- 
                Notifications
    You must be signed in to change notification settings 
- Fork 715
Add MongoDB.Driver v3 client integration package #7034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            2 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
  
    
      
          
            42 changes: 42 additions & 0 deletions
          
          42 
        
  src/Components/Aspire.MongoDB.Driver.v3/Aspire.MongoDB.Driver.v3.csproj
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|  | ||
| <PropertyGroup> | ||
| <TargetFramework>$(DefaultTargetFramework)</TargetFramework> | ||
| <IsPackable>true</IsPackable> | ||
| <PackageTags>$(ComponentDatabasePackageTags) MongoDB</PackageTags> | ||
| <PackageIconFullPath>$(SharedDir)MongoDB_300px.png</PackageIconFullPath> | ||
| <Description>A generic MongoDB client that integrates with Aspire.</Description> | ||
| <MinCodeCoverage>86</MinCodeCoverage> | ||
| <!-- MongoDB.Driver.Core.Extensions.DiagnosticSources is not signed --> | ||
| <NoWarn>$(NoWarn);CS8002</NoWarn> | ||
| <!-- Disable package validation as this package hasn't shipped yet. --> | ||
| <EnablePackageValidation>false</EnablePackageValidation> | ||
|  | ||
| <!-- Keep the same assembly name as the main library. --> | ||
| <AssemblyName>Aspire.MongoDB.Driver</AssemblyName> | ||
| <!-- PackageId defaults to AssemblyName, so need to reset it. --> | ||
| <PackageId>$(MSBuildProjectName)</PackageId> | ||
| </PropertyGroup> | ||
|  | ||
| <ItemGroup> | ||
| <Compile Include="..\Aspire.MongoDB.Driver\AspireMongoDBDriverExtensions.cs" /> | ||
| <Compile Include="..\Aspire.MongoDB.Driver\AssemblyInfo.cs" /> | ||
| <Compile Include="..\Aspire.MongoDB.Driver\MongoDBSettings.cs" /> | ||
| <None Include="..\Aspire.MongoDB.Driver\README.md" Pack="true" PackagePath="\" /> | ||
|  | ||
| <Compile Include="..\Common\ConfigurationSchemaAttributes.cs" Link="ConfigurationSchemaAttributes.cs" /> | ||
| <Compile Include="..\Common\HealthChecksExtensions.cs" Link="HealthChecksExtensions.cs" /> | ||
| <Compile Include="..\Common\ConnectionStringValidation.cs" Link="ConnectionStringValidation.cs" /> | ||
| </ItemGroup> | ||
|  | ||
| <ItemGroup> | ||
| <PackageReference Include="AspNetCore.HealthChecks.MongoDb" /> | ||
| <PackageReference Include="MongoDB.Driver" /> | ||
| <PackageReference Include="Microsoft.Extensions.Configuration.Binder" /> | ||
| <PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" /> | ||
| <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" /> | ||
| <PackageReference Include="MongoDB.Driver.Core.Extensions.DiagnosticSources" /> | ||
| <PackageReference Include="OpenTelemetry.Extensions.Hosting" /> | ||
| </ItemGroup> | ||
|  | ||
| </Project> | 
        
          
  
    
      
          
            63 changes: 63 additions & 0 deletions
          
          63 
        
  src/Components/Aspire.MongoDB.Driver.v3/ConfigurationSchema.json
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| { | ||
| "definitions": { | ||
| "logLevel": { | ||
| "properties": { | ||
| "MongoDB": { | ||
| "$ref": "#/definitions/logLevelThreshold" | ||
| }, | ||
| "MongoDB.Command": { | ||
| "$ref": "#/definitions/logLevelThreshold" | ||
| }, | ||
| "MongoDB.Connection": { | ||
| "$ref": "#/definitions/logLevelThreshold" | ||
| }, | ||
| "MongoDB.Internal": { | ||
| "$ref": "#/definitions/logLevelThreshold" | ||
| }, | ||
| "MongoDB.SDAM": { | ||
| "$ref": "#/definitions/logLevelThreshold" | ||
| }, | ||
| "MongoDB.ServerSelection": { | ||
| "$ref": "#/definitions/logLevelThreshold" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "type": "object", | ||
| "properties": { | ||
| "Aspire": { | ||
| "type": "object", | ||
| "properties": { | ||
| "MongoDB": { | ||
| "type": "object", | ||
| "properties": { | ||
| "Driver": { | ||
| "type": "object", | ||
| "properties": { | ||
| "ConnectionString": { | ||
| "type": "string", | ||
| "description": "Gets or sets the connection string of the MongoDB database to connect to." | ||
| }, | ||
| "DisableHealthChecks": { | ||
| "type": "boolean", | ||
| "description": "Gets or sets a boolean value that indicates whether the MongoDB health check is disabled or not.", | ||
| "default": false | ||
| }, | ||
| "DisableTracing": { | ||
| "type": "boolean", | ||
| "description": "Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.", | ||
| "default": false | ||
| }, | ||
| "HealthCheckTimeout": { | ||
| "type": "integer", | ||
| "description": "Gets or sets a integer value that indicates the MongoDB health check timeout in milliseconds." | ||
| } | ||
| }, | ||
| "description": "Provides the client configuration settings for connecting to a MongoDB database using MongoDB driver." | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #nullable enable | 
        
          
  
    
      
          
            14 changes: 14 additions & 0 deletions
          
          14 
        
  src/Components/Aspire.MongoDB.Driver.v3/PublicAPI.Unshipped.txt
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #nullable enable | ||
| Aspire.MongoDB.Driver.MongoDBSettings | ||
| Aspire.MongoDB.Driver.MongoDBSettings.ConnectionString.get -> string? | ||
| Aspire.MongoDB.Driver.MongoDBSettings.ConnectionString.set -> void | ||
| Aspire.MongoDB.Driver.MongoDBSettings.DisableHealthChecks.get -> bool | ||
| Aspire.MongoDB.Driver.MongoDBSettings.DisableHealthChecks.set -> void | ||
| Aspire.MongoDB.Driver.MongoDBSettings.DisableTracing.get -> bool | ||
| Aspire.MongoDB.Driver.MongoDBSettings.DisableTracing.set -> void | ||
| Aspire.MongoDB.Driver.MongoDBSettings.HealthCheckTimeout.get -> int? | ||
| Aspire.MongoDB.Driver.MongoDBSettings.HealthCheckTimeout.set -> void | ||
| Aspire.MongoDB.Driver.MongoDBSettings.MongoDBSettings() -> void | ||
| Microsoft.Extensions.Hosting.AspireMongoDBDriverExtensions | ||
| static Microsoft.Extensions.Hosting.AspireMongoDBDriverExtensions.AddKeyedMongoDBClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder! builder, string! name, System.Action<Aspire.MongoDB.Driver.MongoDBSettings!>? configureSettings = null, System.Action<MongoDB.Driver.MongoClientSettings!>? configureClientSettings = null) -> void | ||
| static Microsoft.Extensions.Hosting.AspireMongoDBDriverExtensions.AddMongoDBClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder! builder, string! connectionName, System.Action<Aspire.MongoDB.Driver.MongoDBSettings!>? configureSettings = null, System.Action<MongoDB.Driver.MongoClientSettings!>? configureClientSettings = null) -> void | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            22 changes: 22 additions & 0 deletions
          
          22 
        
  tests/Aspire.MongoDB.Driver.v3.Tests/Aspire.MongoDB.Driver.v3.Tests.csproj
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|  | ||
| <PropertyGroup> | ||
| <TargetFramework>$(DefaultTargetFramework)</TargetFramework> | ||
| </PropertyGroup> | ||
|  | ||
| <ItemGroup> | ||
| <None Include="$(RepoRoot)src\Components\Aspire.MongoDB.Driver\ConfigurationSchema.json" CopyToOutputDirectory="PreserveNewest" /> | ||
| <Compile Include="$(RepoRoot)src\Aspire.Hosting.MongoDB\MongoDBContainerImageTags.cs" /> | ||
|  | ||
| <Compile Include="..\Aspire.MongoDB.Driver.Tests\AspireMongoDBDriverExtensionsTests.cs" /> | ||
| <Compile Include="..\Aspire.MongoDB.Driver.Tests\ConformanceTests.cs" /> | ||
| <Compile Include="..\Aspire.MongoDB.Driver.Tests\MongoDbContainerFixture.cs" /> | ||
| <Compile Include="..\Aspire.MongoDB.Driver.Tests\MongoDBDriverPublicApiTests.cs" /> | ||
|  | ||
| <ProjectReference Include="..\..\src\Components\Aspire.MongoDB.Driver.v3\Aspire.MongoDB.Driver.v3.csproj" /> | ||
| <ProjectReference Include="..\Aspire.Components.Common.Tests\Aspire.Components.Common.Tests.csproj" /> | ||
|  | ||
| <PackageReference Include="TestContainers.MongoDb" /> | ||
| </ItemGroup> | ||
|  | ||
| </Project> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.