Refactor code structure for improved readability and maintainability; removed redundant code blocks and optimized function calls.
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled

This commit is contained in:
master
2025-11-20 07:50:52 +02:00
parent 616ec73133
commit 10212d67c0
473 changed files with 316758 additions and 388 deletions

View File

@@ -0,0 +1,5 @@
{
"version": 2,
"contentHash": "JGNK6BanLDEifgkvPLqVFCPus5EDCy416pxf1dxUBRSVd3D9+NB3AvMVX190eXlk5/UXuCxpsQv7jWfNKvppBQ==",
"source": "https://api.nuget.org/v3/index.json"
}

Binary file not shown.

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>MongoDB.Bson</id>
<version>3.5.0</version>
<authors>MongoDB Inc.</authors>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
<icon>packageIcon.png</icon>
<readme>README.md</readme>
<projectUrl>https://www.mongodb.com/docs/drivers/csharp/</projectUrl>
<description>MongoDB's Official Bson Library.</description>
<releaseNotes>https://github.com/mongodb/mongo-csharp-driver/releases/tag/v3.5.0</releaseNotes>
<copyright>Copyright © 2010-present MongoDB Inc.</copyright>
<tags>mongodb mongo nosql bson</tags>
<repository type="git" url="https://github.com/mongodb/mongo-csharp-driver.git" commit="d2ff8abfe42e4a9d6bba6caa2238c51dbbb7497f" />
<dependencies>
<group targetFramework=".NETFramework4.7.2">
<dependency id="System.Memory" version="4.5.5" exclude="Build,Analyzers" />
<dependency id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0">
<dependency id="System.Memory" version="4.5.5" exclude="Build,Analyzers" />
<dependency id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.1">
<dependency id="System.Memory" version="4.5.5" exclude="Build,Analyzers" />
<dependency id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
</package>

View File

@@ -0,0 +1,87 @@
MongoDB C# Driver
=================
[![MongoDB.Driver](https://img.shields.io/nuget/v/MongoDB.Driver.svg)](https://www.nuget.org/packages/MongoDB.Driver/)
[![Documentation](https://img.shields.io/badge/docs-docfx-blue.svg)](https://mongodb.github.io/mongo-csharp-driver/3.4.0/api/index.html)
[![Documentation](https://img.shields.io/badge/docs-mongo-green.svg)](https://www.mongodb.com/docs/drivers/csharp/current/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/mongodb/mongo-csharp-driver/blob/main/LICENSE.md)
The official MongoDB .NET/C# driver.
The MongoDB .NET/C# driver follows [semantic versioning](https://semver.org/) since v3.0.0 of its releases.
Getting Started
---------------
### Untyped Documents
```C#
using MongoDB.Bson;
using MongoDB.Driver;
```
```C#
var client = new MongoClient("mongodb://localhost:27017");
var database = client.GetDatabase("foo");
var collection = database.GetCollection<BsonDocument>("bar");
await collection.InsertOneAsync(new BsonDocument("Name", "Jack"));
var list = await collection.Find(new BsonDocument("Name", "Jack"))
.ToListAsync();
foreach(var document in list)
{
Console.WriteLine(document["Name"]);
}
```
### Typed Documents
```C#
using MongoDB.Bson;
using MongoDB.Driver;
```
```C#
public class Person
{
public ObjectId Id { get; set; }
public string Name { get; set; }
}
```
```C#
var client = new MongoClient("mongodb://localhost:27017");
var database = client.GetDatabase("foo");
var collection = database.GetCollection<Person>("bar");
await collection.InsertOneAsync(new Person { Name = "Jack" });
var list = await collection.Find(x => x.Name == "Jack")
.ToListAsync();
foreach(var person in list)
{
Console.WriteLine(person.Name);
}
```
Documentation
-------------
* [MongoDB](https://www.mongodb.com/docs)
* [.NET/C# Driver](https://www.mongodb.com/docs/drivers/csharp/current/)
* [API Reference](https://mongodb.github.io/mongo-csharp-driver/3.4.0/api/index.html)
Questions/Bug Reports
---------------------
* [MongoDB Community Forum](https://www.mongodb.com/community/forums/tags/c/data/drivers-odms/7/dot-net)
* [Jira](https://jira.mongodb.org/browse/CSHARP)
If youve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the [instructions here](https://www.mongodb.com/docs/manual/tutorial/create-a-vulnerability-report).
Contributing
------------
Please see our [guidelines](CONTRIBUTING.md) for contributing to the driver.
Thank you to [everyone](https://github.com/mongodb/mongo-csharp-driver/graphs/contributors) who has contributed to this project.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
7Ncy+bC/AgpWOKr3ctSzFCRgwwXhhHUfsqMvg8iv2duvjvut5CKJ2KhT4IPaWIb74B7XNfHbgKR13A4upDTJXQ==

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB