diff --git a/.gitignore b/.gitignore index 8b35163..45800c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,68 @@ +#ignore thumbnails created by windows +Thumbs.db +#Ignore files build by Visual Studio +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb *.suo -/MongoDB.Web/obj -/MongoDB.Web/bin \ No newline at end of file +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.lib +*.sbr +obj/ +#Ignore files from extensions +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* +NDependOut +StyleCop.Cache +*.vs10x + +#ignore thumbnails created by windows +Thumbs.db +#Ignore files build by Visual Studio +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.lib +*.sbr +obj/ +#Ignore files from extensions +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* +NDependOut +StyleCop.Cache +*.vs10x +*.docstates +*.dotcover \ No newline at end of file diff --git a/Local.testsettings b/Local.testsettings new file mode 100644 index 0000000..0be6c8d --- /dev/null +++ b/Local.testsettings @@ -0,0 +1,10 @@ + + + These are default test settings for a local test run. + + + + + + + \ No newline at end of file diff --git a/MongoDB.Web.Tests/App.config b/MongoDB.Web.Tests/App.config new file mode 100644 index 0000000..9c5d123 --- /dev/null +++ b/MongoDB.Web.Tests/App.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/MongoDB.Web.Tests/MongoDB.Web.Tests.csproj b/MongoDB.Web.Tests/MongoDB.Web.Tests.csproj new file mode 100644 index 0000000..3d6bc80 --- /dev/null +++ b/MongoDB.Web.Tests/MongoDB.Web.Tests.csproj @@ -0,0 +1,83 @@ + + + + Debug + AnyCPU + + + 2.0 + {76FA6C9A-B60E-47E0-B1E8-4C55AC306136} + Library + Properties + MongoDB.Web.Tests + MongoDB.Web.Tests + v4.0 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\packages\mongocsharpdriver.1.2\lib\net35\MongoDB.Bson.dll + + + ..\packages\mongocsharpdriver.1.2\lib\net35\MongoDB.Driver.dll + + + ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll + + + + + 3.5 + + + + + + + False + + + + + + + + + + + + + + + {90BB8808-E091-463D-AAFD-5134183BDCF7} + MongoDB.Web + + + + + \ No newline at end of file diff --git a/MongoDB.Web.Tests/MongoDBMembershipProviderTests/GetUserXTests.cs b/MongoDB.Web.Tests/MongoDBMembershipProviderTests/GetUserXTests.cs new file mode 100644 index 0000000..4935cea --- /dev/null +++ b/MongoDB.Web.Tests/MongoDBMembershipProviderTests/GetUserXTests.cs @@ -0,0 +1,274 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Configuration.Provider; +using System.Diagnostics; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Web.Security; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MongoDB.Bson; +using MongoDB.Driver; +using MongoDB.Web.Internal; +using MongoDB.Web.Providers; +using Moq; + +namespace MongoDB.Web.Tests.MongoDBMembershipProviderTests +{ + [TestClass] + public class GetUserXTests + { + [TestMethod] + public void When_I_get_a_user_by_name_but_they_are_not_online() + { + var collection = new Mock(MockBehavior.Strict); + var provider = new Mock(MockBehavior.Strict); + + provider.Setup(m => m.GetCollection("mongodb://localhost", "ASPNETDB", "Users")).Returns(() => collection.Object); + collection.Setup(c => c.EnsureIndex(It.IsAny())); + + var membershipProvider = new MongoDBMembershipProvider(provider.Object); + MembershipUtilities.SetDefaultMembershipProvider(membershipProvider); + + string query = null; + + var providerKey = Guid.NewGuid(); + + var userDocument = new BsonDocument((IDictionary) + new Dictionary + { + { "Username", "bob" }, + { "_id", providerKey }, + { "Email", "bob@example.com" }, + { "PasswordQuestion", "MyQuestion" }, + { "Comment", "MyComment" }, + { "IsApproved", true }, + { "IsLockedOut", false }, + { "CreationDate", new DateTime(2000, 1, 1) }, + { "LastLoginDate", new DateTime(2000, 1, 2) }, + { "LastActivityDate", new DateTime(2000, 1, 3) }, + { "LastPasswordChangedDate", new DateTime(2000, 1, 4) }, + { "LastLockoutDate", new DateTime(2000, 1, 5) }, + }); + + collection.Setup(c => c.FindOneAs(It.IsAny())) + .Callback((IMongoQuery q) => query = q.ToJson()) + .Returns(userDocument); + + var user = membershipProvider.GetUser("bob", false); + + Assert.AreEqual("{ \"Username\" : \"bob\" }", query); + + Assert.AreEqual("bob", user.UserName); + Assert.AreEqual(providerKey, (Guid)user.ProviderUserKey); + Assert.AreEqual("bob@example.com", user.Email); + Assert.AreEqual("MyQuestion", user.PasswordQuestion); + Assert.AreEqual("MyComment", user.Comment); + Assert.AreEqual(true, user.IsApproved); + Assert.AreEqual(false, user.IsLockedOut); + Assert.AreEqual(new DateTime(2000, 1, 1), user.CreationDate); + Assert.AreEqual(new DateTime(2000, 1, 2), user.LastLoginDate); + Assert.AreEqual(new DateTime(2000, 1, 3), user.LastActivityDate); + Assert.AreEqual(new DateTime(2000, 1, 4), user.LastPasswordChangedDate); + Assert.AreEqual(new DateTime(2000, 1, 5), user.LastLockoutDate); + } + + [TestMethod] + public void When_I_get_a_user_by_name_and_they_are_online() + { + var collection = new Mock(MockBehavior.Strict); + var provider = new Mock(MockBehavior.Strict); + + provider.Setup(m => m.GetCollection("mongodb://localhost", "ASPNETDB", "Users")).Returns(() => collection.Object); + collection.Setup(c => c.EnsureIndex(It.IsAny())); + + var membershipProvider = new MongoDBMembershipProvider(provider.Object); + MembershipUtilities.SetDefaultMembershipProvider(membershipProvider); + + BsonDocument query = null; + BsonDocument update = null; + + var providerKey = Guid.NewGuid(); + + var userDocument = new BsonDocument((IDictionary) + new Dictionary + { + { "Username", "bob" }, + { "_id", providerKey }, + { "Email", "bob@example.com" }, + { "PasswordQuestion", "MyQuestion" }, + { "Comment", "MyComment" }, + { "IsApproved", true }, + { "IsLockedOut", false }, + { "CreationDate", new DateTime(2000, 1, 1) }, + { "LastLoginDate", new DateTime(2000, 1, 2) }, + { "LastActivityDate", new DateTime(2000, 1, 3) }, + { "LastPasswordChangedDate", new DateTime(2000, 1, 4) }, + { "LastLockoutDate", new DateTime(2000, 1, 5) }, + }); + + collection.Setup(c => c.FindOneAs(It.IsAny())).Returns(userDocument); + + collection.Setup(c => c.Update(It.IsAny(), It.IsAny())) + .Callback((IMongoQuery q, IMongoUpdate u) => + { + query = q.ToBsonDocument(); + update = u.ToBsonDocument(); + }) + .Returns(new SafeModeResult()); + + var user = membershipProvider.GetUser("bob", true); + + Assert.AreEqual("{ \"Username\" : \"bob\" }", query.ToString()); + var lastActivityDateOffset = DateTime.UtcNow - update["$set"].AsBsonDocument["LastActivityDate"].AsDateTime; + Assert.AreEqual(0, lastActivityDateOffset.TotalSeconds, 1); + } + + [TestMethod] + public void When_I_get_a_nonexistant_user_by_name_and_they_are_online() + { + var collection = new Mock(MockBehavior.Strict); + var provider = new Mock(MockBehavior.Strict); + + provider.Setup(m => m.GetCollection("mongodb://localhost", "ASPNETDB", "Users")).Returns(() => collection.Object); + collection.Setup(c => c.EnsureIndex(It.IsAny())); + + var membershipProvider = new MongoDBMembershipProvider(provider.Object); + MembershipUtilities.SetDefaultMembershipProvider(membershipProvider); + + collection.Setup(c => c.FindOneAs(It.IsAny())).Returns(() => null); + + var user = membershipProvider.GetUser("bob", true); + + Assert.IsNull(user); + } + + [TestMethod] + public void When_I_get_a_user_by_id_but_they_are_not_online() + { + var collection = new Mock(MockBehavior.Strict); + var provider = new Mock(MockBehavior.Strict); + + provider.Setup(m => m.GetCollection("mongodb://localhost", "ASPNETDB", "Users")).Returns(() => collection.Object); + collection.Setup(c => c.EnsureIndex(It.IsAny())); + + var membershipProvider = new MongoDBMembershipProvider(provider.Object); + MembershipUtilities.SetDefaultMembershipProvider(membershipProvider); + + string query = null; + + var providerKey = Guid.NewGuid(); + + var userDocument = new BsonDocument((IDictionary) + new Dictionary + { + { "Username", "bob" }, + { "_id", providerKey }, + { "Email", "bob@example.com" }, + { "PasswordQuestion", "MyQuestion" }, + { "Comment", "MyComment" }, + { "IsApproved", true }, + { "IsLockedOut", false }, + { "CreationDate", new DateTime(2000, 1, 1) }, + { "LastLoginDate", new DateTime(2000, 1, 2) }, + { "LastActivityDate", new DateTime(2000, 1, 3) }, + { "LastPasswordChangedDate", new DateTime(2000, 1, 4) }, + { "LastLockoutDate", new DateTime(2000, 1, 5) }, + }); + + collection.Setup(c => c.FindOneAs(It.IsAny())) + .Callback((IMongoQuery q) => query = q.ToJson()) + .Returns(userDocument); + + var user = membershipProvider.GetUser(providerKey, false); + + Assert.AreEqual(string.Format("{{ \"_id\" : CSUUID(\"{0}\") }}", providerKey), query.ToString()); + + Assert.AreEqual("bob", user.UserName); + Assert.AreEqual(providerKey, (Guid)user.ProviderUserKey); + Assert.AreEqual("bob@example.com", user.Email); + Assert.AreEqual("MyQuestion", user.PasswordQuestion); + Assert.AreEqual("MyComment", user.Comment); + Assert.AreEqual(true, user.IsApproved); + Assert.AreEqual(false, user.IsLockedOut); + Assert.AreEqual(new DateTime(2000, 1, 1), user.CreationDate); + Assert.AreEqual(new DateTime(2000, 1, 2), user.LastLoginDate); + Assert.AreEqual(new DateTime(2000, 1, 3), user.LastActivityDate); + Assert.AreEqual(new DateTime(2000, 1, 4), user.LastPasswordChangedDate); + Assert.AreEqual(new DateTime(2000, 1, 5), user.LastLockoutDate); + } + + [TestMethod] + public void When_I_get_a_user_by_id_and_they_are_online() + { + var collection = new Mock(MockBehavior.Strict); + var provider = new Mock(MockBehavior.Strict); + + provider.Setup(m => m.GetCollection("mongodb://localhost", "ASPNETDB", "Users")).Returns(() => collection.Object); + collection.Setup(c => c.EnsureIndex(It.IsAny())); + + var membershipProvider = new MongoDBMembershipProvider(provider.Object); + MembershipUtilities.SetDefaultMembershipProvider(membershipProvider); + + BsonDocument query = null; + BsonDocument update = null; + + var providerKey = Guid.NewGuid(); + + var userDocument = new BsonDocument((IDictionary) + new Dictionary + { + { "Username", "bob" }, + { "_id", providerKey }, + { "Email", "bob@example.com" }, + { "PasswordQuestion", "MyQuestion" }, + { "Comment", "MyComment" }, + { "IsApproved", true }, + { "IsLockedOut", false }, + { "CreationDate", new DateTime(2000, 1, 1) }, + { "LastLoginDate", new DateTime(2000, 1, 2) }, + { "LastActivityDate", new DateTime(2000, 1, 3) }, + { "LastPasswordChangedDate", new DateTime(2000, 1, 4) }, + { "LastLockoutDate", new DateTime(2000, 1, 5) }, + }); + + collection.Setup(c => c.FindOneAs(It.IsAny())).Returns(userDocument); + + collection.Setup(c => c.Update(It.IsAny(), It.IsAny())) + .Callback((IMongoQuery q, IMongoUpdate u) => + { + query = q.ToBsonDocument(); + update = u.ToBsonDocument(); + }) + .Returns(new SafeModeResult()); + + var user = membershipProvider.GetUser(providerKey, true); + + Assert.AreEqual(string.Format("{{ \"_id\" : CSUUID(\"{0}\") }}", providerKey), query.ToString()); + var lastActivityDateOffset = DateTime.UtcNow - update["$set"].AsBsonDocument["LastActivityDate"].AsDateTime; + Assert.AreEqual(0, lastActivityDateOffset.TotalSeconds, 1); + } + + [TestMethod] + public void When_I_get_a_nonexistant_user_by_id_and_they_are_online() + { + var collection = new Mock(MockBehavior.Strict); + var provider = new Mock(MockBehavior.Strict); + + provider.Setup(m => m.GetCollection("mongodb://localhost", "ASPNETDB", "Users")).Returns(() => collection.Object); + collection.Setup(c => c.EnsureIndex(It.IsAny())); + + var membershipProvider = new MongoDBMembershipProvider(provider.Object); + MembershipUtilities.SetDefaultMembershipProvider(membershipProvider); + + var providerKey = Guid.NewGuid(); + + collection.Setup(c => c.FindOneAs(It.IsAny())).Returns(() => null); + + var user = membershipProvider.GetUser(providerKey, true); + + Assert.IsNull(user); + } + } +} diff --git a/MongoDB.Web.Tests/MongoDBMembershipProviderTests/InitializationTests.cs b/MongoDB.Web.Tests/MongoDBMembershipProviderTests/InitializationTests.cs new file mode 100644 index 0000000..de7b37c --- /dev/null +++ b/MongoDB.Web.Tests/MongoDBMembershipProviderTests/InitializationTests.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Configuration.Provider; +using System.Diagnostics; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MongoDB.Driver; +using MongoDB.Web.Internal; +using MongoDB.Web.Providers; +using Moq; + +namespace MongoDB.Web.Tests.MongoDBMembershipProviderTests +{ + [TestClass] + public class InitializationTests + { + [TestMethod] + public void When_I_create_with_no_configuration_options() + { + var collection = new Mock(MockBehavior.Strict); + var provider = new Mock(MockBehavior.Strict); + + provider.Setup(m => m.GetCollection("mongodb://localhost", "ASPNETDB", "Users")).Returns(() => collection.Object); + + collection.Setup(c => c.EnsureIndex(It.IsAny())).Callback((string[] keys) => { Assert.Fail("Tried to create unknown key: {0}", string.Join(", ", keys)); }); + collection.Setup(c => c.EnsureIndex("ApplicationName")); + collection.Setup(c => c.EnsureIndex("ApplicationName", "Email")); + collection.Setup(c => c.EnsureIndex("ApplicationName", "Username")); + + var membershipProvider = new MongoDBMembershipProvider(provider.Object); + var nvc = new NameValueCollection(); + MembershipUtilities.SetDefaultMembershipProvider(membershipProvider, nvc); + + // It should not modify the configuration options + CollectionAssert.AreEquivalent(new object[0], nvc); + + // It should only open the collection once + provider.Verify(m => m.GetCollection("mongodb://localhost", "ASPNETDB", "Users"), Times.Once()); + + // It should create all the needed indexes + collection.Verify(c => c.EnsureIndex("ApplicationName"), Times.Once()); + collection.Verify(c => c.EnsureIndex("ApplicationName", "Email"), Times.Once()); + collection.Verify(c => c.EnsureIndex("ApplicationName", "Username"), Times.Once()); + } + + [TestMethod] + public void When_I_create_with_a_bad_set_of_password_options_it_throws() + { + var provider = new Mock(); + + var membershipProvider = new MongoDBMembershipProvider(provider.Object); + var nvc = new NameValueCollection + { + {"enablePasswordRetrieval", "true"}, + {"passwordFormat", "Hashed"}, + }; + try { + MembershipUtilities.SetDefaultMembershipProvider(membershipProvider, nvc); + Assert.Fail("Did not throw the expected exception."); + } catch (ProviderException exception) { + Assert.AreEqual("Configured settings are invalid: Hashed passwords cannot be retrieved. Either set the password format to different type, or set enablePasswordRetrieval to false.", exception.Message); + } + } + + [TestMethod] + public void When_I_provide_alternate_connection_options() + { + var provider = new Mock(MockBehavior.Strict); + provider.Setup(m => m.GetCollection("mongodb://alternate/?slaveOk=true", "TESTDB", "MyUsers")) + .Returns(() => new Mock().Object); + + var membershipProvider = new MongoDBMembershipProvider(provider.Object); + var nvc = new NameValueCollection + { + {"connectionString", "mongodb://alternate/?slaveOk=true"}, + {"database", "TESTDB"}, + {"collection", "MyUsers"} + }; + MembershipUtilities.SetDefaultMembershipProvider(membershipProvider, nvc); + + provider.Verify(m => m.GetCollection("mongodb://alternate/?slaveOk=true", "TESTDB", "MyUsers"), Times.Once()); + } + } +} diff --git a/MongoDB.Web.Tests/MongoDBMembershipProviderTests/MembershipUtilities.cs b/MongoDB.Web.Tests/MongoDBMembershipProviderTests/MembershipUtilities.cs new file mode 100644 index 0000000..e07cce3 --- /dev/null +++ b/MongoDB.Web.Tests/MongoDBMembershipProviderTests/MembershipUtilities.cs @@ -0,0 +1,27 @@ +using System.Collections.Specialized; +using System.Diagnostics; +using System.Linq; +using System.Reflection; +using System.Web.Security; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MongoDB.Web.Providers; + +namespace MongoDB.Web.Tests +{ + static internal class MembershipUtilities + { + public static void SetDefaultMembershipProvider(MongoDBMembershipProvider membershipProvider, NameValueCollection initializationSettings = null) + { + var testName = new StackTrace(StackTrace.METHODS_TO_SKIP + 1).GetFrames() + .Select(f => f.GetMethod()) + .First(m => m.IsDefined(typeof(TestMethodAttribute), true)) + .Name; + const BindingFlags flags = BindingFlags.Static | BindingFlags.NonPublic; + membershipProvider.Initialize("MongoDBMembershipProvider_" + testName, initializationSettings ?? new NameValueCollection()); + typeof(Membership).GetField("s_Providers", flags).SetValue(null, new MembershipProviderCollection { membershipProvider }); + typeof(Membership).GetField("s_Provider", flags).SetValue(null, membershipProvider); + typeof(Membership).GetField("s_Initialized", flags).SetValue(null, true); + typeof(Membership).GetField("s_InitializedDefaultProvider", flags).SetValue(null, true); + } + } +} \ No newline at end of file diff --git a/MongoDB.Web.Tests/Properties/AssemblyInfo.cs b/MongoDB.Web.Tests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c2f5ad0 --- /dev/null +++ b/MongoDB.Web.Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MongoDB.Web.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Alex Lyman")] +[assembly: AssemblyProduct("MongoDB.Web.Tests")] +[assembly: AssemblyCopyright("Copyright © Alex Lyman 2011")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3f285762-ab9c-46b1-930b-e6749914f070")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MongoDB.Web.Tests/packages.config b/MongoDB.Web.Tests/packages.config new file mode 100644 index 0000000..3ef40ec --- /dev/null +++ b/MongoDB.Web.Tests/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/MongoDB.Web.sln b/MongoDB.Web.sln index 68768de..94ec2b8 100644 --- a/MongoDB.Web.sln +++ b/MongoDB.Web.sln @@ -3,7 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoDB.Web", "MongoDB.Web\MongoDB.Web.csproj", "{90BB8808-E091-463D-AAFD-5134183BDCF7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoDB.Web.Tests", "MongoDB.Web.Tests\MongoDB.Web.Tests.csproj", "{76FA6C9A-B60E-47E0-B1E8-4C55AC306136}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9E8E725F-6C6E-4B3A-83E2-13C6A2790FCB}" + ProjectSection(SolutionItems) = preProject + Local.testsettings = Local.testsettings + MongoDB.Web.vsmdi = MongoDB.Web.vsmdi + TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings + EndProjectSection +EndProject Global + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = MongoDB.Web.vsmdi + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU @@ -13,6 +25,10 @@ Global {90BB8808-E091-463D-AAFD-5134183BDCF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {90BB8808-E091-463D-AAFD-5134183BDCF7}.Release|Any CPU.ActiveCfg = Release|Any CPU {90BB8808-E091-463D-AAFD-5134183BDCF7}.Release|Any CPU.Build.0 = Release|Any CPU + {76FA6C9A-B60E-47E0-B1E8-4C55AC306136}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76FA6C9A-B60E-47E0-B1E8-4C55AC306136}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76FA6C9A-B60E-47E0-B1E8-4C55AC306136}.Release|Any CPU.ActiveCfg = Release|Any CPU + {76FA6C9A-B60E-47E0-B1E8-4C55AC306136}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/MongoDB.Web.vsmdi b/MongoDB.Web.vsmdi new file mode 100644 index 0000000..9303046 --- /dev/null +++ b/MongoDB.Web.vsmdi @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MongoDB.Web/Internal/IMongoConnectionProvider.cs b/MongoDB.Web/Internal/IMongoConnectionProvider.cs new file mode 100644 index 0000000..8135bff --- /dev/null +++ b/MongoDB.Web/Internal/IMongoConnectionProvider.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using MongoDB.Bson; +using MongoDB.Driver; +using MongoDB.Driver.Builders; + +namespace MongoDB.Web.Internal +{ + public interface IMongoConnectionProvider + { + IMongoCollection GetCollection(string connectionString, string database, string collection); + } + + public interface IMongoCollection + { + void EnsureIndex(params string[] keyNames); + long Count(IMongoQuery query); + MongoCursor FindAs(IMongoQuery query); + T FindOneAs(IMongoQuery query); + void Insert(T document); + void InsertBatch(IEnumerable documents); + SafeModeResult Remove(IMongoQuery query); + SafeModeResult Update(IMongoQuery query, IMongoUpdate update); + void Save(BsonDocument document); + } +} \ No newline at end of file diff --git a/MongoDB.Web/Internal/MongoConnectionProvider.cs b/MongoDB.Web/Internal/MongoConnectionProvider.cs new file mode 100644 index 0000000..0bd9ff4 --- /dev/null +++ b/MongoDB.Web/Internal/MongoConnectionProvider.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using MongoDB.Bson; +using MongoDB.Driver; + +namespace MongoDB.Web.Internal +{ + public class MongoConnectionProvider : IMongoConnectionProvider + { + public IMongoCollection GetCollection(string connectionString, string database, string collection) + { + return new WrappedMongoCollection( + MongoServer.Create(connectionString) + .GetDatabase(database) + .GetCollection(collection)); + } + + class WrappedMongoCollection : IMongoCollection + { + private readonly MongoCollection collection; + + public WrappedMongoCollection(MongoCollection collection) + { + this.collection = collection; + } + + public long Count(IMongoQuery query) + { + return this.collection.Count(query); + } + + public void EnsureIndex(params string[] keyNames) + { + collection.EnsureIndex(keyNames); + } + + public MongoCursor FindAs(IMongoQuery query) + { + return collection.FindAs(query); + } + + public T FindOneAs(IMongoQuery query) + { + return collection.FindOneAs(query); + } + + public void Insert(T document) + { + collection.Insert(document); + } + + public void InsertBatch(IEnumerable documents) + { + collection.InsertBatch(documents); + } + + public SafeModeResult Remove(IMongoQuery query) + { + return collection.Remove(query); + } + + public SafeModeResult Update(IMongoQuery query, IMongoUpdate update) + { + return collection.Update(query, update); + } + + public void Save(BsonDocument document) + { + collection.Save(document); + } + } + } +} \ No newline at end of file diff --git a/MongoDB.Web/MongoDB.Web.csproj b/MongoDB.Web/MongoDB.Web.csproj index f4223a6..ca8586f 100644 --- a/MongoDB.Web/MongoDB.Web.csproj +++ b/MongoDB.Web/MongoDB.Web.csproj @@ -1,67 +1,69 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {90BB8808-E091-463D-AAFD-5134183BDCF7} - Library - Properties - MongoDB.Web - MongoDB.Web - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - ..\packages\mongocsharpdriver.1.2\lib\net35\MongoDB.Bson.dll - - - ..\packages\mongocsharpdriver.1.2\lib\net35\MongoDB.Driver.dll - - - - - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {90BB8808-E091-463D-AAFD-5134183BDCF7} + Library + Properties + MongoDB.Web + MongoDB.Web + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + ..\packages\mongocsharpdriver.1.2\lib\net35\MongoDB.Bson.dll + + + ..\packages\mongocsharpdriver.1.2\lib\net35\MongoDB.Driver.dll + + + + + + + + + --> \ No newline at end of file diff --git a/MongoDB.Web/Providers/MongoDBMembershipProvider.cs b/MongoDB.Web/Providers/MongoDBMembershipProvider.cs index 5768b42..a8daf21 100644 --- a/MongoDB.Web/Providers/MongoDBMembershipProvider.cs +++ b/MongoDB.Web/Providers/MongoDBMembershipProvider.cs @@ -8,6 +8,7 @@ using MongoDB.Bson; using MongoDB.Driver; using MongoDB.Driver.Builders; +using MongoDB.Web.Internal; namespace MongoDB.Web.Providers { @@ -18,12 +19,20 @@ public class MongoDBMembershipProvider : MembershipProvider private int maxInvalidPasswordAttempts; private int minRequiredNonAlphanumericCharacters; private int minRequiredPasswordLength; - private MongoCollection mongoCollection; + private IMongoCollection mongoCollection; private int passwordAttemptWindow; private MembershipPasswordFormat passwordFormat; private string passwordStrengthRegularExpression; private bool requiresQuestionAndAnswer; private bool requiresUniqueEmail; + private readonly IMongoConnectionProvider provider; + + public MongoDBMembershipProvider() : this(new MongoConnectionProvider()) { } + + public MongoDBMembershipProvider(IMongoConnectionProvider provider) + { + this.provider = provider; + } public override string ApplicationName { get; set; } @@ -341,8 +350,10 @@ public override void Initialize(string name, NameValueCollection config) { throw new ProviderException("Configured settings are invalid: Hashed passwords cannot be retrieved. Either set the password format to different type, or set enablePasswordRetrieval to false."); } - - this.mongoCollection = MongoServer.Create(config["connectionString"] ?? "mongodb://localhost").GetDatabase(config["database"] ?? "ASPNETDB").GetCollection(config["collection"] ?? "Users"); + this.mongoCollection = provider.GetCollection( + connectionString: config["connectionString"] ?? "mongodb://localhost", + database: config["database"] ?? "ASPNETDB", + collection: config["collection"] ?? "Users"); this.mongoCollection.EnsureIndex("ApplicationName"); this.mongoCollection.EnsureIndex("ApplicationName", "Email"); this.mongoCollection.EnsureIndex("ApplicationName", "Username"); diff --git a/MongoDB.Web/Providers/MongoDBOutputCacheProvider.cs b/MongoDB.Web/Providers/MongoDBOutputCacheProvider.cs index 1967772..3fb733c 100644 --- a/MongoDB.Web/Providers/MongoDBOutputCacheProvider.cs +++ b/MongoDB.Web/Providers/MongoDBOutputCacheProvider.cs @@ -5,12 +5,21 @@ using MongoDB.Bson; using MongoDB.Driver; using MongoDB.Driver.Builders; +using MongoDB.Web.Internal; namespace MongoDB.Web.Providers { public class MongoDBOutputCacheProvider : System.Web.Caching.OutputCacheProvider { - private MongoCollection mongoCollection; + private IMongoCollection mongoCollection; + private readonly IMongoConnectionProvider provider; + + public MongoDBOutputCacheProvider() : this(new MongoConnectionProvider()) { } + + public MongoDBOutputCacheProvider(IMongoConnectionProvider provider) + { + this.provider = provider; + } public override object Add(string key, object entry, DateTime utcExpiry) { @@ -41,7 +50,10 @@ public override object Get(string key) public override void Initialize(string name, NameValueCollection config) { - this.mongoCollection = MongoServer.Create(config["connectionString"] ?? "mongodb://localhost").GetDatabase(config["database"] ?? "ASPNETDB").GetCollection(config["collection"] ?? "OutputCache"); + this.mongoCollection = provider.GetCollection( + connectionString: config["connectionString"] ?? "mongodb://localhost", + database: config["database"] ?? "ASPNETDB", + collection: config["collection"] ?? "OutputCache"); this.mongoCollection.EnsureIndex("Key"); base.Initialize(name, config); } @@ -68,4 +80,4 @@ public override void Set(string key, object entry, DateTime utcExpiry) } } } -} \ No newline at end of file +} diff --git a/MongoDB.Web/Providers/MongoDBProfileProvider.cs b/MongoDB.Web/Providers/MongoDBProfileProvider.cs index 9306530..b571150 100644 --- a/MongoDB.Web/Providers/MongoDBProfileProvider.cs +++ b/MongoDB.Web/Providers/MongoDBProfileProvider.cs @@ -8,12 +8,21 @@ using MongoDB.Bson; using MongoDB.Driver; using MongoDB.Driver.Builders; +using MongoDB.Web.Internal; namespace MongoDB.Web.Providers { public class MongoDBProfileProvider : ProfileProvider { - private MongoCollection mongoCollection; + private IMongoCollection mongoCollection; + private readonly IMongoConnectionProvider provider; + + public MongoDBProfileProvider() : this(new MongoConnectionProvider()) { } + + public MongoDBProfileProvider(IMongoConnectionProvider provider) + { + this.provider = provider; + } public override string ApplicationName { get; set; } @@ -31,7 +40,7 @@ public override int DeleteInactiveProfiles(ProfileAuthenticationOption authentic public override int DeleteProfiles(string[] usernames) { - var query = Query.And(Query.EQ("ApplicationName", this.ApplicationName), Query.In("Username", new BsonArray(usernames))); + var query = Query.And(Query.EQ("ApplicationName", this.ApplicationName), Query.In("Username", new BsonArray(usernames))); return ( int )this.mongoCollection.Remove( query ).DocumentsAffected; } @@ -62,7 +71,7 @@ public override ProfileInfoCollection GetAllProfiles(ProfileAuthenticationOption public override int GetNumberOfInactiveProfiles(ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate) { - var query = GetQuery(authenticationOption, null, userInactiveSinceDate); + var query = GetQuery(authenticationOption, null, userInactiveSinceDate); return ( int )this.mongoCollection.Count( query ); } @@ -110,7 +119,10 @@ public override void Initialize(string name, NameValueCollection config) { this.ApplicationName = config["applicationName"] ?? HostingEnvironment.ApplicationVirtualPath; - this.mongoCollection = MongoServer.Create(config["connectionString"] ?? "mongodb://localhost").GetDatabase(config["database"] ?? "ASPNETDB").GetCollection(config["collection"] ?? "Profiles"); + this.mongoCollection = provider.GetCollection( + connectionString: config["connectionString"] ?? "mongodb://localhost", + database: config["database"] ?? "ASPNETDB", + collection: config["collection"] ?? "Profiles"); this.mongoCollection.EnsureIndex("ApplicationName"); this.mongoCollection.EnsureIndex("ApplicationName", "IsAnonymous"); this.mongoCollection.EnsureIndex("ApplicationName", "IsAnonymous", "LastActivityDate"); @@ -178,8 +190,8 @@ public override void SetPropertyValues(SettingsContext context, SettingsProperty private ProfileInfoCollection GetProfiles(ProfileAuthenticationOption authenticationOption, string usernameToMatch, DateTime? userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords) { - var query = GetQuery(authenticationOption, usernameToMatch, userInactiveSinceDate); - + var query = GetQuery(authenticationOption, usernameToMatch, userInactiveSinceDate); + totalRecords = ( int )this.mongoCollection.Count( query ); var profileInfoCollection = new ProfileInfoCollection(); diff --git a/MongoDB.Web/Providers/MongoDBRoleProvider.cs b/MongoDB.Web/Providers/MongoDBRoleProvider.cs index 4d44123..d44ba91 100644 --- a/MongoDB.Web/Providers/MongoDBRoleProvider.cs +++ b/MongoDB.Web/Providers/MongoDBRoleProvider.cs @@ -7,13 +7,22 @@ using MongoDB.Bson; using MongoDB.Driver; using MongoDB.Driver.Builders; +using MongoDB.Web.Internal; namespace MongoDB.Web.Providers { public class MongoDBRoleProvider : RoleProvider { - private MongoCollection rolesMongoCollection; - private MongoCollection usersInRolesMongoCollection; + private IMongoCollection rolesMongoCollection; + private IMongoCollection usersInRolesMongoCollection; + private readonly IMongoConnectionProvider provider; + + public MongoDBRoleProvider() : this(new MongoConnectionProvider()) { } + + public MongoDBRoleProvider(IMongoConnectionProvider provider) + { + this.provider = provider; + } public override string ApplicationName { get; set; } @@ -127,9 +136,15 @@ public override void Initialize(string name, NameValueCollection config) { this.ApplicationName = config["applicationName"] ?? HostingEnvironment.ApplicationVirtualPath; - var mongoDatabase = MongoServer.Create(config["connectionString"] ?? "mongodb://localhost").GetDatabase(config["database"] ?? "ASPNETDB"); - this.rolesMongoCollection = mongoDatabase.GetCollection(config["collection"] ?? "Roles"); - this.usersInRolesMongoCollection = mongoDatabase.GetCollection("UsersInRoles"); + this.rolesMongoCollection = provider.GetCollection( + connectionString: config["connectionString"] ?? "mongodb://localhost", + database: config["database"] ?? "ASPNETDB", + collection: config["collection"] ?? "Roles"); + + this.usersInRolesMongoCollection = provider.GetCollection( + connectionString: config["connectionString"] ?? "mongodb://localhost", + database: config["database"] ?? "ASPNETDB", + collection: config["usersInRolesCollection"] ?? "UsersInRoles"); this.rolesMongoCollection.EnsureIndex("ApplicationName"); this.rolesMongoCollection.EnsureIndex("ApplicationName", "Role"); diff --git a/MongoDB.Web/Providers/MongoDBSessionStateProvider.cs b/MongoDB.Web/Providers/MongoDBSessionStateProvider.cs index c7be7cc..b484968 100644 --- a/MongoDB.Web/Providers/MongoDBSessionStateProvider.cs +++ b/MongoDB.Web/Providers/MongoDBSessionStateProvider.cs @@ -8,13 +8,22 @@ using MongoDB.Bson; using MongoDB.Driver; using MongoDB.Driver.Builders; +using MongoDB.Web.Internal; namespace MongoDB.Web.Providers { public class MongoDBSessionStateProvider : SessionStateStoreProviderBase { - private MongoCollection mongoCollection; + private IMongoCollection mongoCollection; private SessionStateSection sessionStateSection; + private readonly IMongoConnectionProvider provider; + + public MongoDBSessionStateProvider() : this(new MongoConnectionProvider()) { } + + public MongoDBSessionStateProvider(IMongoConnectionProvider provider) + { + this.provider = provider; + } public override SessionStateStoreData CreateNewStoreData(HttpContext context, int timeout) { @@ -49,7 +58,10 @@ public override void Initialize(string name, NameValueCollection config) var configuration = WebConfigurationManager.OpenWebConfiguration(HostingEnvironment.ApplicationVirtualPath); this.sessionStateSection = configuration.GetSection("system.web/sessionState") as SessionStateSection; - this.mongoCollection = MongoServer.Create(config["connectionString"] ?? "mongodb://localhost").GetDatabase(config["database"] ?? "ASPNETDB").GetCollection(config["collection"] ?? "SessionState"); + this.mongoCollection = provider.GetCollection( + connectionString: config["connectionString"] ?? "mongodb://localhost", + database: config["database"] ?? "ASPNETDB", + collection: config["collection"] ?? "SessionState"); this.mongoCollection.EnsureIndex("applicationVirtualPath", "id"); this.mongoCollection.EnsureIndex("applicationVirtualPath", "id", "lockId"); @@ -189,4 +201,4 @@ private SessionStateStoreData GetSessionStateStoreData(bool exclusive, HttpConte #endregion } -} \ No newline at end of file +} diff --git a/MongoDB.Web/Providers/MongoDBWebEventProvider.cs b/MongoDB.Web/Providers/MongoDBWebEventProvider.cs index e6b143d..4cf0a3b 100644 --- a/MongoDB.Web/Providers/MongoDBWebEventProvider.cs +++ b/MongoDB.Web/Providers/MongoDBWebEventProvider.cs @@ -2,16 +2,28 @@ using System.Linq; using System.Web.Management; using MongoDB.Driver; +using MongoDB.Web.Internal; namespace MongoDB.Web.Providers { public class MongoDBWebEventProvider : BufferedWebEventProvider { - private MongoCollection mongoCollection; + private IMongoCollection mongoCollection; + private readonly IMongoConnectionProvider provider; + + public MongoDBWebEventProvider() : this(new MongoConnectionProvider()) { } + + public MongoDBWebEventProvider(IMongoConnectionProvider provider) + { + this.provider = provider; + } public override void Initialize(string name, NameValueCollection config) { - this.mongoCollection = MongoServer.Create(config["connectionString"] ?? "mongodb://localhost").GetDatabase(config["database"] ?? "ASPNETDB").GetCollection(config["collection"] ?? "WebEvents"); + this.mongoCollection = provider.GetCollection( + connectionString: config["connectionString"] ?? "mongodb://localhost", + database: config["database"] ?? "ASPNETDB", + collection: config["collection"] ?? "WebEvent"); config.Remove("collection"); config.Remove("connectionString"); diff --git a/README.markdown b/README.markdown index b66047a..c95486f 100644 --- a/README.markdown +++ b/README.markdown @@ -54,8 +54,8 @@ To use MongoDB.Web, add the providers you're interested in to your Web.config fi - - \ No newline at end of file + diff --git a/TraceAndTestImpact.testsettings b/TraceAndTestImpact.testsettings new file mode 100644 index 0000000..1633467 --- /dev/null +++ b/TraceAndTestImpact.testsettings @@ -0,0 +1,9 @@ + + + These are test settings for Trace and Test Impact. + + + + + + \ No newline at end of file diff --git a/packages/Moq.4.0.10827/License.txt b/packages/Moq.4.0.10827/License.txt new file mode 100644 index 0000000..fb36f92 --- /dev/null +++ b/packages/Moq.4.0.10827/License.txt @@ -0,0 +1,39 @@ +Copyright (c) 2007. Clarius Consulting, Manas Technology Solutions, InSTEDD +http://code.google.com/p/moq/ +All rights reserved. + +Redistribution and use in source and binary forms, +with or without modification, are permitted provided +that the following conditions are met: + + * Redistributions of source code must retain the + above copyright notice, this list of conditions and + the following disclaimer. + + * Redistributions in binary form must reproduce + the above copyright notice, this list of conditions + and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Clarius Consulting, Manas Technology Solutions or InSTEDD nor the + names of its contributors may be used to endorse + or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +[This is the BSD license, see + http://www.opensource.org/licenses/bsd-license.php] \ No newline at end of file diff --git a/packages/Moq.4.0.10827/Moq.4.0.10827.nupkg b/packages/Moq.4.0.10827/Moq.4.0.10827.nupkg new file mode 100644 index 0000000..91e88a4 Binary files /dev/null and b/packages/Moq.4.0.10827/Moq.4.0.10827.nupkg differ diff --git a/packages/Moq.4.0.10827/Moq.chm b/packages/Moq.4.0.10827/Moq.chm new file mode 100644 index 0000000..f5779bb Binary files /dev/null and b/packages/Moq.4.0.10827/Moq.chm differ diff --git a/packages/Moq.4.0.10827/lib/NET35/Moq.dll b/packages/Moq.4.0.10827/lib/NET35/Moq.dll new file mode 100644 index 0000000..3d3b8cc Binary files /dev/null and b/packages/Moq.4.0.10827/lib/NET35/Moq.dll differ diff --git a/packages/Moq.4.0.10827/lib/NET35/Moq.xml b/packages/Moq.4.0.10827/lib/NET35/Moq.xml new file mode 100644 index 0000000..a0be31c --- /dev/null +++ b/packages/Moq.4.0.10827/lib/NET35/Moq.xml @@ -0,0 +1,5768 @@ + + + + Moq + + + + + Implements the fluent API. + + + + + The expectation will be considered only in the former condition. + + + + + + + The expectation will be considered only in the former condition. + + + + + + + + Setups the get. + + The type of the property. + The expression. + + + + + Setups the set. + + The type of the property. + The setter expression. + + + + + Setups the set. + + The setter expression. + + + + + Defines the Callback verb and overloads. + + + + + Helper interface used to hide the base + members from the fluent API to make it much cleaner + in Visual Studio intellisense. + + + + + + + + + + + + + + + + + Specifies a callback to invoke when the method is called. + + The callback method to invoke. + + The following example specifies a callback to set a boolean + value that can be used later: + + var called = false; + mock.Setup(x => x.Execute()) + .Callback(() => called = true); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The argument type of the invoked method. + The callback method to invoke. + + Invokes the given callback with the concrete invocation argument value. + + Notice how the specific string argument is retrieved by simply declaring + it as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Callback((string command) => Console.WriteLine(command)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2) => Console.WriteLine(arg1 + arg2)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3) => Console.WriteLine(arg1 + arg2 + arg3)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); + + + + + + Defines the Callback verb and overloads for callbacks on + setups that return a value. + + Mocked type. + Type of the return value of the setup. + + + + Specifies a callback to invoke when the method is called. + + The callback method to invoke. + + The following example specifies a callback to set a boolean value that can be used later: + + var called = false; + mock.Setup(x => x.Execute()) + .Callback(() => called = true) + .Returns(true); + + Note that in the case of value-returning methods, after the Callback + call you can still specify the return value. + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the argument of the invoked method. + Callback method to invoke. + + Invokes the given callback with the concrete invocation argument value. + + Notice how the specific string argument is retrieved by simply declaring + it as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Callback(command => Console.WriteLine(command)) + .Returns(true); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2) => Console.WriteLine(arg1 + arg2)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3) => Console.WriteLine(arg1 + arg2 + arg3)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); + + + + + + Defines the Raises verb. + + + + + Specifies the event that will be raised + when the setup is met. + + An expression that represents an event attach or detach action. + The event arguments to pass for the raised event. + + The following example shows how to raise an event when + the setup is met: + + var mock = new Mock<IContainer>(); + + mock.Setup(add => add.Add(It.IsAny<string>(), It.IsAny<object>())) + .Raises(add => add.Added += null, EventArgs.Empty); + + + + + + Specifies the event that will be raised + when the setup is matched. + + An expression that represents an event attach or detach action. + A function that will build the + to pass when raising the event. + + + + + Specifies the custom event that will be raised + when the setup is matched. + + An expression that represents an event attach or detach action. + The arguments to pass to the custom delegate (non EventHandler-compatible). + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + The type of the fifteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + The type of the fifteenth argument received by the expected invocation. + The type of the sixteenth argument received by the expected invocation. + + + + + Defines the Returns verb. + + Mocked type. + Type of the return value from the expression. + + + + Specifies the value to return. + + The value to return, or . + + Return a true value from the method call: + + mock.Setup(x => x.Execute("ping")) + .Returns(true); + + + + + + Specifies a function that will calculate the value to return from the method. + + The function that will calculate the return value. + + Return a calculated value when the method is called: + + mock.Setup(x => x.Execute("ping")) + .Returns(() => returnValues[0]); + + The lambda expression to retrieve the return value is lazy-executed, + meaning that its value may change depending on the moment the method + is executed and the value the returnValues array has at + that moment. + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the argument of the invoked method. + The function that will calculate the return value. + + Return a calculated value which is evaluated lazily at the time of the invocation. + + The lookup list can change between invocations and the setup + will return different values accordingly. Also, notice how the specific + string argument is retrieved by simply declaring it as part of the lambda + expression: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Returns((string command) => returnValues[command]); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2) => arg1 + arg2); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3) => arg1 + arg2 + arg3); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4) => arg1 + arg2 + arg3 + arg4); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5) => arg1 + arg2 + arg3 + arg4 + arg5); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16); + + + + + + Language for ReturnSequence + + + + + Returns value + + + + + Throws an exception + + + + + Throws an exception + + + + + The first method call or member access will be the + last segment of the expression (depth-first traversal), + which is the one we have to Setup rather than FluentMock. + And the last one is the one we have to Mock.Get rather + than FluentMock. + + + + + Base class for mocks and static helper class with methods that + apply to mocked objects, such as to + retrieve a from an object instance. + + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the specification of how the mocked object should behave. + The type of the mocked object. + The mocked object created. + + + + Initializes a new instance of the class. + + + + + Retrieves the mock object for the given object instance. + + Type of the mock to retrieve. Can be omitted as it's inferred + from the object instance passed in as the instance. + The instance of the mocked object.The mock associated with the mocked object. + The received instance + was not created by Moq. + + The following example shows how to add a new setup to an object + instance which is not the original but rather + the object associated with it: + + // Typed instance, not the mock, is retrieved from some test API. + HttpContextBase context = GetMockContext(); + + // context.Request is the typed object from the "real" API + // so in order to add a setup to it, we need to get + // the mock that "owns" it + Mock<HttpRequestBase> request = Mock.Get(context.Request); + mock.Setup(req => req.AppRelativeCurrentExecutionFilePath) + .Returns(tempUrl); + + + + + + Returns the mocked object value. + + + + + Verifies that all verifiable expectations have been met. + + This example sets up an expectation and marks it as verifiable. After + the mock is used, a Verify() call is issued on the mock + to ensure the method in the setup was invoked: + + var mock = new Mock<IWarehouse>(); + this.Setup(x => x.HasInventory(TALISKER, 50)).Verifiable().Returns(true); + ... + // other test code + ... + // Will throw if the test code has didn't call HasInventory. + this.Verify(); + + Not all verifiable expectations were met. + + + + Verifies all expectations regardless of whether they have + been flagged as verifiable. + + This example sets up an expectation without marking it as verifiable. After + the mock is used, a call is issued on the mock + to ensure that all expectations are met: + + var mock = new Mock<IWarehouse>(); + this.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); + ... + // other test code + ... + // Will throw if the test code has didn't call HasInventory, even + // that expectation was not marked as verifiable. + this.VerifyAll(); + + At least one expectation was not met. + + + + Gets the interceptor target for the given expression and root mock, + building the intermediate hierarchy of mock objects if necessary. + + + + + Raises the associated event with the given + event argument data. + + + + + Raises the associated event with the given + event argument data. + + + + + Adds an interface implementation to the mock, + allowing setups to be specified for it. + + This method can only be called before the first use + of the mock property, at which + point the runtime type has already been generated + and no more interfaces can be added to it. + + Also, must be an + interface and not a class, which must be specified + when creating the mock instead. + + + The mock type + has already been generated by accessing the property. + + The specified + is not an interface. + + The following example creates a mock for the main interface + and later adds to it to verify + it's called by the consumer code: + + var mock = new Mock<IProcessor>(); + mock.Setup(x => x.Execute("ping")); + + // add IDisposable interface + var disposable = mock.As<IDisposable>(); + disposable.Setup(d => d.Dispose()).Verifiable(); + + Type of interface to cast the mock to. + + + + + + + Behavior of the mock, according to the value set in the constructor. + + + + + Whether the base member virtual implementation will be called + for mocked classes if no setup is matched. Defaults to . + + + + + Specifies the behavior to use when returning default values for + unexpected invocations on loose mocks. + + + + + Gets the mocked object instance. + + + + + Retrieves the type of the mocked object, its generic type argument. + This is used in the auto-mocking of hierarchy access. + + + + + Specifies the class that will determine the default + value to return when invocations are made that + have no setups and need to return a default + value (for loose mocks). + + + + + Exposes the list of extra interfaces implemented by the mock. + + + + + Utility repository class to use to construct multiple + mocks when consistent verification is + desired for all of them. + + + If multiple mocks will be created during a test, passing + the desired (if different than the + or the one + passed to the repository constructor) and later verifying each + mock can become repetitive and tedious. + + This repository class helps in that scenario by providing a + simplified creation of multiple mocks with a default + (unless overriden by calling + ) and posterior verification. + + + + The following is a straightforward example on how to + create and automatically verify strict mocks using a : + + var repository = new MockRepository(MockBehavior.Strict); + + var foo = repository.Create<IFoo>(); + var bar = repository.Create<IBar>(); + + // no need to call Verifiable() on the setup + // as we'll be validating all of them anyway. + foo.Setup(f => f.Do()); + bar.Setup(b => b.Redo()); + + // exercise the mocks here + + repository.VerifyAll(); + // At this point all setups are already checked + // and an optional MockException might be thrown. + // Note also that because the mocks are strict, any invocation + // that doesn't have a matching setup will also throw a MockException. + + The following examples shows how to setup the repository + to create loose mocks and later verify only verifiable setups: + + var repository = new MockRepository(MockBehavior.Loose); + + var foo = repository.Create<IFoo>(); + var bar = repository.Create<IBar>(); + + // this setup will be verified when we verify the repository + foo.Setup(f => f.Do()).Verifiable(); + + // this setup will NOT be verified + foo.Setup(f => f.Calculate()); + + // this setup will be verified when we verify the repository + bar.Setup(b => b.Redo()).Verifiable(); + + // exercise the mocks here + // note that because the mocks are Loose, members + // called in the interfaces for which no matching + // setups exist will NOT throw exceptions, + // and will rather return default values. + + repository.Verify(); + // At this point verifiable setups are already checked + // and an optional MockException might be thrown. + + The following examples shows how to setup the repository with a + default strict behavior, overriding that default for a + specific mock: + + var repository = new MockRepository(MockBehavior.Strict); + + // this particular one we want loose + var foo = repository.Create<IFoo>(MockBehavior.Loose); + var bar = repository.Create<IBar>(); + + // specify setups + + // exercise the mocks here + + repository.Verify(); + + + + + + + Utility factory class to use to construct multiple + mocks when consistent verification is + desired for all of them. + + + If multiple mocks will be created during a test, passing + the desired (if different than the + or the one + passed to the factory constructor) and later verifying each + mock can become repetitive and tedious. + + This factory class helps in that scenario by providing a + simplified creation of multiple mocks with a default + (unless overriden by calling + ) and posterior verification. + + + + The following is a straightforward example on how to + create and automatically verify strict mocks using a : + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(); + var bar = factory.Create<IBar>(); + + // no need to call Verifiable() on the setup + // as we'll be validating all of them anyway. + foo.Setup(f => f.Do()); + bar.Setup(b => b.Redo()); + + // exercise the mocks here + + factory.VerifyAll(); + // At this point all setups are already checked + // and an optional MockException might be thrown. + // Note also that because the mocks are strict, any invocation + // that doesn't have a matching setup will also throw a MockException. + + The following examples shows how to setup the factory + to create loose mocks and later verify only verifiable setups: + + var factory = new MockFactory(MockBehavior.Loose); + + var foo = factory.Create<IFoo>(); + var bar = factory.Create<IBar>(); + + // this setup will be verified when we verify the factory + foo.Setup(f => f.Do()).Verifiable(); + + // this setup will NOT be verified + foo.Setup(f => f.Calculate()); + + // this setup will be verified when we verify the factory + bar.Setup(b => b.Redo()).Verifiable(); + + // exercise the mocks here + // note that because the mocks are Loose, members + // called in the interfaces for which no matching + // setups exist will NOT throw exceptions, + // and will rather return default values. + + factory.Verify(); + // At this point verifiable setups are already checked + // and an optional MockException might be thrown. + + The following examples shows how to setup the factory with a + default strict behavior, overriding that default for a + specific mock: + + var factory = new MockFactory(MockBehavior.Strict); + + // this particular one we want loose + var foo = factory.Create<IFoo>(MockBehavior.Loose); + var bar = factory.Create<IBar>(); + + // specify setups + + // exercise the mocks here + + factory.Verify(); + + + + + + + Initializes the factory with the given + for newly created mocks from the factory. + + The behavior to use for mocks created + using the factory method if not overriden + by using the overload. + + + + Creates a new mock with the default + specified at factory construction time. + + Type to mock. + A new . + + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(); + // use mock on tests + + factory.VerifyAll(); + + + + + + Creates a new mock with the default + specified at factory construction time and with the + the given constructor arguments for the class. + + + The mock will try to find the best match constructor given the + constructor arguments, and invoke that to initialize the instance. + This applies only to classes, not interfaces. + + Type to mock. + Constructor arguments for mocked classes. + A new . + + + var factory = new MockFactory(MockBehavior.Default); + + var mock = factory.Create<MyBase>("Foo", 25, true); + // use mock on tests + + factory.Verify(); + + + + + + Creates a new mock with the given . + + Type to mock. + Behavior to use for the mock, which overrides + the default behavior specified at factory construction time. + A new . + + The following example shows how to create a mock with a different + behavior to that specified as the default for the factory: + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(MockBehavior.Loose); + + + + + + Creates a new mock with the given + and with the the given constructor arguments for the class. + + + The mock will try to find the best match constructor given the + constructor arguments, and invoke that to initialize the instance. + This applies only to classes, not interfaces. + + Type to mock. + Behavior to use for the mock, which overrides + the default behavior specified at factory construction time. + Constructor arguments for mocked classes. + A new . + + The following example shows how to create a mock with a different + behavior to that specified as the default for the factory, passing + constructor arguments: + + var factory = new MockFactory(MockBehavior.Default); + + var mock = factory.Create<MyBase>(MockBehavior.Strict, "Foo", 25, true); + + + + + + Implements creation of a new mock within the factory. + + Type to mock. + The behavior for the new mock. + Optional arguments for the construction of the mock. + + + + Verifies all verifiable expectations on all mocks created + by this factory. + + + One or more mocks had expectations that were not satisfied. + + + + Verifies all verifiable expectations on all mocks created + by this factory. + + + One or more mocks had expectations that were not satisfied. + + + + Invokes for each mock + in , and accumulates the resulting + that might be + thrown from the action. + + The action to execute against + each mock. + + + + Whether the base member virtual implementation will be called + for mocked classes if no setup is matched. Defaults to . + + + + + Specifies the behavior to use when returning default values for + unexpected invocations on loose mocks. + + + + + Gets the mocks that have been created by this factory and + that will get verified together. + + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The type of the mocked object to query. + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The predicate with the setup expressions. + The type of the mocked object to query. + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the setup expressions. + The type of the mocked object. + The mocked object created. + + + + Creates the mock query with the underlying queriable implementation. + + + + + Wraps the enumerator inside a queryable. + + + + + Method that is turned into the actual call from .Query{T}, to + transform the queryable query into a normal enumerable query. + This method is never used directly by consumers. + + + + + Initializes the repository with the given + for newly created mocks from the repository. + + The behavior to use for mocks created + using the repository method if not overriden + by using the overload. + + + + A that returns an empty default value + for invocations that do not have setups or return values, with loose mocks. + This is the default behavior for a mock. + + + + + Interface to be implemented by classes that determine the + default value of non-expected invocations. + + + + + Defines the default value to return in all the methods returning . + The type of the return value.The value to set as default. + + + + Provides a value for the given member and arguments. + + The member to provide a default value for. + + + + + The intention of is to create a more readable + string representation for the failure message. + + + + + Implements the fluent API. + + + + + Defines the Throws verb. + + + + + Specifies the exception to throw when the method is invoked. + + Exception instance to throw. + + This example shows how to throw an exception when the method is + invoked with an empty string argument: + + mock.Setup(x => x.Execute("")) + .Throws(new ArgumentException()); + + + + + + Specifies the type of exception to throw when the method is invoked. + + Type of exception to instantiate and throw when the setup is matched. + + This example shows how to throw an exception when the method is + invoked with an empty string argument: + + mock.Setup(x => x.Execute("")) + .Throws<ArgumentException>(); + + + + + + Implements the fluent API. + + + + + Defines occurrence members to constraint setups. + + + + + The expected invocation can happen at most once. + + + + var mock = new Mock<ICommand>(); + mock.Setup(foo => foo.Execute("ping")) + .AtMostOnce(); + + + + + + The expected invocation can happen at most specified number of times. + + The number of times to accept calls. + + + var mock = new Mock<ICommand>(); + mock.Setup(foo => foo.Execute("ping")) + .AtMost( 5 ); + + + + + + Defines the Verifiable verb. + + + + + Marks the expectation as verifiable, meaning that a call + to will check if this particular + expectation was met. + + + The following example marks the expectation as verifiable: + + mock.Expect(x => x.Execute("ping")) + .Returns(true) + .Verifiable(); + + + + + + Marks the expectation as verifiable, meaning that a call + to will check if this particular + expectation was met, and specifies a message for failures. + + + The following example marks the expectation as verifiable: + + mock.Expect(x => x.Execute("ping")) + .Returns(true) + .Verifiable("Ping should be executed always!"); + + + + + + Implements the fluent API. + + + + + We need this non-generics base class so that + we can use from + generic code. + + + + + Implements the fluent API. + + + + + Implements the fluent API. + + + + + Implements the fluent API. + + + + + Defines the Callback verb for property getter setups. + + + Mocked type. + Type of the property. + + + + Specifies a callback to invoke when the property is retrieved. + + Callback method to invoke. + + Invokes the given callback with the property value being set. + + mock.SetupGet(x => x.Suspended) + .Callback(() => called = true) + .Returns(true); + + + + + + Implements the fluent API. + + + + + Defines the Returns verb for property get setups. + + Mocked type. + Type of the property. + + + + Specifies the value to return. + + The value to return, or . + + Return a true value from the property getter call: + + mock.SetupGet(x => x.Suspended) + .Returns(true); + + + + + + Specifies a function that will calculate the value to return for the property. + + The function that will calculate the return value. + + Return a calculated value when the property is retrieved: + + mock.SetupGet(x => x.Suspended) + .Returns(() => returnValues[0]); + + The lambda expression to retrieve the return value is lazy-executed, + meaning that its value may change depending on the moment the property + is retrieved and the value the returnValues array has at + that moment. + + + + + Implements the fluent API. + + + + + Encapsulates a method that has five parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has five parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has six parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has six parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has seven parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has seven parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has eight parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has eight parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has nine parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has nine parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has ten parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has ten parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has eleven parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has eleven parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has twelve parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has twelve parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has thirteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has thirteen parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has fourteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has fourteen parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has fifteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has fifteen parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has sixteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The type of the sixteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + The sixteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that has sixteen parameters and returns a value of the type specified by the parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the nineth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The type of the sixteenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The nineth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + The sixteenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Helper class to setup a full trace between many mocks + + + + + Initialize a trace setup + + + + + Allow sequence to be repeated + + + + + define nice api + + + + + Perform an expectation in the trace. + + + + + Marks a method as a matcher, which allows complete replacement + of the built-in class with your own argument + matching rules. + + + This feature has been deprecated in favor of the new + and simpler . + + + The argument matching is used to determine whether a concrete + invocation in the mock matches a given setup. This + matching mechanism is fully extensible. + + + There are two parts of a matcher: the compiler matcher + and the runtime matcher. + + + Compiler matcher + Used to satisfy the compiler requirements for the + argument. Needs to be a method optionally receiving any arguments + you might need for the matching, but with a return type that + matches that of the argument. + + Let's say I want to match a lists of orders that contains + a particular one. I might create a compiler matcher like the following: + + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return null; + } + } + + Now we can invoke this static method instead of an argument in an + invocation: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + Note that the return value from the compiler matcher is irrelevant. + This method will never be called, and is just used to satisfy the + compiler and to signal Moq that this is not a method that we want + to be invoked at runtime. + + + + Runtime matcher + + The runtime matcher is the one that will actually perform evaluation + when the test is run, and is defined by convention to have the + same signature as the compiler matcher, but where the return + value is the first argument to the call, which contains the + object received by the actual invocation at runtime: + + public static bool Contains(IEnumerable<Order> orders, Order order) + { + return orders.Contains(order); + } + + At runtime, the mocked method will be invoked with a specific + list of orders. This value will be passed to this runtime + matcher as the first argument, while the second argument is the + one specified in the setup (x.Save(Orders.Contains(order))). + + The boolean returned determines whether the given argument has been + matched. If all arguments to the expected method are matched, then + the setup matches and is evaluated. + + + + + + Using this extensible infrastructure, you can easily replace the entire + set of matchers with your own. You can also avoid the + typical (and annoying) lengthy expressions that result when you have + multiple arguments that use generics. + + + The following is the complete example explained above: + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return null; + } + + public static bool Contains(IEnumerable<Order> orders, Order order) + { + return orders.Contains(order); + } + } + + And the concrete test using this matcher: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + // use mock, invoke Save, and have the matcher filter. + + + + + + Provides a mock implementation of . + + Any interface type can be used for mocking, but for classes, only abstract and virtual members can be mocked. + + The behavior of the mock with regards to the setups and the actual calls is determined + by the optional that can be passed to the + constructor. + + Type to mock, which can be an interface or a class. + The following example shows establishing setups with specific values + for method invocations: + + // Arrange + var order = new Order(TALISKER, 50); + var mock = new Mock<IWarehouse>(); + + mock.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); + + // Act + order.Fill(mock.Object); + + // Assert + Assert.True(order.IsFilled); + + The following example shows how to use the class + to specify conditions for arguments instead of specific values: + + // Arrange + var order = new Order(TALISKER, 50); + var mock = new Mock<IWarehouse>(); + + // shows how to expect a value within a range + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsInRange(0, 100, Range.Inclusive))) + .Returns(false); + + // shows how to throw for unexpected calls. + mock.Setup(x => x.Remove( + It.IsAny<string>(), + It.IsAny<int>())) + .Throws(new InvalidOperationException()); + + // Act + order.Fill(mock.Object); + + // Assert + Assert.False(order.IsFilled); + + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Ctor invoked by AsTInterface exclusively. + + + + + Initializes an instance of the mock with default behavior. + + var mock = new Mock<IFormatProvider>(); + + + + + Initializes an instance of the mock with default behavior and with + the given constructor arguments for the class. (Only valid when is a class) + + The mock will try to find the best match constructor given the constructor arguments, and invoke that + to initialize the instance. This applies only for classes, not interfaces. + + var mock = new Mock<MyProvider>(someArgument, 25); + Optional constructor arguments if the mocked type is a class. + + + + Initializes an instance of the mock with the specified behavior. + + var mock = new Mock<IFormatProvider>(MockBehavior.Relaxed); + Behavior of the mock. + + + + Initializes an instance of the mock with a specific behavior with + the given constructor arguments for the class. + + The mock will try to find the best match constructor given the constructor arguments, and invoke that + to initialize the instance. This applies only to classes, not interfaces. + + var mock = new Mock<MyProvider>(someArgument, 25); + Behavior of the mock.Optional constructor arguments if the mocked type is a class. + + + + Returns the mocked object value. + + + + + Specifies a setup on the mocked type for a call to + to a void method. + + If more than one setup is specified for the same method or property, + the latest one wins and is the one that will be executed. + Lambda expression that specifies the expected method invocation. + + var mock = new Mock<IProcessor>(); + mock.Setup(x => x.Execute("ping")); + + + + + + Specifies a setup on the mocked type for a call to + to a value returning method. + Type of the return value. Typically omitted as it can be inferred from the expression. + If more than one setup is specified for the same method or property, + the latest one wins and is the one that will be executed. + Lambda expression that specifies the method invocation. + + mock.Setup(x => x.HasInventory("Talisker", 50)).Returns(true); + + + + + + Specifies a setup on the mocked type for a call to + to a property getter. + + If more than one setup is set for the same property getter, + the latest one wins and is the one that will be executed. + Type of the property. Typically omitted as it can be inferred from the expression.Lambda expression that specifies the property getter. + + mock.SetupGet(x => x.Suspended) + .Returns(true); + + + + + + Specifies a setup on the mocked type for a call to + to a property setter. + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + + This overloads allows the use of a callback already + typed for the property type. + + Type of the property. Typically omitted as it can be inferred from the expression.The Lambda expression that sets a property to a value. + + mock.SetupSet(x => x.Suspended = true); + + + + + + Specifies a setup on the mocked type for a call to + to a property setter. + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + Lambda expression that sets a property to a value. + + mock.SetupSet(x => x.Suspended = true); + + + + + + Specifies that the given property should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. (this is also + known as "stubbing"). + + Type of the property, inferred from the property + expression (does not need to be specified). + Property expression to stub. + If you have an interface with an int property Value, you might + stub it using the following straightforward call: + + var mock = new Mock<IHaveValue>(); + mock.Stub(v => v.Value); + + After the Stub call has been issued, setting and + retrieving the object value will behave as expected: + + IHaveValue v = mock.Object; + + v.Value = 5; + Assert.Equal(5, v.Value); + + + + + + Specifies that the given property should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. This overload + allows setting the initial value for the property. (this is also + known as "stubbing"). + + Type of the property, inferred from the property + expression (does not need to be specified). + Property expression to stub.Initial value for the property. + If you have an interface with an int property Value, you might + stub it using the following straightforward call: + + var mock = new Mock<IHaveValue>(); + mock.SetupProperty(v => v.Value, 5); + + After the SetupProperty call has been issued, setting and + retrieving the object value will behave as expected: + + IHaveValue v = mock.Object; + // Initial value was stored + Assert.Equal(5, v.Value); + + // New value set which changes the initial value + v.Value = 6; + Assert.Equal(6, v.Value); + + + + + + Specifies that the all properties on the mock should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. (this is also + known as "stubbing"). The default value for each property will be the + one generated as specified by the property for the mock. + + If the mock is set to , + the mocked default values will also get all properties setup recursively. + + + + + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IProcessor>(); + // exercise mock + //... + // Will throw if the test code didn't call Execute with a "ping" string argument. + mock.Verify(proc => proc.Execute("ping")); + + The invocation was not performed on the mock.Expression to verify. + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called. + + + + Verifies that a specific invocation matching the given expression was performed on the mock, + specifying a failure error message. Use in conjuntion with the default + . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IProcessor>(); + // exercise mock + //... + // Will throw if the test code didn't call Execute with a "ping" string argument. + mock.Verify(proc => proc.Execute("ping")); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + + + + Verifies that a specific invocation matching the given expression was performed on the mock, + specifying a failure error message. Use in conjuntion with the default + . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails. + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't call HasInventory. + mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50)); + + The invocation was not performed on the mock.Expression to verify.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock. Use in conjuntion + with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock, specifying a failure + error message. + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't call HasInventory. + mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50), "When filling orders, inventory has to be checked"); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock, specifying a failure + error message. + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails.Type of return value from the expression. + + + + Verifies that a property was read on the mock. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was retrieved from it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't retrieve the IsClosed property. + mock.VerifyGet(warehouse => warehouse.IsClosed); + + The invocation was not performed on the mock.Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock, specifying a failure + error message. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was retrieved from it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't retrieve the IsClosed property. + mock.VerifyGet(warehouse => warehouse.IsClosed); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock, specifying a failure + error message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was set on the mock. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was set on it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed = true); + + The invocation was not performed on the mock.Expression to verify. + + + + Verifies that a property was set on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + + + + Verifies that a property was set on the mock, specifying + a failure message. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was set on it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed = true, "Warehouse should always be closed after the action"); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + + + + Verifies that a property was set on the mock, specifying + a failure message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + + + + Raises the event referenced in using + the given argument. + + The argument is + invalid for the target event invocation, or the is + not an event attach or detach expression. + + The following example shows how to raise a event: + + var mock = new Mock<IViewModel>(); + + mock.Raise(x => x.PropertyChanged -= null, new PropertyChangedEventArgs("Name")); + + + This example shows how to invoke an event with a custom event arguments + class in a view that will cause its corresponding presenter to + react by changing its state: + + var mockView = new Mock<IOrdersView>(); + var presenter = new OrdersPresenter(mockView.Object); + + // Check that the presenter has no selection by default + Assert.Null(presenter.SelectedOrder); + + // Raise the event with a specific arguments data + mockView.Raise(v => v.SelectionChanged += null, new OrderEventArgs { Order = new Order("moq", 500) }); + + // Now the presenter reacted to the event, and we have a selected order + Assert.NotNull(presenter.SelectedOrder); + Assert.Equal("moq", presenter.SelectedOrder.ProductName); + + + + + + Raises the event referenced in using + the given argument for a non-EventHandler typed event. + + The arguments are + invalid for the target event invocation, or the is + not an event attach or detach expression. + + The following example shows how to raise a custom event that does not adhere to + the standard EventHandler: + + var mock = new Mock<IViewModel>(); + + mock.Raise(x => x.MyEvent -= null, "Name", bool, 25); + + + + + + Exposes the mocked object instance. + + + + + Provides legacy API members as extensions so that + existing code continues to compile, but new code + doesn't see then. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Provides additional methods on mocks. + + + Provided as extension methods as they confuse the compiler + with the overloads taking Action. + + + + + Specifies a setup on the mocked type for a call to + to a property setter, regardless of its value. + + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + + Type of the property. Typically omitted as it can be inferred from the expression. + Type of the mock. + The target mock for the setup. + Lambda expression that specifies the property setter. + + + mock.SetupSet(x => x.Suspended); + + + + This method is not legacy, but must be on an extension method to avoid + confusing the compiler with the new Action syntax. + + + + + Verifies that a property has been set on the mock, regarless of its value. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + Expression to verify. + The mock instance. + Mocked type. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, specifying a failure + error message. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + Expression to verify. + Message to show if verification fails. + The mock instance. + Mocked type. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, regardless + of the value but only the specified number of times. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + The invocation was not call the times specified by + . + The mock instance. + Mocked type. + The number of times a method is allowed to be called. + Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, regardless + of the value but only the specified number of times, and specifying a failure + error message. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + The invocation was not call the times specified by + . + The mock instance. + Mocked type. + The number of times a method is allowed to be called. + Message to show if verification fails. + Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Helper for sequencing return values in the same method. + + + + + Return a sequence of values, once per call. + + + + + Casts the expression to a lambda expression, removing + a cast if there's any. + + + + + Casts the body of the lambda expression to a . + + If the body is not a method call. + + + + Converts the body of the lambda expression into the referenced by it. + + + + + Checks whether the body of the lambda expression is a property access. + + + + + Checks whether the expression is a property access. + + + + + Checks whether the body of the lambda expression is a property indexer, which is true + when the expression is an whose + has + equal to . + + + + + Checks whether the expression is a property indexer, which is true + when the expression is an whose + has + equal to . + + + + + Creates an expression that casts the given expression to the + type. + + + + + TODO: remove this code when https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331583 + is fixed. + + + + + Provides partial evaluation of subtrees, whenever they can be evaluated locally. + + Matt Warren: http://blogs.msdn.com/mattwar + Documented by InSTEDD: http://www.instedd.org + + + + Performs evaluation and replacement of independent sub-trees + + The root of the expression tree. + A function that decides whether a given expression + node can be part of the local function. + A new tree with sub-trees evaluated and replaced. + + + + Performs evaluation and replacement of independent sub-trees + + The root of the expression tree. + A new tree with sub-trees evaluated and replaced. + + + + Evaluates and replaces sub-trees when first candidate is reached (top-down) + + + + + Performs bottom-up analysis to determine which nodes can possibly + be part of an evaluated sub-tree. + + + + + Ensures the given is not null. + Throws otherwise. + + + + + Ensures the given string is not null or empty. + Throws in the first case, or + in the latter. + + + + + Checks an argument to ensure it is in the specified range including the edges. + + Type of the argument to check, it must be an type. + + The expression containing the name of the argument. + The argument value to check. + The minimun allowed value for the argument. + The maximun allowed value for the argument. + + + + Checks an argument to ensure it is in the specified range excluding the edges. + + Type of the argument to check, it must be an type. + + The expression containing the name of the argument. + The argument value to check. + The minimun allowed value for the argument. + The maximun allowed value for the argument. + + + + Implemented by all generated mock object instances. + + + + + Implemented by all generated mock object instances. + + + + + Reference the Mock that contains this as the mock.Object value. + + + + + Reference the Mock that contains this as the mock.Object value. + + + + + Implements the actual interception and method invocation for + all mocks. + + + + + Get an eventInfo for a given event name. Search type ancestors depth first if necessary. + + Name of the event, with the set_ or get_ prefix already removed + + + + Given a type return all of its ancestors, both types and interfaces. + + The type to find immediate ancestors of + + + + Implements the fluent API. + + + + + Defines the Callback verb for property setter setups. + + Type of the property. + + + + Specifies a callback to invoke when the property is set that receives the + property value being set. + + Callback method to invoke. + + Invokes the given callback with the property value being set. + + mock.SetupSet(x => x.Suspended) + .Callback((bool state) => Console.WriteLine(state)); + + + + + + Allows the specification of a matching condition for an + argument in a method invocation, rather than a specific + argument value. "It" refers to the argument being matched. + + This class allows the setup to match a method invocation + with an arbitrary value, with a value in a specified range, or + even one that matches a given predicate. + + + + + Matches any value of the given type. + + Typically used when the actual argument value for a method + call is not relevant. + + + // Throws an exception for a call to Remove with any string value. + mock.Setup(x => x.Remove(It.IsAny<string>())).Throws(new InvalidOperationException()); + + Type of the value. + + + + Matches any value that satisfies the given predicate. + Type of the argument to check.The predicate used to match the method argument. + Allows the specification of a predicate to perform matching + of method call arguments. + + This example shows how to return the value 1 whenever the argument to the + Do method is an even number. + + mock.Setup(x => x.Do(It.Is<int>(i => i % 2 == 0))) + .Returns(1); + + This example shows how to throw an exception if the argument to the + method is a negative number: + + mock.Setup(x => x.GetUser(It.Is<int>(i => i < 0))) + .Throws(new ArgumentException()); + + + + + + Matches any value that is in the range specified. + Type of the argument to check.The lower bound of the range.The upper bound of the range. + The kind of range. See . + + The following example shows how to expect a method call + with an integer argument within the 0..100 range. + + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsInRange(0, 100, Range.Inclusive))) + .Returns(false); + + + + + + Matches a string argument if it matches the given regular expression pattern. + The pattern to use to match the string argument value. + The following example shows how to expect a call to a method where the + string argument matches the given regular expression: + + mock.Setup(x => x.Check(It.IsRegex("[a-z]+"))).Returns(1); + + + + + + Matches a string argument if it matches the given regular expression pattern. + The pattern to use to match the string argument value.The options used to interpret the pattern. + The following example shows how to expect a call to a method where the + string argument matches the given regular expression, in a case insensitive way: + + mock.Setup(x => x.Check(It.IsRegex("[a-z]+", RegexOptions.IgnoreCase))).Returns(1); + + + + + + Matcher to treat static functions as matchers. + + mock.Setup(x => x.StringMethod(A.MagicString())); + + public static class A + { + [Matcher] + public static string MagicString() { return null; } + public static bool MagicString(string arg) + { + return arg == "magic"; + } + } + + Will succeed if: mock.Object.StringMethod("magic"); + and fail with any other call. + + + + + Options to customize the behavior of the mock. + + + + + Causes the mock to always throw + an exception for invocations that don't have a + corresponding setup. + + + + + Will never throw exceptions, returning default + values when necessary (null for reference types, + zero for value types or empty enumerables and arrays). + + + + + Default mock behavior, which equals . + + + + + Exception thrown by mocks when setups are not matched, + the mock is not properly setup, etc. + + + A distinct exception type is provided so that exceptions + thrown by the mock can be differentiated in tests that + expect other exceptions to be thrown (i.e. ArgumentException). + + Richer exception hierarchy/types are not provided as + tests typically should not catch or expect exceptions + from the mocks. These are typically the result of changes + in the tested class or its collaborators implementation, and + result in fixes in the mock setup so that they dissapear and + allow the test to pass. + + + + + + Supports the serialization infrastructure. + + Serialization information. + Streaming context. + + + + Supports the serialization infrastructure. + + Serialization information. + Streaming context. + + + + Made internal as it's of no use for + consumers, but it's important for + our own tests. + + + + + Used by the mock factory to accumulate verification + failures. + + + + + Supports the serialization infrastructure. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Mock type has already been initialized by accessing its Object property. Adding interfaces must be done before that.. + + + + + Looks up a localized string similar to Value cannot be an empty string.. + + + + + Looks up a localized string similar to Can only add interfaces to the mock.. + + + + + Looks up a localized string similar to Can't set return value for void method {0}.. + + + + + Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks.. + + + + + Looks up a localized string similar to A matching constructor for the given arguments was not found on the mocked type.. + + + + + Looks up a localized string similar to Could not locate event for attach or detach method {0}.. + + + + + Looks up a localized string similar to Expression {0} involves a field access, which is not supported. Use properties instead.. + + + + + Looks up a localized string similar to Type to mock must be an interface or an abstract or non-sealed class. . + + + + + Looks up a localized string similar to Cannot retrieve a mock with the given object type {0} as it's not the main type of the mock or any of its additional interfaces. + Please cast the argument to one of the supported types: {1}. + Remember that there's no generics covariance in the CLR, so your object must be one of these types in order for the call to succeed.. + + + + + Looks up a localized string similar to The equals ("==" or "=" in VB) and the conditional 'and' ("&&" or "AndAlso" in VB) operators are the only ones supported in the query specification expression. Unsupported expression: {0}. + + + + + Looks up a localized string similar to LINQ method '{0}' not supported.. + + + + + Looks up a localized string similar to Expression contains a call to a method which is not virtual (overridable in VB) or abstract. Unsupported expression: {0}. + + + + + Looks up a localized string similar to Member {0}.{1} does not exist.. + + + + + Looks up a localized string similar to Method {0}.{1} is public. Use strong-typed Expect overload instead: + mock.Setup(x => x.{1}()); + . + + + + + Looks up a localized string similar to {0} invocation failed with mock behavior {1}. + {2}. + + + + + Looks up a localized string similar to Expected only {0} calls to {1}.. + + + + + Looks up a localized string similar to Expected only one call to {0}.. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at least {2} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at least once, but was never performed: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at most {3} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at most once, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock between {2} and {3} times (Exclusive), but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock between {2} and {3} times (Inclusive), but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock exactly {2} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock should never have been performed, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock once, but was {4} times: {1}. + + + + + Looks up a localized string similar to All invocations on the mock must have a corresponding setup.. + + + + + Looks up a localized string similar to Object instance was not created by Moq.. + + + + + Looks up a localized string similar to Out expression must evaluate to a constant value.. + + + + + Looks up a localized string similar to Property {0}.{1} does not have a getter.. + + + + + Looks up a localized string similar to Property {0}.{1} does not exist.. + + + + + Looks up a localized string similar to Property {0}.{1} is write-only.. + + + + + Looks up a localized string similar to Property {0}.{1} is read-only.. + + + + + Looks up a localized string similar to Property {0}.{1} does not have a setter.. + + + + + Looks up a localized string similar to Cannot raise a mocked event unless it has been associated (attached) to a concrete event in a mocked object.. + + + + + Looks up a localized string similar to Ref expression must evaluate to a constant value.. + + + + + Looks up a localized string similar to Invocation needs to return a value and therefore must have a corresponding setup that provides it.. + + + + + Looks up a localized string similar to A lambda expression is expected as the argument to It.Is<T>.. + + + + + Looks up a localized string similar to Invocation {0} should not have been made.. + + + + + Looks up a localized string similar to Expression is not a method invocation: {0}. + + + + + Looks up a localized string similar to Expression is not a property access: {0}. + + + + + Looks up a localized string similar to Expression is not a property setter invocation.. + + + + + Looks up a localized string similar to Expression references a method that does not belong to the mocked object: {0}. + + + + + Looks up a localized string similar to Invalid setup on a non-virtual (overridable in VB) member: {0}. + + + + + Looks up a localized string similar to Type {0} does not implement required interface {1}. + + + + + Looks up a localized string similar to Type {0} does not from required type {1}. + + + + + Looks up a localized string similar to To specify a setup for public property {0}.{1}, use the typed overloads, such as: + mock.Setup(x => x.{1}).Returns(value); + mock.SetupGet(x => x.{1}).Returns(value); //equivalent to previous one + mock.SetupSet(x => x.{1}).Callback(callbackDelegate); + . + + + + + Looks up a localized string similar to Unsupported expression: {0}. + + + + + Looks up a localized string similar to Only property accesses are supported in intermediate invocations on a setup. Unsupported expression {0}.. + + + + + Looks up a localized string similar to Expression contains intermediate property access {0}.{1} which is of type {2} and cannot be mocked. Unsupported expression {3}.. + + + + + Looks up a localized string similar to Setter expression cannot use argument matchers that receive parameters.. + + + + + Looks up a localized string similar to Member {0} is not supported for protected mocking.. + + + + + Looks up a localized string similar to Setter expression can only use static custom matchers.. + + + + + Looks up a localized string similar to The following setups were not matched: + {0}. + + + + + Looks up a localized string similar to Invalid verify on a non-virtual (overridable in VB) member: {0}. + + + + + Allows setups to be specified for protected members by using their + name as a string, rather than strong-typing them which is not possible + due to their visibility. + + + + + Specifies a setup for a void method invocation with the given + , optionally specifying arguments for the method call. + + The name of the void method to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + + + + Specifies a setup for an invocation on a property or a non void method with the given + , optionally specifying arguments for the method call. + + The name of the method or property to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + The return type of the method or property. + + + + Specifies a setup for an invocation on a property getter with the given + . + + The name of the property. + The type of the property. + + + + Specifies a setup for an invocation on a property setter with the given + . + + The name of the property. + The property value. If argument matchers are used, + remember to use rather than . + The type of the property. + + + + Specifies a verify for a void method with the given , + optionally specifying arguments for the method call. Use in conjuntion with the default + . + + The invocation was not call the times specified by + . + The name of the void method to be verified. + The number of times a method is allowed to be called. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + + + + Specifies a verify for an invocation on a property or a non void method with the given + , optionally specifying arguments for the method call. + + The invocation was not call the times specified by + . + The name of the method or property to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + The number of times a method is allowed to be called. + The type of return value from the expression. + + + + Specifies a verify for an invocation on a property getter with the given + . + The invocation was not call the times specified by + . + + The name of the property. + The number of times a method is allowed to be called. + The type of the property. + + + + Specifies a setup for an invocation on a property setter with the given + . + + The invocation was not call the times specified by + . + The name of the property. + The number of times a method is allowed to be called. + The property value. + The type of the property. If argument matchers are used, + remember to use rather than . + + + + Allows the specification of a matching condition for an + argument in a protected member setup, rather than a specific + argument value. "ItExpr" refers to the argument being matched. + + + Use this variant of argument matching instead of + for protected setups. + This class allows the setup to match a method invocation + with an arbitrary value, with a value in a specified range, or + even one that matches a given predicate, or null. + + + + + Matches a null value of the given type. + + + Required for protected mocks as the null value cannot be used + directly as it prevents proper method overload selection. + + + + // Throws an exception for a call to Remove with a null string value. + mock.Protected() + .Setup("Remove", ItExpr.IsNull<string>()) + .Throws(new InvalidOperationException()); + + + Type of the value. + + + + Matches any value of the given type. + + + Typically used when the actual argument value for a method + call is not relevant. + + + + // Throws an exception for a call to Remove with any string value. + mock.Protected() + .Setup("Remove", ItExpr.IsAny<string>()) + .Throws(new InvalidOperationException()); + + + Type of the value. + + + + Matches any value that satisfies the given predicate. + + Type of the argument to check. + The predicate used to match the method argument. + + Allows the specification of a predicate to perform matching + of method call arguments. + + + This example shows how to return the value 1 whenever the argument to the + Do method is an even number. + + mock.Protected() + .Setup("Do", ItExpr.Is<int>(i => i % 2 == 0)) + .Returns(1); + + This example shows how to throw an exception if the argument to the + method is a negative number: + + mock.Protected() + .Setup("GetUser", ItExpr.Is<int>(i => i < 0)) + .Throws(new ArgumentException()); + + + + + + Matches any value that is in the range specified. + + Type of the argument to check. + The lower bound of the range. + The upper bound of the range. + The kind of range. See . + + The following example shows how to expect a method call + with an integer argument within the 0..100 range. + + mock.Protected() + .Setup("HasInventory", + ItExpr.IsAny<string>(), + ItExpr.IsInRange(0, 100, Range.Inclusive)) + .Returns(false); + + + + + + Matches a string argument if it matches the given regular expression pattern. + + The pattern to use to match the string argument value. + + The following example shows how to expect a call to a method where the + string argument matches the given regular expression: + + mock.Protected() + .Setup("Check", ItExpr.IsRegex("[a-z]+")) + .Returns(1); + + + + + + Matches a string argument if it matches the given regular expression pattern. + + The pattern to use to match the string argument value. + The options used to interpret the pattern. + + The following example shows how to expect a call to a method where the + string argument matches the given regular expression, in a case insensitive way: + + mock.Protected() + .Setup("Check", ItExpr.IsRegex("[a-z]+", RegexOptions.IgnoreCase)) + .Returns(1); + + + + + + Enables the Protected() method on , + allowing setups to be set for protected members by using their + name as a string, rather than strong-typing them which is not possible + due to their visibility. + + + + + Enable protected setups for the mock. + + Mocked object type. Typically omitted as it can be inferred from the mock instance. + The mock to set the protected setups on. + + + + + + + + + + + + Kind of range to use in a filter specified through + . + + + + + The range includes the to and + from values. + + + + + The range does not include the to and + from values. + + + + + Determines the way default values are generated + calculated for loose mocks. + + + + + Default behavior, which generates empty values for + value types (i.e. default(int)), empty array and + enumerables, and nulls for all other reference types. + + + + + Whenever the default value generated by + is null, replaces this value with a mock (if the type + can be mocked). + + + For sealed classes, a null value will be generated. + + + + + A default implementation of IQueryable for use with QueryProvider + + + + + The is a + static method that returns an IQueryable of Mocks of T which is used to + apply the linq specification to. + + + + + Allows creation custom value matchers that can be used on setups and verification, + completely replacing the built-in class with your own argument + matching rules. + + See also . + + + + + Provided for the sole purpose of rendering the delegate passed to the + matcher constructor if no friendly render lambda is provided. + + + + + Initializes the match with the condition that + will be checked in order to match invocation + values. + The condition to match against actual values. + + + + + + + + + This method is used to set an expression as the last matcher invoked, + which is used in the SetupSet to allow matchers in the prop = value + delegate expression. This delegate is executed in "fluent" mode in + order to capture the value being set, and construct the corresponding + methodcall. + This is also used in the MatcherFactory for each argument expression. + This method ensures that when we execute the delegate, we + also track the matcher that was invoked, so that when we create the + methodcall we build the expression using it, rather than the null/default + value returned from the actual invocation. + + + + + Allows creation custom value matchers that can be used on setups and verification, + completely replacing the built-in class with your own argument + matching rules. + Type of the value to match. + The argument matching is used to determine whether a concrete + invocation in the mock matches a given setup. This + matching mechanism is fully extensible. + + Creating a custom matcher is straightforward. You just need to create a method + that returns a value from a call to with + your matching condition and optional friendly render expression: + + [Matcher] + public Order IsBigOrder() + { + return Match<Order>.Create( + o => o.GrandTotal >= 5000, + /* a friendly expression to render on failures */ + () => IsBigOrder()); + } + + This method can be used in any mock setup invocation: + + mock.Setup(m => m.Submit(IsBigOrder()).Throws<UnauthorizedAccessException>(); + + At runtime, Moq knows that the return value was a matcher (note that the method MUST be + annotated with the [Matcher] attribute in order to determine this) and + evaluates your predicate with the actual value passed into your predicate. + + Another example might be a case where you want to match a lists of orders + that contains a particular one. You might create matcher like the following: + + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return Match<IEnumerable<Order>>.Create(orders => orders.Contains(order)); + } + } + + Now we can invoke this static method instead of an argument in an + invocation: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + + + + + Tracks the current mock and interception context. + + + + + Having an active fluent mock context means that the invocation + is being performed in "trial" mode, just to gather the + target method and arguments that need to be matched later + when the actual invocation is made. + + + + + A that returns an empty default value + for non-mockeable types, and mocks for all other types (interfaces and + non-sealed classes) that can be mocked. + + + + + Allows querying the universe of mocks for those that behave + according to the LINQ query specification. + + + This entry-point into Linq to Mocks is the only one in the root Moq + namespace to ease discovery. But to get all the mocking extension + methods on Object, a using of Moq.Linq must be done, so that the + polluting of the intellisense for all objects is an explicit opt-in. + + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The type of the mocked object to query. + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The predicate with the setup expressions. + The type of the mocked object to query. + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the setup expressions. + The type of the mocked object. + The mocked object created. + + + + Creates the mock query with the underlying queriable implementation. + + + + + Wraps the enumerator inside a queryable. + + + + + Method that is turned into the actual call from .Query{T}, to + transform the queryable query into a normal enumerable query. + This method is never used directly by consumers. + + + + + Extension method used to support Linq-like setup properties that are not virtual but do have + a getter and a setter, thereby allowing the use of Linq to Mocks to quickly initialize Dtos too :) + + + + + Helper extensions that are used by the query translator. + + + + + Retrieves a fluent mock from the given setup expression. + + + + + Defines the number of invocations allowed by a mocked method. + + + + + Specifies that a mocked method should be invoked times as minimum. + The minimun number of times.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked one time as minimum. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked time as maximun. + The maximun number of times.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked one time as maximun. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked between and + times. + The minimun number of times.The maximun number of times. + The kind of range. See . + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked exactly times. + The times that a method or property can be called.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should not be invoked. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked exactly one time. + An object defining the allowed number of invocations. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Determines whether two specified objects have the same value. + + The first . + + The second . + + true if the value of left is the same as the value of right; otherwise, false. + + + + + Determines whether two specified objects have different values. + + The first . + + The second . + + true if the value of left is different from the value of right; otherwise, false. + + + + diff --git a/packages/Moq.4.0.10827/lib/NET40/Moq.dll b/packages/Moq.4.0.10827/lib/NET40/Moq.dll new file mode 100644 index 0000000..3a3e653 Binary files /dev/null and b/packages/Moq.4.0.10827/lib/NET40/Moq.dll differ diff --git a/packages/Moq.4.0.10827/lib/NET40/Moq.xml b/packages/Moq.4.0.10827/lib/NET40/Moq.xml new file mode 100644 index 0000000..13b8804 --- /dev/null +++ b/packages/Moq.4.0.10827/lib/NET40/Moq.xml @@ -0,0 +1,5120 @@ + + + + Moq + + + + + Implements the fluent API. + + + + + The expectation will be considered only in the former condition. + + + + + + + The expectation will be considered only in the former condition. + + + + + + + + Setups the get. + + The type of the property. + The expression. + + + + + Setups the set. + + The type of the property. + The setter expression. + + + + + Setups the set. + + The setter expression. + + + + + Defines the Callback verb and overloads. + + + + + Helper interface used to hide the base + members from the fluent API to make it much cleaner + in Visual Studio intellisense. + + + + + + + + + + + + + + + + + Specifies a callback to invoke when the method is called. + + The callback method to invoke. + + The following example specifies a callback to set a boolean + value that can be used later: + + var called = false; + mock.Setup(x => x.Execute()) + .Callback(() => called = true); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The argument type of the invoked method. + The callback method to invoke. + + Invokes the given callback with the concrete invocation argument value. + + Notice how the specific string argument is retrieved by simply declaring + it as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Callback((string command) => Console.WriteLine(command)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2) => Console.WriteLine(arg1 + arg2)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3) => Console.WriteLine(arg1 + arg2 + arg3)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); + + + + + + Defines the Callback verb and overloads for callbacks on + setups that return a value. + + Mocked type. + Type of the return value of the setup. + + + + Specifies a callback to invoke when the method is called. + + The callback method to invoke. + + The following example specifies a callback to set a boolean value that can be used later: + + var called = false; + mock.Setup(x => x.Execute()) + .Callback(() => called = true) + .Returns(true); + + Note that in the case of value-returning methods, after the Callback + call you can still specify the return value. + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the argument of the invoked method. + Callback method to invoke. + + Invokes the given callback with the concrete invocation argument value. + + Notice how the specific string argument is retrieved by simply declaring + it as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Callback(command => Console.WriteLine(command)) + .Returns(true); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2) => Console.WriteLine(arg1 + arg2)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3) => Console.WriteLine(arg1 + arg2 + arg3)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); + + + + + + Defines the Raises verb. + + + + + Specifies the event that will be raised + when the setup is met. + + An expression that represents an event attach or detach action. + The event arguments to pass for the raised event. + + The following example shows how to raise an event when + the setup is met: + + var mock = new Mock<IContainer>(); + + mock.Setup(add => add.Add(It.IsAny<string>(), It.IsAny<object>())) + .Raises(add => add.Added += null, EventArgs.Empty); + + + + + + Specifies the event that will be raised + when the setup is matched. + + An expression that represents an event attach or detach action. + A function that will build the + to pass when raising the event. + + + + + Specifies the custom event that will be raised + when the setup is matched. + + An expression that represents an event attach or detach action. + The arguments to pass to the custom delegate (non EventHandler-compatible). + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + The type of the fifteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + The type of the fifteenth argument received by the expected invocation. + The type of the sixteenth argument received by the expected invocation. + + + + + Defines the Returns verb. + + Mocked type. + Type of the return value from the expression. + + + + Specifies the value to return. + + The value to return, or . + + Return a true value from the method call: + + mock.Setup(x => x.Execute("ping")) + .Returns(true); + + + + + + Specifies a function that will calculate the value to return from the method. + + The function that will calculate the return value. + + Return a calculated value when the method is called: + + mock.Setup(x => x.Execute("ping")) + .Returns(() => returnValues[0]); + + The lambda expression to retrieve the return value is lazy-executed, + meaning that its value may change depending on the moment the method + is executed and the value the returnValues array has at + that moment. + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the argument of the invoked method. + The function that will calculate the return value. + + Return a calculated value which is evaluated lazily at the time of the invocation. + + The lookup list can change between invocations and the setup + will return different values accordingly. Also, notice how the specific + string argument is retrieved by simply declaring it as part of the lambda + expression: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Returns((string command) => returnValues[command]); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2) => arg1 + arg2); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3) => arg1 + arg2 + arg3); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4) => arg1 + arg2 + arg3 + arg4); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5) => arg1 + arg2 + arg3 + arg4 + arg5); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16); + + + + + + Language for ReturnSequence + + + + + Returns value + + + + + Throws an exception + + + + + Throws an exception + + + + + The first method call or member access will be the + last segment of the expression (depth-first traversal), + which is the one we have to Setup rather than FluentMock. + And the last one is the one we have to Mock.Get rather + than FluentMock. + + + + + Base class for mocks and static helper class with methods that + apply to mocked objects, such as to + retrieve a from an object instance. + + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the specification of how the mocked object should behave. + The type of the mocked object. + The mocked object created. + + + + Initializes a new instance of the class. + + + + + Retrieves the mock object for the given object instance. + + Type of the mock to retrieve. Can be omitted as it's inferred + from the object instance passed in as the instance. + The instance of the mocked object.The mock associated with the mocked object. + The received instance + was not created by Moq. + + The following example shows how to add a new setup to an object + instance which is not the original but rather + the object associated with it: + + // Typed instance, not the mock, is retrieved from some test API. + HttpContextBase context = GetMockContext(); + + // context.Request is the typed object from the "real" API + // so in order to add a setup to it, we need to get + // the mock that "owns" it + Mock<HttpRequestBase> request = Mock.Get(context.Request); + mock.Setup(req => req.AppRelativeCurrentExecutionFilePath) + .Returns(tempUrl); + + + + + + Returns the mocked object value. + + + + + Verifies that all verifiable expectations have been met. + + This example sets up an expectation and marks it as verifiable. After + the mock is used, a Verify() call is issued on the mock + to ensure the method in the setup was invoked: + + var mock = new Mock<IWarehouse>(); + this.Setup(x => x.HasInventory(TALISKER, 50)).Verifiable().Returns(true); + ... + // other test code + ... + // Will throw if the test code has didn't call HasInventory. + this.Verify(); + + Not all verifiable expectations were met. + + + + Verifies all expectations regardless of whether they have + been flagged as verifiable. + + This example sets up an expectation without marking it as verifiable. After + the mock is used, a call is issued on the mock + to ensure that all expectations are met: + + var mock = new Mock<IWarehouse>(); + this.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); + ... + // other test code + ... + // Will throw if the test code has didn't call HasInventory, even + // that expectation was not marked as verifiable. + this.VerifyAll(); + + At least one expectation was not met. + + + + Gets the interceptor target for the given expression and root mock, + building the intermediate hierarchy of mock objects if necessary. + + + + + Raises the associated event with the given + event argument data. + + + + + Raises the associated event with the given + event argument data. + + + + + Adds an interface implementation to the mock, + allowing setups to be specified for it. + + This method can only be called before the first use + of the mock property, at which + point the runtime type has already been generated + and no more interfaces can be added to it. + + Also, must be an + interface and not a class, which must be specified + when creating the mock instead. + + + The mock type + has already been generated by accessing the property. + + The specified + is not an interface. + + The following example creates a mock for the main interface + and later adds to it to verify + it's called by the consumer code: + + var mock = new Mock<IProcessor>(); + mock.Setup(x => x.Execute("ping")); + + // add IDisposable interface + var disposable = mock.As<IDisposable>(); + disposable.Setup(d => d.Dispose()).Verifiable(); + + Type of interface to cast the mock to. + + + + + + + Behavior of the mock, according to the value set in the constructor. + + + + + Whether the base member virtual implementation will be called + for mocked classes if no setup is matched. Defaults to . + + + + + Specifies the behavior to use when returning default values for + unexpected invocations on loose mocks. + + + + + Gets the mocked object instance. + + + + + Retrieves the type of the mocked object, its generic type argument. + This is used in the auto-mocking of hierarchy access. + + + + + Specifies the class that will determine the default + value to return when invocations are made that + have no setups and need to return a default + value (for loose mocks). + + + + + Exposes the list of extra interfaces implemented by the mock. + + + + + Utility repository class to use to construct multiple + mocks when consistent verification is + desired for all of them. + + + If multiple mocks will be created during a test, passing + the desired (if different than the + or the one + passed to the repository constructor) and later verifying each + mock can become repetitive and tedious. + + This repository class helps in that scenario by providing a + simplified creation of multiple mocks with a default + (unless overriden by calling + ) and posterior verification. + + + + The following is a straightforward example on how to + create and automatically verify strict mocks using a : + + var repository = new MockRepository(MockBehavior.Strict); + + var foo = repository.Create<IFoo>(); + var bar = repository.Create<IBar>(); + + // no need to call Verifiable() on the setup + // as we'll be validating all of them anyway. + foo.Setup(f => f.Do()); + bar.Setup(b => b.Redo()); + + // exercise the mocks here + + repository.VerifyAll(); + // At this point all setups are already checked + // and an optional MockException might be thrown. + // Note also that because the mocks are strict, any invocation + // that doesn't have a matching setup will also throw a MockException. + + The following examples shows how to setup the repository + to create loose mocks and later verify only verifiable setups: + + var repository = new MockRepository(MockBehavior.Loose); + + var foo = repository.Create<IFoo>(); + var bar = repository.Create<IBar>(); + + // this setup will be verified when we verify the repository + foo.Setup(f => f.Do()).Verifiable(); + + // this setup will NOT be verified + foo.Setup(f => f.Calculate()); + + // this setup will be verified when we verify the repository + bar.Setup(b => b.Redo()).Verifiable(); + + // exercise the mocks here + // note that because the mocks are Loose, members + // called in the interfaces for which no matching + // setups exist will NOT throw exceptions, + // and will rather return default values. + + repository.Verify(); + // At this point verifiable setups are already checked + // and an optional MockException might be thrown. + + The following examples shows how to setup the repository with a + default strict behavior, overriding that default for a + specific mock: + + var repository = new MockRepository(MockBehavior.Strict); + + // this particular one we want loose + var foo = repository.Create<IFoo>(MockBehavior.Loose); + var bar = repository.Create<IBar>(); + + // specify setups + + // exercise the mocks here + + repository.Verify(); + + + + + + + Utility factory class to use to construct multiple + mocks when consistent verification is + desired for all of them. + + + If multiple mocks will be created during a test, passing + the desired (if different than the + or the one + passed to the factory constructor) and later verifying each + mock can become repetitive and tedious. + + This factory class helps in that scenario by providing a + simplified creation of multiple mocks with a default + (unless overriden by calling + ) and posterior verification. + + + + The following is a straightforward example on how to + create and automatically verify strict mocks using a : + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(); + var bar = factory.Create<IBar>(); + + // no need to call Verifiable() on the setup + // as we'll be validating all of them anyway. + foo.Setup(f => f.Do()); + bar.Setup(b => b.Redo()); + + // exercise the mocks here + + factory.VerifyAll(); + // At this point all setups are already checked + // and an optional MockException might be thrown. + // Note also that because the mocks are strict, any invocation + // that doesn't have a matching setup will also throw a MockException. + + The following examples shows how to setup the factory + to create loose mocks and later verify only verifiable setups: + + var factory = new MockFactory(MockBehavior.Loose); + + var foo = factory.Create<IFoo>(); + var bar = factory.Create<IBar>(); + + // this setup will be verified when we verify the factory + foo.Setup(f => f.Do()).Verifiable(); + + // this setup will NOT be verified + foo.Setup(f => f.Calculate()); + + // this setup will be verified when we verify the factory + bar.Setup(b => b.Redo()).Verifiable(); + + // exercise the mocks here + // note that because the mocks are Loose, members + // called in the interfaces for which no matching + // setups exist will NOT throw exceptions, + // and will rather return default values. + + factory.Verify(); + // At this point verifiable setups are already checked + // and an optional MockException might be thrown. + + The following examples shows how to setup the factory with a + default strict behavior, overriding that default for a + specific mock: + + var factory = new MockFactory(MockBehavior.Strict); + + // this particular one we want loose + var foo = factory.Create<IFoo>(MockBehavior.Loose); + var bar = factory.Create<IBar>(); + + // specify setups + + // exercise the mocks here + + factory.Verify(); + + + + + + + Initializes the factory with the given + for newly created mocks from the factory. + + The behavior to use for mocks created + using the factory method if not overriden + by using the overload. + + + + Creates a new mock with the default + specified at factory construction time. + + Type to mock. + A new . + + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(); + // use mock on tests + + factory.VerifyAll(); + + + + + + Creates a new mock with the default + specified at factory construction time and with the + the given constructor arguments for the class. + + + The mock will try to find the best match constructor given the + constructor arguments, and invoke that to initialize the instance. + This applies only to classes, not interfaces. + + Type to mock. + Constructor arguments for mocked classes. + A new . + + + var factory = new MockFactory(MockBehavior.Default); + + var mock = factory.Create<MyBase>("Foo", 25, true); + // use mock on tests + + factory.Verify(); + + + + + + Creates a new mock with the given . + + Type to mock. + Behavior to use for the mock, which overrides + the default behavior specified at factory construction time. + A new . + + The following example shows how to create a mock with a different + behavior to that specified as the default for the factory: + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(MockBehavior.Loose); + + + + + + Creates a new mock with the given + and with the the given constructor arguments for the class. + + + The mock will try to find the best match constructor given the + constructor arguments, and invoke that to initialize the instance. + This applies only to classes, not interfaces. + + Type to mock. + Behavior to use for the mock, which overrides + the default behavior specified at factory construction time. + Constructor arguments for mocked classes. + A new . + + The following example shows how to create a mock with a different + behavior to that specified as the default for the factory, passing + constructor arguments: + + var factory = new MockFactory(MockBehavior.Default); + + var mock = factory.Create<MyBase>(MockBehavior.Strict, "Foo", 25, true); + + + + + + Implements creation of a new mock within the factory. + + Type to mock. + The behavior for the new mock. + Optional arguments for the construction of the mock. + + + + Verifies all verifiable expectations on all mocks created + by this factory. + + + One or more mocks had expectations that were not satisfied. + + + + Verifies all verifiable expectations on all mocks created + by this factory. + + + One or more mocks had expectations that were not satisfied. + + + + Invokes for each mock + in , and accumulates the resulting + that might be + thrown from the action. + + The action to execute against + each mock. + + + + Whether the base member virtual implementation will be called + for mocked classes if no setup is matched. Defaults to . + + + + + Specifies the behavior to use when returning default values for + unexpected invocations on loose mocks. + + + + + Gets the mocks that have been created by this factory and + that will get verified together. + + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The type of the mocked object to query. + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The predicate with the setup expressions. + The type of the mocked object to query. + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the setup expressions. + The type of the mocked object. + The mocked object created. + + + + Creates the mock query with the underlying queriable implementation. + + + + + Wraps the enumerator inside a queryable. + + + + + Method that is turned into the actual call from .Query{T}, to + transform the queryable query into a normal enumerable query. + This method is never used directly by consumers. + + + + + Initializes the repository with the given + for newly created mocks from the repository. + + The behavior to use for mocks created + using the repository method if not overriden + by using the overload. + + + + A that returns an empty default value + for invocations that do not have setups or return values, with loose mocks. + This is the default behavior for a mock. + + + + + Interface to be implemented by classes that determine the + default value of non-expected invocations. + + + + + Defines the default value to return in all the methods returning . + The type of the return value.The value to set as default. + + + + Provides a value for the given member and arguments. + + The member to provide a default value for. + + + + + The intention of is to create a more readable + string representation for the failure message. + + + + + Implements the fluent API. + + + + + Defines the Throws verb. + + + + + Specifies the exception to throw when the method is invoked. + + Exception instance to throw. + + This example shows how to throw an exception when the method is + invoked with an empty string argument: + + mock.Setup(x => x.Execute("")) + .Throws(new ArgumentException()); + + + + + + Specifies the type of exception to throw when the method is invoked. + + Type of exception to instantiate and throw when the setup is matched. + + This example shows how to throw an exception when the method is + invoked with an empty string argument: + + mock.Setup(x => x.Execute("")) + .Throws<ArgumentException>(); + + + + + + Implements the fluent API. + + + + + Defines occurrence members to constraint setups. + + + + + The expected invocation can happen at most once. + + + + var mock = new Mock<ICommand>(); + mock.Setup(foo => foo.Execute("ping")) + .AtMostOnce(); + + + + + + The expected invocation can happen at most specified number of times. + + The number of times to accept calls. + + + var mock = new Mock<ICommand>(); + mock.Setup(foo => foo.Execute("ping")) + .AtMost( 5 ); + + + + + + Defines the Verifiable verb. + + + + + Marks the expectation as verifiable, meaning that a call + to will check if this particular + expectation was met. + + + The following example marks the expectation as verifiable: + + mock.Expect(x => x.Execute("ping")) + .Returns(true) + .Verifiable(); + + + + + + Marks the expectation as verifiable, meaning that a call + to will check if this particular + expectation was met, and specifies a message for failures. + + + The following example marks the expectation as verifiable: + + mock.Expect(x => x.Execute("ping")) + .Returns(true) + .Verifiable("Ping should be executed always!"); + + + + + + Implements the fluent API. + + + + + We need this non-generics base class so that + we can use from + generic code. + + + + + Implements the fluent API. + + + + + Implements the fluent API. + + + + + Implements the fluent API. + + + + + Defines the Callback verb for property getter setups. + + + Mocked type. + Type of the property. + + + + Specifies a callback to invoke when the property is retrieved. + + Callback method to invoke. + + Invokes the given callback with the property value being set. + + mock.SetupGet(x => x.Suspended) + .Callback(() => called = true) + .Returns(true); + + + + + + Implements the fluent API. + + + + + Defines the Returns verb for property get setups. + + Mocked type. + Type of the property. + + + + Specifies the value to return. + + The value to return, or . + + Return a true value from the property getter call: + + mock.SetupGet(x => x.Suspended) + .Returns(true); + + + + + + Specifies a function that will calculate the value to return for the property. + + The function that will calculate the return value. + + Return a calculated value when the property is retrieved: + + mock.SetupGet(x => x.Suspended) + .Returns(() => returnValues[0]); + + The lambda expression to retrieve the return value is lazy-executed, + meaning that its value may change depending on the moment the property + is retrieved and the value the returnValues array has at + that moment. + + + + + Implements the fluent API. + + + + + Helper class to setup a full trace between many mocks + + + + + Initialize a trace setup + + + + + Allow sequence to be repeated + + + + + define nice api + + + + + Perform an expectation in the trace. + + + + + Marks a method as a matcher, which allows complete replacement + of the built-in class with your own argument + matching rules. + + + This feature has been deprecated in favor of the new + and simpler . + + + The argument matching is used to determine whether a concrete + invocation in the mock matches a given setup. This + matching mechanism is fully extensible. + + + There are two parts of a matcher: the compiler matcher + and the runtime matcher. + + + Compiler matcher + Used to satisfy the compiler requirements for the + argument. Needs to be a method optionally receiving any arguments + you might need for the matching, but with a return type that + matches that of the argument. + + Let's say I want to match a lists of orders that contains + a particular one. I might create a compiler matcher like the following: + + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return null; + } + } + + Now we can invoke this static method instead of an argument in an + invocation: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + Note that the return value from the compiler matcher is irrelevant. + This method will never be called, and is just used to satisfy the + compiler and to signal Moq that this is not a method that we want + to be invoked at runtime. + + + + Runtime matcher + + The runtime matcher is the one that will actually perform evaluation + when the test is run, and is defined by convention to have the + same signature as the compiler matcher, but where the return + value is the first argument to the call, which contains the + object received by the actual invocation at runtime: + + public static bool Contains(IEnumerable<Order> orders, Order order) + { + return orders.Contains(order); + } + + At runtime, the mocked method will be invoked with a specific + list of orders. This value will be passed to this runtime + matcher as the first argument, while the second argument is the + one specified in the setup (x.Save(Orders.Contains(order))). + + The boolean returned determines whether the given argument has been + matched. If all arguments to the expected method are matched, then + the setup matches and is evaluated. + + + + + + Using this extensible infrastructure, you can easily replace the entire + set of matchers with your own. You can also avoid the + typical (and annoying) lengthy expressions that result when you have + multiple arguments that use generics. + + + The following is the complete example explained above: + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return null; + } + + public static bool Contains(IEnumerable<Order> orders, Order order) + { + return orders.Contains(order); + } + } + + And the concrete test using this matcher: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + // use mock, invoke Save, and have the matcher filter. + + + + + + Provides a mock implementation of . + + Any interface type can be used for mocking, but for classes, only abstract and virtual members can be mocked. + + The behavior of the mock with regards to the setups and the actual calls is determined + by the optional that can be passed to the + constructor. + + Type to mock, which can be an interface or a class. + The following example shows establishing setups with specific values + for method invocations: + + // Arrange + var order = new Order(TALISKER, 50); + var mock = new Mock<IWarehouse>(); + + mock.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); + + // Act + order.Fill(mock.Object); + + // Assert + Assert.True(order.IsFilled); + + The following example shows how to use the class + to specify conditions for arguments instead of specific values: + + // Arrange + var order = new Order(TALISKER, 50); + var mock = new Mock<IWarehouse>(); + + // shows how to expect a value within a range + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsInRange(0, 100, Range.Inclusive))) + .Returns(false); + + // shows how to throw for unexpected calls. + mock.Setup(x => x.Remove( + It.IsAny<string>(), + It.IsAny<int>())) + .Throws(new InvalidOperationException()); + + // Act + order.Fill(mock.Object); + + // Assert + Assert.False(order.IsFilled); + + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Ctor invoked by AsTInterface exclusively. + + + + + Initializes an instance of the mock with default behavior. + + var mock = new Mock<IFormatProvider>(); + + + + + Initializes an instance of the mock with default behavior and with + the given constructor arguments for the class. (Only valid when is a class) + + The mock will try to find the best match constructor given the constructor arguments, and invoke that + to initialize the instance. This applies only for classes, not interfaces. + + var mock = new Mock<MyProvider>(someArgument, 25); + Optional constructor arguments if the mocked type is a class. + + + + Initializes an instance of the mock with the specified behavior. + + var mock = new Mock<IFormatProvider>(MockBehavior.Relaxed); + Behavior of the mock. + + + + Initializes an instance of the mock with a specific behavior with + the given constructor arguments for the class. + + The mock will try to find the best match constructor given the constructor arguments, and invoke that + to initialize the instance. This applies only to classes, not interfaces. + + var mock = new Mock<MyProvider>(someArgument, 25); + Behavior of the mock.Optional constructor arguments if the mocked type is a class. + + + + Returns the mocked object value. + + + + + Specifies a setup on the mocked type for a call to + to a void method. + + If more than one setup is specified for the same method or property, + the latest one wins and is the one that will be executed. + Lambda expression that specifies the expected method invocation. + + var mock = new Mock<IProcessor>(); + mock.Setup(x => x.Execute("ping")); + + + + + + Specifies a setup on the mocked type for a call to + to a value returning method. + Type of the return value. Typically omitted as it can be inferred from the expression. + If more than one setup is specified for the same method or property, + the latest one wins and is the one that will be executed. + Lambda expression that specifies the method invocation. + + mock.Setup(x => x.HasInventory("Talisker", 50)).Returns(true); + + + + + + Specifies a setup on the mocked type for a call to + to a property getter. + + If more than one setup is set for the same property getter, + the latest one wins and is the one that will be executed. + Type of the property. Typically omitted as it can be inferred from the expression.Lambda expression that specifies the property getter. + + mock.SetupGet(x => x.Suspended) + .Returns(true); + + + + + + Specifies a setup on the mocked type for a call to + to a property setter. + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + + This overloads allows the use of a callback already + typed for the property type. + + Type of the property. Typically omitted as it can be inferred from the expression.The Lambda expression that sets a property to a value. + + mock.SetupSet(x => x.Suspended = true); + + + + + + Specifies a setup on the mocked type for a call to + to a property setter. + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + Lambda expression that sets a property to a value. + + mock.SetupSet(x => x.Suspended = true); + + + + + + Specifies that the given property should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. (this is also + known as "stubbing"). + + Type of the property, inferred from the property + expression (does not need to be specified). + Property expression to stub. + If you have an interface with an int property Value, you might + stub it using the following straightforward call: + + var mock = new Mock<IHaveValue>(); + mock.Stub(v => v.Value); + + After the Stub call has been issued, setting and + retrieving the object value will behave as expected: + + IHaveValue v = mock.Object; + + v.Value = 5; + Assert.Equal(5, v.Value); + + + + + + Specifies that the given property should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. This overload + allows setting the initial value for the property. (this is also + known as "stubbing"). + + Type of the property, inferred from the property + expression (does not need to be specified). + Property expression to stub.Initial value for the property. + If you have an interface with an int property Value, you might + stub it using the following straightforward call: + + var mock = new Mock<IHaveValue>(); + mock.SetupProperty(v => v.Value, 5); + + After the SetupProperty call has been issued, setting and + retrieving the object value will behave as expected: + + IHaveValue v = mock.Object; + // Initial value was stored + Assert.Equal(5, v.Value); + + // New value set which changes the initial value + v.Value = 6; + Assert.Equal(6, v.Value); + + + + + + Specifies that the all properties on the mock should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. (this is also + known as "stubbing"). The default value for each property will be the + one generated as specified by the property for the mock. + + If the mock is set to , + the mocked default values will also get all properties setup recursively. + + + + + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IProcessor>(); + // exercise mock + //... + // Will throw if the test code didn't call Execute with a "ping" string argument. + mock.Verify(proc => proc.Execute("ping")); + + The invocation was not performed on the mock.Expression to verify. + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called. + + + + Verifies that a specific invocation matching the given expression was performed on the mock, + specifying a failure error message. Use in conjuntion with the default + . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IProcessor>(); + // exercise mock + //... + // Will throw if the test code didn't call Execute with a "ping" string argument. + mock.Verify(proc => proc.Execute("ping")); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + + + + Verifies that a specific invocation matching the given expression was performed on the mock, + specifying a failure error message. Use in conjuntion with the default + . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails. + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't call HasInventory. + mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50)); + + The invocation was not performed on the mock.Expression to verify.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock. Use in conjuntion + with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock, specifying a failure + error message. + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't call HasInventory. + mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50), "When filling orders, inventory has to be checked"); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock, specifying a failure + error message. + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails.Type of return value from the expression. + + + + Verifies that a property was read on the mock. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was retrieved from it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't retrieve the IsClosed property. + mock.VerifyGet(warehouse => warehouse.IsClosed); + + The invocation was not performed on the mock.Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock, specifying a failure + error message. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was retrieved from it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't retrieve the IsClosed property. + mock.VerifyGet(warehouse => warehouse.IsClosed); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock, specifying a failure + error message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was set on the mock. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was set on it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed = true); + + The invocation was not performed on the mock.Expression to verify. + + + + Verifies that a property was set on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + + + + Verifies that a property was set on the mock, specifying + a failure message. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was set on it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed = true, "Warehouse should always be closed after the action"); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + + + + Verifies that a property was set on the mock, specifying + a failure message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + + + + Raises the event referenced in using + the given argument. + + The argument is + invalid for the target event invocation, or the is + not an event attach or detach expression. + + The following example shows how to raise a event: + + var mock = new Mock<IViewModel>(); + + mock.Raise(x => x.PropertyChanged -= null, new PropertyChangedEventArgs("Name")); + + + This example shows how to invoke an event with a custom event arguments + class in a view that will cause its corresponding presenter to + react by changing its state: + + var mockView = new Mock<IOrdersView>(); + var presenter = new OrdersPresenter(mockView.Object); + + // Check that the presenter has no selection by default + Assert.Null(presenter.SelectedOrder); + + // Raise the event with a specific arguments data + mockView.Raise(v => v.SelectionChanged += null, new OrderEventArgs { Order = new Order("moq", 500) }); + + // Now the presenter reacted to the event, and we have a selected order + Assert.NotNull(presenter.SelectedOrder); + Assert.Equal("moq", presenter.SelectedOrder.ProductName); + + + + + + Raises the event referenced in using + the given argument for a non-EventHandler typed event. + + The arguments are + invalid for the target event invocation, or the is + not an event attach or detach expression. + + The following example shows how to raise a custom event that does not adhere to + the standard EventHandler: + + var mock = new Mock<IViewModel>(); + + mock.Raise(x => x.MyEvent -= null, "Name", bool, 25); + + + + + + Exposes the mocked object instance. + + + + + Provides legacy API members as extensions so that + existing code continues to compile, but new code + doesn't see then. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Provides additional methods on mocks. + + + Provided as extension methods as they confuse the compiler + with the overloads taking Action. + + + + + Specifies a setup on the mocked type for a call to + to a property setter, regardless of its value. + + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + + Type of the property. Typically omitted as it can be inferred from the expression. + Type of the mock. + The target mock for the setup. + Lambda expression that specifies the property setter. + + + mock.SetupSet(x => x.Suspended); + + + + This method is not legacy, but must be on an extension method to avoid + confusing the compiler with the new Action syntax. + + + + + Verifies that a property has been set on the mock, regarless of its value. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + Expression to verify. + The mock instance. + Mocked type. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, specifying a failure + error message. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + Expression to verify. + Message to show if verification fails. + The mock instance. + Mocked type. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, regardless + of the value but only the specified number of times. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + The invocation was not call the times specified by + . + The mock instance. + Mocked type. + The number of times a method is allowed to be called. + Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, regardless + of the value but only the specified number of times, and specifying a failure + error message. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + The invocation was not call the times specified by + . + The mock instance. + Mocked type. + The number of times a method is allowed to be called. + Message to show if verification fails. + Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Helper for sequencing return values in the same method. + + + + + Return a sequence of values, once per call. + + + + + Casts the expression to a lambda expression, removing + a cast if there's any. + + + + + Casts the body of the lambda expression to a . + + If the body is not a method call. + + + + Converts the body of the lambda expression into the referenced by it. + + + + + Checks whether the body of the lambda expression is a property access. + + + + + Checks whether the expression is a property access. + + + + + Checks whether the body of the lambda expression is a property indexer, which is true + when the expression is an whose + has + equal to . + + + + + Checks whether the expression is a property indexer, which is true + when the expression is an whose + has + equal to . + + + + + Creates an expression that casts the given expression to the + type. + + + + + TODO: remove this code when https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331583 + is fixed. + + + + + Provides partial evaluation of subtrees, whenever they can be evaluated locally. + + Matt Warren: http://blogs.msdn.com/mattwar + Documented by InSTEDD: http://www.instedd.org + + + + Performs evaluation and replacement of independent sub-trees + + The root of the expression tree. + A function that decides whether a given expression + node can be part of the local function. + A new tree with sub-trees evaluated and replaced. + + + + Performs evaluation and replacement of independent sub-trees + + The root of the expression tree. + A new tree with sub-trees evaluated and replaced. + + + + Evaluates and replaces sub-trees when first candidate is reached (top-down) + + + + + Performs bottom-up analysis to determine which nodes can possibly + be part of an evaluated sub-tree. + + + + + Ensures the given is not null. + Throws otherwise. + + + + + Ensures the given string is not null or empty. + Throws in the first case, or + in the latter. + + + + + Checks an argument to ensure it is in the specified range including the edges. + + Type of the argument to check, it must be an type. + + The expression containing the name of the argument. + The argument value to check. + The minimun allowed value for the argument. + The maximun allowed value for the argument. + + + + Checks an argument to ensure it is in the specified range excluding the edges. + + Type of the argument to check, it must be an type. + + The expression containing the name of the argument. + The argument value to check. + The minimun allowed value for the argument. + The maximun allowed value for the argument. + + + + Implemented by all generated mock object instances. + + + + + Implemented by all generated mock object instances. + + + + + Reference the Mock that contains this as the mock.Object value. + + + + + Reference the Mock that contains this as the mock.Object value. + + + + + Implements the actual interception and method invocation for + all mocks. + + + + + Get an eventInfo for a given event name. Search type ancestors depth first if necessary. + + Name of the event, with the set_ or get_ prefix already removed + + + + Given a type return all of its ancestors, both types and interfaces. + + The type to find immediate ancestors of + + + + Implements the fluent API. + + + + + Defines the Callback verb for property setter setups. + + Type of the property. + + + + Specifies a callback to invoke when the property is set that receives the + property value being set. + + Callback method to invoke. + + Invokes the given callback with the property value being set. + + mock.SetupSet(x => x.Suspended) + .Callback((bool state) => Console.WriteLine(state)); + + + + + + Allows the specification of a matching condition for an + argument in a method invocation, rather than a specific + argument value. "It" refers to the argument being matched. + + This class allows the setup to match a method invocation + with an arbitrary value, with a value in a specified range, or + even one that matches a given predicate. + + + + + Matches any value of the given type. + + Typically used when the actual argument value for a method + call is not relevant. + + + // Throws an exception for a call to Remove with any string value. + mock.Setup(x => x.Remove(It.IsAny<string>())).Throws(new InvalidOperationException()); + + Type of the value. + + + + Matches any value that satisfies the given predicate. + Type of the argument to check.The predicate used to match the method argument. + Allows the specification of a predicate to perform matching + of method call arguments. + + This example shows how to return the value 1 whenever the argument to the + Do method is an even number. + + mock.Setup(x => x.Do(It.Is<int>(i => i % 2 == 0))) + .Returns(1); + + This example shows how to throw an exception if the argument to the + method is a negative number: + + mock.Setup(x => x.GetUser(It.Is<int>(i => i < 0))) + .Throws(new ArgumentException()); + + + + + + Matches any value that is in the range specified. + Type of the argument to check.The lower bound of the range.The upper bound of the range. + The kind of range. See . + + The following example shows how to expect a method call + with an integer argument within the 0..100 range. + + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsInRange(0, 100, Range.Inclusive))) + .Returns(false); + + + + + + Matches a string argument if it matches the given regular expression pattern. + The pattern to use to match the string argument value. + The following example shows how to expect a call to a method where the + string argument matches the given regular expression: + + mock.Setup(x => x.Check(It.IsRegex("[a-z]+"))).Returns(1); + + + + + + Matches a string argument if it matches the given regular expression pattern. + The pattern to use to match the string argument value.The options used to interpret the pattern. + The following example shows how to expect a call to a method where the + string argument matches the given regular expression, in a case insensitive way: + + mock.Setup(x => x.Check(It.IsRegex("[a-z]+", RegexOptions.IgnoreCase))).Returns(1); + + + + + + Matcher to treat static functions as matchers. + + mock.Setup(x => x.StringMethod(A.MagicString())); + + public static class A + { + [Matcher] + public static string MagicString() { return null; } + public static bool MagicString(string arg) + { + return arg == "magic"; + } + } + + Will succeed if: mock.Object.StringMethod("magic"); + and fail with any other call. + + + + + Options to customize the behavior of the mock. + + + + + Causes the mock to always throw + an exception for invocations that don't have a + corresponding setup. + + + + + Will never throw exceptions, returning default + values when necessary (null for reference types, + zero for value types or empty enumerables and arrays). + + + + + Default mock behavior, which equals . + + + + + Exception thrown by mocks when setups are not matched, + the mock is not properly setup, etc. + + + A distinct exception type is provided so that exceptions + thrown by the mock can be differentiated in tests that + expect other exceptions to be thrown (i.e. ArgumentException). + + Richer exception hierarchy/types are not provided as + tests typically should not catch or expect exceptions + from the mocks. These are typically the result of changes + in the tested class or its collaborators implementation, and + result in fixes in the mock setup so that they dissapear and + allow the test to pass. + + + + + + Supports the serialization infrastructure. + + Serialization information. + Streaming context. + + + + Supports the serialization infrastructure. + + Serialization information. + Streaming context. + + + + Made internal as it's of no use for + consumers, but it's important for + our own tests. + + + + + Used by the mock factory to accumulate verification + failures. + + + + + Supports the serialization infrastructure. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Mock type has already been initialized by accessing its Object property. Adding interfaces must be done before that.. + + + + + Looks up a localized string similar to Value cannot be an empty string.. + + + + + Looks up a localized string similar to Can only add interfaces to the mock.. + + + + + Looks up a localized string similar to Can't set return value for void method {0}.. + + + + + Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks.. + + + + + Looks up a localized string similar to A matching constructor for the given arguments was not found on the mocked type.. + + + + + Looks up a localized string similar to Could not locate event for attach or detach method {0}.. + + + + + Looks up a localized string similar to Expression {0} involves a field access, which is not supported. Use properties instead.. + + + + + Looks up a localized string similar to Type to mock must be an interface or an abstract or non-sealed class. . + + + + + Looks up a localized string similar to Cannot retrieve a mock with the given object type {0} as it's not the main type of the mock or any of its additional interfaces. + Please cast the argument to one of the supported types: {1}. + Remember that there's no generics covariance in the CLR, so your object must be one of these types in order for the call to succeed.. + + + + + Looks up a localized string similar to The equals ("==" or "=" in VB) and the conditional 'and' ("&&" or "AndAlso" in VB) operators are the only ones supported in the query specification expression. Unsupported expression: {0}. + + + + + Looks up a localized string similar to LINQ method '{0}' not supported.. + + + + + Looks up a localized string similar to Expression contains a call to a method which is not virtual (overridable in VB) or abstract. Unsupported expression: {0}. + + + + + Looks up a localized string similar to Member {0}.{1} does not exist.. + + + + + Looks up a localized string similar to Method {0}.{1} is public. Use strong-typed Expect overload instead: + mock.Setup(x => x.{1}()); + . + + + + + Looks up a localized string similar to {0} invocation failed with mock behavior {1}. + {2}. + + + + + Looks up a localized string similar to Expected only {0} calls to {1}.. + + + + + Looks up a localized string similar to Expected only one call to {0}.. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at least {2} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at least once, but was never performed: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at most {3} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at most once, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock between {2} and {3} times (Exclusive), but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock between {2} and {3} times (Inclusive), but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock exactly {2} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock should never have been performed, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock once, but was {4} times: {1}. + + + + + Looks up a localized string similar to All invocations on the mock must have a corresponding setup.. + + + + + Looks up a localized string similar to Object instance was not created by Moq.. + + + + + Looks up a localized string similar to Out expression must evaluate to a constant value.. + + + + + Looks up a localized string similar to Property {0}.{1} does not have a getter.. + + + + + Looks up a localized string similar to Property {0}.{1} does not exist.. + + + + + Looks up a localized string similar to Property {0}.{1} is write-only.. + + + + + Looks up a localized string similar to Property {0}.{1} is read-only.. + + + + + Looks up a localized string similar to Property {0}.{1} does not have a setter.. + + + + + Looks up a localized string similar to Cannot raise a mocked event unless it has been associated (attached) to a concrete event in a mocked object.. + + + + + Looks up a localized string similar to Ref expression must evaluate to a constant value.. + + + + + Looks up a localized string similar to Invocation needs to return a value and therefore must have a corresponding setup that provides it.. + + + + + Looks up a localized string similar to A lambda expression is expected as the argument to It.Is<T>.. + + + + + Looks up a localized string similar to Invocation {0} should not have been made.. + + + + + Looks up a localized string similar to Expression is not a method invocation: {0}. + + + + + Looks up a localized string similar to Expression is not a property access: {0}. + + + + + Looks up a localized string similar to Expression is not a property setter invocation.. + + + + + Looks up a localized string similar to Expression references a method that does not belong to the mocked object: {0}. + + + + + Looks up a localized string similar to Invalid setup on a non-virtual (overridable in VB) member: {0}. + + + + + Looks up a localized string similar to Type {0} does not implement required interface {1}. + + + + + Looks up a localized string similar to Type {0} does not from required type {1}. + + + + + Looks up a localized string similar to To specify a setup for public property {0}.{1}, use the typed overloads, such as: + mock.Setup(x => x.{1}).Returns(value); + mock.SetupGet(x => x.{1}).Returns(value); //equivalent to previous one + mock.SetupSet(x => x.{1}).Callback(callbackDelegate); + . + + + + + Looks up a localized string similar to Unsupported expression: {0}. + + + + + Looks up a localized string similar to Only property accesses are supported in intermediate invocations on a setup. Unsupported expression {0}.. + + + + + Looks up a localized string similar to Expression contains intermediate property access {0}.{1} which is of type {2} and cannot be mocked. Unsupported expression {3}.. + + + + + Looks up a localized string similar to Setter expression cannot use argument matchers that receive parameters.. + + + + + Looks up a localized string similar to Member {0} is not supported for protected mocking.. + + + + + Looks up a localized string similar to Setter expression can only use static custom matchers.. + + + + + Looks up a localized string similar to The following setups were not matched: + {0}. + + + + + Looks up a localized string similar to Invalid verify on a non-virtual (overridable in VB) member: {0}. + + + + + Allows setups to be specified for protected members by using their + name as a string, rather than strong-typing them which is not possible + due to their visibility. + + + + + Specifies a setup for a void method invocation with the given + , optionally specifying arguments for the method call. + + The name of the void method to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + + + + Specifies a setup for an invocation on a property or a non void method with the given + , optionally specifying arguments for the method call. + + The name of the method or property to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + The return type of the method or property. + + + + Specifies a setup for an invocation on a property getter with the given + . + + The name of the property. + The type of the property. + + + + Specifies a setup for an invocation on a property setter with the given + . + + The name of the property. + The property value. If argument matchers are used, + remember to use rather than . + The type of the property. + + + + Specifies a verify for a void method with the given , + optionally specifying arguments for the method call. Use in conjuntion with the default + . + + The invocation was not call the times specified by + . + The name of the void method to be verified. + The number of times a method is allowed to be called. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + + + + Specifies a verify for an invocation on a property or a non void method with the given + , optionally specifying arguments for the method call. + + The invocation was not call the times specified by + . + The name of the method or property to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + The number of times a method is allowed to be called. + The type of return value from the expression. + + + + Specifies a verify for an invocation on a property getter with the given + . + The invocation was not call the times specified by + . + + The name of the property. + The number of times a method is allowed to be called. + The type of the property. + + + + Specifies a setup for an invocation on a property setter with the given + . + + The invocation was not call the times specified by + . + The name of the property. + The number of times a method is allowed to be called. + The property value. + The type of the property. If argument matchers are used, + remember to use rather than . + + + + Allows the specification of a matching condition for an + argument in a protected member setup, rather than a specific + argument value. "ItExpr" refers to the argument being matched. + + + Use this variant of argument matching instead of + for protected setups. + This class allows the setup to match a method invocation + with an arbitrary value, with a value in a specified range, or + even one that matches a given predicate, or null. + + + + + Matches a null value of the given type. + + + Required for protected mocks as the null value cannot be used + directly as it prevents proper method overload selection. + + + + // Throws an exception for a call to Remove with a null string value. + mock.Protected() + .Setup("Remove", ItExpr.IsNull<string>()) + .Throws(new InvalidOperationException()); + + + Type of the value. + + + + Matches any value of the given type. + + + Typically used when the actual argument value for a method + call is not relevant. + + + + // Throws an exception for a call to Remove with any string value. + mock.Protected() + .Setup("Remove", ItExpr.IsAny<string>()) + .Throws(new InvalidOperationException()); + + + Type of the value. + + + + Matches any value that satisfies the given predicate. + + Type of the argument to check. + The predicate used to match the method argument. + + Allows the specification of a predicate to perform matching + of method call arguments. + + + This example shows how to return the value 1 whenever the argument to the + Do method is an even number. + + mock.Protected() + .Setup("Do", ItExpr.Is<int>(i => i % 2 == 0)) + .Returns(1); + + This example shows how to throw an exception if the argument to the + method is a negative number: + + mock.Protected() + .Setup("GetUser", ItExpr.Is<int>(i => i < 0)) + .Throws(new ArgumentException()); + + + + + + Matches any value that is in the range specified. + + Type of the argument to check. + The lower bound of the range. + The upper bound of the range. + The kind of range. See . + + The following example shows how to expect a method call + with an integer argument within the 0..100 range. + + mock.Protected() + .Setup("HasInventory", + ItExpr.IsAny<string>(), + ItExpr.IsInRange(0, 100, Range.Inclusive)) + .Returns(false); + + + + + + Matches a string argument if it matches the given regular expression pattern. + + The pattern to use to match the string argument value. + + The following example shows how to expect a call to a method where the + string argument matches the given regular expression: + + mock.Protected() + .Setup("Check", ItExpr.IsRegex("[a-z]+")) + .Returns(1); + + + + + + Matches a string argument if it matches the given regular expression pattern. + + The pattern to use to match the string argument value. + The options used to interpret the pattern. + + The following example shows how to expect a call to a method where the + string argument matches the given regular expression, in a case insensitive way: + + mock.Protected() + .Setup("Check", ItExpr.IsRegex("[a-z]+", RegexOptions.IgnoreCase)) + .Returns(1); + + + + + + Enables the Protected() method on , + allowing setups to be set for protected members by using their + name as a string, rather than strong-typing them which is not possible + due to their visibility. + + + + + Enable protected setups for the mock. + + Mocked object type. Typically omitted as it can be inferred from the mock instance. + The mock to set the protected setups on. + + + + + + + + + + + + Kind of range to use in a filter specified through + . + + + + + The range includes the to and + from values. + + + + + The range does not include the to and + from values. + + + + + Determines the way default values are generated + calculated for loose mocks. + + + + + Default behavior, which generates empty values for + value types (i.e. default(int)), empty array and + enumerables, and nulls for all other reference types. + + + + + Whenever the default value generated by + is null, replaces this value with a mock (if the type + can be mocked). + + + For sealed classes, a null value will be generated. + + + + + A default implementation of IQueryable for use with QueryProvider + + + + + The is a + static method that returns an IQueryable of Mocks of T which is used to + apply the linq specification to. + + + + + Allows creation custom value matchers that can be used on setups and verification, + completely replacing the built-in class with your own argument + matching rules. + + See also . + + + + + Provided for the sole purpose of rendering the delegate passed to the + matcher constructor if no friendly render lambda is provided. + + + + + Initializes the match with the condition that + will be checked in order to match invocation + values. + The condition to match against actual values. + + + + + + + + + This method is used to set an expression as the last matcher invoked, + which is used in the SetupSet to allow matchers in the prop = value + delegate expression. This delegate is executed in "fluent" mode in + order to capture the value being set, and construct the corresponding + methodcall. + This is also used in the MatcherFactory for each argument expression. + This method ensures that when we execute the delegate, we + also track the matcher that was invoked, so that when we create the + methodcall we build the expression using it, rather than the null/default + value returned from the actual invocation. + + + + + Allows creation custom value matchers that can be used on setups and verification, + completely replacing the built-in class with your own argument + matching rules. + Type of the value to match. + The argument matching is used to determine whether a concrete + invocation in the mock matches a given setup. This + matching mechanism is fully extensible. + + Creating a custom matcher is straightforward. You just need to create a method + that returns a value from a call to with + your matching condition and optional friendly render expression: + + [Matcher] + public Order IsBigOrder() + { + return Match<Order>.Create( + o => o.GrandTotal >= 5000, + /* a friendly expression to render on failures */ + () => IsBigOrder()); + } + + This method can be used in any mock setup invocation: + + mock.Setup(m => m.Submit(IsBigOrder()).Throws<UnauthorizedAccessException>(); + + At runtime, Moq knows that the return value was a matcher (note that the method MUST be + annotated with the [Matcher] attribute in order to determine this) and + evaluates your predicate with the actual value passed into your predicate. + + Another example might be a case where you want to match a lists of orders + that contains a particular one. You might create matcher like the following: + + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return Match<IEnumerable<Order>>.Create(orders => orders.Contains(order)); + } + } + + Now we can invoke this static method instead of an argument in an + invocation: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + + + + + Tracks the current mock and interception context. + + + + + Having an active fluent mock context means that the invocation + is being performed in "trial" mode, just to gather the + target method and arguments that need to be matched later + when the actual invocation is made. + + + + + A that returns an empty default value + for non-mockeable types, and mocks for all other types (interfaces and + non-sealed classes) that can be mocked. + + + + + Allows querying the universe of mocks for those that behave + according to the LINQ query specification. + + + This entry-point into Linq to Mocks is the only one in the root Moq + namespace to ease discovery. But to get all the mocking extension + methods on Object, a using of Moq.Linq must be done, so that the + polluting of the intellisense for all objects is an explicit opt-in. + + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The type of the mocked object to query. + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The predicate with the setup expressions. + The type of the mocked object to query. + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the setup expressions. + The type of the mocked object. + The mocked object created. + + + + Creates the mock query with the underlying queriable implementation. + + + + + Wraps the enumerator inside a queryable. + + + + + Method that is turned into the actual call from .Query{T}, to + transform the queryable query into a normal enumerable query. + This method is never used directly by consumers. + + + + + Extension method used to support Linq-like setup properties that are not virtual but do have + a getter and a setter, thereby allowing the use of Linq to Mocks to quickly initialize Dtos too :) + + + + + Helper extensions that are used by the query translator. + + + + + Retrieves a fluent mock from the given setup expression. + + + + + Defines the number of invocations allowed by a mocked method. + + + + + Specifies that a mocked method should be invoked times as minimum. + The minimun number of times.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked one time as minimum. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked time as maximun. + The maximun number of times.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked one time as maximun. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked between and + times. + The minimun number of times.The maximun number of times. + The kind of range. See . + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked exactly times. + The times that a method or property can be called.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should not be invoked. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked exactly one time. + An object defining the allowed number of invocations. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Determines whether two specified objects have the same value. + + The first . + + The second . + + true if the value of left is the same as the value of right; otherwise, false. + + + + + Determines whether two specified objects have different values. + + The first . + + The second . + + true if the value of left is different from the value of right; otherwise, false. + + + + diff --git a/packages/Moq.4.0.10827/lib/Silverlight4/Castle.Core.dll b/packages/Moq.4.0.10827/lib/Silverlight4/Castle.Core.dll new file mode 100644 index 0000000..a887ecd Binary files /dev/null and b/packages/Moq.4.0.10827/lib/Silverlight4/Castle.Core.dll differ diff --git a/packages/Moq.4.0.10827/lib/Silverlight4/Moq.Silverlight.dll b/packages/Moq.4.0.10827/lib/Silverlight4/Moq.Silverlight.dll new file mode 100644 index 0000000..fb516c1 Binary files /dev/null and b/packages/Moq.4.0.10827/lib/Silverlight4/Moq.Silverlight.dll differ diff --git a/packages/Moq.4.0.10827/lib/Silverlight4/Moq.Silverlight.xml b/packages/Moq.4.0.10827/lib/Silverlight4/Moq.Silverlight.xml new file mode 100644 index 0000000..ac37f5c --- /dev/null +++ b/packages/Moq.4.0.10827/lib/Silverlight4/Moq.Silverlight.xml @@ -0,0 +1,5101 @@ + + + + Moq.Silverlight + + + + + Provides a mock implementation of . + + Any interface type can be used for mocking, but for classes, only abstract and virtual members can be mocked. + + The behavior of the mock with regards to the setups and the actual calls is determined + by the optional that can be passed to the + constructor. + + Type to mock, which can be an interface or a class. + The following example shows establishing setups with specific values + for method invocations: + + // Arrange + var order = new Order(TALISKER, 50); + var mock = new Mock<IWarehouse>(); + + mock.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); + + // Act + order.Fill(mock.Object); + + // Assert + Assert.True(order.IsFilled); + + The following example shows how to use the class + to specify conditions for arguments instead of specific values: + + // Arrange + var order = new Order(TALISKER, 50); + var mock = new Mock<IWarehouse>(); + + // shows how to expect a value within a range + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsInRange(0, 100, Range.Inclusive))) + .Returns(false); + + // shows how to throw for unexpected calls. + mock.Setup(x => x.Remove( + It.IsAny<string>(), + It.IsAny<int>())) + .Throws(new InvalidOperationException()); + + // Act + order.Fill(mock.Object); + + // Assert + Assert.False(order.IsFilled); + + + + + + Base class for mocks and static helper class with methods that + apply to mocked objects, such as to + retrieve a from an object instance. + + + + + Helper interface used to hide the base + members from the fluent API to make it much cleaner + in Visual Studio intellisense. + + + + + + + + + + + + + + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the specification of how the mocked object should behave. + The type of the mocked object. + The mocked object created. + + + + Initializes a new instance of the class. + + + + + Retrieves the mock object for the given object instance. + + Type of the mock to retrieve. Can be omitted as it's inferred + from the object instance passed in as the instance. + The instance of the mocked object.The mock associated with the mocked object. + The received instance + was not created by Moq. + + The following example shows how to add a new setup to an object + instance which is not the original but rather + the object associated with it: + + // Typed instance, not the mock, is retrieved from some test API. + HttpContextBase context = GetMockContext(); + + // context.Request is the typed object from the "real" API + // so in order to add a setup to it, we need to get + // the mock that "owns" it + Mock<HttpRequestBase> request = Mock.Get(context.Request); + mock.Setup(req => req.AppRelativeCurrentExecutionFilePath) + .Returns(tempUrl); + + + + + + Returns the mocked object value. + + + + + Verifies that all verifiable expectations have been met. + + This example sets up an expectation and marks it as verifiable. After + the mock is used, a Verify() call is issued on the mock + to ensure the method in the setup was invoked: + + var mock = new Mock<IWarehouse>(); + this.Setup(x => x.HasInventory(TALISKER, 50)).Verifiable().Returns(true); + ... + // other test code + ... + // Will throw if the test code has didn't call HasInventory. + this.Verify(); + + Not all verifiable expectations were met. + + + + Verifies all expectations regardless of whether they have + been flagged as verifiable. + + This example sets up an expectation without marking it as verifiable. After + the mock is used, a call is issued on the mock + to ensure that all expectations are met: + + var mock = new Mock<IWarehouse>(); + this.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); + ... + // other test code + ... + // Will throw if the test code has didn't call HasInventory, even + // that expectation was not marked as verifiable. + this.VerifyAll(); + + At least one expectation was not met. + + + + Gets the interceptor target for the given expression and root mock, + building the intermediate hierarchy of mock objects if necessary. + + + + + Raises the associated event with the given + event argument data. + + + + + Raises the associated event with the given + event argument data. + + + + + Adds an interface implementation to the mock, + allowing setups to be specified for it. + + This method can only be called before the first use + of the mock property, at which + point the runtime type has already been generated + and no more interfaces can be added to it. + + Also, must be an + interface and not a class, which must be specified + when creating the mock instead. + + + The mock type + has already been generated by accessing the property. + + The specified + is not an interface. + + The following example creates a mock for the main interface + and later adds to it to verify + it's called by the consumer code: + + var mock = new Mock<IProcessor>(); + mock.Setup(x => x.Execute("ping")); + + // add IDisposable interface + var disposable = mock.As<IDisposable>(); + disposable.Setup(d => d.Dispose()).Verifiable(); + + Type of interface to cast the mock to. + + + + + + + Behavior of the mock, according to the value set in the constructor. + + + + + Whether the base member virtual implementation will be called + for mocked classes if no setup is matched. Defaults to . + + + + + Specifies the behavior to use when returning default values for + unexpected invocations on loose mocks. + + + + + Gets the mocked object instance. + + + + + Retrieves the type of the mocked object, its generic type argument. + This is used in the auto-mocking of hierarchy access. + + + + + Specifies the class that will determine the default + value to return when invocations are made that + have no setups and need to return a default + value (for loose mocks). + + + + + Exposes the list of extra interfaces implemented by the mock. + + + + + Ctor invoked by AsTInterface exclusively. + + + + + Initializes an instance of the mock with default behavior. + + var mock = new Mock<IFormatProvider>(); + + + + + Initializes an instance of the mock with default behavior and with + the given constructor arguments for the class. (Only valid when is a class) + + The mock will try to find the best match constructor given the constructor arguments, and invoke that + to initialize the instance. This applies only for classes, not interfaces. + + var mock = new Mock<MyProvider>(someArgument, 25); + Optional constructor arguments if the mocked type is a class. + + + + Initializes an instance of the mock with the specified behavior. + + var mock = new Mock<IFormatProvider>(MockBehavior.Relaxed); + Behavior of the mock. + + + + Initializes an instance of the mock with a specific behavior with + the given constructor arguments for the class. + + The mock will try to find the best match constructor given the constructor arguments, and invoke that + to initialize the instance. This applies only to classes, not interfaces. + + var mock = new Mock<MyProvider>(someArgument, 25); + Behavior of the mock.Optional constructor arguments if the mocked type is a class. + + + + Returns the mocked object value. + + + + + Specifies a setup on the mocked type for a call to + to a void method. + + If more than one setup is specified for the same method or property, + the latest one wins and is the one that will be executed. + Lambda expression that specifies the expected method invocation. + + var mock = new Mock<IProcessor>(); + mock.Setup(x => x.Execute("ping")); + + + + + + Specifies a setup on the mocked type for a call to + to a value returning method. + Type of the return value. Typically omitted as it can be inferred from the expression. + If more than one setup is specified for the same method or property, + the latest one wins and is the one that will be executed. + Lambda expression that specifies the method invocation. + + mock.Setup(x => x.HasInventory("Talisker", 50)).Returns(true); + + + + + + Specifies a setup on the mocked type for a call to + to a property getter. + + If more than one setup is set for the same property getter, + the latest one wins and is the one that will be executed. + Type of the property. Typically omitted as it can be inferred from the expression.Lambda expression that specifies the property getter. + + mock.SetupGet(x => x.Suspended) + .Returns(true); + + + + + + Specifies a setup on the mocked type for a call to + to a property setter. + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + + This overloads allows the use of a callback already + typed for the property type. + + Type of the property. Typically omitted as it can be inferred from the expression.The Lambda expression that sets a property to a value. + + mock.SetupSet(x => x.Suspended = true); + + + + + + Specifies a setup on the mocked type for a call to + to a property setter. + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + Lambda expression that sets a property to a value. + + mock.SetupSet(x => x.Suspended = true); + + + + + + Specifies that the given property should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. (this is also + known as "stubbing"). + + Type of the property, inferred from the property + expression (does not need to be specified). + Property expression to stub. + If you have an interface with an int property Value, you might + stub it using the following straightforward call: + + var mock = new Mock<IHaveValue>(); + mock.Stub(v => v.Value); + + After the Stub call has been issued, setting and + retrieving the object value will behave as expected: + + IHaveValue v = mock.Object; + + v.Value = 5; + Assert.Equal(5, v.Value); + + + + + + Specifies that the given property should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. This overload + allows setting the initial value for the property. (this is also + known as "stubbing"). + + Type of the property, inferred from the property + expression (does not need to be specified). + Property expression to stub.Initial value for the property. + If you have an interface with an int property Value, you might + stub it using the following straightforward call: + + var mock = new Mock<IHaveValue>(); + mock.SetupProperty(v => v.Value, 5); + + After the SetupProperty call has been issued, setting and + retrieving the object value will behave as expected: + + IHaveValue v = mock.Object; + // Initial value was stored + Assert.Equal(5, v.Value); + + // New value set which changes the initial value + v.Value = 6; + Assert.Equal(6, v.Value); + + + + + + Specifies that the all properties on the mock should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. (this is also + known as "stubbing"). The default value for each property will be the + one generated as specified by the property for the mock. + + If the mock is set to , + the mocked default values will also get all properties setup recursively. + + + + + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IProcessor>(); + // exercise mock + //... + // Will throw if the test code didn't call Execute with a "ping" string argument. + mock.Verify(proc => proc.Execute("ping")); + + The invocation was not performed on the mock.Expression to verify. + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called. + + + + Verifies that a specific invocation matching the given expression was performed on the mock, + specifying a failure error message. Use in conjuntion with the default + . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IProcessor>(); + // exercise mock + //... + // Will throw if the test code didn't call Execute with a "ping" string argument. + mock.Verify(proc => proc.Execute("ping")); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + + + + Verifies that a specific invocation matching the given expression was performed on the mock, + specifying a failure error message. Use in conjuntion with the default + . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails. + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't call HasInventory. + mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50)); + + The invocation was not performed on the mock.Expression to verify.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock. Use in conjuntion + with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock, specifying a failure + error message. + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't call HasInventory. + mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50), "When filling orders, inventory has to be checked"); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock, specifying a failure + error message. + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails.Type of return value from the expression. + + + + Verifies that a property was read on the mock. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was retrieved from it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't retrieve the IsClosed property. + mock.VerifyGet(warehouse => warehouse.IsClosed); + + The invocation was not performed on the mock.Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock, specifying a failure + error message. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was retrieved from it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't retrieve the IsClosed property. + mock.VerifyGet(warehouse => warehouse.IsClosed); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock, specifying a failure + error message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was set on the mock. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was set on it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed = true); + + The invocation was not performed on the mock.Expression to verify. + + + + Verifies that a property was set on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + + + + Verifies that a property was set on the mock, specifying + a failure message. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was set on it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed = true, "Warehouse should always be closed after the action"); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + + + + Verifies that a property was set on the mock, specifying + a failure message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + + + + Raises the event referenced in using + the given argument. + + The argument is + invalid for the target event invocation, or the is + not an event attach or detach expression. + + The following example shows how to raise a event: + + var mock = new Mock<IViewModel>(); + + mock.Raise(x => x.PropertyChanged -= null, new PropertyChangedEventArgs("Name")); + + + This example shows how to invoke an event with a custom event arguments + class in a view that will cause its corresponding presenter to + react by changing its state: + + var mockView = new Mock<IOrdersView>(); + var presenter = new OrdersPresenter(mockView.Object); + + // Check that the presenter has no selection by default + Assert.Null(presenter.SelectedOrder); + + // Raise the event with a specific arguments data + mockView.Raise(v => v.SelectionChanged += null, new OrderEventArgs { Order = new Order("moq", 500) }); + + // Now the presenter reacted to the event, and we have a selected order + Assert.NotNull(presenter.SelectedOrder); + Assert.Equal("moq", presenter.SelectedOrder.ProductName); + + + + + + Raises the event referenced in using + the given argument for a non-EventHandler typed event. + + The arguments are + invalid for the target event invocation, or the is + not an event attach or detach expression. + + The following example shows how to raise a custom event that does not adhere to + the standard EventHandler: + + var mock = new Mock<IViewModel>(); + + mock.Raise(x => x.MyEvent -= null, "Name", bool, 25); + + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Exposes the mocked object instance. + + + + + Implements the fluent API. + + + + + The expectation will be considered only in the former condition. + + + + + + + The expectation will be considered only in the former condition. + + + + + + + + Setups the get. + + The type of the property. + The expression. + + + + + Setups the set. + + The type of the property. + The setter expression. + + + + + Setups the set. + + The setter expression. + + + + + Determines the way default values are generated + calculated for loose mocks. + + + + + Default behavior, which generates empty values for + value types (i.e. default(int)), empty array and + enumerables, and nulls for all other reference types. + + + + + Whenever the default value generated by + is null, replaces this value with a mock (if the type + can be mocked). + + + For sealed classes, a null value will be generated. + + + + + A that returns an empty default value + for invocations that do not have setups or return values, with loose mocks. + This is the default behavior for a mock. + + + + + Interface to be implemented by classes that determine the + default value of non-expected invocations. + + + + + Defines the default value to return in all the methods returning . + The type of the return value.The value to set as default. + + + + Provides a value for the given member and arguments. + + The member to provide a default value for. + + + + + Provides partial evaluation of subtrees, whenever they can be evaluated locally. + + Matt Warren: http://blogs.msdn.com/mattwar + Documented by InSTEDD: http://www.instedd.org + + + + Performs evaluation and replacement of independent sub-trees + + The root of the expression tree. + A function that decides whether a given expression + node can be part of the local function. + A new tree with sub-trees evaluated and replaced. + + + + Performs evaluation and replacement of independent sub-trees + + The root of the expression tree. + A new tree with sub-trees evaluated and replaced. + + + + Evaluates and replaces sub-trees when first candidate is reached (top-down) + + + + + Performs bottom-up analysis to determine which nodes can possibly + be part of an evaluated sub-tree. + + + + + Casts the expression to a lambda expression, removing + a cast if there's any. + + + + + Casts the body of the lambda expression to a . + + If the body is not a method call. + + + + Converts the body of the lambda expression into the referenced by it. + + + + + Checks whether the body of the lambda expression is a property access. + + + + + Checks whether the expression is a property access. + + + + + Checks whether the body of the lambda expression is a property indexer, which is true + when the expression is an whose + has + equal to . + + + + + Checks whether the expression is a property indexer, which is true + when the expression is an whose + has + equal to . + + + + + Creates an expression that casts the given expression to the + type. + + + + + TODO: remove this code when https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331583 + is fixed. + + + + + The intention of is to create a more readable + string representation for the failure message. + + + + + Tracks the current mock and interception context. + + + + + Having an active fluent mock context means that the invocation + is being performed in "trial" mode, just to gather the + target method and arguments that need to be matched later + when the actual invocation is made. + + + + + Ensures the given is not null. + Throws otherwise. + + + + + Ensures the given string is not null or empty. + Throws in the first case, or + in the latter. + + + + + Checks an argument to ensure it is in the specified range including the edges. + + Type of the argument to check, it must be an type. + + The expression containing the name of the argument. + The argument value to check. + The minimun allowed value for the argument. + The maximun allowed value for the argument. + + + + Checks an argument to ensure it is in the specified range excluding the edges. + + Type of the argument to check, it must be an type. + + The expression containing the name of the argument. + The argument value to check. + The minimun allowed value for the argument. + The maximun allowed value for the argument. + + + + Implemented by all generated mock object instances. + + + + + Implemented by all generated mock object instances. + + + + + Reference the Mock that contains this as the mock.Object value. + + + + + Reference the Mock that contains this as the mock.Object value. + + + + + Implements the actual interception and method invocation for + all mocks. + + + + + Get an eventInfo for a given event name. Search type ancestors depth first if necessary. + + Name of the event, with the set_ or get_ prefix already removed + + + + Given a type return all of its ancestors, both types and interfaces. + + The type to find immediate ancestors of + + + + Allows the specification of a matching condition for an + argument in a method invocation, rather than a specific + argument value. "It" refers to the argument being matched. + + This class allows the setup to match a method invocation + with an arbitrary value, with a value in a specified range, or + even one that matches a given predicate. + + + + + Matches any value of the given type. + + Typically used when the actual argument value for a method + call is not relevant. + + + // Throws an exception for a call to Remove with any string value. + mock.Setup(x => x.Remove(It.IsAny<string>())).Throws(new InvalidOperationException()); + + Type of the value. + + + + Matches any value that satisfies the given predicate. + Type of the argument to check.The predicate used to match the method argument. + Allows the specification of a predicate to perform matching + of method call arguments. + + This example shows how to return the value 1 whenever the argument to the + Do method is an even number. + + mock.Setup(x => x.Do(It.Is<int>(i => i % 2 == 0))) + .Returns(1); + + This example shows how to throw an exception if the argument to the + method is a negative number: + + mock.Setup(x => x.GetUser(It.Is<int>(i => i < 0))) + .Throws(new ArgumentException()); + + + + + + Matches any value that is in the range specified. + Type of the argument to check.The lower bound of the range.The upper bound of the range. + The kind of range. See . + + The following example shows how to expect a method call + with an integer argument within the 0..100 range. + + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsInRange(0, 100, Range.Inclusive))) + .Returns(false); + + + + + + Matches a string argument if it matches the given regular expression pattern. + The pattern to use to match the string argument value. + The following example shows how to expect a call to a method where the + string argument matches the given regular expression: + + mock.Setup(x => x.Check(It.IsRegex("[a-z]+"))).Returns(1); + + + + + + Matches a string argument if it matches the given regular expression pattern. + The pattern to use to match the string argument value.The options used to interpret the pattern. + The following example shows how to expect a call to a method where the + string argument matches the given regular expression, in a case insensitive way: + + mock.Setup(x => x.Check(It.IsRegex("[a-z]+", RegexOptions.IgnoreCase))).Returns(1); + + + + + + Implements the fluent API. + + + + + Defines the Callback verb and overloads. + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2) => Console.WriteLine(arg1 + arg2)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3) => Console.WriteLine(arg1 + arg2 + arg3)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); + + + + + + Specifies a callback to invoke when the method is called. + + The callback method to invoke. + + The following example specifies a callback to set a boolean + value that can be used later: + + var called = false; + mock.Setup(x => x.Execute()) + .Callback(() => called = true); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The argument type of the invoked method. + The callback method to invoke. + + Invokes the given callback with the concrete invocation argument value. + + Notice how the specific string argument is retrieved by simply declaring + it as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Callback((string command) => Console.WriteLine(command)); + + + + + + Defines occurrence members to constraint setups. + + + + + The expected invocation can happen at most once. + + + + var mock = new Mock<ICommand>(); + mock.Setup(foo => foo.Execute("ping")) + .AtMostOnce(); + + + + + + The expected invocation can happen at most specified number of times. + + The number of times to accept calls. + + + var mock = new Mock<ICommand>(); + mock.Setup(foo => foo.Execute("ping")) + .AtMost( 5 ); + + + + + + Defines the Raises verb. + + + + + Specifies the event that will be raised + when the setup is met. + + An expression that represents an event attach or detach action. + The event arguments to pass for the raised event. + + The following example shows how to raise an event when + the setup is met: + + var mock = new Mock<IContainer>(); + + mock.Setup(add => add.Add(It.IsAny<string>(), It.IsAny<object>())) + .Raises(add => add.Added += null, EventArgs.Empty); + + + + + + Specifies the event that will be raised + when the setup is matched. + + An expression that represents an event attach or detach action. + A function that will build the + to pass when raising the event. + + + + + Specifies the custom event that will be raised + when the setup is matched. + + An expression that represents an event attach or detach action. + The arguments to pass to the custom delegate (non EventHandler-compatible). + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + The type of the fifteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + The type of the fifteenth argument received by the expected invocation. + The type of the sixteenth argument received by the expected invocation. + + + + + Defines the Verifiable verb. + + + + + Marks the expectation as verifiable, meaning that a call + to will check if this particular + expectation was met. + + + The following example marks the expectation as verifiable: + + mock.Expect(x => x.Execute("ping")) + .Returns(true) + .Verifiable(); + + + + + + Marks the expectation as verifiable, meaning that a call + to will check if this particular + expectation was met, and specifies a message for failures. + + + The following example marks the expectation as verifiable: + + mock.Expect(x => x.Execute("ping")) + .Returns(true) + .Verifiable("Ping should be executed always!"); + + + + + + Implements the fluent API. + + + + + Implements the fluent API. + + + + + Defines the Throws verb. + + + + + Specifies the exception to throw when the method is invoked. + + Exception instance to throw. + + This example shows how to throw an exception when the method is + invoked with an empty string argument: + + mock.Setup(x => x.Execute("")) + .Throws(new ArgumentException()); + + + + + + Specifies the type of exception to throw when the method is invoked. + + Type of exception to instantiate and throw when the setup is matched. + + This example shows how to throw an exception when the method is + invoked with an empty string argument: + + mock.Setup(x => x.Execute("")) + .Throws<ArgumentException>(); + + + + + + Implements the fluent API. + + + + + Implements the fluent API. + + + + + Defines the Callback verb and overloads for callbacks on + setups that return a value. + + Mocked type. + Type of the return value of the setup. + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2) => Console.WriteLine(arg1 + arg2)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3) => Console.WriteLine(arg1 + arg2 + arg3)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); + + + + + + Specifies a callback to invoke when the method is called. + + The callback method to invoke. + + The following example specifies a callback to set a boolean value that can be used later: + + var called = false; + mock.Setup(x => x.Execute()) + .Callback(() => called = true) + .Returns(true); + + Note that in the case of value-returning methods, after the Callback + call you can still specify the return value. + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the argument of the invoked method. + Callback method to invoke. + + Invokes the given callback with the concrete invocation argument value. + + Notice how the specific string argument is retrieved by simply declaring + it as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Callback(command => Console.WriteLine(command)) + .Returns(true); + + + + + + Implements the fluent API. + + + + + Defines the Returns verb. + + Mocked type. + Type of the return value from the expression. + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2) => arg1 + arg2); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3) => arg1 + arg2 + arg3); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4) => arg1 + arg2 + arg3 + arg4); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5) => arg1 + arg2 + arg3 + arg4 + arg5); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16); + + + + + + Specifies the value to return. + + The value to return, or . + + Return a true value from the method call: + + mock.Setup(x => x.Execute("ping")) + .Returns(true); + + + + + + Specifies a function that will calculate the value to return from the method. + + The function that will calculate the return value. + + Return a calculated value when the method is called: + + mock.Setup(x => x.Execute("ping")) + .Returns(() => returnValues[0]); + + The lambda expression to retrieve the return value is lazy-executed, + meaning that its value may change depending on the moment the method + is executed and the value the returnValues array has at + that moment. + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the argument of the invoked method. + The function that will calculate the return value. + + Return a calculated value which is evaluated lazily at the time of the invocation. + + The lookup list can change between invocations and the setup + will return different values accordingly. Also, notice how the specific + string argument is retrieved by simply declaring it as part of the lambda + expression: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Returns((string command) => returnValues[command]); + + + + + + Implements the fluent API. + + + + + Defines the Callback verb for property getter setups. + + + Mocked type. + Type of the property. + + + + Specifies a callback to invoke when the property is retrieved. + + Callback method to invoke. + + Invokes the given callback with the property value being set. + + mock.SetupGet(x => x.Suspended) + .Callback(() => called = true) + .Returns(true); + + + + + + Implements the fluent API. + + + + + Defines the Returns verb for property get setups. + + Mocked type. + Type of the property. + + + + Specifies the value to return. + + The value to return, or . + + Return a true value from the property getter call: + + mock.SetupGet(x => x.Suspended) + .Returns(true); + + + + + + Specifies a function that will calculate the value to return for the property. + + The function that will calculate the return value. + + Return a calculated value when the property is retrieved: + + mock.SetupGet(x => x.Suspended) + .Returns(() => returnValues[0]); + + The lambda expression to retrieve the return value is lazy-executed, + meaning that its value may change depending on the moment the property + is retrieved and the value the returnValues array has at + that moment. + + + + + Implements the fluent API. + + + + + Defines the Callback verb for property setter setups. + + Type of the property. + + + + Specifies a callback to invoke when the property is set that receives the + property value being set. + + Callback method to invoke. + + Invokes the given callback with the property value being set. + + mock.SetupSet(x => x.Suspended) + .Callback((bool state) => Console.WriteLine(state)); + + + + + + Language for ReturnSequence + + + + + Returns value + + + + + Throws an exception + + + + + Throws an exception + + + + + The first method call or member access will be the + last segment of the expression (depth-first traversal), + which is the one we have to Setup rather than FluentMock. + And the last one is the one we have to Mock.Get rather + than FluentMock. + + + + + A default implementation of IQueryable for use with QueryProvider + + + + + The is a + static method that returns an IQueryable of Mocks of T which is used to + apply the linq specification to. + + + + + Utility repository class to use to construct multiple + mocks when consistent verification is + desired for all of them. + + + If multiple mocks will be created during a test, passing + the desired (if different than the + or the one + passed to the repository constructor) and later verifying each + mock can become repetitive and tedious. + + This repository class helps in that scenario by providing a + simplified creation of multiple mocks with a default + (unless overriden by calling + ) and posterior verification. + + + + The following is a straightforward example on how to + create and automatically verify strict mocks using a : + + var repository = new MockRepository(MockBehavior.Strict); + + var foo = repository.Create<IFoo>(); + var bar = repository.Create<IBar>(); + + // no need to call Verifiable() on the setup + // as we'll be validating all of them anyway. + foo.Setup(f => f.Do()); + bar.Setup(b => b.Redo()); + + // exercise the mocks here + + repository.VerifyAll(); + // At this point all setups are already checked + // and an optional MockException might be thrown. + // Note also that because the mocks are strict, any invocation + // that doesn't have a matching setup will also throw a MockException. + + The following examples shows how to setup the repository + to create loose mocks and later verify only verifiable setups: + + var repository = new MockRepository(MockBehavior.Loose); + + var foo = repository.Create<IFoo>(); + var bar = repository.Create<IBar>(); + + // this setup will be verified when we verify the repository + foo.Setup(f => f.Do()).Verifiable(); + + // this setup will NOT be verified + foo.Setup(f => f.Calculate()); + + // this setup will be verified when we verify the repository + bar.Setup(b => b.Redo()).Verifiable(); + + // exercise the mocks here + // note that because the mocks are Loose, members + // called in the interfaces for which no matching + // setups exist will NOT throw exceptions, + // and will rather return default values. + + repository.Verify(); + // At this point verifiable setups are already checked + // and an optional MockException might be thrown. + + The following examples shows how to setup the repository with a + default strict behavior, overriding that default for a + specific mock: + + var repository = new MockRepository(MockBehavior.Strict); + + // this particular one we want loose + var foo = repository.Create<IFoo>(MockBehavior.Loose); + var bar = repository.Create<IBar>(); + + // specify setups + + // exercise the mocks here + + repository.Verify(); + + + + + + + Utility factory class to use to construct multiple + mocks when consistent verification is + desired for all of them. + + + If multiple mocks will be created during a test, passing + the desired (if different than the + or the one + passed to the factory constructor) and later verifying each + mock can become repetitive and tedious. + + This factory class helps in that scenario by providing a + simplified creation of multiple mocks with a default + (unless overriden by calling + ) and posterior verification. + + + + The following is a straightforward example on how to + create and automatically verify strict mocks using a : + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(); + var bar = factory.Create<IBar>(); + + // no need to call Verifiable() on the setup + // as we'll be validating all of them anyway. + foo.Setup(f => f.Do()); + bar.Setup(b => b.Redo()); + + // exercise the mocks here + + factory.VerifyAll(); + // At this point all setups are already checked + // and an optional MockException might be thrown. + // Note also that because the mocks are strict, any invocation + // that doesn't have a matching setup will also throw a MockException. + + The following examples shows how to setup the factory + to create loose mocks and later verify only verifiable setups: + + var factory = new MockFactory(MockBehavior.Loose); + + var foo = factory.Create<IFoo>(); + var bar = factory.Create<IBar>(); + + // this setup will be verified when we verify the factory + foo.Setup(f => f.Do()).Verifiable(); + + // this setup will NOT be verified + foo.Setup(f => f.Calculate()); + + // this setup will be verified when we verify the factory + bar.Setup(b => b.Redo()).Verifiable(); + + // exercise the mocks here + // note that because the mocks are Loose, members + // called in the interfaces for which no matching + // setups exist will NOT throw exceptions, + // and will rather return default values. + + factory.Verify(); + // At this point verifiable setups are already checked + // and an optional MockException might be thrown. + + The following examples shows how to setup the factory with a + default strict behavior, overriding that default for a + specific mock: + + var factory = new MockFactory(MockBehavior.Strict); + + // this particular one we want loose + var foo = factory.Create<IFoo>(MockBehavior.Loose); + var bar = factory.Create<IBar>(); + + // specify setups + + // exercise the mocks here + + factory.Verify(); + + + + + + + Initializes the factory with the given + for newly created mocks from the factory. + + The behavior to use for mocks created + using the factory method if not overriden + by using the overload. + + + + Creates a new mock with the default + specified at factory construction time. + + Type to mock. + A new . + + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(); + // use mock on tests + + factory.VerifyAll(); + + + + + + Creates a new mock with the default + specified at factory construction time and with the + the given constructor arguments for the class. + + + The mock will try to find the best match constructor given the + constructor arguments, and invoke that to initialize the instance. + This applies only to classes, not interfaces. + + Type to mock. + Constructor arguments for mocked classes. + A new . + + + var factory = new MockFactory(MockBehavior.Default); + + var mock = factory.Create<MyBase>("Foo", 25, true); + // use mock on tests + + factory.Verify(); + + + + + + Creates a new mock with the given . + + Type to mock. + Behavior to use for the mock, which overrides + the default behavior specified at factory construction time. + A new . + + The following example shows how to create a mock with a different + behavior to that specified as the default for the factory: + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(MockBehavior.Loose); + + + + + + Creates a new mock with the given + and with the the given constructor arguments for the class. + + + The mock will try to find the best match constructor given the + constructor arguments, and invoke that to initialize the instance. + This applies only to classes, not interfaces. + + Type to mock. + Behavior to use for the mock, which overrides + the default behavior specified at factory construction time. + Constructor arguments for mocked classes. + A new . + + The following example shows how to create a mock with a different + behavior to that specified as the default for the factory, passing + constructor arguments: + + var factory = new MockFactory(MockBehavior.Default); + + var mock = factory.Create<MyBase>(MockBehavior.Strict, "Foo", 25, true); + + + + + + Implements creation of a new mock within the factory. + + Type to mock. + The behavior for the new mock. + Optional arguments for the construction of the mock. + + + + Verifies all verifiable expectations on all mocks created + by this factory. + + + One or more mocks had expectations that were not satisfied. + + + + Verifies all verifiable expectations on all mocks created + by this factory. + + + One or more mocks had expectations that were not satisfied. + + + + Invokes for each mock + in , and accumulates the resulting + that might be + thrown from the action. + + The action to execute against + each mock. + + + + Whether the base member virtual implementation will be called + for mocked classes if no setup is matched. Defaults to . + + + + + Specifies the behavior to use when returning default values for + unexpected invocations on loose mocks. + + + + + Gets the mocks that have been created by this factory and + that will get verified together. + + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The type of the mocked object to query. + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The predicate with the setup expressions. + The type of the mocked object to query. + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the setup expressions. + The type of the mocked object. + The mocked object created. + + + + Creates the mock query with the underlying queriable implementation. + + + + + Wraps the enumerator inside a queryable. + + + + + Method that is turned into the actual call from .Query{T}, to + transform the queryable query into a normal enumerable query. + This method is never used directly by consumers. + + + + + Initializes the repository with the given + for newly created mocks from the repository. + + The behavior to use for mocks created + using the repository method if not overriden + by using the overload. + + + + Allows querying the universe of mocks for those that behave + according to the LINQ query specification. + + + This entry-point into Linq to Mocks is the only one in the root Moq + namespace to ease discovery. But to get all the mocking extension + methods on Object, a using of Moq.Linq must be done, so that the + polluting of the intellisense for all objects is an explicit opt-in. + + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The type of the mocked object to query. + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The predicate with the setup expressions. + The type of the mocked object to query. + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the setup expressions. + The type of the mocked object. + The mocked object created. + + + + Creates the mock query with the underlying queriable implementation. + + + + + Wraps the enumerator inside a queryable. + + + + + Method that is turned into the actual call from .Query{T}, to + transform the queryable query into a normal enumerable query. + This method is never used directly by consumers. + + + + + Extension method used to support Linq-like setup properties that are not virtual but do have + a getter and a setter, thereby allowing the use of Linq to Mocks to quickly initialize Dtos too :) + + + + + Helper extensions that are used by the query translator. + + + + + Retrieves a fluent mock from the given setup expression. + + + + + Allows creation custom value matchers that can be used on setups and verification, + completely replacing the built-in class with your own argument + matching rules. + + See also . + + + + + Provided for the sole purpose of rendering the delegate passed to the + matcher constructor if no friendly render lambda is provided. + + + + + Initializes the match with the condition that + will be checked in order to match invocation + values. + The condition to match against actual values. + + + + + + + + + This method is used to set an expression as the last matcher invoked, + which is used in the SetupSet to allow matchers in the prop = value + delegate expression. This delegate is executed in "fluent" mode in + order to capture the value being set, and construct the corresponding + methodcall. + This is also used in the MatcherFactory for each argument expression. + This method ensures that when we execute the delegate, we + also track the matcher that was invoked, so that when we create the + methodcall we build the expression using it, rather than the null/default + value returned from the actual invocation. + + + + + Allows creation custom value matchers that can be used on setups and verification, + completely replacing the built-in class with your own argument + matching rules. + Type of the value to match. + The argument matching is used to determine whether a concrete + invocation in the mock matches a given setup. This + matching mechanism is fully extensible. + + Creating a custom matcher is straightforward. You just need to create a method + that returns a value from a call to with + your matching condition and optional friendly render expression: + + [Matcher] + public Order IsBigOrder() + { + return Match<Order>.Create( + o => o.GrandTotal >= 5000, + /* a friendly expression to render on failures */ + () => IsBigOrder()); + } + + This method can be used in any mock setup invocation: + + mock.Setup(m => m.Submit(IsBigOrder()).Throws<UnauthorizedAccessException>(); + + At runtime, Moq knows that the return value was a matcher (note that the method MUST be + annotated with the [Matcher] attribute in order to determine this) and + evaluates your predicate with the actual value passed into your predicate. + + Another example might be a case where you want to match a lists of orders + that contains a particular one. You might create matcher like the following: + + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return Match<IEnumerable<Order>>.Create(orders => orders.Contains(order)); + } + } + + Now we can invoke this static method instead of an argument in an + invocation: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + + + + + Marks a method as a matcher, which allows complete replacement + of the built-in class with your own argument + matching rules. + + + This feature has been deprecated in favor of the new + and simpler . + + + The argument matching is used to determine whether a concrete + invocation in the mock matches a given setup. This + matching mechanism is fully extensible. + + + There are two parts of a matcher: the compiler matcher + and the runtime matcher. + + + Compiler matcher + Used to satisfy the compiler requirements for the + argument. Needs to be a method optionally receiving any arguments + you might need for the matching, but with a return type that + matches that of the argument. + + Let's say I want to match a lists of orders that contains + a particular one. I might create a compiler matcher like the following: + + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return null; + } + } + + Now we can invoke this static method instead of an argument in an + invocation: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + Note that the return value from the compiler matcher is irrelevant. + This method will never be called, and is just used to satisfy the + compiler and to signal Moq that this is not a method that we want + to be invoked at runtime. + + + + Runtime matcher + + The runtime matcher is the one that will actually perform evaluation + when the test is run, and is defined by convention to have the + same signature as the compiler matcher, but where the return + value is the first argument to the call, which contains the + object received by the actual invocation at runtime: + + public static bool Contains(IEnumerable<Order> orders, Order order) + { + return orders.Contains(order); + } + + At runtime, the mocked method will be invoked with a specific + list of orders. This value will be passed to this runtime + matcher as the first argument, while the second argument is the + one specified in the setup (x.Save(Orders.Contains(order))). + + The boolean returned determines whether the given argument has been + matched. If all arguments to the expected method are matched, then + the setup matches and is evaluated. + + + + + + Using this extensible infrastructure, you can easily replace the entire + set of matchers with your own. You can also avoid the + typical (and annoying) lengthy expressions that result when you have + multiple arguments that use generics. + + + The following is the complete example explained above: + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return null; + } + + public static bool Contains(IEnumerable<Order> orders, Order order) + { + return orders.Contains(order); + } + } + + And the concrete test using this matcher: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + // use mock, invoke Save, and have the matcher filter. + + + + + + Matcher to treat static functions as matchers. + + mock.Setup(x => x.StringMethod(A.MagicString())); + + public static class A + { + [Matcher] + public static string MagicString() { return null; } + public static bool MagicString(string arg) + { + return arg == "magic"; + } + } + + Will succeed if: mock.Object.StringMethod("magic"); + and fail with any other call. + + + + + We need this non-generics base class so that + we can use from + generic code. + + + + + Options to customize the behavior of the mock. + + + + + Causes the mock to always throw + an exception for invocations that don't have a + corresponding setup. + + + + + Will never throw exceptions, returning default + values when necessary (null for reference types, + zero for value types or empty enumerables and arrays). + + + + + Default mock behavior, which equals . + + + + + A that returns an empty default value + for non-mockeable types, and mocks for all other types (interfaces and + non-sealed classes) that can be mocked. + + + + + Exception thrown by mocks when setups are not matched, + the mock is not properly setup, etc. + + + A distinct exception type is provided so that exceptions + thrown by the mock can be differentiated in tests that + expect other exceptions to be thrown (i.e. ArgumentException). + + Richer exception hierarchy/types are not provided as + tests typically should not catch or expect exceptions + from the mocks. These are typically the result of changes + in the tested class or its collaborators implementation, and + result in fixes in the mock setup so that they dissapear and + allow the test to pass. + + + + + + Made internal as it's of no use for + consumers, but it's important for + our own tests. + + + + + Used by the mock factory to accumulate verification + failures. + + + + + Helper class to setup a full trace between many mocks + + + + + Initialize a trace setup + + + + + Allow sequence to be repeated + + + + + define nice api + + + + + Perform an expectation in the trace. + + + + + Provides legacy API members as extensions so that + existing code continues to compile, but new code + doesn't see then. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Provides additional methods on mocks. + + + Provided as extension methods as they confuse the compiler + with the overloads taking Action. + + + + + Specifies a setup on the mocked type for a call to + to a property setter, regardless of its value. + + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + + Type of the property. Typically omitted as it can be inferred from the expression. + Type of the mock. + The target mock for the setup. + Lambda expression that specifies the property setter. + + + mock.SetupSet(x => x.Suspended); + + + + This method is not legacy, but must be on an extension method to avoid + confusing the compiler with the new Action syntax. + + + + + Verifies that a property has been set on the mock, regarless of its value. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + Expression to verify. + The mock instance. + Mocked type. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, specifying a failure + error message. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + Expression to verify. + Message to show if verification fails. + The mock instance. + Mocked type. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, regardless + of the value but only the specified number of times. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + The invocation was not call the times specified by + . + The mock instance. + Mocked type. + The number of times a method is allowed to be called. + Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, regardless + of the value but only the specified number of times, and specifying a failure + error message. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + The invocation was not call the times specified by + . + The mock instance. + Mocked type. + The number of times a method is allowed to be called. + Message to show if verification fails. + Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Allows setups to be specified for protected members by using their + name as a string, rather than strong-typing them which is not possible + due to their visibility. + + + + + Specifies a setup for a void method invocation with the given + , optionally specifying arguments for the method call. + + The name of the void method to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + + + + Specifies a setup for an invocation on a property or a non void method with the given + , optionally specifying arguments for the method call. + + The name of the method or property to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + The return type of the method or property. + + + + Specifies a setup for an invocation on a property getter with the given + . + + The name of the property. + The type of the property. + + + + Specifies a setup for an invocation on a property setter with the given + . + + The name of the property. + The property value. If argument matchers are used, + remember to use rather than . + The type of the property. + + + + Specifies a verify for a void method with the given , + optionally specifying arguments for the method call. Use in conjuntion with the default + . + + The invocation was not call the times specified by + . + The name of the void method to be verified. + The number of times a method is allowed to be called. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + + + + Specifies a verify for an invocation on a property or a non void method with the given + , optionally specifying arguments for the method call. + + The invocation was not call the times specified by + . + The name of the method or property to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + The number of times a method is allowed to be called. + The type of return value from the expression. + + + + Specifies a verify for an invocation on a property getter with the given + . + The invocation was not call the times specified by + . + + The name of the property. + The number of times a method is allowed to be called. + The type of the property. + + + + Specifies a setup for an invocation on a property setter with the given + . + + The invocation was not call the times specified by + . + The name of the property. + The number of times a method is allowed to be called. + The property value. + The type of the property. If argument matchers are used, + remember to use rather than . + + + + Allows the specification of a matching condition for an + argument in a protected member setup, rather than a specific + argument value. "ItExpr" refers to the argument being matched. + + + Use this variant of argument matching instead of + for protected setups. + This class allows the setup to match a method invocation + with an arbitrary value, with a value in a specified range, or + even one that matches a given predicate, or null. + + + + + Matches a null value of the given type. + + + Required for protected mocks as the null value cannot be used + directly as it prevents proper method overload selection. + + + + // Throws an exception for a call to Remove with a null string value. + mock.Protected() + .Setup("Remove", ItExpr.IsNull<string>()) + .Throws(new InvalidOperationException()); + + + Type of the value. + + + + Matches any value of the given type. + + + Typically used when the actual argument value for a method + call is not relevant. + + + + // Throws an exception for a call to Remove with any string value. + mock.Protected() + .Setup("Remove", ItExpr.IsAny<string>()) + .Throws(new InvalidOperationException()); + + + Type of the value. + + + + Matches any value that satisfies the given predicate. + + Type of the argument to check. + The predicate used to match the method argument. + + Allows the specification of a predicate to perform matching + of method call arguments. + + + This example shows how to return the value 1 whenever the argument to the + Do method is an even number. + + mock.Protected() + .Setup("Do", ItExpr.Is<int>(i => i % 2 == 0)) + .Returns(1); + + This example shows how to throw an exception if the argument to the + method is a negative number: + + mock.Protected() + .Setup("GetUser", ItExpr.Is<int>(i => i < 0)) + .Throws(new ArgumentException()); + + + + + + Matches any value that is in the range specified. + + Type of the argument to check. + The lower bound of the range. + The upper bound of the range. + The kind of range. See . + + The following example shows how to expect a method call + with an integer argument within the 0..100 range. + + mock.Protected() + .Setup("HasInventory", + ItExpr.IsAny<string>(), + ItExpr.IsInRange(0, 100, Range.Inclusive)) + .Returns(false); + + + + + + Matches a string argument if it matches the given regular expression pattern. + + The pattern to use to match the string argument value. + + The following example shows how to expect a call to a method where the + string argument matches the given regular expression: + + mock.Protected() + .Setup("Check", ItExpr.IsRegex("[a-z]+")) + .Returns(1); + + + + + + Matches a string argument if it matches the given regular expression pattern. + + The pattern to use to match the string argument value. + The options used to interpret the pattern. + + The following example shows how to expect a call to a method where the + string argument matches the given regular expression, in a case insensitive way: + + mock.Protected() + .Setup("Check", ItExpr.IsRegex("[a-z]+", RegexOptions.IgnoreCase)) + .Returns(1); + + + + + + Enables the Protected() method on , + allowing setups to be set for protected members by using their + name as a string, rather than strong-typing them which is not possible + due to their visibility. + + + + + Enable protected setups for the mock. + + Mocked object type. Typically omitted as it can be inferred from the mock instance. + The mock to set the protected setups on. + + + + + + + + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Mock type has already been initialized by accessing its Object property. Adding interfaces must be done before that.. + + + + + Looks up a localized string similar to Value cannot be an empty string.. + + + + + Looks up a localized string similar to Can only add interfaces to the mock.. + + + + + Looks up a localized string similar to Can't set return value for void method {0}.. + + + + + Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks.. + + + + + Looks up a localized string similar to A matching constructor for the given arguments was not found on the mocked type.. + + + + + Looks up a localized string similar to Could not locate event for attach or detach method {0}.. + + + + + Looks up a localized string similar to Expression {0} involves a field access, which is not supported. Use properties instead.. + + + + + Looks up a localized string similar to Type to mock must be an interface or an abstract or non-sealed class. . + + + + + Looks up a localized string similar to Cannot retrieve a mock with the given object type {0} as it's not the main type of the mock or any of its additional interfaces. + Please cast the argument to one of the supported types: {1}. + Remember that there's no generics covariance in the CLR, so your object must be one of these types in order for the call to succeed.. + + + + + Looks up a localized string similar to The equals ("==" or "=" in VB) and the conditional 'and' ("&&" or "AndAlso" in VB) operators are the only ones supported in the query specification expression. Unsupported expression: {0}. + + + + + Looks up a localized string similar to LINQ method '{0}' not supported.. + + + + + Looks up a localized string similar to Expression contains a call to a method which is not virtual (overridable in VB) or abstract. Unsupported expression: {0}. + + + + + Looks up a localized string similar to Member {0}.{1} does not exist.. + + + + + Looks up a localized string similar to Method {0}.{1} is public. Use strong-typed Expect overload instead: + mock.Setup(x => x.{1}()); + . + + + + + Looks up a localized string similar to {0} invocation failed with mock behavior {1}. + {2}. + + + + + Looks up a localized string similar to Expected only {0} calls to {1}.. + + + + + Looks up a localized string similar to Expected only one call to {0}.. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at least {2} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at least once, but was never performed: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at most {3} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at most once, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock between {2} and {3} times (Exclusive), but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock between {2} and {3} times (Inclusive), but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock exactly {2} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock should never have been performed, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock once, but was {4} times: {1}. + + + + + Looks up a localized string similar to All invocations on the mock must have a corresponding setup.. + + + + + Looks up a localized string similar to Object instance was not created by Moq.. + + + + + Looks up a localized string similar to Out expression must evaluate to a constant value.. + + + + + Looks up a localized string similar to Property {0}.{1} does not have a getter.. + + + + + Looks up a localized string similar to Property {0}.{1} does not exist.. + + + + + Looks up a localized string similar to Property {0}.{1} is write-only.. + + + + + Looks up a localized string similar to Property {0}.{1} is read-only.. + + + + + Looks up a localized string similar to Property {0}.{1} does not have a setter.. + + + + + Looks up a localized string similar to Cannot raise a mocked event unless it has been associated (attached) to a concrete event in a mocked object.. + + + + + Looks up a localized string similar to Ref expression must evaluate to a constant value.. + + + + + Looks up a localized string similar to Invocation needs to return a value and therefore must have a corresponding setup that provides it.. + + + + + Looks up a localized string similar to A lambda expression is expected as the argument to It.Is<T>.. + + + + + Looks up a localized string similar to Invocation {0} should not have been made.. + + + + + Looks up a localized string similar to Expression is not a method invocation: {0}. + + + + + Looks up a localized string similar to Expression is not a property access: {0}. + + + + + Looks up a localized string similar to Expression is not a property setter invocation.. + + + + + Looks up a localized string similar to Expression references a method that does not belong to the mocked object: {0}. + + + + + Looks up a localized string similar to Invalid setup on a non-virtual (overridable in VB) member: {0}. + + + + + Looks up a localized string similar to Type {0} does not implement required interface {1}. + + + + + Looks up a localized string similar to Type {0} does not from required type {1}. + + + + + Looks up a localized string similar to To specify a setup for public property {0}.{1}, use the typed overloads, such as: + mock.Setup(x => x.{1}).Returns(value); + mock.SetupGet(x => x.{1}).Returns(value); //equivalent to previous one + mock.SetupSet(x => x.{1}).Callback(callbackDelegate); + . + + + + + Looks up a localized string similar to Unsupported expression: {0}. + + + + + Looks up a localized string similar to Only property accesses are supported in intermediate invocations on a setup. Unsupported expression {0}.. + + + + + Looks up a localized string similar to Expression contains intermediate property access {0}.{1} which is of type {2} and cannot be mocked. Unsupported expression {3}.. + + + + + Looks up a localized string similar to Setter expression cannot use argument matchers that receive parameters.. + + + + + Looks up a localized string similar to Member {0} is not supported for protected mocking.. + + + + + Looks up a localized string similar to Setter expression can only use static custom matchers.. + + + + + Looks up a localized string similar to The following setups were not matched: + {0}. + + + + + Looks up a localized string similar to Invalid verify on a non-virtual (overridable in VB) member: {0}. + + + + + Kind of range to use in a filter specified through + . + + + + + The range includes the to and + from values. + + + + + The range does not include the to and + from values. + + + + + Helper for sequencing return values in the same method. + + + + + Return a sequence of values, once per call. + + + + + Defines the number of invocations allowed by a mocked method. + + + + + Specifies that a mocked method should be invoked times as minimum. + The minimun number of times.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked one time as minimum. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked time as maximun. + The maximun number of times.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked one time as maximun. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked between and + times. + The minimun number of times.The maximun number of times. + The kind of range. See . + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked exactly times. + The times that a method or property can be called.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should not be invoked. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked exactly one time. + An object defining the allowed number of invocations. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Determines whether two specified objects have the same value. + + The first . + + The second . + + true if the value of left is the same as the value of right; otherwise, false. + + + + + Determines whether two specified objects have different values. + + The first . + + The second . + + true if the value of left is different from the value of right; otherwise, false. + + + + diff --git a/packages/mongocsharpdriver.1.2/License.rtf b/packages/mongocsharpdriver.1.2/License.rtf index 7b885ef..911ddbc 100644 --- a/packages/mongocsharpdriver.1.2/License.rtf +++ b/packages/mongocsharpdriver.1.2/License.rtf @@ -1,174 +1,174 @@ -{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;} -{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} -{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} -{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f59\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f60\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} -{\f62\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f63\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f64\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f65\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} -{\f66\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f67\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f379\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f380\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} -{\f382\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f383\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f386\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f387\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} -{\f409\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f410\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f412\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f413\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} -{\f416\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f417\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} -{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} -{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} -{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} -{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0; -\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22 }{\*\defpap -\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 -\af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 \styrsid6517486 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* -\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1 -\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31506\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused \sqformat Normal Table;}} -{\*\rsidtbl \rsid658138\rsid6517486\rsid8002733\rsid11818273\rsid14620378}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Robert Stam}{\operator Robert Stam} -{\creatim\yr2010\mo10\dy1\hr11\min43}{\revtim\yr2011\mo1\dy25\hr18\min14}{\version3}{\edmins2}{\nofpages1}{\nofwords82}{\nofchars471}{\*\company 10gen}{\nofcharsws552}{\vern32771}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml} -}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect -\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen -\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1 -\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct -\asianbrkrule\rsidroot14620378\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0 -{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sectrsid658138\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}} -{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (} -{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar -\ql \li0\ri0\widctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14620378 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 Copyright 2010}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid8002733 -2011}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 - 10gen Inc. -\par -\par Licensed under the Apache License, Version 2.0 (the "License");}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 -you may not use this file except in compliance with the License.}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 -You may obtain a copy of the License at -\par -\par http://www.apache.org/licenses/LICENSE-2.0 -\par -\par Unless required by applicable law or agreed to in writing, software}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 -distributed under the License is distributed on an "AS IS" BASIS,}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 -See the License for the specific language governing permissions and}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 -limitations under the License. -\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid6517486 -\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8 -72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7 -2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b -44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7 -065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000 -00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08 -84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc -52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353 -bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468 -656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c -070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7 -29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65 -312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8 -a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04 -98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c -94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471 -7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671 -9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1 -e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5 -193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1 -17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2 -8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6 -6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a -668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847 -bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e -16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b -5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0 -8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2 -c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966 -0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b -7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb -9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0 -088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf -8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26 -ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0 -28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6 -345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93 -b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30 -254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74 -68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24 -51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198 -720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528 -a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000 -000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000 -002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468 -656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000 -00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000 -00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000} -{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d -617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 -6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 -656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} -{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; -\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9; -\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7; -\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000 -4d73786d6c322e534158584d4c5265616465722e352e3000000000000000000000060000 -d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f0000000000000000000000001027 -2192e5bccb01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 -000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;} +{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} +{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f59\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f60\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} +{\f62\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f63\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f64\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f65\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} +{\f66\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f67\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f379\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f380\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} +{\f382\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f383\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f386\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f387\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} +{\f409\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f410\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f412\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f413\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} +{\f416\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f417\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} +{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} +{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} +{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0; +\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22 }{\*\defpap +\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 +\af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 \styrsid6517486 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31506\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused \sqformat Normal Table;}} +{\*\rsidtbl \rsid658138\rsid6517486\rsid8002733\rsid11818273\rsid14620378}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Robert Stam}{\operator Robert Stam} +{\creatim\yr2010\mo10\dy1\hr11\min43}{\revtim\yr2011\mo1\dy25\hr18\min14}{\version3}{\edmins2}{\nofpages1}{\nofwords82}{\nofchars471}{\*\company 10gen}{\nofcharsws552}{\vern32771}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml} +}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect +\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen +\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1 +\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct +\asianbrkrule\rsidroot14620378\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0 +{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sectrsid658138\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}} +{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (} +{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar +\ql \li0\ri0\widctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14620378 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 Copyright 2010}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid8002733 -2011}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 + 10gen Inc. +\par +\par Licensed under the Apache License, Version 2.0 (the "License");}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 +you may not use this file except in compliance with the License.}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 +You may obtain a copy of the License at +\par +\par http://www.apache.org/licenses/LICENSE-2.0 +\par +\par Unless required by applicable law or agreed to in writing, software}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 +distributed under the License is distributed on an "AS IS" BASIS,}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 +See the License for the specific language governing permissions and}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid11818273 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang1024\langfe1024\noproof\insrsid14620378 +limitations under the License. +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid6517486 +\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8 +72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7 +2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b +44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7 +065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000 +00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08 +84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc +52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353 +bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468 +656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c +070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7 +29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65 +312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8 +a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04 +98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c +94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471 +7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671 +9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1 +e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5 +193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1 +17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2 +8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6 +6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a +668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847 +bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e +16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b +5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0 +8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2 +c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966 +0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b +7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb +9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0 +088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf +8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26 +ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0 +28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6 +345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93 +b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30 +254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74 +68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24 +51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198 +720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528 +a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000 +000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000 +002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468 +656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000 +00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000 +00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9; +\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7; +\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000 +4d73786d6c322e534158584d4c5265616465722e352e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f0000000000000000000000001027 +2192e5bccb01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/packages/mongocsharpdriver.1.2/lib/net35/MongoDB.Bson.XML b/packages/mongocsharpdriver.1.2/lib/net35/MongoDB.Bson.XML index e71d59a..790ea5b 100644 --- a/packages/mongocsharpdriver.1.2/lib/net35/MongoDB.Bson.XML +++ b/packages/mongocsharpdriver.1.2/lib/net35/MongoDB.Bson.XML @@ -1,12075 +1,12075 @@ - - - - MongoDB.Bson - - - - - Represents the BSON MaxKey value. - - - - - Represents a BSON value (this is an abstract class, see the various subclasses). - - - - - The BsonType of this BsonValue. - - - - - Initializes a new instance of the BsonValue class. - - The BsonType of this BsonValue. - - - - Casts a BsonValue to a bool. - - The BsonValue. - A bool. - - - - Casts a BsonValue to a bool?. - - The BsonValue. - A bool?. - - - - Converts a bool to a BsonValue. - - A bool. - A BsonValue. - - - - Converts a bool? to a BsonValue. - - A bool?. - A BsonValue. - - - - Converts a byte[] to a BsonValue. - - A byte[]. - A BsonValue. - - - - Converts a DateTime to a BsonValue. - - A DateTime. - A BsonValue. - - - - Converts a DateTime? to a BsonValue. - - A DateTime?. - A BsonValue. - - - - Converts a double to a BsonValue. - - A double. - A BsonValue. - - - - Converts a double? to a BsonValue. - - A double?. - A BsonValue. - - - - Converts an Enum to a BsonValue. - - An Enum. - A BsonValue. - - - - Converts a Guid to a BsonValue. - - A Guid. - A BsonValue. - - - - Converts a Guid? to a BsonValue. - - A Guid?. - A BsonValue. - - - - Converts an int to a BsonValue. - - An int. - A BsonValue. - - - - Converts an int? to a BsonValue. - - An int?. - A BsonValue. - - - - Converts a long to a BsonValue. - - A long. - A BsonValue. - - - - Converts a long? to a BsonValue. - - A long?. - A BsonValue. - - - - Converts an ObjectId to a BsonValue. - - An ObjectId. - A BsonValue. - - - - Converts an ObjectId? to a BsonValue. - - An ObjectId?. - A BsonValue. - - - - Converts a Regex to a BsonValue. - - A Regex. - A BsonValue. - - - - Converts a string to a BsonValue. - - A string. - A BsonValue. - - - - Casts a BsonValue to a byte[]. - - The BsonValue. - A byte[]. - - - - Casts a BsonValue to a DateTime. - - The BsonValue. - A DateTime. - - - - Casts a BsonValue to a DateTime?. - - The BsonValue. - A DateTime?. - - - - Casts a BsonValue to a double. - - The BsonValue. - A double. - - - - Casts a BsonValue to a double?. - - The BsonValue. - A double?. - - - - Casts a BsonValue to a Guid. - - The BsonValue. - A Guid. - - - - Casts a BsonValue to a Guid?. - - The BsonValue. - A Guid?. - - - - Casts a BsonValue to an int. - - The BsonValue. - An int. - - - - Casts a BsonValue to an int?. - - The BsonValue. - An int?. - - - - Casts a BsonValue to a long. - - The BsonValue. - A long. - - - - Casts a BsonValue to a long?. - - The BsonValue. - A long?. - - - - Casts a BsonValue to an ObjectId. - - The BsonValue. - An ObjectId. - - - - Casts a BsonValue to an ObjectId?. - - The BsonValue. - An ObjectId?. - - - - Casts a BsonValue to a Regex. - - The BsonValue. - A Regex. - - - - Casts a BsonValue to a string. - - The BsonValue. - A string. - - - - Compares two BsonValues. - - The first BsonValue. - The other BsonValue. - True if the first BsonValue is less than the other one. - - - - Compares two BsonValues. - - The first BsonValue. - The other BsonValue. - True if the first BsonValue is less than or equal to the other one. - - - - Compares two BsonValues. - - The first BsonValue. - The other BsonValue. - True if the two BsonValues are not equal (or one is null and the other is not). - - - - Compares two BsonValues. - - The first BsonValue. - The other BsonValue. - True if the two BsonValues are equal (or both null). - - - - Compares two BsonValues. - - The first BsonValue. - The other BsonValue. - True if the first BsonValue is greater than the other one. - - - - Compares two BsonValues. - - The first BsonValue. - The other BsonValue. - True if the first BsonValue is greater than or equal to the other one. - - - - Creates a new instance of the BsonValue class. - - A value to be mapped to a BsonValue. - A BsonValue. - - - - Reads one BsonValue from a BsonReader. - - The reader. - A BsonValue. - - - - Creates a shallow clone of the BsonValue (see also DeepClone). - - A shallow clone of the BsonValue. - - - - Compares this BsonValue to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonValue is less than, equal to, or greather than the other BsonValue. - - - - Compares the type of this BsonValue to the type of another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether the type of this BsonValue is less than, equal to, or greather than the type of the other BsonValue. - - - - Creates a deep clone of the BsonValue (see also Clone). - - A deep clone of the BsonValue. - - - - Compares this BsonValue to another BsonValue. - - The other BsonValue. - True if the two BsonValue values are equal. - - - - Compares this BsonValue to another object. - - The other object. - True if the other object is a BsonValue and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Converts this BsonValue to a Boolean (using the JavaScript definition of truthiness). - - A Boolean. - - - - Converts this BsonValue to a Double. - - A Double. - - - - Converts this BsonValue to an Int32. - - An Int32. - - - - Converts this BsonValue to an Int64. - - An Int64. - - - - Writes the BsonValue to a BsonWriter. - - The writer. - - - - Casts the BsonValue to a Boolean (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonArray (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonBinaryData (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonDateTime (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonDocument (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonJavaScript (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonJavaScriptWithScope (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonMaxKey (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonMinKey (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonNull (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonRegularExpression (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonSymbol (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonTimestamp (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonUndefined (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a BsonValue (a way of upcasting subclasses of BsonValue to BsonValue at compile time). - - - - - Casts the BsonValue to a Byte[] (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a DateTime (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Double (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Guid (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to an Int32 (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Int64 (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Nullable{Boolean} (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Nullable{DateTime} (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Nullable{Double} (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Nullable{Guid} (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Nullable{Int32} (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Nullable{Int64} (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Nullable{ObjectId} (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to an ObjectId (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a Regex (throws an InvalidCastException if the cast is not valid). - - - - - Casts the BsonValue to a String (throws an InvalidCastException if the cast is not valid). - - - - - Gets the BsonType of this BsonValue. - - - - - Tests whether this BsonValue is a Boolean. - - - - - Tests whether this BsonValue is a BsonArray. - - - - - Tests whether this BsonValue is a BsonBinaryData. - - - - - Tests whether this BsonValue is a BsonDateTime. - - - - - Tests whether this BsonValue is a BsonDocument. - - - - - Tests whether this BsonValue is a BsonJavaScript. - - - - - Tests whether this BsonValue is a BsonJavaScriptWithScope. - - - - - Tests whether this BsonValue is a BsonMaxKey. - - - - - Tests whether this BsonValue is a BsonMinKey. - - - - - Tests whether this BsonValue is a BsonNull. - - - - - Tests whether this BsonValue is a BsonRegularExpression. - - - - - Tests whether this BsonValue is a BsonSymbol . - - - - - Tests whether this BsonValue is a BsonTimestamp. - - - - - Tests whether this BsonValue is a BsonUndefined. - - - - - Tests whether this BsonValue is a DateTime. - - - - - Tests whether this BsonValue is a Double. - - - - - Tests whether this BsonValue is a Guid. - - - - - Tests whether this BsonValue is an Int32. - - - - - Tests whether this BsonValue is an Int64. - - - - - Tests whether this BsonValue is a numeric value. - - - - - Tests whether this BsonValue is an ObjectId . - - - - - Tests whether this BsonValue is a String. - - - - - Gets the raw value of this BsonValue (or null if this BsonValue doesn't have a single scalar value). - - - - - Compares this BsonMaxKey to another BsonMaxKey. - - The other BsonMaxKey. - A 32-bit signed integer that indicates whether this BsonMaxKey is less than, equal to, or greather than the other. - - - - Compares the BsonMaxKey to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonMaxKey is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonMaxKey to another BsonMaxKey. - - The other BsonMaxKey. - True if the two BsonMaxKey values are equal. - - - - Compares this BsonMaxKey to another object. - - The other object. - True if the other object is a BsonMaxKey and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the singleton instance of BsonMaxKey. - - - - - Represents a BSON element. - - - - - Initializes a new instance of the BsonElement class. - - The name of the element. - The value of the element. - - - - Compares two BsonElements. - - The first BsonElement. - The other BsonElement. - True if the two BsonElements are equal (or both null). - - - - Compares two BsonElements. - - The first BsonElement. - The other BsonElement. - True if the two BsonElements are not equal (or one is null and the other is not). - - - - Creates a new instance of the BsonElement class. - - Whether to create the BsonElement or return null. - The name of the element. - The value of the element. - A BsonElement or null. - - - - Creates a new instance of the BsonElement class. - - The name of the element. - The value of the element. - A BsonElement or null. - - - - Creates a shallow clone of the element (see also DeepClone). - - A shallow clone of the element. - - - - Creates a deep clone of the element (see also Clone). - - A deep clone of the element. - - - - Compares this BsonElement to another BsonElement. - - The other BsonElement. - A 32-bit signed integer that indicates whether this BsonElement is less than, equal to, or greather than the other. - - - - Compares this BsonElement to another BsonElement. - - The other BsonElement. - True if the two BsonElement values are equal. - - - - Compares this BsonElement to another object. - - The other object. - True if the other object is a BsonElement and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the name of the element. - - - - - Gets or sets the value of the element. - - - - - Represents a BSON string value. - - - - - Initializes a new instance of the BsonString class. - - The value. - - - - Converts a string to a BsonString. - - A string. - A BsonString. - - - - Creates a new BsonString. - - An object to be mapped to a BsonString. - A BsonString or null. - - - - Creates a new instance of the BsonString class. - - A string. - A BsonString. - - - - Compares this BsonString to another BsonString. - - The other BsonString. - A 32-bit signed integer that indicates whether this BsonString is less than, equal to, or greather than the other. - - - - Compares the BsonString to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonString is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonString to another BsonString. - - The other BsonString. - True if the two BsonString values are equal. - - - - Compares this BsonString to another object. - - The other object. - True if the other object is a BsonString and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets an instance of BsonString that represents an empty string. - - - - - Gets the BsonString as a string. - - - - - Gets the value of this BsonString. - - - - - Represents a BSON writer to a TextWriter (in JSON format). - - - - - Represents a BSON writer for some external format (see subclasses). - - - - - Whether the object has been disposed. - - - - - The settings of the writer. - - - - - The current state of the writer. - - - - - The name of the current element. - - - - - Whether to check element names (no periods or leading $). - - - - - Whether to check an update document (turns CheckElementNames on if first element name does *not* start with $). - - - - - Initializes a new instance of the BsonWriter class. - - - - - Creates a BsonWriter to a BsonBuffer. - - Optional BsonBinaryWriterSettings. - A BsonWriter. - - - - Creates a BsonWriter to a BsonBuffer. - - A BsonBuffer. - A BsonWriter. - - - - Creates a BsonWriter to a BsonBuffer. - - A BsonBuffer. - Optional BsonBinaryWriterSettings. - A BsonWriter. - - - - Creates a BsonWriter to a BsonDocument. - - A BsonDocument. - A BsonWriter. - - - - Creates a BsonWriter to a BsonDocument. - - A BsonDocument. - The settings. - A BsonWriter. - - - - Creates a BsonWriter to a BSON Stream. - - A Stream. - A BsonWriter. - - - - Creates a BsonWriter to a BSON Stream. - - A Stream. - Optional BsonBinaryWriterSettings. - A BsonWriter. - - - - Creates a BsonWriter to a JSON TextWriter. - - A TextWriter. - A BsonWriter. - - - - Creates a BsonWriter to a JSON TextWriter. - - A TextWriter. - Optional JsonWriterSettings. - A BsonWriter. - - - - Closes the writer. - - - - - Disposes of any resources used by the writer. - - - - - Flushes any pending data to the output destination. - - - - - Writes a BSON binary data element to the writer. - - The binary data. - The binary data subtype. - - - - Writes BSON binary data to the writer. - - The binary data. - The binary data subtype. - The respresentation for Guids. - - - - Writes a BSON binary data element to the writer. - - The name of the element. - The binary data. - The binary data subtype. - - - - Writes a BSON binary data element to the writer. - - The name of the element. - The binary data. - The binary data subtype. - The representation for Guids. - - - - Writes a BSON Boolean to the writer. - - The Boolean value. - - - - Writes a BSON Boolean element to the writer. - - The name of the element. - The Boolean value. - - - - Writes a BSON DateTime to the writer. - - The number of milliseconds since the Unix epoch. - - - - Writes a BSON DateTime element to the writer. - - The name of the element. - The number of milliseconds since the Unix epoch. - - - - Writes a BSON Double to the writer. - - The Double value. - - - - Writes a BSON Double element to the writer. - - The name of the element. - The Double value. - - - - Writes the end of a BSON array to the writer. - - - - - Writes the end of a BSON document to the writer. - - - - - Writes a BSON Int32 to the writer. - - The Int32 value. - - - - Writes a BSON Int32 element to the writer. - - The name of the element. - The Int32 value. - - - - Writes a BSON Int64 to the writer. - - The Int64 value. - - - - Writes a BSON Int64 element to the writer. - - The name of the element. - The Int64 value. - - - - Writes a BSON JavaScript to the writer. - - The JavaScript code. - - - - Writes a BSON JavaScript element to the writer. - - The name of the element. - The JavaScript code. - - - - Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope). - - The JavaScript code. - - - - Writes a BSON JavaScript element to the writer (call WriteStartDocument to start writing the scope). - - The name of the element. - The JavaScript code. - - - - Writes a BSON MaxKey to the writer. - - - - - Writes a BSON MaxKey element to the writer. - - The name of the element. - - - - Writes a BSON MinKey to the writer. - - - - - Writes a BSON MinKey element to the writer. - - The name of the element. - - - - Writes the name of an element to the writer. - - The name of the element. - - - - Writes a BSON null to the writer. - - - - - Writes a BSON null element to the writer. - - The name of the element. - - - - Writes a BSON ObjectId to the writer. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Writes a BSON ObjectId element to the writer. - - The name of the element. - The timestamp. - The machine hash. - The PID. - The increment. - - - - Writes a BSON regular expression to the writer. - - A regular expression pattern. - A regular expression options. - - - - Writes a BSON regular expression element to the writer. - - The name of the element. - A regular expression pattern. - A regular expression options. - - - - Writes the start of a BSON array to the writer. - - - - - Writes the start of a BSON array element to the writer. - - The name of the element. - - - - Writes the start of a BSON document to the writer. - - - - - Writes the start of a BSON document element to the writer. - - The name of the element. - - - - Writes a BSON String to the writer. - - The String value. - - - - Writes a BSON String element to the writer. - - The name of the element. - The String value. - - - - Writes a BSON Symbol to the writer. - - The symbol. - - - - Writes a BSON Symbol element to the writer. - - The name of the element. - The symbol. - - - - Writes a BSON timestamp to the writer. - - The combined timestamp/increment value. - - - - Writes a BSON timestamp element to the writer. - - The name of the element. - The combined timestamp/increment value. - - - - Writes a BSON undefined to the writer. - - - - - Writes a BSON undefined element to the writer. - - The name of the element. - - - - Checks that the name is valid. - - - - - - Disposes of any resources used by the writer. - - True if called from Dispose. - - - - Throws an InvalidOperationException when the method called is not valid for the current ContextType. - - The name of the method. - The actual ContextType. - The valid ContextTypes. - - - - Throws an InvalidOperationException when the method called is not valid for the current state. - - The name of the method. - The valid states. - - - - Gets or sets whether to check element names (no periods or leading $). - - - - - Gets or sets whether to check an update document (turns CheckElementNames on if first element name does *not* start with $). - - - - - Gets the settings of the writer. - - - - - Gets the current state of the writer. - - - - - Initializes a new instance of the JsonWriter class. - - A TextWriter. - Optional JsonWriter settings. - - - - Closes the writer. - - - - - Flushes any pending data to the output destination. - - - - - Writes BSON binary data to the writer. - - The binary data. - The binary data subtype. - The representation for Guids. - - - - Writes a BSON Boolean to the writer. - - The Boolean value. - - - - Writes a BSON DateTime to the writer. - - The number of milliseconds since the Unix epoch. - - - - Writes a BSON Double to the writer. - - The Double value. - - - - Writes the end of a BSON array to the writer. - - - - - Writes the end of a BSON document to the writer. - - - - - Writes a BSON Int32 to the writer. - - The Int32 value. - - - - Writes a BSON Int64 to the writer. - - The Int64 value. - - - - Writes a BSON JavaScript to the writer. - - The JavaScript code. - - - - Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope). - - The JavaScript code. - - - - Writes a BSON MaxKey to the writer. - - - - - Writes a BSON MinKey to the writer. - - - - - Writes a BSON null to the writer. - - - - - Writes a BSON ObjectId to the writer. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Writes a BSON regular expression to the writer. - - A regular expression pattern. - A regular expression options. - - - - Writes the start of a BSON array to the writer. - - - - - Writes the start of a BSON document to the writer. - - - - - Writes a BSON String to the writer. - - The String value. - - - - Writes a BSON Symbol to the writer. - - The symbol. - - - - Writes a BSON timestamp to the writer. - - The combined timestamp/increment value. - - - - Writes a BSON undefined to the writer. - - - - - Disposes of any resources used by the writer. - - True if called from Dispose. - - - - Specifies the discriminator and related options for a class. - - - - - Initializes a new instance of the BsonDiscriminatorAttribute class. - - - - - Initializes a new instance of the BsonDiscriminatorAttribute class. - - The discriminator. - - - - Gets the discriminator. - - - - - Gets or sets whether the discriminator is required. - - - - - Gets or sets whether this is a root class. - - - - - Represents a bookmark that can be used to return a reader to the current position and state. - - - - - Represents a bookmark that can be used to return a reader to the current position and state. - - - - - The state of the reader. - - - - - The current BSON type. - - - - - The name of the current element. - - - - - Initializes a new instance of the BsonReaderBookmark class. - - The state of the reader. - The current BSON type. - The name of the current element. - - - - Gets the current state of the reader. - - - - - Gets the current BsonType; - - - - - Gets the name of the current element. - - - - - Represents a BSON reader for a JSON string. - - - - - Represents a BSON reader for some external format (see subclasses). - - - - - Whether the reader has been disposed. - - - - - The settings of the reader. - - - - - The current state of the reader. - - - - - The current BSON type. - - - - - The name of the current element. - - - - - Initializes a new instance of the BsonReader class. - - - - - Creates a BsonReader for a BsonBuffer. - - The BsonBuffer. - A BsonReader. - - - - Creates a BsonReader for a BsonBuffer. - - The BsonBuffer. - Optional reader settings. - A BsonReader. - - - - Creates a BsonReader for a BsonDocument. - - The BsonDocument. - A BsonReader. - - - - Creates a BsonReader for a BsonDocument. - - The BsonDocument. - The settings. - A BsonReader. - - - - Creates a BsonReader for a JsonBuffer. - - The buffer. - A BsonReader. - - - - Creates a BsonReader for a JsonBuffer. - - The buffer. - The settings. - A BsonReader. - - - - Creates a BsonReader for a BSON Stream. - - The BSON Stream. - A BsonReader. - - - - Creates a BsonReader for a BSON Stream. - - The BSON Stream. - Optional reader settings. - A BsonReader. - - - - Creates a BsonReader for a JSON string. - - The JSON string. - A BsonReader. - - - - Creates a BsonReader for a JSON TextReader. - - The JSON TextReader. - A BsonReader. - - - - Closes the reader. - - - - - Disposes of any resources used by the reader. - - - - - Positions the reader to an element by name. - - The name of the element. - True if the element was found. - - - - Positions the reader to a string element by name. - - The name of the element. - True if the element was found. - - - - Gets a bookmark to the reader's current position and state. - - A bookmark. - - - - Reads BSON binary data from the reader. - - The binary data. - The binary data subtype. - - - - Reads BSON binary data from the reader. - - The binary data. - The binary data subtype. - The representation for Guids. - - - - Reads a BSON binary data element from the reader. - - The name of the element. - The binary data. - The binary data subtype. - - - - Reads a BSON binary data element from the reader. - - The name of the element. - The binary data. - The binary data subtype. - The representation for Guids. - - - - Reads a BSON boolean from the reader. - - A Boolean. - - - - Reads a BSON boolean element from the reader. - - The name of the element. - A Boolean. - - - - Reads a BsonType from the reader. - - A BsonType. - - - - Reads a BSON DateTime from the reader. - - The number of milliseconds since the Unix epoch. - - - - Reads a BSON DateTime element from the reader. - - The name of the element. - The number of milliseconds since the Unix epoch. - - - - Reads a BSON Double from the reader. - - A Double. - - - - Reads a BSON Double element from the reader. - - The name of the element. - A Double. - - - - Reads the end of a BSON array from the reader. - - - - - Reads the end of a BSON document from the reader. - - - - - Reads a BSON Int32 from the reader. - - An Int32. - - - - Reads a BSON Int32 element from the reader. - - The name of the element. - An Int32. - - - - Reads a BSON Int64 from the reader. - - An Int64. - - - - Reads a BSON Int64 element from the reader. - - The name of the element. - An Int64. - - - - Reads a BSON JavaScript from the reader. - - A string. - - - - Reads a BSON JavaScript element from the reader. - - The name of the element. - A string. - - - - Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope). - - A string. - - - - Reads a BSON JavaScript with scope element from the reader (call ReadStartDocument next to read the scope). - - The name of the element. - A string. - - - - Reads a BSON MaxKey from the reader. - - - - - Reads a BSON MaxKey element from the reader. - - The name of the element. - - - - Reads a BSON MinKey from the reader. - - - - - Reads a BSON MinKey element from the reader. - - The name of the element. - - - - Reads the name of an element from the reader. - - The name of the element. - - - - Reads the name of an element from the reader. - - The name of the element. - - - - Reads a BSON null from the reader. - - - - - Reads a BSON null element from the reader. - - The name of the element. - - - - Reads a BSON ObjectId from the reader. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Reads a BSON ObjectId element from the reader. - - The name of the element. - The timestamp. - The machine hash. - The PID. - The increment. - - - - Reads a BSON regular expression from the reader. - - A regular expression pattern. - A regular expression options. - - - - Reads a BSON regular expression element from the reader. - - The name of the element. - A regular expression pattern. - A regular expression options. - - - - Reads the start of a BSON array. - - - - - Reads the start of a BSON document. - - - - - Reads a BSON string from the reader. - - A String. - - - - Reads a BSON string element from the reader. - - A String. - The name of the element. - - - - Reads a BSON symbol from the reader. - - A string. - - - - Reads a BSON symbol element from the reader. - - The name of the element. - A string. - - - - Reads a BSON timestamp from the reader. - - The combined timestamp/increment. - - - - Reads a BSON timestamp element from the reader. - - The combined timestamp/increment. - The name of the element. - - - - Reads a BSON undefined from the reader. - - - - - Reads a BSON undefined element from the reader. - - The name of the element. - - - - Returns the reader to previously bookmarked position and state. - - The bookmark. - - - - Skips the name (reader must be positioned on a name). - - - - - Skips the value (reader must be positioned on a value). - - - - - Disposes of any resources used by the reader. - - True if called from Dispose. - - - - Throws an InvalidOperationException when the method called is not valid for the current ContextType. - - The name of the method. - The actual ContextType. - The valid ContextTypes. - - - - Throws an InvalidOperationException when the method called is not valid for the current state. - - The name of the method. - The valid states. - - - - Throws an ObjectDisposedException. - - - - - Verifies the current state and BsonType of the reader. - - The name of the method calling this one. - The required BSON type. - - - - Verifies the name of the current element. - - The expected name. - - - - Gets the current BsonType. - - - - - Gets the settings of the reader. - - - - - Gets the current state of the reader. - - - - - Initializes a new instance of the JsonReader class. - - The buffer. - The reader settings. - - - - Closes the reader. - - - - - Gets a bookmark to the reader's current position and state. - - A bookmark. - - - - Reads BSON binary data from the reader. - - The binary data. - The binary data subtype. - The representation for Guids. - - - - Reads a BSON boolean from the reader. - - A Boolean. - - - - Reads a BsonType from the reader. - - A BsonType. - - - - Reads a BSON DateTime from the reader. - - The number of milliseconds since the Unix epoch. - - - - Reads a BSON Double from the reader. - - A Double. - - - - Reads the end of a BSON array from the reader. - - - - - Reads the end of a BSON document from the reader. - - - - - Reads a BSON Int32 from the reader. - - An Int32. - - - - Reads a BSON Int64 from the reader. - - An Int64. - - - - Reads a BSON JavaScript from the reader. - - A string. - - - - Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope). - - A string. - - - - Reads a BSON MaxKey from the reader. - - - - - Reads a BSON MinKey from the reader. - - - - - Reads a BSON null from the reader. - - - - - Reads a BSON ObjectId from the reader. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Reads a BSON regular expression from the reader. - - A regular expression pattern. - A regular expression options. - - - - Reads the start of a BSON array. - - - - - Reads the start of a BSON document. - - - - - Reads a BSON string from the reader. - - A String. - - - - Reads a BSON symbol from the reader. - - A string. - - - - Reads a BSON timestamp from the reader. - - The combined timestamp/increment. - - - - Reads a BSON undefined from the reader. - - - - - Returns the reader to previously bookmarked position and state. - - The bookmark. - - - - Skips the name (reader must be positioned on a name). - - - - - Skips the value (reader must be positioned on a value). - - - - - Disposes of any resources used by the reader. - - True if called from Dispose. - - - - Represents a truncation exception. - - - - - Represents a BSON exception. - - - - - Initializes a new instance of the BsonException class. - - - - - Initializes a new instance of the BsonException class. - - The error message. - - - - Initializes a new instance of the BsonException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the BsonException class. - - The error message format string. - One or more args for the error message. - - - - Initializes a new instance of the BsonException class (this overload used by deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Initializes a new instance of the TruncationException class. - - - - - Initializes a new instance of the TruncationException class. - - The error message. - - - - Initializes a new instance of the TruncationException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the TruncationException class (this overload used by deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Represents the state of a BsonWriter. - - - - - The initial state. - - - - - The writer is positioned to write a name. - - - - - The writer is positioned to write a value. - - - - - The writer is positioned to write a scope document (call WriteStartDocument to start writing the scope document). - - - - - The writer is done. - - - - - The writer is closed. - - - - - Represents BSON binary data. - - - - - Initializes a new instance of the BsonBinaryData class. - - The binary data. - - - - Initializes a new instance of the BsonBinaryData class. - - The binary data. - The binary data subtype. - - - - Initializes a new instance of the BsonBinaryData class. - - The binary data. - The binary data subtype. - The representation for Guids. - - - - Initializes a new instance of the BsonBinaryData class. - - A Guid. - - - - Initializes a new instance of the BsonBinaryData class. - - A Guid. - The representation for Guids. - - - - Converts a byte array to a BsonBinaryData. - - A byte array. - A BsonBinaryData. - - - - Converts a Guid to a BsonBinaryData. - - A Guid. - A BsonBinaryData. - - - - Creates a new BsonBinaryData. - - The binary data. - A BsonBinaryData or null. - - - - Creates a new BsonBinaryData. - - The binary data. - The binary data subtype. - A BsonBinaryData or null. - - - - Creates a new BsonBinaryData. - - The binary data. - The binary data subtype. - The representation for Guids. - A BsonBinaryData or null. - - - - Creates a new BsonBinaryData. - - A Guid. - A BsonBinaryData. - - - - Creates a new BsonBinaryData. - - A Guid. - The representation for Guids. - A BsonBinaryData. - - - - Creates a new BsonBinaryData. - - An object to be mapped to a BsonBinaryData. - A BsonBinaryData or null. - - - - Compares this BsonBinaryData to another BsonBinaryData. - - The other BsonBinaryData. - A 32-bit signed integer that indicates whether this BsonBinaryData is less than, equal to, or greather than the other. - - - - Compares the BsonBinaryData to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonBinaryData is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonBinaryData to another BsonBinaryData. - - The other BsonBinaryData. - True if the two BsonBinaryData values are equal. - - - - Compares this BsonBinaryData to another object. - - The other object. - True if the other object is a BsonBinaryData and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Converts this BsonBinaryData to a Guid. - - A Guid. - - - - Converts this BsonBinaryData to a Guid. - - The representation for Guids. - A Guid. - - - - Returns a string representation of the binary data. - - A string representation of the binary data. - - - - Gets the binary data. - - - - - Gets the representation to use when representing the Guid as BSON binary data. - - - - - Gets the BsonBinaryData as a Guid if the subtype is UuidStandard or UuidLegacy, otherwise null. - - - - - Gets the binary data subtype. - - - - - Represents the output mode of a JsonWriter. - - - - - Output strict JSON. - - - - - Use JavaScript data types for some values. - - - - - Use JavaScript and 10gen data types for some values. - - - - - Use a format that can be pasted in to the MongoDB shell. - - - - - Indicates that this field or property should be ignored when this class is serialized. - - - - - Represents an ignore if null convention. - - - - - Determines whether to ignore nulls for a member. - - The member. - Whether to ignore nulls. - - - - Represents an ignore if null convention where nulls are never ignored. - - - - - Determines whether to ignore nulls for a member. - - The member. - Whether to ignore nulls. - - - - Represents an ignore if null convention where nulls are always ignored. - - - - - Determines whether to ignore nulls for a member. - - The member. - Whether to ignore nulls. - - - - A marker interface that represents serialization options. - - - - - This class represents a JSON string buffer. - - - - - Initializes a new instance of the JsonBuffer class. - - The string. - - - - Reads a character from the buffer. - - The next character (or -1 if at the end of the buffer). - - - - Reads a substring from the buffer. - - The zero based index of the start of the substring. - The substring. - - - - Reads a substring from the buffer. - - The zero based index of the start of the substring. - The number of characters in the substring. - The substring. - - - - Returns one character to the buffer (if the character matches the one at the current position the current position is moved back by one). - - The character to return. - - - - Gets the length of the JSON string. - - - - - Gets or sets the current position. - - - - - Used by BsonReaders and BsonWriters to represent the current context. - - - - - The top level of a BSON document. - - - - - A (possibly embedded) BSON document. - - - - - A BSON array. - - - - - A JavaScriptWithScope BSON value. - - - - - The scope document of a JavaScriptWithScope BSON value. - - - - - Creates a clone of the context. - - A clone of the context. - - - - Represents a BSON document. - - - - - An interface implemented by classes that handle their own BSON serialization. - - - - - Deserializes this object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The serialization options. - Normally itself, though sometimes an instance of a subclass or null. - - - - Gets the document Id. - - The Id. - The nominal type of the Id. - The IdGenerator for the Id type. - True if the document has an Id. - - - - Serializes this object to a BsonWriter. - - The BsonWriter. - The nominal type of this object. - The serialization options. - - - - Sets the document Id. - - The Id. - - - - An interface implemented by objects that convert themselves to a BsonDocument. - - - - - Converts this object to a BsonDocument. - - A BsonDocument. - - - - Initializes a new instance of the BsonDocument class. - - - - - Initializes a new instance of the BsonDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the BsonDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the BsonDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the BsonDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the BsonDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - Creates a new BsonDocument by mapping an object to a BsonDocument. - - The object to be mapped to a BsonDocument. - A BsonDocument. - - - - Parses a JSON string and returns a BsonDocument. - - The JSON string. - A BsonDocument. - - - - Reads a BsonDocument from a BsonBuffer. - - The BsonBuffer. - A BsonDocument. - - - - Reads a BsonDocument from a BsonReader. - - The BsonReader. - A BsonDocument. - - - - Reads a BsonDocument from a byte array. - - The byte array. - A BsonDocument. - - - - Reads a BsonDocument from a stream. - - The stream. - A BsonDocument. - - - - Reads a BsonDocument from a file. - - The name of the file. - A BsonDocument. - - - - Adds an element to the document. - - The element to add. - The document (so method calls can be chained). - - - - Adds elements to the document from a dictionary of key/value pairs. - - The dictionary. - The document (so method calls can be chained). - - - - Adds elements to the document from a dictionary of key/value pairs. - - The dictionary. - Which keys of the hash table to add. - The document (so method calls can be chained). - - - - Adds elements to the document from a dictionary of key/value pairs. - - The dictionary. - The document (so method calls can be chained). - - - - Adds elements to the document from a dictionary of key/value pairs. - - The dictionary. - Which keys of the hash table to add. - The document (so method calls can be chained). - - - - Adds elements to the document from a dictionary of key/value pairs. - - The dictionary. - The document (so method calls can be chained). - - - - Adds elements to the document from a dictionary of key/value pairs. - - The dictionary. - Which keys of the hash table to add. - The document (so method calls can be chained). - - - - Adds a list of elements to the document. - - The list of elements. - The document (so method calls can be chained). - - - - Adds a list of elements to the document. - - The list of elements. - The document (so method calls can be chained). - - - - Creates and adds an element to the document. - - The name of the element. - The value of the element. - The document (so method calls can be chained). - - - - Creates and adds an element to the document, but only if the condition is true. - - The name of the element. - The value of the element. - Whether to add the element to the document. - The document (so method calls can be chained). - - - - Clears the document (removes all elements). - - - - - Creates a shallow clone of the document (see also DeepClone). - - A shallow clone of the document. - - - - Compares this document to another document. - - The other document. - A 32-bit signed integer that indicates whether this document is less than, equal to, or greather than the other. - - - - Compares the BsonDocument to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonDocument is less than, equal to, or greather than the other BsonValue. - - - - Tests whether the document contains an element with the specified name. - - The name of the element to look for. - True if the document contains an element with the specified name. - - - - Tests whether the document contains an element with the specified value. - - The value of the element to look for. - True if the document contains an element with the specified value. - - - - Creates a deep clone of the document (see also Clone). - - A deep clone of the document. - - - - Deserializes the document from a BsonReader. - - The BsonReader. - The nominal type of the object (ignored, but should be BsonDocument). - The serialization options (ignored). - The document (which has now been initialized by deserialization), or null. - - - - Gets the Id of the document. - - The Id of the document (the RawValue if it has one, otherwise the element Value). - The nominal type of the Id. - The IdGenerator for the Id (or null). - True (a BsonDocument either has an Id member or one can be added). - - - - Compares this document to another document. - - The other document. - True if the two documents are equal. - - - - Compares this BsonDocument to another object. - - The other object. - True if the other object is a BsonDocument and equal to this one. - - - - Gets an element of this document. - - The zero based index of the element. - The element. - - - - Gets an element of this document. - - The name of the element. - A BsonElement. - - - - Gets an enumerator that can be used to enumerate the elements of this document. - - An enumerator. - - - - Gets the hash code. - - The hash code. - - - - Gets the value of an element. - - The zero based index of the element. - The value of the element. - - - - Gets the value of an element. - - The name of the element. - The value of the element. - - - - Gets the value of an element or a default value if the element is not found. - - The name of the element. - The default value returned if the element is not found. - The value of the element or the default value if the element is not found. - - - - Inserts a new element at a specified position. - - The position of the new element. - The element. - - - - Merges another document into this one. Existing elements are not overwritten. - - The other document. - The document (so method calls can be chained). - - - - Merges another document into this one, specifying whether existing elements are overwritten. - - The other document. - Whether to overwrite existing elements. - The document (so method calls can be chained). - - - - Removes an element from this document (if duplicate element names are allowed - then all elements with this name will be removed). - - The name of the element to remove. - - - - Removes an element from this document. - - The zero based index of the element to remove. - - - - Removes an element from this document. - - The element to remove. - - - - Serializes this document to a BsonWriter. - - The writer. - The nominalType. - The serialization options (can be null). - - - - Sets the value of an element. - - The zero based index of the element whose value is to be set. - The new value. - The document (so method calls can be chained). - - - - Sets the value of an element (an element will be added if no element with this name is found). - - The name of the element whose value is to be set. - The new value. - The document (so method calls can be chained). - - - - Sets the document Id. - - The value of the Id. - - - - Sets an element of the document (replacing the existing element at that position). - - The zero based index of the element to replace. - The new element. - The document. - - - - Sets an element of the document (replaces any existing element with the same name or adds a new element if an element with the same name is not found). - - The new element. - The document. - - - - Returns a string representation of the document. - - A string representation of the document. - - - - Tries to get an element of this document. - - The name of the element. - The element. - True if an element with that name was found. - - - - Tries to get the value of an element of this document. - - The name of the element. - The value of the element. - True if an element with that name was found. - - - - Writes the document to a BsonWriter. - - The writer. - - - - Writes the document to a BsonBuffer. - - The buffer. - - - - Writes the document to a Stream. - - The stream. - - - - Writes the document to a file. - - The name of the file. - - - - Gets or sets whether to allow duplicate names (allowing duplicate names is not recommended). - - - - - Gets the number of elements. - - - - - Gets the elements. - - - - - Gets the element names. - - - - - Gets the raw values (see BsonValue.RawValue). - - - - - Gets the values. - - - - - Gets or sets the value of an element. - - The zero based index of the element. - The value of the element. - - - - Gets the value of an element or a default value if the element is not found. - - The name of the element. - The default value to return if the element is not found. - Teh value of the element or a default value if the element is not found. - - - - Gets or sets the value of an element. - - The name of the element. - The value of the element. - - - - Represents the mapping between a field or property and a BSON element. - - - - - Initializes a new instance of the BsonMemberMap class. - - The member info. - The conventions to use with this member. - - - - Applies the default value to the member of an object. - - The object. - - - - Gets the serializer. - - The actual type of the member's value. - The member map. - - - - Sets the default value. - - The default value. - The member map. - - - - Sets the default value. - - The default value. - Whether the default value shoudl be serialized. - The member map. - - - - Sets the name of the element. - - The name of the element. - The member map. - - - - Sets the Id generator. - - The Id generator. - The member map. - - - - Sets whether null values should be ignored when serialized. - - Wether null values should be ignored when serialized. - The member map. - - - - Sets whether an element is required for this member when deserialized - - Whether an element is required for this member when deserialized - The member map. - - - - Sets the serialization order. - - The serialization order. - The member map. - - - - Sets the external representation. - - The external representation. - The member map. - - - - Sets the serialization options. - - The serialization options. - The member map. - - - - Sets the serializer. - - The serializer. - The member map. - - - - Sets whether the default value should be serialized. - - Whether the default value should be serialized. - The member map. - - - - Sets the method that will be called to determine whether the member should be serialized. - - The method. - - - - - Gets the name of the member. - - - - - Gets the type of the member. - - - - - Gets the name of the element. - - - - - Gets the serialization order. - - - - - Gets the member info. - - - - - Gets the getter function. - - - - - Gets the serialization options. - - - - - Gets the setter function. - - - - - Gets the Id generator. - - - - - Gets whether an element is required for this member when deserialized. - - - - - Gets whether this member has a default value. - - - - - Gets whether the default value should be serialized. - - - - - Gets the method that will be called to determine whether the member should be serialized. - - - - - Gets whether null values should be ignored when serialized. - - - - - Gets the default value. - - - - - Indicates that a field or property is required. - - - - - Specifies the default value for a field or property. - - - - - Initializes a new instance of the BsonDefaultValueAttribute class. - - The default value. - - - - Gets the default value. - - - - - Gets or sets whether to serialize the default value. - - - - - Represents the binary data subtype of a BsonBinaryData. - - - - - Binary data. - - - - - A function. - - - - - Obsolete binary data subtype (use Binary instead). - - - - - A UUID in a driver dependent legacy byte order. - - - - - A UUID in standard network byte order. - - - - - An MD5 hash. - - - - - User defined binary data. - - - - - Represents an ObjectId (see also BsonObjectId). - - - - - Initializes a new instance of the ObjectId class. - - The value. - - - - Initializes a new instance of the ObjectId class. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Initializes a new instance of the ObjectId class. - - The value. - - - - Compares two ObjectIds. - - The first ObjectId. - The other ObjectId - True if the first ObjectId is less than the second ObjectId. - - - - Compares two ObjectIds. - - The first ObjectId. - The other ObjectId - True if the first ObjectId is less than or equal to the second ObjectId. - - - - Compares two ObjectIds. - - The first ObjectId. - The other ObjectId. - True if the two ObjectIds are equal. - - - - Compares two ObjectIds. - - The first ObjectId. - The other ObjectId. - True if the two ObjectIds are not equal. - - - - Compares two ObjectIds. - - The first ObjectId. - The other ObjectId - True if the first ObjectId is greather than or equal to the second ObjectId. - - - - Compares two ObjectIds. - - The first ObjectId. - The other ObjectId - True if the first ObjectId is greather than the second ObjectId. - - - - Generates a new ObjectId with a unique value. - - A ObjectId. - - - - Packs the components of an ObjectId into a byte array. - - The timestamp. - The machine hash. - The PID. - The increment. - A byte array. - - - - Parses a string and creates a new ObjectId. - - The string value. - A ObjectId. - - - - Tries to parse a string and create a new ObjectId. - - The string value. - The new ObjectId. - True if the string was parsed successfully. - - - - Unpacks a byte array into the components of an ObjectId. - - A byte array. - The timestamp. - The machine hash. - The PID. - The increment. - - - - Compares this ObjectId to another ObjectId. - - The other ObjectId. - A 32-bit signed integer that indicates whether this ObjectId is less than, equal to, or greather than the other. - - - - Compares this ObjectId to another ObjectId. - - The other ObjectId. - True if the two ObjectIds are equal. - - - - Compares this ObjectId to another object. - - The other object. - True if the other object is an ObjectId and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Converts the ObjectId to a byte array. - - A byte array. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets an instance of ObjectId where the value is empty. - - - - - Gets the timestamp. - - - - - Gets the machine. - - - - - Gets the PID. - - - - - Gets the increment. - - - - - Gets the creation time (derived from the timestamp). - - - - - Represents a serializer for enumerable values. - - - - - Represents a base implementation for the many implementations of IBsonSerializer. - - - - - An interface implemented by BSON serializers. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The serialization options. - An object. - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Gets the document Id. - - The document. - The Id. - The nominal type of the Id. - The IdGenerator for the Id type. - True if the document has an Id. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Sets the document Id. - - The document. - The Id. - - - - Initializes a new instance of the BsonBaseSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The serialization options. - An object. - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Gets the document Id. - - The document. - The Id. - The nominal type of the Id. - The IdGenerator for the Id type. - True if the document has an Id. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Sets the document Id. - - The document. - The Id. - - - - Verifies the nominal and actual types against the expected type. - - The nominal type. - The actual type. - The expected type. - - - - Initializes a new instance of the EnumerableSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Represents a serializer for Queues. - - - - - Initializes a new instance of the QueueSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Represents a serializer for Stacks. - - - - - Initializes a new instance of the StackSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Represents a discriminator convention. - - - - - Gets the actual type of an object by reading the discriminator from a BsonReader. - - The reader. - The nominal type. - The actual type. - - - - Gets the discriminator value for an actual type. - - The nominal type. - The actual type. - The discriminator value. - - - - Gets the discriminator element name. - - - - - Represents the standard discriminator conventions (see ScalarDiscriminatorConvention and HierarchicalDiscriminatorConvention). - - - - - Initializes a new instance of the StandardDiscriminatorConvention class. - - The element name. - - - - Gets the actual type of an object by reading the discriminator from a BsonReader. - - The reader. - The nominal type. - The actual type. - - - - Gets the discriminator value for an actual type. - - The nominal type. - The actual type. - The discriminator value. - - - - Gets an instance of the ScalarDiscriminatorConvention. - - - - - Gets an instance of the HierarchicalDiscriminatorConvention. - - - - - Gets the discriminator element name. - - - - - Represents a discriminator convention where the discriminator is provided by the class map of the actual type. - - - - - Initializes a new instance of the ScalarDiscriminatorConvention class. - - The element name. - - - - Gets the discriminator value for an actual type. - - The nominal type. - The actual type. - The discriminator value. - - - - Represents a discriminator convention where the discriminator is an array of all the discriminators provided by the class maps of the root class down to the actual type. - - - - - Initializes a new instance of the HierarchicalDiscriminatorConvention class. - - The element name. - - - - Gets the discriminator value for an actual type. - - The nominal type. - The actual type. - The discriminator value. - - - - Represents a bookmark that can be used to return a reader to the current position and state. - - - - - Specifies the serialization options for this class (see derived attributes). - - - - - Initializes a new instance of the BsonSerializationOptionsAttribute class. - - - - - Gets the serialization options specified by this attribute. - - The serialization options. - - - - Represents the representation to use when converting a Guid to a BSON binary value. - - - - - The representation for Guids is unspecified, so conversion between Guids and Bson binary data is not possible. - - - - - Use the new standard representation for Guids (binary subtype 4 with bytes in network byte order). - - - - - Use the representation used by older versions of the C# driver (including most community provided C# drivers). - - - - - Use the representation used by older versions of the Java driver. - - - - - Use the representation used by older versions of the Python driver. - - - - - An interface implemented by serialization providers. - - - - - Gets a serializer for a type. - - The type. - A serializer. - - - - Indicates that a field or property should be ignored if its value is null when this class is serialized. - - - - - Creates a clone of the context. - - A clone of the context. - - - - Represents a serializer for BitArrays. - - - - - Initializes a new instance of the BitArraySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BitArraySerializer class. - - - - - Represents a serializer for ByteArrays. - - - - - Initializes a new instance of the ByteArraySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the ByteArraySerializer class. - - - - - Represents a serializer for Bytes. - - - - - Initializes a new instance of the ByteSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the ByteSerializer class. - - - - - Represents a serializer for Chars. - - - - - Initializes a new instance of the CharSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the CharSerializer class. - - - - - Represents a serializer for CultureInfos. - - - - - Initializes a new instance of the CultureInfoSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the CultureInfoSerializer class. - - - - - Represents a serializer for DateTimeOffsets. - - - - - Initializes a new instance of the DateTimeOffsetSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the DateTimeOffsetSerializer class. - - - - - Represents a serializer for Decimals. - - - - - Initializes a new instance of the DecimalSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the DecimalSerializer class. - - - - - Represents a serializer for System.Drawing.Size. - - - - - Initializes a new instance of the DrawingSizeSerializer class. - - - - - Deserializes an object of type System.Drawing.Size from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object of type System.Drawing.Size to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the DrawingSizeSerializer class. - - - - - Represents a serializer for Int16s. - - - - - Initializes a new instance of the Int16Serializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the Int16Serializer class. - - - - - Represents a serializer for IPAddresses. - - - - - Initializes a new instance of the IPAddressSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the IPAddressSerializer class. - - - - - Represents a serializer for IPEndPoints. - - - - - Initializes a new instance of the IPEndPointSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the IPEndPointSerializer class. - - - - - Represents a serializer for SBytes. - - - - - Initializes a new instance of the SByteSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the SByteSerializer class. - - - - - Represents a serializer for Singles. - - - - - Initializes a new instance of the SingleSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the SingleSerializer class. - - - - - Represents a serializer for Timespans. - - - - - Initializes a new instance of the TimeSpanSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the TimeSpanSerializer class. - - - - - Represents a serializer for UInt16s. - - - - - Initializes a new instance of the UInt16Serializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the UInt16Serializer class. - - - - - Represents a serializer for UInt32s. - - - - - Initializes a new instance of the UInt32Serializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the UInt32Serializer class. - - - - - Represents a serializer for UInt64s. - - - - - Initializes a new instance of the UInt64Serializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the UInt64Serializer class. - - - - - Represents a serializer for Uris. - - - - - Initializes a new instance of the UriSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the UriSerializer class. - - - - - Represents a serializer for Versions. - - - - - Initializes a new instance of the VersionSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the VersionSerializer class. - - - - - An interface implemented by Id generators. - - - - - Generates an Id for a document. - - The container of the document (will be a MongoCollection when called from the C# driver). - The document. - An Id. - - - - Tests whether an Id is empty. - - The Id. - True if the Id is empty. - - - - Represents a serializer for classes that implement IBsonSerializable. - - - - - Initializes a new instance of the BsonIBsonSerializableSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The serialization options. - An object. - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Gets the document Id. - - The document. - The Id. - The nominal type of the Id. - The IdGenerator for the Id type. - True if the document has an Id. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Sets the document Id. - - The document. - The Id. - - - - Gets an instance of the BsonIBsonSerializableSerializer class. - - - - - A static class containing BSON utility methods. - - - - - Parses a hex string to a byte array. - - The hex string. - A byte array. - - - - Converts from number of milliseconds since Unix epoch to DateTime. - - The number of milliseconds since Unix epoch. - A DateTime. - - - - Converts a byte array to a hex string. - - The byte array. - A hex string. - - - - Converts a DateTime to local time (with special handling for MinValue and MaxValue). - - A DateTime. - A DateTimeKind. - The DateTime in local time. - - - - Converts a DateTime to number of milliseconds since Unix epoch. - - A DateTime. - Number of seconds since Unix epoch. - - - - Converts a DateTime to UTC (with special handling for MinValue and MaxValue). - - A DateTime. - The DateTime in UTC. - - - - Tries to parse a hex string to a byte array. - - The hex string. - A byte array. - True if the hex string was successfully parsed. - - - - A static class that maps between .NET objects and BsonValues. - - - - - Maps an object to a BsonValue. - - An object. - A BsonValue. - - - - Maps an object to a specific BsonValue type. - - An object. - The BsonType to map to. - A BsonValue. - - - - Registers a custom type mapper. - - The type. - A custom type mapper. - - - - Tries to map an object to a BsonValue. - - An object. - The BsonValue. - True if the mapping was successfull. - - - - Compares this Mapping to another object. - - The other object. - True if the other object is a Mapping and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Represents a member finder convention. - - - - - Finds the members of a class that are serialized. - - The class. - The members that are serialized. - - - - Represents a member finder convention where all public read/write fields and properties are serialized. - - - - - Finds the members of a class that are serialized. - - The class. - The members that are serialized. - - - - Represents a set of conventions. - - - - - Gets the default convention profile. - - The default convention profile. - - - - Merges another convention profile into this one (only missing conventions are merged). - - The other convention profile. - - - - Sets the Id generator convention. - - An Id generator convention. - The convention profile. - - - - Sets the default value convention. - - A default value convention. - The convention profile. - - - - Sets the element name convention. - - An element name convention. - The convention profile. - - - - Sets the extra elements member convention. - - An extra elements member convention. - The convention profile. - - - - Sets the Id member convention. - - An Id member convention. - The convention profile. - - - - Sets the ignore extra elements convention. - - An ignore extra elements convention. - The convention profile. - - - - Sets the ignore if null convention. - - An ignore if null convention. - The convention profile. - - - - Sets the member finder convention. - - A member finder convention. - The convention profile. - - - - Sets the serialize default value convention. - - A serialize default value convention. - The convention profile. - - - - Gets the Id generator convention. - - - - - Gets the default value convention. - - - - - Gets the element name convention. - - - - - Gets the extra elements member convention. - - - - - Gets the Id member convention. - - - - - Gets the ignore extra elements convention. - - - - - Gets the ignore if null convention. - - - - - Gets the member finder convention. - - - - - Gets the default value convention. - - - - - Represents an Id generator for BsonObjectIds. - - - - - Initializes a new instance of the BsonObjectIdGenerator class. - - - - - Generates an Id for a document. - - The container of the document (will be a MongoCollection when called from the C# driver). - The document. - An Id. - - - - Tests whether an Id is empty. - - The Id. - True if the Id is empty. - - - - Gets an instance of ObjectIdGenerator. - - - - - Represents an Id generator for Guids using the COMB algorithm. - - - - - Initializes a new instance of the CombGuidGenerator class. - - - - - Generates an Id for a document. - - The container of the document (will be a MongoCollection when called from the C# driver). - The document. - An Id. - - - - Tests whether an Id is empty. - - The Id. - True if the Id is empty. - - - - Gets an instance of CombGuidGenerator. - - - - - Represents an Id generator for Guids. - - - - - Initializes a new instance of the GuidGenerator class. - - - - - Generates an Id for a document. - - The container of the document (will be a MongoCollection when called from the C# driver). - The document. - An Id. - - - - Tests whether an Id is empty. - - The Id. - True if the Id is empty. - - - - Gets an instance of GuidGenerator. - - - - - Represents an Id generator that only checks that the Id is not null. - - - - - Initializes a new instance of the NullIdChecker class. - - - - - Generates an Id for a document. - - The container of the document (will be a MongoCollection when called from the C# driver). - The document. - An Id. - - - - Tests whether an Id is empty. - - The Id. - True if the Id is empty. - - - - Gets an instance of NullIdChecker. - - - - - Represents an Id generator for ObjectIds. - - - - - Initializes a new instance of the ObjectIdGenerator class. - - - - - Generates an Id for a document. - - The container of the document (will be a MongoCollection when called from the C# driver). - The document. - An Id. - - - - Tests whether an Id is empty. - - The Id. - True if the Id is empty. - - - - Gets an instance of ObjectIdGenerator. - - - - - Represents an Id generator for ObjectIds represented internally as strings. - - - - - Initializes a new instance of the StringObjectIdGenerator class. - - - - - Generates an Id for a document. - - The container of the document (will be a MongoCollection when called from the C# driver). - The document. - An Id. - - - - Tests whether an Id is empty. - - The Id. - True if the Id is empty. - - - - Gets an instance of StringObjectIdGenerator. - - - - - Represents an Id generator that only checks that the Id is not all zeros. - - - - - Initializes a new instance of the ZeroIdChecker class. - - - - - Generates an Id for a document. - - The container of the document (will be a MongoCollection when called from the C# driver). - The document. - An Id. - - - - Tests whether an Id is empty. - - The Id. - True if the Id is empty. - - - - Represents an extra elements member convention. - - - - - Finds the extra elements member of a class. - - The class. - The extra elements member. - - - - Represents an extra elements member convention where the extra elements member has a certain name. - - - - - Initializes a new instance of the NamedExtraElementsMemberConvention class. - - The name of the extra elements member. - - - - Finds the extra elements member of a class. - - The class. - The extra elements member. - - - - Gets the name of the extra elements member. - - - - - A static class containing BSON extension methods. - - - - - Converts an object to a BSON document byte array. - - The nominal type of the object. - The object. - A byte array. - - - - Converts an object to a BSON document byte array. - - The nominal type of the object. - The object. - The serialization options. - A byte array. - - - - Converts an object to a BSON document byte array. - - The nominal type of the object. - The object. - The serialization options. - The BsonBinaryWriter settings. - A byte array. - - - - Converts an object to a BSON document byte array. - - The nominal type of the object. - The object. - The BsonBinaryWriter settings. - A byte array. - - - - Converts an object to a BSON document byte array. - - The object. - The nominal type of the object. - A byte array. - - - - Converts an object to a BSON document byte array. - - The object. - The nominal type of the object. - The serialization options. - A byte array. - - - - Converts an object to a BSON document byte array. - - The object. - The nominal type of the object. - The serialization options. - The BsonBinaryWriter settings. - A byte array. - - - - Converts an object to a BSON document byte array. - - The object. - The nominal type of the object. - The BsonBinaryWriter settings. - A byte array. - - - - Converts an object to a BsonDocument. - - The nominal type of the object. - The object. - A BsonDocument. - - - - Converts an object to a BsonDocument. - - The nominal type of the object. - The object. - The serialization options. - A BsonDocument. - - - - Converts an object to a BsonDocument. - - The object. - The nominal type of the object. - A BsonDocument. - - - - Converts an object to a BsonDocument. - - The object. - The nominal type of the object. - The serialization options. - A BsonDocument. - - - - Converts an object to a JSON string. - - The nominal type of the object. - The object. - A JSON string. - - - - Converts an object to a JSON string. - - The nominal type of the object. - The object. - The serialization options. - A JSON string. - - - - Converts an object to a JSON string. - - The nominal type of the object. - The object. - The serialization options. - The JsonWriter settings. - A JSON string. - - - - Converts an object to a JSON string. - - The nominal type of the object. - The object. - The JsonWriter settings. - A JSON string. - - - - Converts an object to a JSON string. - - The object. - The nominal type of the object. - A JSON string. - - - - Converts an object to a JSON string. - - The object. - The nominal type of the object. - The serialization options. - A JSON string. - - - - Converts an object to a JSON string. - - The object. - The nominal type of the object. - The serialization options. - The JsonWriter settings. - A JSON string. - - - - Converts an object to a JSON string. - - The object. - The nominal type of the object. - The JsonWriter settings. - A JSON string. - - - - Represents a buffer for BSON encoded bytes. - - - - - Initializes a new instance of the BsonBuffer class. - - - - - Backpatches the length of an object. - - The start position of the object. - The length of the object. - - - - Clears the data in the buffer. - - - - - Copies data from the buffer to a byte array. - - The source offset in the buffer. - The destination byte array. - The destination offset in the byte array. - The number of bytes to copy. - - - - Disposes of any resources held by the buffer. - - - - - Loads the buffer from a Stream (the Stream must be positioned at a 4 byte length field). - - The Stream. - - - - Loads the buffer from a Stream (leaving the position in the buffer unchanged). - - The stream. - The number of bytes to load. - - - - Peeks at the next byte in the buffer and returns it as a BsonType. - - A BsonType. - - - - Peeks at the next byte in the buffer. - - A Byte. - - - - Reads a BSON Boolean from the buffer. - - A Boolean. - - - - Reads a BSON type from the buffer. - - A BsonType. - - - - Reads a byte from the buffer. - - A Byte. - - - - Reads bytes from the buffer. - - The number of bytes to read. - A byte array. - - - - Reads a BSON Double from the buffer. - - A Double. - - - - Reads a BSON Int32 from the reader. - - An Int32. - - - - Reads a BSON Int64 from the reader. - - An Int64. - - - - Reads a BSON ObjectId from the reader. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Reads a BSON string from the reader. - - A String. - - - - Reads a BSON CString from the reader (a null terminated string). - - A String. - - - - Skips over bytes in the buffer (advances the position). - - The number of bytes to skip. - - - - Skips over a CString in the buffer (advances the position). - - - - - Converts the buffer to a byte array. - - A byte array. - - - - Writes a BSON Boolean to the buffer. - - The Boolean value. - - - - Writes a byte to the buffer. - - A byte. - - - - Writes bytes to the buffer. - - A byte array. - - - - Writes a CString to the buffer. - - A string. - - - - Writes a BSON Double to the buffer. - - The Double value. - - - - Writes a BSON Int32 to the buffer. - - The Int32 value. - - - - Writes a BSON Int64 to the buffer. - - The Int64 value. - - - - Writes a BSON ObjectId to the buffer. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Writes a BSON String to the buffer. - - The String value. - - - - Writes all the data in the buffer to a Stream. - - The Stream. - - - - Writes a 32-bit zero the the buffer. - - - - - Gets or sets the max chunk pool size. - - - - - Gets or sets the length of the data in the buffer. - - - - - Gets or sets the current position in the buffer. - - - - - Represents a BSON writer to a BSON Stream. - - - - - Initializes a new instance of the BsonBinaryWriter class. - - A stream. - A BsonBuffer. - Optional BsonBinaryWriter settings. - - - - Closes the writer. - - - - - Flushes any pending data to the output destination. - - - - - Writes BSON binary data to the writer. - - The binary data. - The binary data subtype. - The representation for Guids. - - - - Writes a BSON Boolean to the writer. - - The Boolean value. - - - - Writes a BSON DateTime to the writer. - - The number of milliseconds since the Unix epoch. - - - - Writes a BSON Double to the writer. - - The Double value. - - - - Writes the end of a BSON array to the writer. - - - - - Writes the end of a BSON document to the writer. - - - - - Writes a BSON Int32 to the writer. - - The Int32 value. - - - - Writes a BSON Int64 to the writer. - - The Int64 value. - - - - Writes a BSON JavaScript to the writer. - - The JavaScript code. - - - - Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope). - - The JavaScript code. - - - - Writes a BSON MaxKey to the writer. - - - - - Writes a BSON MinKey to the writer. - - - - - Writes a BSON null to the writer. - - - - - Writes a BSON ObjectId to the writer. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Writes a BSON regular expression to the writer. - - A regular expression pattern. - A regular expression options. - - - - Writes the start of a BSON array to the writer. - - - - - Writes the start of a BSON document to the writer. - - - - - Writes a BSON String to the writer. - - The String value. - - - - Writes a BSON Symbol to the writer. - - The symbol. - - - - Writes a BSON timestamp to the writer. - - The combined timestamp/increment value. - - - - Writes a BSON undefined to the writer. - - - - - Disposes of any resources used by the writer. - - True if called from Dispose. - - - - Gets the writer's BsonBuffer. - - - - - Represents the type of a BSON element. - - - - - Not a real BSON type. Used to signal the end of a document. - - - - - A BSON double. - - - - - A BSON string. - - - - - A BSON document. - - - - - A BSON array. - - - - - BSON binary data. - - - - - A BSON undefined value. - - - - - A BSON ObjectId. - - - - - A BSON bool. - - - - - A BSON DateTime. - - - - - A BSON null value. - - - - - A BSON regular expression. - - - - - BSON JavaScript code. - - - - - A BSON symbol. - - - - - BSON JavaScript code with a scope (a set of variables with values). - - - - - A BSON 32-bit integer. - - - - - A BSON timestamp. - - - - - A BSON 64-bit integer. - - - - - A BSON MinKey value. - - - - - A BSON MaxKey value. - - - - - A static class containing BSON constants. - - - - - Gets the number of milliseconds since the Unix epoch for DateTime.MaxValue. - - - - - Gets the number of milliseconds since the Unix epoch for DateTime.MinValue. - - - - - Gets the Unix Epoch for BSON DateTimes (1970-01-01). - - - - - A static class containing BSON defaults. - - - - - Gets or sets the default Guid representation. - - - - - Gets or sets the default initial BSON buffer size. - - - - - Gets or sets the default max document size. - - - - - Represents a BSON reader for a binary BSON byte array. - - - - - Initializes a new instance of the BsonBinaryReader class. - A BsonBuffer. - A BsonBinaryReaderSettings. - - - - - Closes the reader. - - - - - Gets a bookmark to the reader's current position and state. - - A bookmark. - - - - Reads BSON binary data from the reader. - - The binary data. - The binary data subtype. - The representation for Guids. - - - - Reads a BSON boolean from the reader. - - A Boolean. - - - - Reads a BsonType from the reader. - - A BsonType. - - - - Reads a BSON DateTime from the reader. - - The number of milliseconds since the Unix epoch. - - - - Reads a BSON Double from the reader. - - A Double. - - - - Reads the end of a BSON array from the reader. - - - - - Reads the end of a BSON document from the reader. - - - - - Reads a BSON Int32 from the reader. - - An Int32. - - - - Reads a BSON Int64 from the reader. - - An Int64. - - - - Reads a BSON JavaScript from the reader. - - A string. - - - - Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope). - - A string. - - - - Reads a BSON MaxKey from the reader. - - - - - Reads a BSON MinKey from the reader. - - - - - Reads a BSON null from the reader. - - - - - Reads a BSON ObjectId from the reader. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Reads a BSON regular expression from the reader. - - A regular expression pattern. - A regular expression options. - - - - Reads the start of a BSON array. - - - - - Reads the start of a BSON document. - - - - - Reads a BSON string from the reader. - - A String. - - - - Reads a BSON symbol from the reader. - - A string. - - - - Reads a BSON timestamp from the reader. - - The combined timestamp/increment. - - - - Reads a BSON undefined from the reader. - - - - - Returns the reader to previously bookmarked position and state. - - The bookmark. - - - - Skips the name (reader must be positioned on a name). - - - - - Skips the value (reader must be positioned on a value). - - - - - Disposes of any resources used by the reader. - - True if called from Dispose. - - - - Gets the reader's buffer. - - - - - Represents a serializer for a class map. - - - - - Initializes a new instance of the BsonClassMapSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The serialization options. - An object. - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Gets the document Id. - - The document. - The Id. - The nominal type of the Id. - The IdGenerator for the Id type. - True if the document has an Id. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Sets the document Id. - - The document. - The Id. - - - - Gets an instance of the BsonClassMapSerializer class. - - - - - Represents a serializer for dictionaries. - - - - - Initializes a new instance of the DictionarySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Represents the BSON undefined value. - - - - - Compares this BsonUndefined to another BsonUndefined. - - The other BsonUndefined. - A 32-bit signed integer that indicates whether this BsonUndefined is less than, equal to, or greather than the other. - - - - Compares the BsonUndefined to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonUndefined is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonUndefined to another BsonUndefined. - - The other BsonUndefined. - True if the two BsonUndefined values are equal. - - - - Compares this BsonUndefined to another object. - - The other object. - True if the other object is a BsonUndefined and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the singleton instance of BsonUndefined. - - - - - Represents a serializer for enums. - - - - - Initializes a new instance of the EnumSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the EnumSerializer class. - - - - - Represents the BSON MinKey value. - - - - - Compares this BsonMinKey to another BsonMinKey. - - The other BsonMinKey. - A 32-bit signed integer that indicates whether this BsonMinKey is less than, equal to, or greather than the other. - - - - Compares the BsonMinKey to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonMinKey is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonMinKey to another BsonMinKey. - - The other BsonMinKey. - True if the two BsonMinKey values are equal. - - - - Compares this BsonMinKey to another object. - - The other object. - True if the other object is a BsonMinKey and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the singleton instance of BsonMinKey. - - - - - A static class that represents the BSON serialization functionality. - - - - - Deserializes an object from a BsonDocument. - - The nominal type of the object. - The BsonDocument. - A TNominalType. - - - - Deserializes an object from a JsonBuffer. - - The nominal type of the object. - The JsonBuffer. - A TNominalType. - - - - Deserializes an object from a BsonReader. - - The nominal type of the object. - The BsonReader. - A TNominalType. - - - - Deserializes an object from a BSON byte array. - - The nominal type of the object. - The BSON byte array. - A TNominalType. - - - - Deserializes an object from a BSON Stream. - - The nominal type of the object. - The BSON Stream. - A TNominalType. - - - - Deserializes an object from a JSON string. - - The nominal type of the object. - The JSON string. - A TNominalType. - - - - Deserializes an object from a JSON TextReader. - - The nominal type of the object. - The JSON TextReader. - A TNominalType. - - - - Deserializes an object from a BsonDocument. - - The BsonDocument. - The nominal type of the object. - A TNominalType. - - - - Deserializes an object from a JsonBuffer. - - The JsonBuffer. - The nominal type of the object. - An object. - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - An object. - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The serialization options. - An object. - - - - Deserializes an object from a BSON byte array. - - The BSON byte array. - The nominal type of the object. - An object. - - - - Deserializes an object from a BSON Stream. - - The BSON Stream. - The nominal type of the object. - An object. - - - - Deserializes an object from a JSON string. - - The JSON string. - The nominal type of the object. - An object. - - - - Deserializes an object from a JSON TextReader. - - The JSON TextReader. - The nominal type of the object. - An object. - - - - Looks up a generic serializer definition. - - The generic type. - A generic serializer definition. - - - - Looks up an IdGenerator. - - The Id type. - An IdGenerator for the Id type. - - - - Looks up a serializer for a Type. - - The Type. - A serializer for the Type. - - - - Registers a generic serializer definition for a generic type. - - The generic type. - The generic serializer definition. - - - - Registers an IdGenerator for an Id Type. - - The Id Type. - The IdGenerator for the Id Type. - - - - Registers a serialization provider. - - The serialization provider. - - - - Registers a serializer for a type. - - The type. - The serializer. - - - - Serializes an object to a BsonWriter. - - The nominal type of the object. - The BsonWriter. - The object. - - - - Serializes an object to a BsonWriter. - - The nominal type of the object. - The BsonWriter. - The object. - The serialization options. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type of the object. - The object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type of the object. - The object. - The serialization options. - - - - Gets or sets whether to use the NullIdChecker on reference Id types that don't have an IdGenerator registered. - - - - - Gets or sets whether to use the ZeroIdChecker on value Id types that don't have an IdGenerator registered. - - - - - Represents the state of a reader. - - - - - The initial state. - - - - - The reader is positioned at the type of an element or value. - - - - - The reader is positioned at the name of an element. - - - - - The reader is positioned at a value. - - - - - The reader is positioned at a scope document. - - - - - The reader is positioned at the end of a document. - - - - - The reader is positioned at the end of an array. - - - - - The reader has finished reading a document. - - - - - The reader is closed. - - - - - Represents a BsonDocument wrapper. - - - - - Initializes a new instance of the BsonDocumentWrapper class. - - The wrapped object. - - - - Initializes a new instance of the BsonDocumentWrapper class. - - The nominal type of the wrapped object. - The wrapped object. - - - - Initializes a new instance of the BsonDocumentWrapper class. - - The nominal type of the wrapped object. - The wrapped object. - Whether the wrapped object is an update document that needs to be checked. - - - - Creates a new instance of the BsonDocumentWrapper class. - - The nominal type of the wrapped object. - The wrapped object. - A BsonDocumentWrapper or null. - - - - Creates a new instance of the BsonDocumentWrapper class. - - The nominal type of the wrapped object. - The wrapped object. - Whether the wrapped object is an update document. - A BsonDocumentWrapper or null. - - - - Creates a new instance of the BsonDocumentWrapper class. - - The nominal type of the wrapped object. - The wrapped object. - A BsonDocumentWrapper or null. - - - - Creates a new instance of the BsonDocumentWrapper class. - - The nominal type of the wrapped object. - The wrapped object. - Whether the wrapped object is an update document. - A BsonDocumentWrapper or null. - - - - Creates a list of new instances of the BsonDocumentWrapper class. - - The nominal type of the wrapped objects. - A list of wrapped objects. - A list of BsonDocumentWrappers or null. - - - - Creates a list of new instances of the BsonDocumentWrapper class. - - The nominal type of the wrapped object. - A list of wrapped objects. - A list of BsonDocumentWrappers or null. - - - - CompareTo is an invalid operation for BsonDocumentWrapper. - - Not applicable. - Not applicable. - - - - Deserialize is an invalid operation for BsonDocumentWrapper. - - Not applicable. - Not applicable. - Not applicable. - Not applicable. - - - - GetDocumentId is an invalid operation for BsonDocumentWrapper. - - Not applicable. - Not applicable. - Not applicable. - Not applicable. - - - - Equals is an invalid operation for BsonDocumentWrapper. - - Not applicable. - Not applicable. - - - - GetHashCode is an invalid operation for BsonDocumentWrapper. - - Not applicable. - - - - Serializes the wrapped object to a BsonWriter. - - The writer. - The nominal type (overridded by the wrapped nominal type). - The serialization options. - - - - SetDocumentId is an invalid operation for BsonDocumentWrapper. - - Not applicable. - - - - Returns a string representation of the wrapped document. - - A string representation of the wrapped document. - - - - Specifies that this is the Id field or property. - - - - - Initializes a new instance of the BsonIdAttribute class. - - - - - Gets or sets the Id generator for the Id. - - - - - Gets or sets the Id element serialization order. - - - - - Specifies the element name and related options for a field or property. - - - - - Initializes a new instance of the BsonElementAttribute class. - - The name of the element. - - - - Gets the element name. - - - - - Gets the element serialization order. - - - - - Indicates that extra elements should be ignored when this class is deserialized. - - - - - Represents settings for a BsonDocumentWriter. - - - - - Represents settings for a BsonWriter. - - - - - The representation for Guids. - - - - - Whether the settings are frozen. - - - - - Initializes a new instance of the BsonWriterSettings class. - - - - - Initializes a new instance of the BsonWriterSettings class. - - The representation for Guids. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Freezes the settings. - - The settings. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Throws an InvalidOperationException when an attempt is made to change a setting after the settings are frozen. - - - - - Gets or sets the representation for Guids. - - - - - Gets whether the settings are frozen. - - - - - Initializes a new instance of the BsonDocumentWriterSettings class. - - - - - Initializes a new instance of the BsonDocumentWriterSettings class. - - The representation for Guids. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Gets or sets the default BsonDocumentWriter settings. - - - - - Represents settings for a BsonDocumentReader. - - - - - Represents settings for a BsonReader. - - - - - The representation for Guids. - - - - - Whether the settings are frozen. - - - - - Initializes a new instance of the BsonReaderSettings class. - - - - - Initializes a new instance of the BsonReaderSettings class. - - The representation for Guids. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Freezes the settings. - - The settings. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Throws an InvalidOperationException when an attempt is made to change a setting after the settings are frozen. - - - - - Gets or sets the representation for Guids. - - - - - Gets whether the settings are frozen. - - - - - Initializes a new instance of the BsonDocumentReaderSettings class. - - - - - Initializes a new instance of the BsonDocumentReaderSettings class. - - The representation for Guids. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Gets or sets the default settings for a BsonDocumentReader. - - - - - Represents a serializer for Booleans. - - - - - Initializes a new instance of the BooleanSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BooleanSerializer class. - - - - - Represents a serializer for DateTimes. - - - - - Initializes a new instance of the DateTimeSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the DateTimeSerializer class. - - - - - Represents a serializer for Doubles. - - - - - Initializes a new instance of the DoubleSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the DoubleSerializer class. - - - - - Represents a serializer for Guids. - - - - - Initializes a new instance of the GuidSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the GuidSerializer class. - - - - - Represents a serializer for Int32. - - - - - Initializes a new instance of the Int32Serializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the Int32Serializer class. - - - - - Represents a serializer for Int64s. - - - - - Initializes a new instance of the Int64Serializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the Int64Serializer class. - - - - - Represents a serializer for ObjectIds. - - - - - Initializes a new instance of the ObjectIdSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the ObjectIdSerializer class. - - - - - Represents a serializer for Strings. - - - - - Initializes a new instance of the StringSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the StringSerializer class. - - - - - Represents a BSON JavaScript value with a scope. - - - - - Represents a BSON JavaScript value. - - - - - The JavaScript code. - - - - - Initializes a new instance of the BsonJavaScript class. - - The JavaScript code. - - - - Initializes a new instance of the BsonJavaScript class (only called by BsonJavaScriptWithScope). - - The JavaScript code. - The BsonType (must be JavaScriptWithScope). - - - - Converts a string to a BsonJavaScript. - - A string. - A BsonJavaScript. - - - - Creates a new instance of the BsonJavaScript class. - - A string containing JavaScript code. - A BsonJavaScript. - - - - Creates a new BsonJavaScript. - - An object to be mapped to a BsonJavaScript. - A BsonJavaScript or null. - - - - Compares this BsonJavaScript to another BsonJavaScript. - - The other BsonJavaScript. - A 32-bit signed integer that indicates whether this BsonJavaScript is less than, equal to, or greather than the other. - - - - Compares the BsonJavaScript to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonJavaScript is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonJavaScript to another BsonJavaScript. - - The other BsonJavaScript. - True if the two BsonJavaScript values are equal. - - - - Compares this BsonJavaScript to another object. - - The other object. - True if the other object is a BsonJavaScript and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the JavaScript code. - - - - - Initializes a new instance of the BsonJavaScriptWithScope class. - - The JavaScript code. - A scope (a set of variables with values). - - - - Creates a new BsonJavaScriptWithScope. - - An object to be mapped to a BsonJavaScriptWithScope. - A BsonJavaScriptWithScope or null. - - - - Creates a new instance of the BsonJavaScript class. - - A string containing JavaScript code. - A scope (a set of variable with values). - A BsonJavaScript. - - - - Creates a shallow clone of the BsonJavaScriptWithScope (see also DeepClone). - - A shallow clone of the BsonJavaScriptWithScope. - - - - Creates a deep clone of the BsonJavaScriptWithScope (see also Clone). - - A deep clone of the BsonJavaScriptWithScope. - - - - Compares this BsonJavaScriptWithScope to another BsonJavaScriptWithScope. - - The other BsonJavaScriptWithScope. - A 32-bit signed integer that indicates whether this BsonJavaScriptWithScope is less than, equal to, or greather than the other. - - - - Compares the BsonJavaScriptWithScope to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonJavaScriptWithScope is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonJavaScriptWithScope to another BsonJavaScriptWithScope. - - The other BsonJavaScriptWithScope. - True if the two BsonJavaScriptWithScope values are equal. - - - - Compares this BsonJavaScriptWithScope to another object. - - The other object. - True if the other object is a BsonJavaScriptWithScope and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the scope (a set of variables with values). - - - - - Represents a serializer for one-dimensional arrays. - - The type of the elements. - - - - Initializes a new instance of the ArraySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Represents a serializer for two-dimensional arrays. - - The type of the elements. - - - - Initializes a new instance of the TwoDimensionalArraySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Represents a serializer for three-dimensional arrays. - - The type of the elements. - - - - Initializes a new instance of the ThreeDimensionalArraySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Specifies the known types for this class (the derived classes). - - - - - Initializes a new instance of the BsonKnownTypesAttribute class. - - One or more known types. - - - - Gets a list of the known types. - - - - - Represents a BSON internal exception (almost surely the result of a bug). - - - - - Initializes a new instance of the BsonInternalException class. - - - - - Initializes a new instance of the BsonInternalException class. - - The error message. - - - - Initializes a new instance of the BsonInternalException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the BsonInternalException class (this overload used by deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Represents a JSON token type. - - - - - An invalid token. - - - - - A begin array token (a '['). - - - - - A begin object token (a '{'). - - - - - An end array token (a ']'). - - - - - A left parenthesis (a '('). - - - - - A right parenthesis (a ')'). - - - - - An end object token (a '}'). - - - - - A colon token (a ':'). - - - - - A comma token (a ','). - - - - - A DateTime token. - - - - - A Double token. - - - - - An Int32 token. - - - - - And Int64 token. - - - - - An ObjectId token. - - - - - A regular expression token. - - - - - A string token. - - - - - An unquoted string token. - - - - - An end of file token. - - - - - Represents a JSON token. - - - - - Initializes a new instance of the JsonToken class. - - The token type. - The lexeme. - - - - Gets the token type. - - - - - Gets the lexeme. - - - - - Gets the value of a DateTime token. - - - - - Gets the value of a Double token. - - - - - Gets the value of an Int32 token. - - - - - Gets the value of an Int64 token. - - - - - Gets the value of an ObjectId token. - - - - - Gets the value of a regular expression token. - - - - - Gets the value of a string token. - - - - - Represents a DateTime JSON token. - - - - - Initializes a new instance of the DateTimeJsonToken class. - - The lexeme. - The DateTime value. - - - - Gets the value of a DateTime token. - - - - - Represents a Double JSON token. - - - - - Initializes a new instance of the DoubleJsonToken class. - - The lexeme. - The Double value. - - - - Gets the value of a Double token. - - - - - Represents an Int32 JSON token. - - - - - Initializes a new instance of the Int32JsonToken class. - - The lexeme. - The Int32 value. - - - - Gets the value of an Int32 token. - - - - - Gets the value of an Int32 token as an Int64. - - - - - Represents an Int64 JSON token. - - - - - Initializes a new instance of the Int64JsonToken class. - - The lexeme. - The Int64 value. - - - - Gets the value of an Int64 token. - - - - - Represents an ObjectId JSON token. - - - - - Initializes a new instance of the ObjectIdJsonToken class. - - The lexeme. - The ObjectId value. - - - - Gets the value of an ObjectId token. - - - - - Represents a regular expression JSON token. - - - - - Initializes a new instance of the RegularExpressionJsonToken class. - - The lexeme. - The BsonRegularExpression value. - - - - Gets the value of a regular expression token. - - - - - Represents a String JSON token. - - - - - Initializes a new instance of the StringJsonToken class. - - The token type. - The lexeme. - The String value. - - - - Gets the value of an String token. - - - - - A static class that represents a JSON scanner. - - - - - Gets the next JsonToken from a JsonBuffer. - - The buffer. - The next token. - - - - Creates a clone of the context. - - A clone of the context. - - - - Represents a BSON serialization exception. - - - - - Initializes a new instance of the BsonSerializationException class. - - - - - Initializes a new instance of the BsonSerializationException class. - - The error message. - - - - Initializes a new instance of the BsonSerializationException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the BsonSerializationException class (this overload used by deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Represents a serializer for objects. - - - - - Initializes a new instance of the ObjectSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The serialization options. - An object. - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Gets the document Id. - - The document. - The Id. - The nominal type of the Id. - The IdGenerator for the Id type. - True if the document has an Id. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Sets the document Id. - - The document. - The Id. - - - - Gets an instance of the ObjectSerializer class. - - - - - Represents the external representation of a field or property. - - - - - Initializes a new instance of the RepresentationSerializationOptions class. - - The external representation. - - - - Initializes a new instance of the RepresentationSerializationOptions class. - - The external representation. - Whether to allow overflow. - Whether to allow truncation. - - - - Converts a Double to a Decimal. - - A Double. - A Decimal. - - - - Converts an Int32 to a Decimal. - - An Int32. - A Decimal. - - - - Converts an Int64 to a Decimal. - - An Int64. - A Decimal. - - - - Converts a Decimal to a Double. - - A Decimal. - A Double. - - - - Converts a Double to a Double. - - A Double. - A Double. - - - - Converts a Single to a Double. - - A Single. - A Double. - - - - Converts an Int32 to a Double. - - An Int32. - A Double. - - - - Converts an Int64 to a Double. - - An Int64. - A Double. - - - - Converts an Int16 to a Double. - - An Int16. - A Double. - - - - Converts a UInt32 to a Double. - - A UInt32. - A Double. - - - - Converts a UInt64 to a Double. - - A UInt64. - A Double. - - - - Converts a UInt16 to a Double. - - A UInt16. - A Double. - - - - Converts a Double to an Int16. - - A Double. - An Int16. - - - - Converts an Int32 to an Int16. - - An Int32. - An Int16. - - - - Converts an Int64 to an Int16. - - An Int64. - An Int16. - - - - Converts a Decimal to an Int32. - - A Decimal. - An Int32. - - - - Converts a Double to an Int32. - - A Double. - An Int32. - - - - Converts a Single to an Int32. - - A Single. - An Int32. - - - - Converts an Int32 to an Int32. - - An Int32. - An Int32. - - - - Converts an Int64 to an Int32. - - An Int64. - An Int32. - - - - Converts an Int16 to an Int32. - - An Int16. - An Int32. - - - - Converts a UInt32 to an Int32. - - A UInt32. - An Int32. - - - - Converts a UInt64 to an Int32. - - A UInt64. - An Int32. - - - - Converts a UInt16 to an Int32. - - A UInt16. - An Int32. - - - - Converts a Decimal to an Int64. - - A Decimal. - An Int64. - - - - Converts a Double to an Int64. - - A Double. - An Int64. - - - - Converts a Single to an Int64. - - A Single. - An Int64. - - - - Converts an Int32 to an Int64. - - An Int32. - An Int64. - - - - Converts an Int64 to an Int64. - - An Int64. - An Int64. - - - - Converts an Int16 to an Int64. - - An Int16. - An Int64. - - - - Converts a UInt32 to an Int64. - - A UInt32. - An Int64. - - - - Converts a UInt64 to an Int64. - - A UInt64. - An Int64. - - - - Converts a UInt16 to an Int64. - - A UInt16. - An Int64. - - - - Converts a Double to a Single. - - A Double. - A Single. - - - - Converts an Int32 to a Single. - - An Int32. - A Single. - - - - Converts an Int64 to a Single. - - An Int64. - A Single. - - - - Converts a Double to a UInt16. - - A Double. - A UInt16. - - - - Converts an Int32 to a UInt16. - - An Int32. - A UInt16. - - - - Converts an Int64 to a UInt16. - - An Int64. - A UInt16. - - - - Converts a Double to a UInt32. - - A Double. - A UInt32. - - - - Converts an Int32 to a UInt32. - - An Int32. - A UInt32. - - - - Converts an Int64 to a UInt32. - - An Int64. - A UInt32. - - - - Converts a Double to a UInt64. - - A Double. - A UInt64. - - - - Converts an Int32 to a UInt64. - - An Int32. - A UInt64. - - - - Converts an Int64 to a UInt64. - - An Int64. - A UInt64. - - - - Gets the external representation. - - - - - Gets whether to allow overflow. - - - - - Gets whether to allow truncation. - - - - - Represents a serializer for BsonArrays. - - - - - Initializes a new instance of the BsonArraySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonArraySerializer class. - - - - - Represents a serializer for BsonBinaryDatas. - - - - - Initializes a new instance of the BsonBinaryDataSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonBinaryDataSerializer class. - - - - - Represents a serializer for BsonBooleans. - - - - - Initializes a new instance of the BsonBooleanSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonBooleanSerializer class. - - - - - Represents a serializer for BsonDateTimes. - - - - - Initializes a new instance of the BsonDateTimeSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonDateTimeSerializer class. - - - - - Represents a serializer for BsonDocuments. - - - - - Initializes a new instance of the BsonDocumentSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Gets the document Id. - - The document. - The Id. - The nominal type of the Id. - The IdGenerator for the Id type. - True if the document has an Id. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Sets the document Id. - - The document. - The Id. - - - - Gets an instance of the BsonDocumentSerializer class. - - - - - Represents a serializer for BsonDocumentWrappers. - - - - - Initializes a new instance of the BsonDocumentWrapperSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonDocumentWrapperSerializer class. - - - - - Represents a serializer for BsonDoubles. - - - - - Initializes a new instance of the BsonDoubleSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonDoubleSerializer class. - - - - - Represents a serializer for BsonInt32s. - - - - - Initializes a new instance of the BsonInt32Serializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonInt32Serializer class. - - - - - Represents a serializer for BsonInt64s. - - - - - Initializes a new instance of the BsonInt64Serializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonInt64Serializer class. - - - - - Represents a serializer for BsonJavaScripts. - - - - - Initializes a new instance of the BsonJavaScriptSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonJavaScriptSerializer class. - - - - - Represents a serializer for BsonJavaScriptWithScopes. - - - - - Initializes a new instance of the BsonJavaScriptWithScopeSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonJavaScriptWithScopeSerializer class. - - - - - Represents a serializer for BsonMaxKeys. - - - - - Initializes a new instance of the BsonMaxKeySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonMaxKeySerializer class. - - - - - Represents a serializer for BsonMinKeys. - - - - - Initializes a new instance of the BsonMinKeySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonMinKeySerializer class. - - - - - Represents a serializer for BsonNulls. - - - - - Initializes a new instance of the BsonNullSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonNullSerializer class. - - - - - Represents a serializer for BsonObjectIds. - - - - - Initializes a new instance of the BsonObjectIdSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonObjectIdSerializer class. - - - - - Represents a serializer for BsonRegularExpressions. - - - - - Initializes a new instance of the BsonRegularExpressionSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonRegularExpressionSerializer class. - - - - - Represents a serializer for BsonStrings. - - - - - Initializes a new instance of the BsonStringSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonStringSerializer class. - - - - - Represents a serializer for BsonSymbols. - - - - - Initializes a new instance of the BsonSymbolSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonSymbolSerializer class. - - - - - Represents a serializer for BsonTimestamps. - - - - - Initializes a new instance of the BsonTimestampSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonTimestampSerializer class. - - - - - Represents a serializer for BsonUndefineds. - - - - - Initializes a new instance of the BsonUndefinedSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonUndefinedSerializer class. - - - - - Represents a serializer for BsonValues. - - - - - Initializes a new instance of the BsonValueSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the BsonValueSerializer class. - - - - - Represents a BSON boolean value. - - - - - Converts a bool to a BsonBoolean. - - A bool. - A BsonBoolean. - - - - Returns one of the two possible BsonBoolean values. - - The bool value. - The corresponding BsonBoolean value. - - - - Returns one of the two possible BsonBoolean values. - - An object to be mapped to a BsonBoolean. - A BsonBoolean or null. - - - - Compares this BsonBoolean to another BsonBoolean. - - The other BsonBoolean. - A 32-bit signed integer that indicates whether this BsonBoolean is less than, equal to, or greather than the other. - - - - Compares the BsonBoolean to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonBoolean is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonBoolean to another BsonBoolean. - - The other BsonBoolean. - True if the two BsonBoolean values are equal. - - - - Compares this BsonBoolean to another object. - - The other object. - True if the other object is a BsonBoolean and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the instance of BsonBoolean that represents false. - - - - - Gets the instance of BsonBoolean that represents true. - - - - - Gets the BsonBoolean as a bool. - - - - - Gets the value of this BsonBoolean. - - - - - Represents a BSON array. - - - - - Initializes a new instance of the BsonArray class. - - - - - Initializes a new instance of the BsonArray class. - - A list of values to add to the array. - - - - Initializes a new instance of the BsonArray class. - - A list of values to add to the array. - - - - Initializes a new instance of the BsonArray class. - - A list of values to add to the array. - - - - Initializes a new instance of the BsonArray class. - - A list of values to add to the array. - - - - Initializes a new instance of the BsonArray class. - - A list of values to add to the array. - - - - Initializes a new instance of the BsonArray class. - - A list of values to add to the array. - - - - Initializes a new instance of the BsonArray class. - - A list of values to add to the array. - - - - Initializes a new instance of the BsonArray class. - - A list of values to add to the array. - - - - Initializes a new instance of the BsonArray class. - - A list of values to add to the array. - - - - Initializes a new instance of the BsonArray class. - - The initial capacity of the array. - - - - Creates a new BsonArray. - - A list of values to add to the array. - A BsonArray or null. - - - - Creates a new BsonArray. - - A list of values to add to the array. - A BsonArray or null. - - - - Creates a new BsonArray. - - A list of values to add to the array. - A BsonArray or null. - - - - Creates a new BsonArray. - - A list of values to add to the array. - A BsonArray or null. - - - - Creates a new BsonArray. - - A list of values to add to the array. - A BsonArray or null. - - - - Creates a new BsonArray. - - A list of values to add to the array. - A BsonArray or null. - - - - Creates a new BsonArray. - - A list of values to add to the array. - A BsonArray or null. - - - - Creates a new BsonArray. - - A list of values to add to the array. - A BsonArray or null. - - - - Creates a new BsonArray. - - A list of values to add to the array. - A BsonArray or null. - - - - Creates a new BsonArray. - - A value to be mapped to a BsonArray. - A BsonArray or null. - - - - Reads a BsonArray from a BsonReader. - - The reader. - A BsonArray. - - - - Adds an element to the array. - - The value to add to the array. - The array (so method calls can be chained). - - - - Adds multiple elements to the array. - - A list of values to add to the array. - The array (so method calls can be chained). - - - - Adds multiple elements to the array. - - A list of values to add to the array. - The array (so method calls can be chained). - - - - Adds multiple elements to the array. - - A list of values to add to the array. - The array (so method calls can be chained). - - - - Adds multiple elements to the array. - - A list of values to add to the array. - The array (so method calls can be chained). - - - - Adds multiple elements to the array. - - A list of values to add to the array. - The array (so method calls can be chained). - - - - Adds multiple elements to the array. - - A list of values to add to the array. - The array (so method calls can be chained). - - - - Adds multiple elements to the array. - - A list of values to add to the array. - The array (so method calls can be chained). - - - - Adds multiple elements to the array. - - A list of values to add to the array. - The array (so method calls can be chained). - - - - Adds multiple elements to the array. - - A list of values to add to the array. - The array (so method calls can be chained). - - - - Creates a shallow clone of the array (see also DeepClone). - - A shallow clone of the array. - - - - Clears the array. - - - - - Compares the array to another array. - - The other array. - A 32-bit signed integer that indicates whether this array is less than, equal to, or greather than the other. - - - - Compares the array to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this array is less than, equal to, or greather than the other BsonValue. - - - - Tests whether the array contains a value. - - The value to test for. - True if the array contains the value. - - - - Copies elements from this array to another array. - - The other array. - The zero based index of the other array at which to start copying. - - - - Copies elements from this array to another array as raw values (see BsonValue.RawValue). - - The other array. - The zero based index of the other array at which to start copying. - - - - Creates a deep clone of the array (see also Clone). - - A deep clone of the array. - - - - Compares this array to another array. - - The other array. - True if the two arrays are equal. - - - - Compares this BsonArray to another object. - - The other object. - True if the other object is a BsonArray and equal to this one. - - - - Gets an enumerator that can enumerate the elements of the array. - - An enumerator. - - - - Gets the hash code. - - The hash code. - - - - Gets the index of a value in the array. - - The value to search for. - The zero based index of the value (or -1 if not found). - - - - Gets the index of a value in the array. - - The value to search for. - The zero based index at which to start the search. - The zero based index of the value (or -1 if not found). - - - - Gets the index of a value in the array. - - The value to search for. - The zero based index at which to start the search. - The number of elements to search. - The zero based index of the value (or -1 if not found). - - - - Inserts a new value into the array. - - The zero based index at which to insert the new value. - The new value. - - - - Removes the first occurrence of a value from the array. - - The value to remove. - True if the value was removed. - - - - Removes an element from the array. - - The zero based index of the element to remove. - - - - Converts the BsonArray to an array of BsonValues. - - An array of BsonValues. - - - - Converts the BsonArray to a list of BsonValues. - - A list of BsonValues. - - - - Returns a string representation of the array. - - A string representation of the array. - - - - Writes the array to a BsonWriter. - - The writer. - - - - Gets or sets the total number of elements the internal data structure can hold without resizing. - - - - - Gets the count of array elements. - - - - - Gets whether the array is read-only. - - - - - Gets the array elements as raw values (see BsonValue.RawValue). - - - - - Gets the array elements. - - - - - Gets or sets an array element. - - The zero based index of the element. - The value of the element. - - - - Represents a mapping between a class and a BSON document. - - - - - Initializes a new instance of the BsonClassMap class. - - The class type. - - - - Gets the type of a member. - - The member info. - The type of the member. - - - - Gets a loadable type name (like AssemblyQualifiedName but shortened when possible) - - The type. - The type name. - - - - Checks whether a class map is registered for a type. - - The type to check. - True if there is a class map registered for the type. - - - - Looks up a class map (will AutoMap the class if no class map is registered). - - The class type. - The class map. - - - - Looks up the conventions profile for a type. - - The type. - The conventions profile for that type. - - - - Creates and registers a class map. - - The class. - The class map. - - - - Creates and registers a class map. - - The class. - The class map initializer. - The class map. - - - - Registers a class map. - - The class map. - - - - Registers a conventions profile. - - The conventions profile. - The filter function that determines which types this profile applies to. - - - - Automaps the class. - - - - - Creates an instance of the class. - - An object. - - - - Freezes the class map. - - The class map. - - - - Gets a member map. - - The member name. - The member map. - - - - Gets the member map for a BSON element. - - The name of the element. - The member map. - - - - Creates a member map for the extra elements field and adds it to the class map. - - The name of the extra elements field. - The member map (so method calls can be chained). - - - - Creates a member map for the extra elements member and adds it to the class map. - - The member info for the extra elements member. - The member map (so method calls can be chained). - - - - Creates a member map for the extra elements property and adds it to the class map. - - The name of the property. - The member map (so method calls can be chained). - - - - Creates a member map for a field and adds it to the class map. - - The name of the field. - The member map (so method calls can be chained). - - - - Creates a member map for the Id field and adds it to the class map. - - The name of the Id field. - The member map (so method calls can be chained). - - - - Creates a member map for the Id member and adds it to the class map. - - The member info for the Id member. - The member map (so method calls can be chained). - - - - Creates a member map for the Id property and adds it to the class map. - - The name of the Id property. - The member map (so method calls can be chained). - - - - Creates a member map for a member and adds it to the class map. - - The member info. - The member map (so method calls can be chained). - - - - Creates a member map for a property and adds it to the class map. - - The name of the property. - The member map (so method calls can be chained). - - - - Sets the discriminator. - - The discriminator. - - - - Sets whether a discriminator is required when serializing this class. - - Whether a discriminator is required. - - - - Sets the member map of the member used to hold extra elements. - - The extra elements member map. - - - - Sets the Id member. - - The Id member. - - - - Sets whether extra elements should be ignored when deserializing. - - Whether extra elements should be ignored when deserializing. - - - - Sets whether this class is a root class. - - Whether this class is a root class. - - - - Removes the member map for a field from the class map. - - The name of the field. - - - - Removes a member map from the class map. - - The member info. - - - - Removes the member map for a property from the class map. - - The name of the property. - - - - Gets the base class map. - - - - - Gets the class type. - - - - - Gets the discriminator. - - - - - Gets whether a discriminator is required when serializing this class. - - - - - Gets the member map of the member used to hold extra elements. - - - - - Gets whether this class has a root class ancestor. - - - - - Gets the Id member map. - - - - - Gets whether extra elements should be ignored when deserializing. - - - - - Gets whether this class is anonymous. - - - - - Gets whether the class map is frozen. - - - - - Gets whether this class is a root class. - - - - - Gets the known types of this class. - - - - - Gets the member maps. - - - - - Represents a mapping between a class and a BSON document. - - The class. - - - - Initializes a new instance of the BsonClassMap class. - - - - - Initializes a new instance of the BsonClassMap class. - - The class map initializer. - - - - Gets a member map. - - The member type. - A lambda expression specifying the member. - The member map. - - - - Creates a member map for the extra elements field and adds it to the class map. - - The member type. - A lambda expression specifying the extra elements field. - The member map. - - - - Creates a member map for the extra elements member and adds it to the class map. - - The member type. - A lambda expression specifying the extra elements member. - The member map. - - - - Creates a member map for the extra elements property and adds it to the class map. - - The member type. - A lambda expression specifying the extra elements property. - The member map. - - - - Creates a member map for a field and adds it to the class map. - - The member type. - A lambda expression specifying the field. - The member map. - - - - Creates a member map for the Id field and adds it to the class map. - - The member type. - A lambda expression specifying the Id field. - The member map. - - - - Creates a member map for the Id member and adds it to the class map. - - The member type. - A lambda expression specifying the Id member. - The member map. - - - - Creates a member map for the Id property and adds it to the class map. - - The member type. - A lambda expression specifying the Id property. - The member map. - - - - Creates a member map and adds it to the class map. - - The member type. - A lambda expression specifying the member. - The member map. - - - - Creates a member map for the Id property and adds it to the class map. - - The member type. - A lambda expression specifying the Id property. - The member map. - - - - Removes the member map for a field from the class map. - - The member type. - A lambda expression specifying the field. - - - - Removes a member map from the class map. - - The member type. - A lambda expression specifying the member. - - - - Removes a member map for a property from the class map. - - The member type. - A lambda expression specifying the property. - - - - Represents a serializer for nullable values. - - - - - Initializes a new instance of the NullableSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Represents an element name convention. - - - - - Gets the element name for a member. - - The member. - The element name. - - - - Represents an element name convention where the element name is the same as the member name. - - - - - Gets the element name for a member. - - The member. - The element name. - - - - Represents an element name convention where the element name is the member name with the first character lower cased. - - - - - Gets the element name for a member. - - The member. - The element name. - - - - Represents a default value convention. - - - - - Gets the default value for a member. - - The member. - The default value. - - - - Represents a default value convention of null. - - - - - Gets the default value for a member. - - The member. - null. - - - - Specifies the external representation and related options for this field or property. - - - - - Initializes a new instance of the BsonRepresentationAttribute class. - - The external representation. - - - - Gets the serialization options specified by this attribute. - - The serialization options. - - - - Gets the external representation. - - - - - Gets or sets whether to allow overflow. - - - - - Gets or sets whether to allow truncation. - - - - - Represents a BSON int value. - - - - - Creates a new instance of the BsonInt32 class. - - The value. - - - - Converts an int to a BsonInt32. - - An int. - A BsonInt32. - - - - Creates a new instance of the BsonInt32 class. - - An int. - A BsonInt32. - - - - Creates a new BsonInt32. - - An object to be mapped to a BsonInt32. - A BsonInt32 or null. - - - - Compares this BsonInt32 to another BsonInt32. - - The other BsonInt32. - A 32-bit signed integer that indicates whether this BsonInt32 is less than, equal to, or greather than the other. - - - - Compares the BsonInt32 to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonInt32 is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonInt32 to another BsonInt32. - - The other BsonInt32. - True if the two BsonInt32 values are equal. - - - - Compares this BsonInt32 to another object. - - The other object. - True if the other object is a BsonInt32 and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets an instance of BsonInt32 that represents -1. - - - - - Gets an instance of BsonInt32 that represents -0. - - - - - Gets an instance of BsonInt32 that represents 1. - - - - - Gets an instance of BsonInt32 that represents 2. - - - - - Gets an instance of BsonInt32 that represents 3. - - - - - Gets the BsonInt32 as an int. - - - - - Gets the value of this BsonInt32. - - - - - Represents the BSON Null value. - - - - - Compares this BsonNull to another BsonNull. - - The other BsonNull. - A 32-bit signed integer that indicates whether this BsonNull is less than, equal to, or greather than the other. - - - - Compares the BsonNull to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonNull is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonNull to another BsonNull. - - The other BsonNull. - True if the two BsonNull values are equal. - - - - Compares this BsonNull to another object. - - The other object. - True if the other object is a BsonNull and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the singleton instance of BsonNull. - - - - - Represents a BSON DateTime value. - - - - - Initializes a new instance of the BsonDateTime class. - - A DateTime. - - - - Initializes a new instance of the BsonDateTime class. - - Milliseconds since Unix Epoch. - - - - Converts a DateTime to a BsonDateTime. - - A DateTime. - A BsonDateTime. - - - - Creates a new BsonDateTime. - - A DateTime. - A BsonDateTime. - - - - Creates a new BsonDateTime. - - A DateTime. - Milliseconds since Unix Epoch. - - - - Creates a new BsonDateTime. - - An object to be mapped to a BsonDateTime. - A BsonDateTime or null. - - - - Compares this BsonDateTime to another BsonDateTime. - - The other BsonDateTime. - A 32-bit signed integer that indicates whether this BsonDateTime is less than, equal to, or greather than the other. - - - - Compares the BsonDateTime to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonDateTime is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonDateTime to another BsonDateTime. - - The other BsonDateTime. - True if the two BsonDateTime values are equal. - - - - Compares this BsonDateTime to another object. - - The other object. - True if the other object is a BsonDateTime and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets whether this BsonDateTime is a valid .NET DateTime. - - - - - Gets the number of milliseconds since the Unix Epoch. - - - - - Gets the number of milliseconds since the Unix Epoch. - - - - - Gets the DateTime value. - - - - - Represents settings for a BsonBinaryReader. - - - - - Initializes a new instance of the BsonBinaryReaderSettings class. - - - - - Initializes a new instance of the BsonBinaryReaderSettings class. - - Whether to close the input stream when the reader is closed. - Whether to fix occurrences of the old binary subtype on input. - Whether to fix occurrences of the old representation of DateTime.MaxValue on input. - The representation for Guids. - The max document size. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Gets or sets the default settings for a BsonBinaryReader. - - - - - Gets or sets whether to close the input stream when the reader is closed. - - - - - Gets or sets whether to fix occurrences of the old binary subtype on input. - - - - - Gets or sets whether to fix occurrences of the old representation of DateTime.MaxValue on input. - - - - - Gets or sets the max document size. - - - - - Represents an ignore extra elements convention. - - - - - Determines whether to ignore extra elements for a class. - - The class. - Whether to ignore extra elements. - - - - Represents an ignore extra elements convention where extra elements are never ignored. - - - - - Determines whether to ignore extra elements for a class. - - The class. - Whether to ignore extra elements. - - - - Represents an ignore extra elements convention where extra elements are always ignored. - - - - - Determines whether to ignore extra elements for a class. - - The class. - Whether to ignore extra elements. - - - - Represents a serialize default value convention. - - - - - Determines whether to serialize the default value for a member. - - The member. - Whether to serialize the default value. - - - - Represents a serialize default value convention where default values are never serialized. - - - - - Determines whether to serialize the default value for a member. - - The member. - Whether to serialize the default value. - - - - Represents a serialize default value convention where default values are always serialized. - - - - - Determines whether to serialize the default value for a member. - - The member. - Whether to serialize the default value. - - - - Represents a bookmark that can be used to return a reader to the current position and state. - - - - - Represents a BSON symbol value. - - - - - Converts a string to a BsonSymbol. - - A string. - A BsonSymbol. - - - - Creates a new BsonSymbol. - - An object to be mapped to a BsonSymbol. - A BsonSymbol or null. - - - - Creates a new instance of the BsonSymbol class. - - A string. - A BsonSymbol. - - - - Compares this BsonSymbol to another BsonSymbol. - - The other BsonSymbol. - A 32-bit signed integer that indicates whether this BsonSymbol is less than, equal to, or greather than the other. - - - - Compares the BsonSymbol to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonSymbol is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonSymbol to another BsonSymbol. - - The other BsonSymbol. - True if the two BsonSymbol values are equal. - - - - Compares this BsonSymbol to another object. - - The other object. - True if the other object is a BsonSymbol and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the name of the symbol. - - - - - Represents settings for a BsonBinaryWriter. - - - - - Initializes a new instance of the BsonBinaryWriterSettings class. - - - - - Initializes a new instance of the BsonBinaryWriterSettings class. - - Whether to close the output stream when the writer is closed. - Whether to fix old binary data subtype on output. - The representation for Guids. - The max document size. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Gets or sets the default BsonBinaryWriter settings. - - - - - Gets or sets whether to close the output when the writer is closed. - - - - - Gets or sets whether to fix the old binary data subtype on output. - - - - - Gets or sets the max document size. - - - - - Represents a BSON long value. - - - - - Initializes a new instance of the BsonInt64 class. - - The value. - - - - Converts a long to a BsonInt64. - - A long. - A BsonInt64. - - - - Creates a new instance of the BsonInt64 class. - - A long. - A BsonInt64. - - - - Creates a new BsonInt64. - - An object to be mapped to a BsonInt64. - A BsonInt64 or null. - - - - Compares this BsonInt64 to another BsonInt64. - - The other BsonInt64. - A 32-bit signed integer that indicates whether this BsonInt64 is less than, equal to, or greather than the other. - - - - Compares the BsonInt64 to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonInt64 is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonInt64 to another BsonInt64. - - The other BsonInt64. - True if the two BsonInt64 values are equal. - - - - Compares this BsonInt64 to another object. - - The other object. - True if the other object is a BsonInt64 and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the BsonInt64 as a long. - - - - - Gets the value of this BsonInt64. - - - - - Represents a serializer for enumerable values. - - - - - Initializes a new instance of the EnumerableSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the EnumerableSerializer class. - - - - - Represents a serializer for Queues. - - - - - Initializes a new instance of the QueueSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the QueueSerializer class. - - - - - Represents a serializer for Stacks. - - - - - Initializes a new instance of the StackSerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the StackSerializer class. - - - - - A static class containing methods to convert to and from Guids and byte arrays in various byte orders. - - - - - Converts a byte array to a Guid. - - The byte array. - The representation of the Guid in the byte array. - A Guid. - - - - Converts a Guid to a byte array. - - The Guid. - The representation of the Guid in the byte array. - A byte array. - - - - Represents the symbol table of BsonSymbols. - - - - - Looks up a symbol (and creates a new one if necessary). - - The name of the symbol. - The symbol. - - - - Represents a BSON double value. - - - - - Initializes a new instance of the BsonDouble class. - - The value. - - - - Converts a double to a BsonDouble. - - A double. - A BsonDouble. - - - - Creates a new instance of the BsonDouble class. - - A double. - A BsonDouble. - - - - Creates a new instance of the BsonDouble class. - - An object to be mapped to a BsonDouble. - A BsonDouble. - - - - Compares this BsonDouble to another BsonDouble. - - The other BsonDouble. - A 32-bit signed integer that indicates whether this BsonDouble is less than, equal to, or greather than the other. - - - - Compares the BsonDouble to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonDouble is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonDouble to another BsonDouble. - - The other BsonDouble. - True if the two BsonDouble values are equal. - - - - Compares this BsonDouble to another object. - - The other object. - True if the other object is a BsonDouble and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the BsonDouble as a double. - - - - - Gets the value of this BsonDouble. - - - - - Represents a BSON writer to a BsonDocument. - - - - - Initializes a new instance of the BsonDocumentWriter class. - - The document to write to (normally starts out as an empty document). - The settings. - - - - Closes the writer. - - - - - Flushes any pending data to the output destination. - - - - - Writes BSON binary data to the writer. - - The binary data. - The binary data subtype. - The representation for Guids. - - - - Writes a BSON Boolean to the writer. - - The Boolean value. - - - - Writes a BSON DateTime to the writer. - - The number of milliseconds since the Unix epoch. - - - - Writes a BSON Double to the writer. - - The Double value. - - - - Writes the end of a BSON array to the writer. - - - - - Writes the end of a BSON document to the writer. - - - - - Writes a BSON Int32 to the writer. - - The Int32 value. - - - - Writes a BSON Int64 to the writer. - - The Int64 value. - - - - Writes a BSON JavaScript to the writer. - - The JavaScript code. - - - - Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope). - - The JavaScript code. - - - - Writes a BSON MaxKey to the writer. - - - - - Writes a BSON MinKey to the writer. - - - - - Writes the name of an element to the writer. - - The name of the element. - - - - Writes a BSON null to the writer. - - - - - Writes a BSON ObjectId to the writer. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Writes a BSON regular expression to the writer. - - A regular expression pattern. - A regular expression options. - - - - Writes the start of a BSON array to the writer. - - - - - Writes the start of a BSON document to the writer. - - - - - Writes a BSON String to the writer. - - The String value. - - - - Writes a BSON Symbol to the writer. - - The symbol. - - - - Writes a BSON timestamp to the writer. - - The combined timestamp/increment value. - - - - Writes a BSON undefined to the writer. - - - - - Disposes of any resources used by the writer. - - True if called from Dispose. - - - - Gets the top level BsonDocument. - - - - - Represents a BSON reader for a BsonDocument. - - - - - Initializes a new instance of the BsonDocumentReader class. - - A BsonDocument. - The reader settings. - - - - Closes the reader. - - - - - Gets a bookmark to the reader's current position and state. - - A bookmark. - - - - Reads BSON binary data from the reader. - - The binary data. - The binary data subtype. - The representation for Guids. - - - - Reads a BSON boolean from the reader. - - A Boolean. - - - - Reads a BsonType from the reader. - - A BsonType. - - - - Reads a BSON DateTime from the reader. - - The number of milliseconds since the Unix epoch. - - - - Reads a BSON Double from the reader. - - A Double. - - - - Reads the end of a BSON array from the reader. - - - - - Reads the end of a BSON document from the reader. - - - - - Reads a BSON Int32 from the reader. - - An Int32. - - - - Reads a BSON Int64 from the reader. - - An Int64. - - - - Reads a BSON JavaScript from the reader. - - A string. - - - - Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope). - - A string. - - - - Reads a BSON MaxKey from the reader. - - - - - Reads a BSON MinKey from the reader. - - - - - Reads a BSON null from the reader. - - - - - Reads a BSON ObjectId from the reader. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Reads a BSON regular expression from the reader. - - A regular expression pattern. - A regular expression options. - - - - Reads the start of a BSON array. - - - - - Reads the start of a BSON document. - - - - - Reads a BSON string from the reader. - - A String. - - - - Reads a BSON symbol from the reader. - - A string. - - - - Reads a BSON timestamp from the reader. - - The combined timestamp/increment. - - - - Reads a BSON undefined from the reader. - - - - - Returns the reader to previously bookmarked position and state. - - The bookmark. - - - - Skips the name (reader must be positioned on a name). - - - - - Skips the value (reader must be positioned on a value). - - - - - Disposes of any resources used by the reader. - - True if called from Dispose. - - - - Represents serialization options for a document. - - - - - Initializes a new instance of the DocumentSerializationOptions class. - - Whether to serialize the Id as the first element. - - - - Gets or sets the default document serialization options. - - - - - Gets an instance of DocumentSerializationOptions that specifies to serialize the Id as the first element. - - - - - Gets whether to serialize the Id as the first element. - - - - - Represents settings for a JsonWriter. - - - - - Initializes a new instance of the JsonWriterSettings class. - - - - - Initializes a new instance of the JsonWriterSettings class. - - Whether to close the output when the writer is closed. - The output Encoding. - The representation for Guids. - Whether to indent the output. - The indentation characters. - The new line characters. - The output mode. - The version of the shell to target. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Gets or sets the default JsonWriterSettings. - - - - - Gets or sets whether to close the output when the writer is closed. - - - - - Gets or sets the output Encoding. - - - - - Gets or sets whether to indent the output. - - - - - Gets or sets the indent characters. - - - - - Gets or sets the new line characters. - - - - - Gets or sets the output mode. - - - - - Gets or sets the shell version (used with OutputMode Shell). - - - - - Represents a serializer for dictionaries. - - - - - Initializes a new instance of the DictionarySerializer class. - - - - - Deserializes an object from a BsonReader. - - The BsonReader. - The nominal type of the object. - The actual type of the object. - The serialization options. - An object. - - - - Serializes an object to a BsonWriter. - - The BsonWriter. - The nominal type. - The object. - The serialization options. - - - - Gets an instance of the DictionarySerializer class. - - - - - Specifies serialization options for a DateTime field or property. - - - - - Initializes a new instance of the BsonDateTimeOptionsAttribute class. - - - - - Gets the serialization options specified by this attribute. - - The serialization options. - - - - Gets or sets whether the DateTime consists of a Date only. - - - - - Gets or sets the DateTimeKind (Local, Unspecified or Utc). - - - - - Gets or sets the external representation. - - - - - Represents settings for a JsonReader. - - - - - Initializes a new instance of the JsonReaderSettings class. - - - - - Initializes a new instance of the JsonReaderSettings class. - - Whether to close the input stream when the reader is closed. - The representation for Guids. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Gets or sets the default settings for a JsonReader. - - - - - Gets or sets whether to close the input stream when the reader is closed. - - - - - Represents the default serialization provider. - - - - - Initializes a new instance of the BsonDefaultSerializer class. - - - - - Returns whether the given type has any discriminators registered for any of its subclasses. - - A Type. - True if the type is discriminated. - - - - Looks up the actual type of an object to be deserialized. - - The nominal type of the object. - The discriminator. - The actual type of the object. - - - - Looks up the discriminator convention for a type. - - The type. - A discriminator convention. - - - - Registers the discriminator for a type. - - The type. - The discriminator. - - - - Registers the discriminator convention for a type. - - Type type. - The discriminator convention. - - - - Gets the serializer for a type. - - The type. - The serializer. - - - - Gets an instance of the BsonDefaultSerializer class. - - - - - Represents a BSON regular expression value. - - - - - Initializes a new instance of the BsonRegularExpression class. - - A regular expression pattern. - - - - Initializes a new instance of the BsonRegularExpression class. - - A regular expression pattern. - Regular expression options. - - - - Initializes a new instance of the BsonRegularExpression class. - - A Regex. - - - - Converts a Regex to a BsonRegularExpression. - - A Regex. - A BsonRegularExpression. - - - - Converts a string to a BsonRegularExpression. - - A string. - A BsonRegularExpression. - - - - Creates a new BsonRegularExpression. - - An object to be mapped to a BsonRegularExpression. - A BsonRegularExpression or null. - - - - Creates a new instance of the BsonRegularExpression class. - - A Regex. - A BsonRegularExpression. - - - - Creates a new instance of the BsonRegularExpression class. - - A regular expression pattern. - A BsonRegularExpression. - - - - Creates a new instance of the BsonRegularExpression class. - - A regular expression pattern. - Regular expression options. - A BsonRegularExpression. - - - - Compares this BsonRegularExpression to another BsonRegularExpression. - - The other BsonRegularExpression. - A 32-bit signed integer that indicates whether this BsonRegularExpression is less than, equal to, or greather than the other. - - - - Compares the BsonRegularExpression to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonRegularExpression is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonRegularExpression to another BsonRegularExpression. - - The other BsonRegularExpression. - True if the two BsonRegularExpression values are equal. - - - - Compares this BsonRegularExpression to another object. - - The other object. - True if the other object is a BsonRegularExpression and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Converts the BsonRegularExpression to a Regex. - - A Regex. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the regular expression pattern. - - - - - Gets the regular expression options. - - - - - Represents a BSON ObjectId value (see also ObjectId). - - - - - Initializes a new instance of the BsonObjectId class. - - The value. - - - - Initializes a new instance of the BsonObjectId class. - - The value. - - - - Initializes a new instance of the BsonObjectId class. - - The timestamp. - The machine hash. - The PID. - The increment. - - - - Initializes a new instance of the BsonObjectId class. - - The value. - - - - Converts an ObjectId to a BsonObjectId. - - An ObjectId. - A BsonObjectId. - - - - Creates a new instance of the BsonObjectId class. - - An ObjectId. - A BsonObjectId. - - - - Creates a new instance of the BsonObjectId class. - - A byte array. - A BsonObjectId. - - - - Creates a new instance of the BsonObjectId class. - - The timestamp. - The machine hash. - The pid. - The increment. - A BsonObjectId. - - - - Creates a new BsonObjectId. - - An object to be mapped to a BsonObjectId. - A BsonObjectId or null. - - - - Creates a new instance of the BsonObjectId class. - - A string. - A BsonObjectId. - - - - Generates a new BsonObjectId with a unique value. - - A BsonObjectId. - - - - Parses a string and creates a new BsonObjectId. - - The string value. - A BsonObjectId. - - - - Tries to parse a string and create a new BsonObjectId. - - The string value. - The new BsonObjectId. - True if the string was parsed successfully. - - - - Compares this BsonObjectId to another BsonObjectId. - - The other BsonObjectId. - A 32-bit signed integer that indicates whether this BsonObjectId is less than, equal to, or greather than the other. - - - - Compares the BsonObjectId to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonObjectId is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonObjectId to another BsonObjectId. - - The other BsonObjectId. - True if the two BsonObjectId values are equal. - - - - Compares this BsonObjectId to another object. - - The other object. - True if the other object is a BsonObjectId and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Converts the BsonObjectId to a byte array. - - A byte array. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets an instance of BsonObjectId where the value is empty. - - - - - Gets the timestamp. - - - - - Gets the machine. - - - - - Gets the PID. - - - - - Gets the increment. - - - - - Gets the creation time (derived from the timestamp). - - - - - Gets the BsonObjectId as an ObjectId. - - - - - Gets the value of this BsonObjectId. - - - - - Represents a BSON timestamp value. - - - - - Initializes a new instance of the BsonTimestamp class. - - The combined timestamp/increment value. - - - - Initializes a new instance of the BsonTimestamp class. - - The timestamp. - The increment. - - - - Creates a new instance of the BsonTimestamp class. - - The combined timestamp/increment value. - A BsonTimestamp. - - - - Creates a new instance of the BsonTimestamp class. - - The timestamp. - The increment. - A BsonTimestamp. - - - - Creates a new BsonTimestamp. - - An object to be mapped to a BsonTimestamp. - A BsonTimestamp or null. - - - - Compares this BsonTimestamp to another BsonTimestamp. - - The other BsonTimestamp. - A 32-bit signed integer that indicates whether this BsonTimestamp is less than, equal to, or greather than the other. - - - - Compares the BsonTimestamp to another BsonValue. - - The other BsonValue. - A 32-bit signed integer that indicates whether this BsonTimestamp is less than, equal to, or greather than the other BsonValue. - - - - Compares this BsonTimestamp to another BsonTimestamp. - - The other BsonTimestamp. - True if the two BsonTimestamp values are equal. - - - - Compares this BsonTimestamp to another object. - - The other object. - True if the other object is a BsonTimestamp and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the value. - - A string representation of the value. - - - - Gets the value of this BsonTimestamp. - - - - - Gets the increment. - - - - - Gets the timestamp. - - - - - Specifies whether extra elements should be ignored when this class is deserialized. - - - - - Initializes a new instance of the BsonIgnoreExtraElementsAttribute class. - - - - - Initializes a new instance of the BsonIgnoreExtraElementsAttribute class. - - Whether extra elements should be ignored when this class is deserialized. - - - - Gets whether extra elements should be ignored when this class is deserialized. - - - - - Represents an Id member convention. - - - - - Finds the Id member of a class. - - The class. - The name of the Id member. - - - - Represents an Id member convention where the Id member name is one of a set of possible Id member names. - - - - - Initializes a new instance of the NamedIdMemberConvention class. - - A set of possible Id member names. - - - - Finds the Id member of a class. - - The class. - The name of the Id member. - - - - Gets the set of possible Id member names. - - - - - Represents an Id generator convention. - - - - - Gets the Id generator for an Id member. - - The member. - An Id generator. - - - - Represents an Id generator convention where the Id generator is looked up based on the member type. - - - - - Gets the Id generator for an Id member. - - The member. - An Id generator. - - - - Represents serialization options for a DateTime value. - - - - - Initializes a new instance of the DateTimeSerializationOptions class. - - - - - Initializes a new instance of the DateTimeSerializationOptions class. - - Whether this DateTime consists of a Date only. - - - - Initializes a new instance of the DateTimeSerializationOptions class. - - Whether this DateTime consists of a Date only. - The external representation. - - - - Initializes a new instance of theDateTimeSerializationOptions class. - - The DateTimeKind (Local, Unspecified or Utc). - - - - Initializes a new instance of the DateTimeSerializationOptions class. - - The DateTimeKind (Local, Unspecified or Utc). - The external representation. - - - - Gets an instance of DateTimeSerializationOptions with DateOnly=true. - - - - - Gets or sets the default DateTime serialization options. - - - - - Gets an instance of DateTimeSerializationOptions with Kind=Local. - - - - - Gets an instance of DateTimeSerializationOptions with Kind=Utc. - - - - - Gets whether this DateTime consists of a Date only. - - - - - Gets the DateTimeKind (Local, Unspecified or Utc). - - - - - Gets the external representation. - - - - - An interface for custom mappers that map an object to a BsonValue. - - - - - Tries to map an object to a BsonValue. - - An object. - The BsonValue. - True if the mapping was successfull. - - - + + + + MongoDB.Bson + + + + + Represents the BSON MaxKey value. + + + + + Represents a BSON value (this is an abstract class, see the various subclasses). + + + + + The BsonType of this BsonValue. + + + + + Initializes a new instance of the BsonValue class. + + The BsonType of this BsonValue. + + + + Casts a BsonValue to a bool. + + The BsonValue. + A bool. + + + + Casts a BsonValue to a bool?. + + The BsonValue. + A bool?. + + + + Converts a bool to a BsonValue. + + A bool. + A BsonValue. + + + + Converts a bool? to a BsonValue. + + A bool?. + A BsonValue. + + + + Converts a byte[] to a BsonValue. + + A byte[]. + A BsonValue. + + + + Converts a DateTime to a BsonValue. + + A DateTime. + A BsonValue. + + + + Converts a DateTime? to a BsonValue. + + A DateTime?. + A BsonValue. + + + + Converts a double to a BsonValue. + + A double. + A BsonValue. + + + + Converts a double? to a BsonValue. + + A double?. + A BsonValue. + + + + Converts an Enum to a BsonValue. + + An Enum. + A BsonValue. + + + + Converts a Guid to a BsonValue. + + A Guid. + A BsonValue. + + + + Converts a Guid? to a BsonValue. + + A Guid?. + A BsonValue. + + + + Converts an int to a BsonValue. + + An int. + A BsonValue. + + + + Converts an int? to a BsonValue. + + An int?. + A BsonValue. + + + + Converts a long to a BsonValue. + + A long. + A BsonValue. + + + + Converts a long? to a BsonValue. + + A long?. + A BsonValue. + + + + Converts an ObjectId to a BsonValue. + + An ObjectId. + A BsonValue. + + + + Converts an ObjectId? to a BsonValue. + + An ObjectId?. + A BsonValue. + + + + Converts a Regex to a BsonValue. + + A Regex. + A BsonValue. + + + + Converts a string to a BsonValue. + + A string. + A BsonValue. + + + + Casts a BsonValue to a byte[]. + + The BsonValue. + A byte[]. + + + + Casts a BsonValue to a DateTime. + + The BsonValue. + A DateTime. + + + + Casts a BsonValue to a DateTime?. + + The BsonValue. + A DateTime?. + + + + Casts a BsonValue to a double. + + The BsonValue. + A double. + + + + Casts a BsonValue to a double?. + + The BsonValue. + A double?. + + + + Casts a BsonValue to a Guid. + + The BsonValue. + A Guid. + + + + Casts a BsonValue to a Guid?. + + The BsonValue. + A Guid?. + + + + Casts a BsonValue to an int. + + The BsonValue. + An int. + + + + Casts a BsonValue to an int?. + + The BsonValue. + An int?. + + + + Casts a BsonValue to a long. + + The BsonValue. + A long. + + + + Casts a BsonValue to a long?. + + The BsonValue. + A long?. + + + + Casts a BsonValue to an ObjectId. + + The BsonValue. + An ObjectId. + + + + Casts a BsonValue to an ObjectId?. + + The BsonValue. + An ObjectId?. + + + + Casts a BsonValue to a Regex. + + The BsonValue. + A Regex. + + + + Casts a BsonValue to a string. + + The BsonValue. + A string. + + + + Compares two BsonValues. + + The first BsonValue. + The other BsonValue. + True if the first BsonValue is less than the other one. + + + + Compares two BsonValues. + + The first BsonValue. + The other BsonValue. + True if the first BsonValue is less than or equal to the other one. + + + + Compares two BsonValues. + + The first BsonValue. + The other BsonValue. + True if the two BsonValues are not equal (or one is null and the other is not). + + + + Compares two BsonValues. + + The first BsonValue. + The other BsonValue. + True if the two BsonValues are equal (or both null). + + + + Compares two BsonValues. + + The first BsonValue. + The other BsonValue. + True if the first BsonValue is greater than the other one. + + + + Compares two BsonValues. + + The first BsonValue. + The other BsonValue. + True if the first BsonValue is greater than or equal to the other one. + + + + Creates a new instance of the BsonValue class. + + A value to be mapped to a BsonValue. + A BsonValue. + + + + Reads one BsonValue from a BsonReader. + + The reader. + A BsonValue. + + + + Creates a shallow clone of the BsonValue (see also DeepClone). + + A shallow clone of the BsonValue. + + + + Compares this BsonValue to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonValue is less than, equal to, or greather than the other BsonValue. + + + + Compares the type of this BsonValue to the type of another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether the type of this BsonValue is less than, equal to, or greather than the type of the other BsonValue. + + + + Creates a deep clone of the BsonValue (see also Clone). + + A deep clone of the BsonValue. + + + + Compares this BsonValue to another BsonValue. + + The other BsonValue. + True if the two BsonValue values are equal. + + + + Compares this BsonValue to another object. + + The other object. + True if the other object is a BsonValue and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Converts this BsonValue to a Boolean (using the JavaScript definition of truthiness). + + A Boolean. + + + + Converts this BsonValue to a Double. + + A Double. + + + + Converts this BsonValue to an Int32. + + An Int32. + + + + Converts this BsonValue to an Int64. + + An Int64. + + + + Writes the BsonValue to a BsonWriter. + + The writer. + + + + Casts the BsonValue to a Boolean (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonArray (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonBinaryData (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonDateTime (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonDocument (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonJavaScript (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonJavaScriptWithScope (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonMaxKey (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonMinKey (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonNull (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonRegularExpression (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonSymbol (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonTimestamp (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonUndefined (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a BsonValue (a way of upcasting subclasses of BsonValue to BsonValue at compile time). + + + + + Casts the BsonValue to a Byte[] (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a DateTime (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Double (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Guid (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to an Int32 (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Int64 (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Nullable{Boolean} (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Nullable{DateTime} (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Nullable{Double} (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Nullable{Guid} (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Nullable{Int32} (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Nullable{Int64} (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Nullable{ObjectId} (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to an ObjectId (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a Regex (throws an InvalidCastException if the cast is not valid). + + + + + Casts the BsonValue to a String (throws an InvalidCastException if the cast is not valid). + + + + + Gets the BsonType of this BsonValue. + + + + + Tests whether this BsonValue is a Boolean. + + + + + Tests whether this BsonValue is a BsonArray. + + + + + Tests whether this BsonValue is a BsonBinaryData. + + + + + Tests whether this BsonValue is a BsonDateTime. + + + + + Tests whether this BsonValue is a BsonDocument. + + + + + Tests whether this BsonValue is a BsonJavaScript. + + + + + Tests whether this BsonValue is a BsonJavaScriptWithScope. + + + + + Tests whether this BsonValue is a BsonMaxKey. + + + + + Tests whether this BsonValue is a BsonMinKey. + + + + + Tests whether this BsonValue is a BsonNull. + + + + + Tests whether this BsonValue is a BsonRegularExpression. + + + + + Tests whether this BsonValue is a BsonSymbol . + + + + + Tests whether this BsonValue is a BsonTimestamp. + + + + + Tests whether this BsonValue is a BsonUndefined. + + + + + Tests whether this BsonValue is a DateTime. + + + + + Tests whether this BsonValue is a Double. + + + + + Tests whether this BsonValue is a Guid. + + + + + Tests whether this BsonValue is an Int32. + + + + + Tests whether this BsonValue is an Int64. + + + + + Tests whether this BsonValue is a numeric value. + + + + + Tests whether this BsonValue is an ObjectId . + + + + + Tests whether this BsonValue is a String. + + + + + Gets the raw value of this BsonValue (or null if this BsonValue doesn't have a single scalar value). + + + + + Compares this BsonMaxKey to another BsonMaxKey. + + The other BsonMaxKey. + A 32-bit signed integer that indicates whether this BsonMaxKey is less than, equal to, or greather than the other. + + + + Compares the BsonMaxKey to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonMaxKey is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonMaxKey to another BsonMaxKey. + + The other BsonMaxKey. + True if the two BsonMaxKey values are equal. + + + + Compares this BsonMaxKey to another object. + + The other object. + True if the other object is a BsonMaxKey and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the singleton instance of BsonMaxKey. + + + + + Represents a BSON element. + + + + + Initializes a new instance of the BsonElement class. + + The name of the element. + The value of the element. + + + + Compares two BsonElements. + + The first BsonElement. + The other BsonElement. + True if the two BsonElements are equal (or both null). + + + + Compares two BsonElements. + + The first BsonElement. + The other BsonElement. + True if the two BsonElements are not equal (or one is null and the other is not). + + + + Creates a new instance of the BsonElement class. + + Whether to create the BsonElement or return null. + The name of the element. + The value of the element. + A BsonElement or null. + + + + Creates a new instance of the BsonElement class. + + The name of the element. + The value of the element. + A BsonElement or null. + + + + Creates a shallow clone of the element (see also DeepClone). + + A shallow clone of the element. + + + + Creates a deep clone of the element (see also Clone). + + A deep clone of the element. + + + + Compares this BsonElement to another BsonElement. + + The other BsonElement. + A 32-bit signed integer that indicates whether this BsonElement is less than, equal to, or greather than the other. + + + + Compares this BsonElement to another BsonElement. + + The other BsonElement. + True if the two BsonElement values are equal. + + + + Compares this BsonElement to another object. + + The other object. + True if the other object is a BsonElement and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the name of the element. + + + + + Gets or sets the value of the element. + + + + + Represents a BSON string value. + + + + + Initializes a new instance of the BsonString class. + + The value. + + + + Converts a string to a BsonString. + + A string. + A BsonString. + + + + Creates a new BsonString. + + An object to be mapped to a BsonString. + A BsonString or null. + + + + Creates a new instance of the BsonString class. + + A string. + A BsonString. + + + + Compares this BsonString to another BsonString. + + The other BsonString. + A 32-bit signed integer that indicates whether this BsonString is less than, equal to, or greather than the other. + + + + Compares the BsonString to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonString is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonString to another BsonString. + + The other BsonString. + True if the two BsonString values are equal. + + + + Compares this BsonString to another object. + + The other object. + True if the other object is a BsonString and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets an instance of BsonString that represents an empty string. + + + + + Gets the BsonString as a string. + + + + + Gets the value of this BsonString. + + + + + Represents a BSON writer to a TextWriter (in JSON format). + + + + + Represents a BSON writer for some external format (see subclasses). + + + + + Whether the object has been disposed. + + + + + The settings of the writer. + + + + + The current state of the writer. + + + + + The name of the current element. + + + + + Whether to check element names (no periods or leading $). + + + + + Whether to check an update document (turns CheckElementNames on if first element name does *not* start with $). + + + + + Initializes a new instance of the BsonWriter class. + + + + + Creates a BsonWriter to a BsonBuffer. + + Optional BsonBinaryWriterSettings. + A BsonWriter. + + + + Creates a BsonWriter to a BsonBuffer. + + A BsonBuffer. + A BsonWriter. + + + + Creates a BsonWriter to a BsonBuffer. + + A BsonBuffer. + Optional BsonBinaryWriterSettings. + A BsonWriter. + + + + Creates a BsonWriter to a BsonDocument. + + A BsonDocument. + A BsonWriter. + + + + Creates a BsonWriter to a BsonDocument. + + A BsonDocument. + The settings. + A BsonWriter. + + + + Creates a BsonWriter to a BSON Stream. + + A Stream. + A BsonWriter. + + + + Creates a BsonWriter to a BSON Stream. + + A Stream. + Optional BsonBinaryWriterSettings. + A BsonWriter. + + + + Creates a BsonWriter to a JSON TextWriter. + + A TextWriter. + A BsonWriter. + + + + Creates a BsonWriter to a JSON TextWriter. + + A TextWriter. + Optional JsonWriterSettings. + A BsonWriter. + + + + Closes the writer. + + + + + Disposes of any resources used by the writer. + + + + + Flushes any pending data to the output destination. + + + + + Writes a BSON binary data element to the writer. + + The binary data. + The binary data subtype. + + + + Writes BSON binary data to the writer. + + The binary data. + The binary data subtype. + The respresentation for Guids. + + + + Writes a BSON binary data element to the writer. + + The name of the element. + The binary data. + The binary data subtype. + + + + Writes a BSON binary data element to the writer. + + The name of the element. + The binary data. + The binary data subtype. + The representation for Guids. + + + + Writes a BSON Boolean to the writer. + + The Boolean value. + + + + Writes a BSON Boolean element to the writer. + + The name of the element. + The Boolean value. + + + + Writes a BSON DateTime to the writer. + + The number of milliseconds since the Unix epoch. + + + + Writes a BSON DateTime element to the writer. + + The name of the element. + The number of milliseconds since the Unix epoch. + + + + Writes a BSON Double to the writer. + + The Double value. + + + + Writes a BSON Double element to the writer. + + The name of the element. + The Double value. + + + + Writes the end of a BSON array to the writer. + + + + + Writes the end of a BSON document to the writer. + + + + + Writes a BSON Int32 to the writer. + + The Int32 value. + + + + Writes a BSON Int32 element to the writer. + + The name of the element. + The Int32 value. + + + + Writes a BSON Int64 to the writer. + + The Int64 value. + + + + Writes a BSON Int64 element to the writer. + + The name of the element. + The Int64 value. + + + + Writes a BSON JavaScript to the writer. + + The JavaScript code. + + + + Writes a BSON JavaScript element to the writer. + + The name of the element. + The JavaScript code. + + + + Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope). + + The JavaScript code. + + + + Writes a BSON JavaScript element to the writer (call WriteStartDocument to start writing the scope). + + The name of the element. + The JavaScript code. + + + + Writes a BSON MaxKey to the writer. + + + + + Writes a BSON MaxKey element to the writer. + + The name of the element. + + + + Writes a BSON MinKey to the writer. + + + + + Writes a BSON MinKey element to the writer. + + The name of the element. + + + + Writes the name of an element to the writer. + + The name of the element. + + + + Writes a BSON null to the writer. + + + + + Writes a BSON null element to the writer. + + The name of the element. + + + + Writes a BSON ObjectId to the writer. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Writes a BSON ObjectId element to the writer. + + The name of the element. + The timestamp. + The machine hash. + The PID. + The increment. + + + + Writes a BSON regular expression to the writer. + + A regular expression pattern. + A regular expression options. + + + + Writes a BSON regular expression element to the writer. + + The name of the element. + A regular expression pattern. + A regular expression options. + + + + Writes the start of a BSON array to the writer. + + + + + Writes the start of a BSON array element to the writer. + + The name of the element. + + + + Writes the start of a BSON document to the writer. + + + + + Writes the start of a BSON document element to the writer. + + The name of the element. + + + + Writes a BSON String to the writer. + + The String value. + + + + Writes a BSON String element to the writer. + + The name of the element. + The String value. + + + + Writes a BSON Symbol to the writer. + + The symbol. + + + + Writes a BSON Symbol element to the writer. + + The name of the element. + The symbol. + + + + Writes a BSON timestamp to the writer. + + The combined timestamp/increment value. + + + + Writes a BSON timestamp element to the writer. + + The name of the element. + The combined timestamp/increment value. + + + + Writes a BSON undefined to the writer. + + + + + Writes a BSON undefined element to the writer. + + The name of the element. + + + + Checks that the name is valid. + + + + + + Disposes of any resources used by the writer. + + True if called from Dispose. + + + + Throws an InvalidOperationException when the method called is not valid for the current ContextType. + + The name of the method. + The actual ContextType. + The valid ContextTypes. + + + + Throws an InvalidOperationException when the method called is not valid for the current state. + + The name of the method. + The valid states. + + + + Gets or sets whether to check element names (no periods or leading $). + + + + + Gets or sets whether to check an update document (turns CheckElementNames on if first element name does *not* start with $). + + + + + Gets the settings of the writer. + + + + + Gets the current state of the writer. + + + + + Initializes a new instance of the JsonWriter class. + + A TextWriter. + Optional JsonWriter settings. + + + + Closes the writer. + + + + + Flushes any pending data to the output destination. + + + + + Writes BSON binary data to the writer. + + The binary data. + The binary data subtype. + The representation for Guids. + + + + Writes a BSON Boolean to the writer. + + The Boolean value. + + + + Writes a BSON DateTime to the writer. + + The number of milliseconds since the Unix epoch. + + + + Writes a BSON Double to the writer. + + The Double value. + + + + Writes the end of a BSON array to the writer. + + + + + Writes the end of a BSON document to the writer. + + + + + Writes a BSON Int32 to the writer. + + The Int32 value. + + + + Writes a BSON Int64 to the writer. + + The Int64 value. + + + + Writes a BSON JavaScript to the writer. + + The JavaScript code. + + + + Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope). + + The JavaScript code. + + + + Writes a BSON MaxKey to the writer. + + + + + Writes a BSON MinKey to the writer. + + + + + Writes a BSON null to the writer. + + + + + Writes a BSON ObjectId to the writer. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Writes a BSON regular expression to the writer. + + A regular expression pattern. + A regular expression options. + + + + Writes the start of a BSON array to the writer. + + + + + Writes the start of a BSON document to the writer. + + + + + Writes a BSON String to the writer. + + The String value. + + + + Writes a BSON Symbol to the writer. + + The symbol. + + + + Writes a BSON timestamp to the writer. + + The combined timestamp/increment value. + + + + Writes a BSON undefined to the writer. + + + + + Disposes of any resources used by the writer. + + True if called from Dispose. + + + + Specifies the discriminator and related options for a class. + + + + + Initializes a new instance of the BsonDiscriminatorAttribute class. + + + + + Initializes a new instance of the BsonDiscriminatorAttribute class. + + The discriminator. + + + + Gets the discriminator. + + + + + Gets or sets whether the discriminator is required. + + + + + Gets or sets whether this is a root class. + + + + + Represents a bookmark that can be used to return a reader to the current position and state. + + + + + Represents a bookmark that can be used to return a reader to the current position and state. + + + + + The state of the reader. + + + + + The current BSON type. + + + + + The name of the current element. + + + + + Initializes a new instance of the BsonReaderBookmark class. + + The state of the reader. + The current BSON type. + The name of the current element. + + + + Gets the current state of the reader. + + + + + Gets the current BsonType; + + + + + Gets the name of the current element. + + + + + Represents a BSON reader for a JSON string. + + + + + Represents a BSON reader for some external format (see subclasses). + + + + + Whether the reader has been disposed. + + + + + The settings of the reader. + + + + + The current state of the reader. + + + + + The current BSON type. + + + + + The name of the current element. + + + + + Initializes a new instance of the BsonReader class. + + + + + Creates a BsonReader for a BsonBuffer. + + The BsonBuffer. + A BsonReader. + + + + Creates a BsonReader for a BsonBuffer. + + The BsonBuffer. + Optional reader settings. + A BsonReader. + + + + Creates a BsonReader for a BsonDocument. + + The BsonDocument. + A BsonReader. + + + + Creates a BsonReader for a BsonDocument. + + The BsonDocument. + The settings. + A BsonReader. + + + + Creates a BsonReader for a JsonBuffer. + + The buffer. + A BsonReader. + + + + Creates a BsonReader for a JsonBuffer. + + The buffer. + The settings. + A BsonReader. + + + + Creates a BsonReader for a BSON Stream. + + The BSON Stream. + A BsonReader. + + + + Creates a BsonReader for a BSON Stream. + + The BSON Stream. + Optional reader settings. + A BsonReader. + + + + Creates a BsonReader for a JSON string. + + The JSON string. + A BsonReader. + + + + Creates a BsonReader for a JSON TextReader. + + The JSON TextReader. + A BsonReader. + + + + Closes the reader. + + + + + Disposes of any resources used by the reader. + + + + + Positions the reader to an element by name. + + The name of the element. + True if the element was found. + + + + Positions the reader to a string element by name. + + The name of the element. + True if the element was found. + + + + Gets a bookmark to the reader's current position and state. + + A bookmark. + + + + Reads BSON binary data from the reader. + + The binary data. + The binary data subtype. + + + + Reads BSON binary data from the reader. + + The binary data. + The binary data subtype. + The representation for Guids. + + + + Reads a BSON binary data element from the reader. + + The name of the element. + The binary data. + The binary data subtype. + + + + Reads a BSON binary data element from the reader. + + The name of the element. + The binary data. + The binary data subtype. + The representation for Guids. + + + + Reads a BSON boolean from the reader. + + A Boolean. + + + + Reads a BSON boolean element from the reader. + + The name of the element. + A Boolean. + + + + Reads a BsonType from the reader. + + A BsonType. + + + + Reads a BSON DateTime from the reader. + + The number of milliseconds since the Unix epoch. + + + + Reads a BSON DateTime element from the reader. + + The name of the element. + The number of milliseconds since the Unix epoch. + + + + Reads a BSON Double from the reader. + + A Double. + + + + Reads a BSON Double element from the reader. + + The name of the element. + A Double. + + + + Reads the end of a BSON array from the reader. + + + + + Reads the end of a BSON document from the reader. + + + + + Reads a BSON Int32 from the reader. + + An Int32. + + + + Reads a BSON Int32 element from the reader. + + The name of the element. + An Int32. + + + + Reads a BSON Int64 from the reader. + + An Int64. + + + + Reads a BSON Int64 element from the reader. + + The name of the element. + An Int64. + + + + Reads a BSON JavaScript from the reader. + + A string. + + + + Reads a BSON JavaScript element from the reader. + + The name of the element. + A string. + + + + Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope). + + A string. + + + + Reads a BSON JavaScript with scope element from the reader (call ReadStartDocument next to read the scope). + + The name of the element. + A string. + + + + Reads a BSON MaxKey from the reader. + + + + + Reads a BSON MaxKey element from the reader. + + The name of the element. + + + + Reads a BSON MinKey from the reader. + + + + + Reads a BSON MinKey element from the reader. + + The name of the element. + + + + Reads the name of an element from the reader. + + The name of the element. + + + + Reads the name of an element from the reader. + + The name of the element. + + + + Reads a BSON null from the reader. + + + + + Reads a BSON null element from the reader. + + The name of the element. + + + + Reads a BSON ObjectId from the reader. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Reads a BSON ObjectId element from the reader. + + The name of the element. + The timestamp. + The machine hash. + The PID. + The increment. + + + + Reads a BSON regular expression from the reader. + + A regular expression pattern. + A regular expression options. + + + + Reads a BSON regular expression element from the reader. + + The name of the element. + A regular expression pattern. + A regular expression options. + + + + Reads the start of a BSON array. + + + + + Reads the start of a BSON document. + + + + + Reads a BSON string from the reader. + + A String. + + + + Reads a BSON string element from the reader. + + A String. + The name of the element. + + + + Reads a BSON symbol from the reader. + + A string. + + + + Reads a BSON symbol element from the reader. + + The name of the element. + A string. + + + + Reads a BSON timestamp from the reader. + + The combined timestamp/increment. + + + + Reads a BSON timestamp element from the reader. + + The combined timestamp/increment. + The name of the element. + + + + Reads a BSON undefined from the reader. + + + + + Reads a BSON undefined element from the reader. + + The name of the element. + + + + Returns the reader to previously bookmarked position and state. + + The bookmark. + + + + Skips the name (reader must be positioned on a name). + + + + + Skips the value (reader must be positioned on a value). + + + + + Disposes of any resources used by the reader. + + True if called from Dispose. + + + + Throws an InvalidOperationException when the method called is not valid for the current ContextType. + + The name of the method. + The actual ContextType. + The valid ContextTypes. + + + + Throws an InvalidOperationException when the method called is not valid for the current state. + + The name of the method. + The valid states. + + + + Throws an ObjectDisposedException. + + + + + Verifies the current state and BsonType of the reader. + + The name of the method calling this one. + The required BSON type. + + + + Verifies the name of the current element. + + The expected name. + + + + Gets the current BsonType. + + + + + Gets the settings of the reader. + + + + + Gets the current state of the reader. + + + + + Initializes a new instance of the JsonReader class. + + The buffer. + The reader settings. + + + + Closes the reader. + + + + + Gets a bookmark to the reader's current position and state. + + A bookmark. + + + + Reads BSON binary data from the reader. + + The binary data. + The binary data subtype. + The representation for Guids. + + + + Reads a BSON boolean from the reader. + + A Boolean. + + + + Reads a BsonType from the reader. + + A BsonType. + + + + Reads a BSON DateTime from the reader. + + The number of milliseconds since the Unix epoch. + + + + Reads a BSON Double from the reader. + + A Double. + + + + Reads the end of a BSON array from the reader. + + + + + Reads the end of a BSON document from the reader. + + + + + Reads a BSON Int32 from the reader. + + An Int32. + + + + Reads a BSON Int64 from the reader. + + An Int64. + + + + Reads a BSON JavaScript from the reader. + + A string. + + + + Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope). + + A string. + + + + Reads a BSON MaxKey from the reader. + + + + + Reads a BSON MinKey from the reader. + + + + + Reads a BSON null from the reader. + + + + + Reads a BSON ObjectId from the reader. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Reads a BSON regular expression from the reader. + + A regular expression pattern. + A regular expression options. + + + + Reads the start of a BSON array. + + + + + Reads the start of a BSON document. + + + + + Reads a BSON string from the reader. + + A String. + + + + Reads a BSON symbol from the reader. + + A string. + + + + Reads a BSON timestamp from the reader. + + The combined timestamp/increment. + + + + Reads a BSON undefined from the reader. + + + + + Returns the reader to previously bookmarked position and state. + + The bookmark. + + + + Skips the name (reader must be positioned on a name). + + + + + Skips the value (reader must be positioned on a value). + + + + + Disposes of any resources used by the reader. + + True if called from Dispose. + + + + Represents a truncation exception. + + + + + Represents a BSON exception. + + + + + Initializes a new instance of the BsonException class. + + + + + Initializes a new instance of the BsonException class. + + The error message. + + + + Initializes a new instance of the BsonException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the BsonException class. + + The error message format string. + One or more args for the error message. + + + + Initializes a new instance of the BsonException class (this overload used by deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Initializes a new instance of the TruncationException class. + + + + + Initializes a new instance of the TruncationException class. + + The error message. + + + + Initializes a new instance of the TruncationException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the TruncationException class (this overload used by deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Represents the state of a BsonWriter. + + + + + The initial state. + + + + + The writer is positioned to write a name. + + + + + The writer is positioned to write a value. + + + + + The writer is positioned to write a scope document (call WriteStartDocument to start writing the scope document). + + + + + The writer is done. + + + + + The writer is closed. + + + + + Represents BSON binary data. + + + + + Initializes a new instance of the BsonBinaryData class. + + The binary data. + + + + Initializes a new instance of the BsonBinaryData class. + + The binary data. + The binary data subtype. + + + + Initializes a new instance of the BsonBinaryData class. + + The binary data. + The binary data subtype. + The representation for Guids. + + + + Initializes a new instance of the BsonBinaryData class. + + A Guid. + + + + Initializes a new instance of the BsonBinaryData class. + + A Guid. + The representation for Guids. + + + + Converts a byte array to a BsonBinaryData. + + A byte array. + A BsonBinaryData. + + + + Converts a Guid to a BsonBinaryData. + + A Guid. + A BsonBinaryData. + + + + Creates a new BsonBinaryData. + + The binary data. + A BsonBinaryData or null. + + + + Creates a new BsonBinaryData. + + The binary data. + The binary data subtype. + A BsonBinaryData or null. + + + + Creates a new BsonBinaryData. + + The binary data. + The binary data subtype. + The representation for Guids. + A BsonBinaryData or null. + + + + Creates a new BsonBinaryData. + + A Guid. + A BsonBinaryData. + + + + Creates a new BsonBinaryData. + + A Guid. + The representation for Guids. + A BsonBinaryData. + + + + Creates a new BsonBinaryData. + + An object to be mapped to a BsonBinaryData. + A BsonBinaryData or null. + + + + Compares this BsonBinaryData to another BsonBinaryData. + + The other BsonBinaryData. + A 32-bit signed integer that indicates whether this BsonBinaryData is less than, equal to, or greather than the other. + + + + Compares the BsonBinaryData to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonBinaryData is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonBinaryData to another BsonBinaryData. + + The other BsonBinaryData. + True if the two BsonBinaryData values are equal. + + + + Compares this BsonBinaryData to another object. + + The other object. + True if the other object is a BsonBinaryData and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Converts this BsonBinaryData to a Guid. + + A Guid. + + + + Converts this BsonBinaryData to a Guid. + + The representation for Guids. + A Guid. + + + + Returns a string representation of the binary data. + + A string representation of the binary data. + + + + Gets the binary data. + + + + + Gets the representation to use when representing the Guid as BSON binary data. + + + + + Gets the BsonBinaryData as a Guid if the subtype is UuidStandard or UuidLegacy, otherwise null. + + + + + Gets the binary data subtype. + + + + + Represents the output mode of a JsonWriter. + + + + + Output strict JSON. + + + + + Use JavaScript data types for some values. + + + + + Use JavaScript and 10gen data types for some values. + + + + + Use a format that can be pasted in to the MongoDB shell. + + + + + Indicates that this field or property should be ignored when this class is serialized. + + + + + Represents an ignore if null convention. + + + + + Determines whether to ignore nulls for a member. + + The member. + Whether to ignore nulls. + + + + Represents an ignore if null convention where nulls are never ignored. + + + + + Determines whether to ignore nulls for a member. + + The member. + Whether to ignore nulls. + + + + Represents an ignore if null convention where nulls are always ignored. + + + + + Determines whether to ignore nulls for a member. + + The member. + Whether to ignore nulls. + + + + A marker interface that represents serialization options. + + + + + This class represents a JSON string buffer. + + + + + Initializes a new instance of the JsonBuffer class. + + The string. + + + + Reads a character from the buffer. + + The next character (or -1 if at the end of the buffer). + + + + Reads a substring from the buffer. + + The zero based index of the start of the substring. + The substring. + + + + Reads a substring from the buffer. + + The zero based index of the start of the substring. + The number of characters in the substring. + The substring. + + + + Returns one character to the buffer (if the character matches the one at the current position the current position is moved back by one). + + The character to return. + + + + Gets the length of the JSON string. + + + + + Gets or sets the current position. + + + + + Used by BsonReaders and BsonWriters to represent the current context. + + + + + The top level of a BSON document. + + + + + A (possibly embedded) BSON document. + + + + + A BSON array. + + + + + A JavaScriptWithScope BSON value. + + + + + The scope document of a JavaScriptWithScope BSON value. + + + + + Creates a clone of the context. + + A clone of the context. + + + + Represents a BSON document. + + + + + An interface implemented by classes that handle their own BSON serialization. + + + + + Deserializes this object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The serialization options. + Normally itself, though sometimes an instance of a subclass or null. + + + + Gets the document Id. + + The Id. + The nominal type of the Id. + The IdGenerator for the Id type. + True if the document has an Id. + + + + Serializes this object to a BsonWriter. + + The BsonWriter. + The nominal type of this object. + The serialization options. + + + + Sets the document Id. + + The Id. + + + + An interface implemented by objects that convert themselves to a BsonDocument. + + + + + Converts this object to a BsonDocument. + + A BsonDocument. + + + + Initializes a new instance of the BsonDocument class. + + + + + Initializes a new instance of the BsonDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the BsonDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the BsonDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the BsonDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the BsonDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + Creates a new BsonDocument by mapping an object to a BsonDocument. + + The object to be mapped to a BsonDocument. + A BsonDocument. + + + + Parses a JSON string and returns a BsonDocument. + + The JSON string. + A BsonDocument. + + + + Reads a BsonDocument from a BsonBuffer. + + The BsonBuffer. + A BsonDocument. + + + + Reads a BsonDocument from a BsonReader. + + The BsonReader. + A BsonDocument. + + + + Reads a BsonDocument from a byte array. + + The byte array. + A BsonDocument. + + + + Reads a BsonDocument from a stream. + + The stream. + A BsonDocument. + + + + Reads a BsonDocument from a file. + + The name of the file. + A BsonDocument. + + + + Adds an element to the document. + + The element to add. + The document (so method calls can be chained). + + + + Adds elements to the document from a dictionary of key/value pairs. + + The dictionary. + The document (so method calls can be chained). + + + + Adds elements to the document from a dictionary of key/value pairs. + + The dictionary. + Which keys of the hash table to add. + The document (so method calls can be chained). + + + + Adds elements to the document from a dictionary of key/value pairs. + + The dictionary. + The document (so method calls can be chained). + + + + Adds elements to the document from a dictionary of key/value pairs. + + The dictionary. + Which keys of the hash table to add. + The document (so method calls can be chained). + + + + Adds elements to the document from a dictionary of key/value pairs. + + The dictionary. + The document (so method calls can be chained). + + + + Adds elements to the document from a dictionary of key/value pairs. + + The dictionary. + Which keys of the hash table to add. + The document (so method calls can be chained). + + + + Adds a list of elements to the document. + + The list of elements. + The document (so method calls can be chained). + + + + Adds a list of elements to the document. + + The list of elements. + The document (so method calls can be chained). + + + + Creates and adds an element to the document. + + The name of the element. + The value of the element. + The document (so method calls can be chained). + + + + Creates and adds an element to the document, but only if the condition is true. + + The name of the element. + The value of the element. + Whether to add the element to the document. + The document (so method calls can be chained). + + + + Clears the document (removes all elements). + + + + + Creates a shallow clone of the document (see also DeepClone). + + A shallow clone of the document. + + + + Compares this document to another document. + + The other document. + A 32-bit signed integer that indicates whether this document is less than, equal to, or greather than the other. + + + + Compares the BsonDocument to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonDocument is less than, equal to, or greather than the other BsonValue. + + + + Tests whether the document contains an element with the specified name. + + The name of the element to look for. + True if the document contains an element with the specified name. + + + + Tests whether the document contains an element with the specified value. + + The value of the element to look for. + True if the document contains an element with the specified value. + + + + Creates a deep clone of the document (see also Clone). + + A deep clone of the document. + + + + Deserializes the document from a BsonReader. + + The BsonReader. + The nominal type of the object (ignored, but should be BsonDocument). + The serialization options (ignored). + The document (which has now been initialized by deserialization), or null. + + + + Gets the Id of the document. + + The Id of the document (the RawValue if it has one, otherwise the element Value). + The nominal type of the Id. + The IdGenerator for the Id (or null). + True (a BsonDocument either has an Id member or one can be added). + + + + Compares this document to another document. + + The other document. + True if the two documents are equal. + + + + Compares this BsonDocument to another object. + + The other object. + True if the other object is a BsonDocument and equal to this one. + + + + Gets an element of this document. + + The zero based index of the element. + The element. + + + + Gets an element of this document. + + The name of the element. + A BsonElement. + + + + Gets an enumerator that can be used to enumerate the elements of this document. + + An enumerator. + + + + Gets the hash code. + + The hash code. + + + + Gets the value of an element. + + The zero based index of the element. + The value of the element. + + + + Gets the value of an element. + + The name of the element. + The value of the element. + + + + Gets the value of an element or a default value if the element is not found. + + The name of the element. + The default value returned if the element is not found. + The value of the element or the default value if the element is not found. + + + + Inserts a new element at a specified position. + + The position of the new element. + The element. + + + + Merges another document into this one. Existing elements are not overwritten. + + The other document. + The document (so method calls can be chained). + + + + Merges another document into this one, specifying whether existing elements are overwritten. + + The other document. + Whether to overwrite existing elements. + The document (so method calls can be chained). + + + + Removes an element from this document (if duplicate element names are allowed + then all elements with this name will be removed). + + The name of the element to remove. + + + + Removes an element from this document. + + The zero based index of the element to remove. + + + + Removes an element from this document. + + The element to remove. + + + + Serializes this document to a BsonWriter. + + The writer. + The nominalType. + The serialization options (can be null). + + + + Sets the value of an element. + + The zero based index of the element whose value is to be set. + The new value. + The document (so method calls can be chained). + + + + Sets the value of an element (an element will be added if no element with this name is found). + + The name of the element whose value is to be set. + The new value. + The document (so method calls can be chained). + + + + Sets the document Id. + + The value of the Id. + + + + Sets an element of the document (replacing the existing element at that position). + + The zero based index of the element to replace. + The new element. + The document. + + + + Sets an element of the document (replaces any existing element with the same name or adds a new element if an element with the same name is not found). + + The new element. + The document. + + + + Returns a string representation of the document. + + A string representation of the document. + + + + Tries to get an element of this document. + + The name of the element. + The element. + True if an element with that name was found. + + + + Tries to get the value of an element of this document. + + The name of the element. + The value of the element. + True if an element with that name was found. + + + + Writes the document to a BsonWriter. + + The writer. + + + + Writes the document to a BsonBuffer. + + The buffer. + + + + Writes the document to a Stream. + + The stream. + + + + Writes the document to a file. + + The name of the file. + + + + Gets or sets whether to allow duplicate names (allowing duplicate names is not recommended). + + + + + Gets the number of elements. + + + + + Gets the elements. + + + + + Gets the element names. + + + + + Gets the raw values (see BsonValue.RawValue). + + + + + Gets the values. + + + + + Gets or sets the value of an element. + + The zero based index of the element. + The value of the element. + + + + Gets the value of an element or a default value if the element is not found. + + The name of the element. + The default value to return if the element is not found. + Teh value of the element or a default value if the element is not found. + + + + Gets or sets the value of an element. + + The name of the element. + The value of the element. + + + + Represents the mapping between a field or property and a BSON element. + + + + + Initializes a new instance of the BsonMemberMap class. + + The member info. + The conventions to use with this member. + + + + Applies the default value to the member of an object. + + The object. + + + + Gets the serializer. + + The actual type of the member's value. + The member map. + + + + Sets the default value. + + The default value. + The member map. + + + + Sets the default value. + + The default value. + Whether the default value shoudl be serialized. + The member map. + + + + Sets the name of the element. + + The name of the element. + The member map. + + + + Sets the Id generator. + + The Id generator. + The member map. + + + + Sets whether null values should be ignored when serialized. + + Wether null values should be ignored when serialized. + The member map. + + + + Sets whether an element is required for this member when deserialized + + Whether an element is required for this member when deserialized + The member map. + + + + Sets the serialization order. + + The serialization order. + The member map. + + + + Sets the external representation. + + The external representation. + The member map. + + + + Sets the serialization options. + + The serialization options. + The member map. + + + + Sets the serializer. + + The serializer. + The member map. + + + + Sets whether the default value should be serialized. + + Whether the default value should be serialized. + The member map. + + + + Sets the method that will be called to determine whether the member should be serialized. + + The method. + + + + + Gets the name of the member. + + + + + Gets the type of the member. + + + + + Gets the name of the element. + + + + + Gets the serialization order. + + + + + Gets the member info. + + + + + Gets the getter function. + + + + + Gets the serialization options. + + + + + Gets the setter function. + + + + + Gets the Id generator. + + + + + Gets whether an element is required for this member when deserialized. + + + + + Gets whether this member has a default value. + + + + + Gets whether the default value should be serialized. + + + + + Gets the method that will be called to determine whether the member should be serialized. + + + + + Gets whether null values should be ignored when serialized. + + + + + Gets the default value. + + + + + Indicates that a field or property is required. + + + + + Specifies the default value for a field or property. + + + + + Initializes a new instance of the BsonDefaultValueAttribute class. + + The default value. + + + + Gets the default value. + + + + + Gets or sets whether to serialize the default value. + + + + + Represents the binary data subtype of a BsonBinaryData. + + + + + Binary data. + + + + + A function. + + + + + Obsolete binary data subtype (use Binary instead). + + + + + A UUID in a driver dependent legacy byte order. + + + + + A UUID in standard network byte order. + + + + + An MD5 hash. + + + + + User defined binary data. + + + + + Represents an ObjectId (see also BsonObjectId). + + + + + Initializes a new instance of the ObjectId class. + + The value. + + + + Initializes a new instance of the ObjectId class. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Initializes a new instance of the ObjectId class. + + The value. + + + + Compares two ObjectIds. + + The first ObjectId. + The other ObjectId + True if the first ObjectId is less than the second ObjectId. + + + + Compares two ObjectIds. + + The first ObjectId. + The other ObjectId + True if the first ObjectId is less than or equal to the second ObjectId. + + + + Compares two ObjectIds. + + The first ObjectId. + The other ObjectId. + True if the two ObjectIds are equal. + + + + Compares two ObjectIds. + + The first ObjectId. + The other ObjectId. + True if the two ObjectIds are not equal. + + + + Compares two ObjectIds. + + The first ObjectId. + The other ObjectId + True if the first ObjectId is greather than or equal to the second ObjectId. + + + + Compares two ObjectIds. + + The first ObjectId. + The other ObjectId + True if the first ObjectId is greather than the second ObjectId. + + + + Generates a new ObjectId with a unique value. + + A ObjectId. + + + + Packs the components of an ObjectId into a byte array. + + The timestamp. + The machine hash. + The PID. + The increment. + A byte array. + + + + Parses a string and creates a new ObjectId. + + The string value. + A ObjectId. + + + + Tries to parse a string and create a new ObjectId. + + The string value. + The new ObjectId. + True if the string was parsed successfully. + + + + Unpacks a byte array into the components of an ObjectId. + + A byte array. + The timestamp. + The machine hash. + The PID. + The increment. + + + + Compares this ObjectId to another ObjectId. + + The other ObjectId. + A 32-bit signed integer that indicates whether this ObjectId is less than, equal to, or greather than the other. + + + + Compares this ObjectId to another ObjectId. + + The other ObjectId. + True if the two ObjectIds are equal. + + + + Compares this ObjectId to another object. + + The other object. + True if the other object is an ObjectId and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Converts the ObjectId to a byte array. + + A byte array. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets an instance of ObjectId where the value is empty. + + + + + Gets the timestamp. + + + + + Gets the machine. + + + + + Gets the PID. + + + + + Gets the increment. + + + + + Gets the creation time (derived from the timestamp). + + + + + Represents a serializer for enumerable values. + + + + + Represents a base implementation for the many implementations of IBsonSerializer. + + + + + An interface implemented by BSON serializers. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The serialization options. + An object. + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Gets the document Id. + + The document. + The Id. + The nominal type of the Id. + The IdGenerator for the Id type. + True if the document has an Id. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Sets the document Id. + + The document. + The Id. + + + + Initializes a new instance of the BsonBaseSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The serialization options. + An object. + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Gets the document Id. + + The document. + The Id. + The nominal type of the Id. + The IdGenerator for the Id type. + True if the document has an Id. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Sets the document Id. + + The document. + The Id. + + + + Verifies the nominal and actual types against the expected type. + + The nominal type. + The actual type. + The expected type. + + + + Initializes a new instance of the EnumerableSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Represents a serializer for Queues. + + + + + Initializes a new instance of the QueueSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Represents a serializer for Stacks. + + + + + Initializes a new instance of the StackSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Represents a discriminator convention. + + + + + Gets the actual type of an object by reading the discriminator from a BsonReader. + + The reader. + The nominal type. + The actual type. + + + + Gets the discriminator value for an actual type. + + The nominal type. + The actual type. + The discriminator value. + + + + Gets the discriminator element name. + + + + + Represents the standard discriminator conventions (see ScalarDiscriminatorConvention and HierarchicalDiscriminatorConvention). + + + + + Initializes a new instance of the StandardDiscriminatorConvention class. + + The element name. + + + + Gets the actual type of an object by reading the discriminator from a BsonReader. + + The reader. + The nominal type. + The actual type. + + + + Gets the discriminator value for an actual type. + + The nominal type. + The actual type. + The discriminator value. + + + + Gets an instance of the ScalarDiscriminatorConvention. + + + + + Gets an instance of the HierarchicalDiscriminatorConvention. + + + + + Gets the discriminator element name. + + + + + Represents a discriminator convention where the discriminator is provided by the class map of the actual type. + + + + + Initializes a new instance of the ScalarDiscriminatorConvention class. + + The element name. + + + + Gets the discriminator value for an actual type. + + The nominal type. + The actual type. + The discriminator value. + + + + Represents a discriminator convention where the discriminator is an array of all the discriminators provided by the class maps of the root class down to the actual type. + + + + + Initializes a new instance of the HierarchicalDiscriminatorConvention class. + + The element name. + + + + Gets the discriminator value for an actual type. + + The nominal type. + The actual type. + The discriminator value. + + + + Represents a bookmark that can be used to return a reader to the current position and state. + + + + + Specifies the serialization options for this class (see derived attributes). + + + + + Initializes a new instance of the BsonSerializationOptionsAttribute class. + + + + + Gets the serialization options specified by this attribute. + + The serialization options. + + + + Represents the representation to use when converting a Guid to a BSON binary value. + + + + + The representation for Guids is unspecified, so conversion between Guids and Bson binary data is not possible. + + + + + Use the new standard representation for Guids (binary subtype 4 with bytes in network byte order). + + + + + Use the representation used by older versions of the C# driver (including most community provided C# drivers). + + + + + Use the representation used by older versions of the Java driver. + + + + + Use the representation used by older versions of the Python driver. + + + + + An interface implemented by serialization providers. + + + + + Gets a serializer for a type. + + The type. + A serializer. + + + + Indicates that a field or property should be ignored if its value is null when this class is serialized. + + + + + Creates a clone of the context. + + A clone of the context. + + + + Represents a serializer for BitArrays. + + + + + Initializes a new instance of the BitArraySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BitArraySerializer class. + + + + + Represents a serializer for ByteArrays. + + + + + Initializes a new instance of the ByteArraySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the ByteArraySerializer class. + + + + + Represents a serializer for Bytes. + + + + + Initializes a new instance of the ByteSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the ByteSerializer class. + + + + + Represents a serializer for Chars. + + + + + Initializes a new instance of the CharSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the CharSerializer class. + + + + + Represents a serializer for CultureInfos. + + + + + Initializes a new instance of the CultureInfoSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the CultureInfoSerializer class. + + + + + Represents a serializer for DateTimeOffsets. + + + + + Initializes a new instance of the DateTimeOffsetSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the DateTimeOffsetSerializer class. + + + + + Represents a serializer for Decimals. + + + + + Initializes a new instance of the DecimalSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the DecimalSerializer class. + + + + + Represents a serializer for System.Drawing.Size. + + + + + Initializes a new instance of the DrawingSizeSerializer class. + + + + + Deserializes an object of type System.Drawing.Size from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object of type System.Drawing.Size to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the DrawingSizeSerializer class. + + + + + Represents a serializer for Int16s. + + + + + Initializes a new instance of the Int16Serializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the Int16Serializer class. + + + + + Represents a serializer for IPAddresses. + + + + + Initializes a new instance of the IPAddressSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the IPAddressSerializer class. + + + + + Represents a serializer for IPEndPoints. + + + + + Initializes a new instance of the IPEndPointSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the IPEndPointSerializer class. + + + + + Represents a serializer for SBytes. + + + + + Initializes a new instance of the SByteSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the SByteSerializer class. + + + + + Represents a serializer for Singles. + + + + + Initializes a new instance of the SingleSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the SingleSerializer class. + + + + + Represents a serializer for Timespans. + + + + + Initializes a new instance of the TimeSpanSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the TimeSpanSerializer class. + + + + + Represents a serializer for UInt16s. + + + + + Initializes a new instance of the UInt16Serializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the UInt16Serializer class. + + + + + Represents a serializer for UInt32s. + + + + + Initializes a new instance of the UInt32Serializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the UInt32Serializer class. + + + + + Represents a serializer for UInt64s. + + + + + Initializes a new instance of the UInt64Serializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the UInt64Serializer class. + + + + + Represents a serializer for Uris. + + + + + Initializes a new instance of the UriSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the UriSerializer class. + + + + + Represents a serializer for Versions. + + + + + Initializes a new instance of the VersionSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the VersionSerializer class. + + + + + An interface implemented by Id generators. + + + + + Generates an Id for a document. + + The container of the document (will be a MongoCollection when called from the C# driver). + The document. + An Id. + + + + Tests whether an Id is empty. + + The Id. + True if the Id is empty. + + + + Represents a serializer for classes that implement IBsonSerializable. + + + + + Initializes a new instance of the BsonIBsonSerializableSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The serialization options. + An object. + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Gets the document Id. + + The document. + The Id. + The nominal type of the Id. + The IdGenerator for the Id type. + True if the document has an Id. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Sets the document Id. + + The document. + The Id. + + + + Gets an instance of the BsonIBsonSerializableSerializer class. + + + + + A static class containing BSON utility methods. + + + + + Parses a hex string to a byte array. + + The hex string. + A byte array. + + + + Converts from number of milliseconds since Unix epoch to DateTime. + + The number of milliseconds since Unix epoch. + A DateTime. + + + + Converts a byte array to a hex string. + + The byte array. + A hex string. + + + + Converts a DateTime to local time (with special handling for MinValue and MaxValue). + + A DateTime. + A DateTimeKind. + The DateTime in local time. + + + + Converts a DateTime to number of milliseconds since Unix epoch. + + A DateTime. + Number of seconds since Unix epoch. + + + + Converts a DateTime to UTC (with special handling for MinValue and MaxValue). + + A DateTime. + The DateTime in UTC. + + + + Tries to parse a hex string to a byte array. + + The hex string. + A byte array. + True if the hex string was successfully parsed. + + + + A static class that maps between .NET objects and BsonValues. + + + + + Maps an object to a BsonValue. + + An object. + A BsonValue. + + + + Maps an object to a specific BsonValue type. + + An object. + The BsonType to map to. + A BsonValue. + + + + Registers a custom type mapper. + + The type. + A custom type mapper. + + + + Tries to map an object to a BsonValue. + + An object. + The BsonValue. + True if the mapping was successfull. + + + + Compares this Mapping to another object. + + The other object. + True if the other object is a Mapping and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Represents a member finder convention. + + + + + Finds the members of a class that are serialized. + + The class. + The members that are serialized. + + + + Represents a member finder convention where all public read/write fields and properties are serialized. + + + + + Finds the members of a class that are serialized. + + The class. + The members that are serialized. + + + + Represents a set of conventions. + + + + + Gets the default convention profile. + + The default convention profile. + + + + Merges another convention profile into this one (only missing conventions are merged). + + The other convention profile. + + + + Sets the Id generator convention. + + An Id generator convention. + The convention profile. + + + + Sets the default value convention. + + A default value convention. + The convention profile. + + + + Sets the element name convention. + + An element name convention. + The convention profile. + + + + Sets the extra elements member convention. + + An extra elements member convention. + The convention profile. + + + + Sets the Id member convention. + + An Id member convention. + The convention profile. + + + + Sets the ignore extra elements convention. + + An ignore extra elements convention. + The convention profile. + + + + Sets the ignore if null convention. + + An ignore if null convention. + The convention profile. + + + + Sets the member finder convention. + + A member finder convention. + The convention profile. + + + + Sets the serialize default value convention. + + A serialize default value convention. + The convention profile. + + + + Gets the Id generator convention. + + + + + Gets the default value convention. + + + + + Gets the element name convention. + + + + + Gets the extra elements member convention. + + + + + Gets the Id member convention. + + + + + Gets the ignore extra elements convention. + + + + + Gets the ignore if null convention. + + + + + Gets the member finder convention. + + + + + Gets the default value convention. + + + + + Represents an Id generator for BsonObjectIds. + + + + + Initializes a new instance of the BsonObjectIdGenerator class. + + + + + Generates an Id for a document. + + The container of the document (will be a MongoCollection when called from the C# driver). + The document. + An Id. + + + + Tests whether an Id is empty. + + The Id. + True if the Id is empty. + + + + Gets an instance of ObjectIdGenerator. + + + + + Represents an Id generator for Guids using the COMB algorithm. + + + + + Initializes a new instance of the CombGuidGenerator class. + + + + + Generates an Id for a document. + + The container of the document (will be a MongoCollection when called from the C# driver). + The document. + An Id. + + + + Tests whether an Id is empty. + + The Id. + True if the Id is empty. + + + + Gets an instance of CombGuidGenerator. + + + + + Represents an Id generator for Guids. + + + + + Initializes a new instance of the GuidGenerator class. + + + + + Generates an Id for a document. + + The container of the document (will be a MongoCollection when called from the C# driver). + The document. + An Id. + + + + Tests whether an Id is empty. + + The Id. + True if the Id is empty. + + + + Gets an instance of GuidGenerator. + + + + + Represents an Id generator that only checks that the Id is not null. + + + + + Initializes a new instance of the NullIdChecker class. + + + + + Generates an Id for a document. + + The container of the document (will be a MongoCollection when called from the C# driver). + The document. + An Id. + + + + Tests whether an Id is empty. + + The Id. + True if the Id is empty. + + + + Gets an instance of NullIdChecker. + + + + + Represents an Id generator for ObjectIds. + + + + + Initializes a new instance of the ObjectIdGenerator class. + + + + + Generates an Id for a document. + + The container of the document (will be a MongoCollection when called from the C# driver). + The document. + An Id. + + + + Tests whether an Id is empty. + + The Id. + True if the Id is empty. + + + + Gets an instance of ObjectIdGenerator. + + + + + Represents an Id generator for ObjectIds represented internally as strings. + + + + + Initializes a new instance of the StringObjectIdGenerator class. + + + + + Generates an Id for a document. + + The container of the document (will be a MongoCollection when called from the C# driver). + The document. + An Id. + + + + Tests whether an Id is empty. + + The Id. + True if the Id is empty. + + + + Gets an instance of StringObjectIdGenerator. + + + + + Represents an Id generator that only checks that the Id is not all zeros. + + + + + Initializes a new instance of the ZeroIdChecker class. + + + + + Generates an Id for a document. + + The container of the document (will be a MongoCollection when called from the C# driver). + The document. + An Id. + + + + Tests whether an Id is empty. + + The Id. + True if the Id is empty. + + + + Represents an extra elements member convention. + + + + + Finds the extra elements member of a class. + + The class. + The extra elements member. + + + + Represents an extra elements member convention where the extra elements member has a certain name. + + + + + Initializes a new instance of the NamedExtraElementsMemberConvention class. + + The name of the extra elements member. + + + + Finds the extra elements member of a class. + + The class. + The extra elements member. + + + + Gets the name of the extra elements member. + + + + + A static class containing BSON extension methods. + + + + + Converts an object to a BSON document byte array. + + The nominal type of the object. + The object. + A byte array. + + + + Converts an object to a BSON document byte array. + + The nominal type of the object. + The object. + The serialization options. + A byte array. + + + + Converts an object to a BSON document byte array. + + The nominal type of the object. + The object. + The serialization options. + The BsonBinaryWriter settings. + A byte array. + + + + Converts an object to a BSON document byte array. + + The nominal type of the object. + The object. + The BsonBinaryWriter settings. + A byte array. + + + + Converts an object to a BSON document byte array. + + The object. + The nominal type of the object. + A byte array. + + + + Converts an object to a BSON document byte array. + + The object. + The nominal type of the object. + The serialization options. + A byte array. + + + + Converts an object to a BSON document byte array. + + The object. + The nominal type of the object. + The serialization options. + The BsonBinaryWriter settings. + A byte array. + + + + Converts an object to a BSON document byte array. + + The object. + The nominal type of the object. + The BsonBinaryWriter settings. + A byte array. + + + + Converts an object to a BsonDocument. + + The nominal type of the object. + The object. + A BsonDocument. + + + + Converts an object to a BsonDocument. + + The nominal type of the object. + The object. + The serialization options. + A BsonDocument. + + + + Converts an object to a BsonDocument. + + The object. + The nominal type of the object. + A BsonDocument. + + + + Converts an object to a BsonDocument. + + The object. + The nominal type of the object. + The serialization options. + A BsonDocument. + + + + Converts an object to a JSON string. + + The nominal type of the object. + The object. + A JSON string. + + + + Converts an object to a JSON string. + + The nominal type of the object. + The object. + The serialization options. + A JSON string. + + + + Converts an object to a JSON string. + + The nominal type of the object. + The object. + The serialization options. + The JsonWriter settings. + A JSON string. + + + + Converts an object to a JSON string. + + The nominal type of the object. + The object. + The JsonWriter settings. + A JSON string. + + + + Converts an object to a JSON string. + + The object. + The nominal type of the object. + A JSON string. + + + + Converts an object to a JSON string. + + The object. + The nominal type of the object. + The serialization options. + A JSON string. + + + + Converts an object to a JSON string. + + The object. + The nominal type of the object. + The serialization options. + The JsonWriter settings. + A JSON string. + + + + Converts an object to a JSON string. + + The object. + The nominal type of the object. + The JsonWriter settings. + A JSON string. + + + + Represents a buffer for BSON encoded bytes. + + + + + Initializes a new instance of the BsonBuffer class. + + + + + Backpatches the length of an object. + + The start position of the object. + The length of the object. + + + + Clears the data in the buffer. + + + + + Copies data from the buffer to a byte array. + + The source offset in the buffer. + The destination byte array. + The destination offset in the byte array. + The number of bytes to copy. + + + + Disposes of any resources held by the buffer. + + + + + Loads the buffer from a Stream (the Stream must be positioned at a 4 byte length field). + + The Stream. + + + + Loads the buffer from a Stream (leaving the position in the buffer unchanged). + + The stream. + The number of bytes to load. + + + + Peeks at the next byte in the buffer and returns it as a BsonType. + + A BsonType. + + + + Peeks at the next byte in the buffer. + + A Byte. + + + + Reads a BSON Boolean from the buffer. + + A Boolean. + + + + Reads a BSON type from the buffer. + + A BsonType. + + + + Reads a byte from the buffer. + + A Byte. + + + + Reads bytes from the buffer. + + The number of bytes to read. + A byte array. + + + + Reads a BSON Double from the buffer. + + A Double. + + + + Reads a BSON Int32 from the reader. + + An Int32. + + + + Reads a BSON Int64 from the reader. + + An Int64. + + + + Reads a BSON ObjectId from the reader. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Reads a BSON string from the reader. + + A String. + + + + Reads a BSON CString from the reader (a null terminated string). + + A String. + + + + Skips over bytes in the buffer (advances the position). + + The number of bytes to skip. + + + + Skips over a CString in the buffer (advances the position). + + + + + Converts the buffer to a byte array. + + A byte array. + + + + Writes a BSON Boolean to the buffer. + + The Boolean value. + + + + Writes a byte to the buffer. + + A byte. + + + + Writes bytes to the buffer. + + A byte array. + + + + Writes a CString to the buffer. + + A string. + + + + Writes a BSON Double to the buffer. + + The Double value. + + + + Writes a BSON Int32 to the buffer. + + The Int32 value. + + + + Writes a BSON Int64 to the buffer. + + The Int64 value. + + + + Writes a BSON ObjectId to the buffer. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Writes a BSON String to the buffer. + + The String value. + + + + Writes all the data in the buffer to a Stream. + + The Stream. + + + + Writes a 32-bit zero the the buffer. + + + + + Gets or sets the max chunk pool size. + + + + + Gets or sets the length of the data in the buffer. + + + + + Gets or sets the current position in the buffer. + + + + + Represents a BSON writer to a BSON Stream. + + + + + Initializes a new instance of the BsonBinaryWriter class. + + A stream. + A BsonBuffer. + Optional BsonBinaryWriter settings. + + + + Closes the writer. + + + + + Flushes any pending data to the output destination. + + + + + Writes BSON binary data to the writer. + + The binary data. + The binary data subtype. + The representation for Guids. + + + + Writes a BSON Boolean to the writer. + + The Boolean value. + + + + Writes a BSON DateTime to the writer. + + The number of milliseconds since the Unix epoch. + + + + Writes a BSON Double to the writer. + + The Double value. + + + + Writes the end of a BSON array to the writer. + + + + + Writes the end of a BSON document to the writer. + + + + + Writes a BSON Int32 to the writer. + + The Int32 value. + + + + Writes a BSON Int64 to the writer. + + The Int64 value. + + + + Writes a BSON JavaScript to the writer. + + The JavaScript code. + + + + Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope). + + The JavaScript code. + + + + Writes a BSON MaxKey to the writer. + + + + + Writes a BSON MinKey to the writer. + + + + + Writes a BSON null to the writer. + + + + + Writes a BSON ObjectId to the writer. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Writes a BSON regular expression to the writer. + + A regular expression pattern. + A regular expression options. + + + + Writes the start of a BSON array to the writer. + + + + + Writes the start of a BSON document to the writer. + + + + + Writes a BSON String to the writer. + + The String value. + + + + Writes a BSON Symbol to the writer. + + The symbol. + + + + Writes a BSON timestamp to the writer. + + The combined timestamp/increment value. + + + + Writes a BSON undefined to the writer. + + + + + Disposes of any resources used by the writer. + + True if called from Dispose. + + + + Gets the writer's BsonBuffer. + + + + + Represents the type of a BSON element. + + + + + Not a real BSON type. Used to signal the end of a document. + + + + + A BSON double. + + + + + A BSON string. + + + + + A BSON document. + + + + + A BSON array. + + + + + BSON binary data. + + + + + A BSON undefined value. + + + + + A BSON ObjectId. + + + + + A BSON bool. + + + + + A BSON DateTime. + + + + + A BSON null value. + + + + + A BSON regular expression. + + + + + BSON JavaScript code. + + + + + A BSON symbol. + + + + + BSON JavaScript code with a scope (a set of variables with values). + + + + + A BSON 32-bit integer. + + + + + A BSON timestamp. + + + + + A BSON 64-bit integer. + + + + + A BSON MinKey value. + + + + + A BSON MaxKey value. + + + + + A static class containing BSON constants. + + + + + Gets the number of milliseconds since the Unix epoch for DateTime.MaxValue. + + + + + Gets the number of milliseconds since the Unix epoch for DateTime.MinValue. + + + + + Gets the Unix Epoch for BSON DateTimes (1970-01-01). + + + + + A static class containing BSON defaults. + + + + + Gets or sets the default Guid representation. + + + + + Gets or sets the default initial BSON buffer size. + + + + + Gets or sets the default max document size. + + + + + Represents a BSON reader for a binary BSON byte array. + + + + + Initializes a new instance of the BsonBinaryReader class. + A BsonBuffer. + A BsonBinaryReaderSettings. + + + + + Closes the reader. + + + + + Gets a bookmark to the reader's current position and state. + + A bookmark. + + + + Reads BSON binary data from the reader. + + The binary data. + The binary data subtype. + The representation for Guids. + + + + Reads a BSON boolean from the reader. + + A Boolean. + + + + Reads a BsonType from the reader. + + A BsonType. + + + + Reads a BSON DateTime from the reader. + + The number of milliseconds since the Unix epoch. + + + + Reads a BSON Double from the reader. + + A Double. + + + + Reads the end of a BSON array from the reader. + + + + + Reads the end of a BSON document from the reader. + + + + + Reads a BSON Int32 from the reader. + + An Int32. + + + + Reads a BSON Int64 from the reader. + + An Int64. + + + + Reads a BSON JavaScript from the reader. + + A string. + + + + Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope). + + A string. + + + + Reads a BSON MaxKey from the reader. + + + + + Reads a BSON MinKey from the reader. + + + + + Reads a BSON null from the reader. + + + + + Reads a BSON ObjectId from the reader. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Reads a BSON regular expression from the reader. + + A regular expression pattern. + A regular expression options. + + + + Reads the start of a BSON array. + + + + + Reads the start of a BSON document. + + + + + Reads a BSON string from the reader. + + A String. + + + + Reads a BSON symbol from the reader. + + A string. + + + + Reads a BSON timestamp from the reader. + + The combined timestamp/increment. + + + + Reads a BSON undefined from the reader. + + + + + Returns the reader to previously bookmarked position and state. + + The bookmark. + + + + Skips the name (reader must be positioned on a name). + + + + + Skips the value (reader must be positioned on a value). + + + + + Disposes of any resources used by the reader. + + True if called from Dispose. + + + + Gets the reader's buffer. + + + + + Represents a serializer for a class map. + + + + + Initializes a new instance of the BsonClassMapSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The serialization options. + An object. + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Gets the document Id. + + The document. + The Id. + The nominal type of the Id. + The IdGenerator for the Id type. + True if the document has an Id. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Sets the document Id. + + The document. + The Id. + + + + Gets an instance of the BsonClassMapSerializer class. + + + + + Represents a serializer for dictionaries. + + + + + Initializes a new instance of the DictionarySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Represents the BSON undefined value. + + + + + Compares this BsonUndefined to another BsonUndefined. + + The other BsonUndefined. + A 32-bit signed integer that indicates whether this BsonUndefined is less than, equal to, or greather than the other. + + + + Compares the BsonUndefined to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonUndefined is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonUndefined to another BsonUndefined. + + The other BsonUndefined. + True if the two BsonUndefined values are equal. + + + + Compares this BsonUndefined to another object. + + The other object. + True if the other object is a BsonUndefined and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the singleton instance of BsonUndefined. + + + + + Represents a serializer for enums. + + + + + Initializes a new instance of the EnumSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the EnumSerializer class. + + + + + Represents the BSON MinKey value. + + + + + Compares this BsonMinKey to another BsonMinKey. + + The other BsonMinKey. + A 32-bit signed integer that indicates whether this BsonMinKey is less than, equal to, or greather than the other. + + + + Compares the BsonMinKey to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonMinKey is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonMinKey to another BsonMinKey. + + The other BsonMinKey. + True if the two BsonMinKey values are equal. + + + + Compares this BsonMinKey to another object. + + The other object. + True if the other object is a BsonMinKey and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the singleton instance of BsonMinKey. + + + + + A static class that represents the BSON serialization functionality. + + + + + Deserializes an object from a BsonDocument. + + The nominal type of the object. + The BsonDocument. + A TNominalType. + + + + Deserializes an object from a JsonBuffer. + + The nominal type of the object. + The JsonBuffer. + A TNominalType. + + + + Deserializes an object from a BsonReader. + + The nominal type of the object. + The BsonReader. + A TNominalType. + + + + Deserializes an object from a BSON byte array. + + The nominal type of the object. + The BSON byte array. + A TNominalType. + + + + Deserializes an object from a BSON Stream. + + The nominal type of the object. + The BSON Stream. + A TNominalType. + + + + Deserializes an object from a JSON string. + + The nominal type of the object. + The JSON string. + A TNominalType. + + + + Deserializes an object from a JSON TextReader. + + The nominal type of the object. + The JSON TextReader. + A TNominalType. + + + + Deserializes an object from a BsonDocument. + + The BsonDocument. + The nominal type of the object. + A TNominalType. + + + + Deserializes an object from a JsonBuffer. + + The JsonBuffer. + The nominal type of the object. + An object. + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + An object. + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The serialization options. + An object. + + + + Deserializes an object from a BSON byte array. + + The BSON byte array. + The nominal type of the object. + An object. + + + + Deserializes an object from a BSON Stream. + + The BSON Stream. + The nominal type of the object. + An object. + + + + Deserializes an object from a JSON string. + + The JSON string. + The nominal type of the object. + An object. + + + + Deserializes an object from a JSON TextReader. + + The JSON TextReader. + The nominal type of the object. + An object. + + + + Looks up a generic serializer definition. + + The generic type. + A generic serializer definition. + + + + Looks up an IdGenerator. + + The Id type. + An IdGenerator for the Id type. + + + + Looks up a serializer for a Type. + + The Type. + A serializer for the Type. + + + + Registers a generic serializer definition for a generic type. + + The generic type. + The generic serializer definition. + + + + Registers an IdGenerator for an Id Type. + + The Id Type. + The IdGenerator for the Id Type. + + + + Registers a serialization provider. + + The serialization provider. + + + + Registers a serializer for a type. + + The type. + The serializer. + + + + Serializes an object to a BsonWriter. + + The nominal type of the object. + The BsonWriter. + The object. + + + + Serializes an object to a BsonWriter. + + The nominal type of the object. + The BsonWriter. + The object. + The serialization options. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type of the object. + The object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type of the object. + The object. + The serialization options. + + + + Gets or sets whether to use the NullIdChecker on reference Id types that don't have an IdGenerator registered. + + + + + Gets or sets whether to use the ZeroIdChecker on value Id types that don't have an IdGenerator registered. + + + + + Represents the state of a reader. + + + + + The initial state. + + + + + The reader is positioned at the type of an element or value. + + + + + The reader is positioned at the name of an element. + + + + + The reader is positioned at a value. + + + + + The reader is positioned at a scope document. + + + + + The reader is positioned at the end of a document. + + + + + The reader is positioned at the end of an array. + + + + + The reader has finished reading a document. + + + + + The reader is closed. + + + + + Represents a BsonDocument wrapper. + + + + + Initializes a new instance of the BsonDocumentWrapper class. + + The wrapped object. + + + + Initializes a new instance of the BsonDocumentWrapper class. + + The nominal type of the wrapped object. + The wrapped object. + + + + Initializes a new instance of the BsonDocumentWrapper class. + + The nominal type of the wrapped object. + The wrapped object. + Whether the wrapped object is an update document that needs to be checked. + + + + Creates a new instance of the BsonDocumentWrapper class. + + The nominal type of the wrapped object. + The wrapped object. + A BsonDocumentWrapper or null. + + + + Creates a new instance of the BsonDocumentWrapper class. + + The nominal type of the wrapped object. + The wrapped object. + Whether the wrapped object is an update document. + A BsonDocumentWrapper or null. + + + + Creates a new instance of the BsonDocumentWrapper class. + + The nominal type of the wrapped object. + The wrapped object. + A BsonDocumentWrapper or null. + + + + Creates a new instance of the BsonDocumentWrapper class. + + The nominal type of the wrapped object. + The wrapped object. + Whether the wrapped object is an update document. + A BsonDocumentWrapper or null. + + + + Creates a list of new instances of the BsonDocumentWrapper class. + + The nominal type of the wrapped objects. + A list of wrapped objects. + A list of BsonDocumentWrappers or null. + + + + Creates a list of new instances of the BsonDocumentWrapper class. + + The nominal type of the wrapped object. + A list of wrapped objects. + A list of BsonDocumentWrappers or null. + + + + CompareTo is an invalid operation for BsonDocumentWrapper. + + Not applicable. + Not applicable. + + + + Deserialize is an invalid operation for BsonDocumentWrapper. + + Not applicable. + Not applicable. + Not applicable. + Not applicable. + + + + GetDocumentId is an invalid operation for BsonDocumentWrapper. + + Not applicable. + Not applicable. + Not applicable. + Not applicable. + + + + Equals is an invalid operation for BsonDocumentWrapper. + + Not applicable. + Not applicable. + + + + GetHashCode is an invalid operation for BsonDocumentWrapper. + + Not applicable. + + + + Serializes the wrapped object to a BsonWriter. + + The writer. + The nominal type (overridded by the wrapped nominal type). + The serialization options. + + + + SetDocumentId is an invalid operation for BsonDocumentWrapper. + + Not applicable. + + + + Returns a string representation of the wrapped document. + + A string representation of the wrapped document. + + + + Specifies that this is the Id field or property. + + + + + Initializes a new instance of the BsonIdAttribute class. + + + + + Gets or sets the Id generator for the Id. + + + + + Gets or sets the Id element serialization order. + + + + + Specifies the element name and related options for a field or property. + + + + + Initializes a new instance of the BsonElementAttribute class. + + The name of the element. + + + + Gets the element name. + + + + + Gets the element serialization order. + + + + + Indicates that extra elements should be ignored when this class is deserialized. + + + + + Represents settings for a BsonDocumentWriter. + + + + + Represents settings for a BsonWriter. + + + + + The representation for Guids. + + + + + Whether the settings are frozen. + + + + + Initializes a new instance of the BsonWriterSettings class. + + + + + Initializes a new instance of the BsonWriterSettings class. + + The representation for Guids. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Freezes the settings. + + The settings. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Throws an InvalidOperationException when an attempt is made to change a setting after the settings are frozen. + + + + + Gets or sets the representation for Guids. + + + + + Gets whether the settings are frozen. + + + + + Initializes a new instance of the BsonDocumentWriterSettings class. + + + + + Initializes a new instance of the BsonDocumentWriterSettings class. + + The representation for Guids. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Gets or sets the default BsonDocumentWriter settings. + + + + + Represents settings for a BsonDocumentReader. + + + + + Represents settings for a BsonReader. + + + + + The representation for Guids. + + + + + Whether the settings are frozen. + + + + + Initializes a new instance of the BsonReaderSettings class. + + + + + Initializes a new instance of the BsonReaderSettings class. + + The representation for Guids. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Freezes the settings. + + The settings. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Throws an InvalidOperationException when an attempt is made to change a setting after the settings are frozen. + + + + + Gets or sets the representation for Guids. + + + + + Gets whether the settings are frozen. + + + + + Initializes a new instance of the BsonDocumentReaderSettings class. + + + + + Initializes a new instance of the BsonDocumentReaderSettings class. + + The representation for Guids. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Gets or sets the default settings for a BsonDocumentReader. + + + + + Represents a serializer for Booleans. + + + + + Initializes a new instance of the BooleanSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BooleanSerializer class. + + + + + Represents a serializer for DateTimes. + + + + + Initializes a new instance of the DateTimeSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the DateTimeSerializer class. + + + + + Represents a serializer for Doubles. + + + + + Initializes a new instance of the DoubleSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the DoubleSerializer class. + + + + + Represents a serializer for Guids. + + + + + Initializes a new instance of the GuidSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the GuidSerializer class. + + + + + Represents a serializer for Int32. + + + + + Initializes a new instance of the Int32Serializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the Int32Serializer class. + + + + + Represents a serializer for Int64s. + + + + + Initializes a new instance of the Int64Serializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the Int64Serializer class. + + + + + Represents a serializer for ObjectIds. + + + + + Initializes a new instance of the ObjectIdSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the ObjectIdSerializer class. + + + + + Represents a serializer for Strings. + + + + + Initializes a new instance of the StringSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the StringSerializer class. + + + + + Represents a BSON JavaScript value with a scope. + + + + + Represents a BSON JavaScript value. + + + + + The JavaScript code. + + + + + Initializes a new instance of the BsonJavaScript class. + + The JavaScript code. + + + + Initializes a new instance of the BsonJavaScript class (only called by BsonJavaScriptWithScope). + + The JavaScript code. + The BsonType (must be JavaScriptWithScope). + + + + Converts a string to a BsonJavaScript. + + A string. + A BsonJavaScript. + + + + Creates a new instance of the BsonJavaScript class. + + A string containing JavaScript code. + A BsonJavaScript. + + + + Creates a new BsonJavaScript. + + An object to be mapped to a BsonJavaScript. + A BsonJavaScript or null. + + + + Compares this BsonJavaScript to another BsonJavaScript. + + The other BsonJavaScript. + A 32-bit signed integer that indicates whether this BsonJavaScript is less than, equal to, or greather than the other. + + + + Compares the BsonJavaScript to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonJavaScript is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonJavaScript to another BsonJavaScript. + + The other BsonJavaScript. + True if the two BsonJavaScript values are equal. + + + + Compares this BsonJavaScript to another object. + + The other object. + True if the other object is a BsonJavaScript and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the JavaScript code. + + + + + Initializes a new instance of the BsonJavaScriptWithScope class. + + The JavaScript code. + A scope (a set of variables with values). + + + + Creates a new BsonJavaScriptWithScope. + + An object to be mapped to a BsonJavaScriptWithScope. + A BsonJavaScriptWithScope or null. + + + + Creates a new instance of the BsonJavaScript class. + + A string containing JavaScript code. + A scope (a set of variable with values). + A BsonJavaScript. + + + + Creates a shallow clone of the BsonJavaScriptWithScope (see also DeepClone). + + A shallow clone of the BsonJavaScriptWithScope. + + + + Creates a deep clone of the BsonJavaScriptWithScope (see also Clone). + + A deep clone of the BsonJavaScriptWithScope. + + + + Compares this BsonJavaScriptWithScope to another BsonJavaScriptWithScope. + + The other BsonJavaScriptWithScope. + A 32-bit signed integer that indicates whether this BsonJavaScriptWithScope is less than, equal to, or greather than the other. + + + + Compares the BsonJavaScriptWithScope to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonJavaScriptWithScope is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonJavaScriptWithScope to another BsonJavaScriptWithScope. + + The other BsonJavaScriptWithScope. + True if the two BsonJavaScriptWithScope values are equal. + + + + Compares this BsonJavaScriptWithScope to another object. + + The other object. + True if the other object is a BsonJavaScriptWithScope and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the scope (a set of variables with values). + + + + + Represents a serializer for one-dimensional arrays. + + The type of the elements. + + + + Initializes a new instance of the ArraySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Represents a serializer for two-dimensional arrays. + + The type of the elements. + + + + Initializes a new instance of the TwoDimensionalArraySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Represents a serializer for three-dimensional arrays. + + The type of the elements. + + + + Initializes a new instance of the ThreeDimensionalArraySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Specifies the known types for this class (the derived classes). + + + + + Initializes a new instance of the BsonKnownTypesAttribute class. + + One or more known types. + + + + Gets a list of the known types. + + + + + Represents a BSON internal exception (almost surely the result of a bug). + + + + + Initializes a new instance of the BsonInternalException class. + + + + + Initializes a new instance of the BsonInternalException class. + + The error message. + + + + Initializes a new instance of the BsonInternalException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the BsonInternalException class (this overload used by deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Represents a JSON token type. + + + + + An invalid token. + + + + + A begin array token (a '['). + + + + + A begin object token (a '{'). + + + + + An end array token (a ']'). + + + + + A left parenthesis (a '('). + + + + + A right parenthesis (a ')'). + + + + + An end object token (a '}'). + + + + + A colon token (a ':'). + + + + + A comma token (a ','). + + + + + A DateTime token. + + + + + A Double token. + + + + + An Int32 token. + + + + + And Int64 token. + + + + + An ObjectId token. + + + + + A regular expression token. + + + + + A string token. + + + + + An unquoted string token. + + + + + An end of file token. + + + + + Represents a JSON token. + + + + + Initializes a new instance of the JsonToken class. + + The token type. + The lexeme. + + + + Gets the token type. + + + + + Gets the lexeme. + + + + + Gets the value of a DateTime token. + + + + + Gets the value of a Double token. + + + + + Gets the value of an Int32 token. + + + + + Gets the value of an Int64 token. + + + + + Gets the value of an ObjectId token. + + + + + Gets the value of a regular expression token. + + + + + Gets the value of a string token. + + + + + Represents a DateTime JSON token. + + + + + Initializes a new instance of the DateTimeJsonToken class. + + The lexeme. + The DateTime value. + + + + Gets the value of a DateTime token. + + + + + Represents a Double JSON token. + + + + + Initializes a new instance of the DoubleJsonToken class. + + The lexeme. + The Double value. + + + + Gets the value of a Double token. + + + + + Represents an Int32 JSON token. + + + + + Initializes a new instance of the Int32JsonToken class. + + The lexeme. + The Int32 value. + + + + Gets the value of an Int32 token. + + + + + Gets the value of an Int32 token as an Int64. + + + + + Represents an Int64 JSON token. + + + + + Initializes a new instance of the Int64JsonToken class. + + The lexeme. + The Int64 value. + + + + Gets the value of an Int64 token. + + + + + Represents an ObjectId JSON token. + + + + + Initializes a new instance of the ObjectIdJsonToken class. + + The lexeme. + The ObjectId value. + + + + Gets the value of an ObjectId token. + + + + + Represents a regular expression JSON token. + + + + + Initializes a new instance of the RegularExpressionJsonToken class. + + The lexeme. + The BsonRegularExpression value. + + + + Gets the value of a regular expression token. + + + + + Represents a String JSON token. + + + + + Initializes a new instance of the StringJsonToken class. + + The token type. + The lexeme. + The String value. + + + + Gets the value of an String token. + + + + + A static class that represents a JSON scanner. + + + + + Gets the next JsonToken from a JsonBuffer. + + The buffer. + The next token. + + + + Creates a clone of the context. + + A clone of the context. + + + + Represents a BSON serialization exception. + + + + + Initializes a new instance of the BsonSerializationException class. + + + + + Initializes a new instance of the BsonSerializationException class. + + The error message. + + + + Initializes a new instance of the BsonSerializationException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the BsonSerializationException class (this overload used by deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Represents a serializer for objects. + + + + + Initializes a new instance of the ObjectSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The serialization options. + An object. + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Gets the document Id. + + The document. + The Id. + The nominal type of the Id. + The IdGenerator for the Id type. + True if the document has an Id. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Sets the document Id. + + The document. + The Id. + + + + Gets an instance of the ObjectSerializer class. + + + + + Represents the external representation of a field or property. + + + + + Initializes a new instance of the RepresentationSerializationOptions class. + + The external representation. + + + + Initializes a new instance of the RepresentationSerializationOptions class. + + The external representation. + Whether to allow overflow. + Whether to allow truncation. + + + + Converts a Double to a Decimal. + + A Double. + A Decimal. + + + + Converts an Int32 to a Decimal. + + An Int32. + A Decimal. + + + + Converts an Int64 to a Decimal. + + An Int64. + A Decimal. + + + + Converts a Decimal to a Double. + + A Decimal. + A Double. + + + + Converts a Double to a Double. + + A Double. + A Double. + + + + Converts a Single to a Double. + + A Single. + A Double. + + + + Converts an Int32 to a Double. + + An Int32. + A Double. + + + + Converts an Int64 to a Double. + + An Int64. + A Double. + + + + Converts an Int16 to a Double. + + An Int16. + A Double. + + + + Converts a UInt32 to a Double. + + A UInt32. + A Double. + + + + Converts a UInt64 to a Double. + + A UInt64. + A Double. + + + + Converts a UInt16 to a Double. + + A UInt16. + A Double. + + + + Converts a Double to an Int16. + + A Double. + An Int16. + + + + Converts an Int32 to an Int16. + + An Int32. + An Int16. + + + + Converts an Int64 to an Int16. + + An Int64. + An Int16. + + + + Converts a Decimal to an Int32. + + A Decimal. + An Int32. + + + + Converts a Double to an Int32. + + A Double. + An Int32. + + + + Converts a Single to an Int32. + + A Single. + An Int32. + + + + Converts an Int32 to an Int32. + + An Int32. + An Int32. + + + + Converts an Int64 to an Int32. + + An Int64. + An Int32. + + + + Converts an Int16 to an Int32. + + An Int16. + An Int32. + + + + Converts a UInt32 to an Int32. + + A UInt32. + An Int32. + + + + Converts a UInt64 to an Int32. + + A UInt64. + An Int32. + + + + Converts a UInt16 to an Int32. + + A UInt16. + An Int32. + + + + Converts a Decimal to an Int64. + + A Decimal. + An Int64. + + + + Converts a Double to an Int64. + + A Double. + An Int64. + + + + Converts a Single to an Int64. + + A Single. + An Int64. + + + + Converts an Int32 to an Int64. + + An Int32. + An Int64. + + + + Converts an Int64 to an Int64. + + An Int64. + An Int64. + + + + Converts an Int16 to an Int64. + + An Int16. + An Int64. + + + + Converts a UInt32 to an Int64. + + A UInt32. + An Int64. + + + + Converts a UInt64 to an Int64. + + A UInt64. + An Int64. + + + + Converts a UInt16 to an Int64. + + A UInt16. + An Int64. + + + + Converts a Double to a Single. + + A Double. + A Single. + + + + Converts an Int32 to a Single. + + An Int32. + A Single. + + + + Converts an Int64 to a Single. + + An Int64. + A Single. + + + + Converts a Double to a UInt16. + + A Double. + A UInt16. + + + + Converts an Int32 to a UInt16. + + An Int32. + A UInt16. + + + + Converts an Int64 to a UInt16. + + An Int64. + A UInt16. + + + + Converts a Double to a UInt32. + + A Double. + A UInt32. + + + + Converts an Int32 to a UInt32. + + An Int32. + A UInt32. + + + + Converts an Int64 to a UInt32. + + An Int64. + A UInt32. + + + + Converts a Double to a UInt64. + + A Double. + A UInt64. + + + + Converts an Int32 to a UInt64. + + An Int32. + A UInt64. + + + + Converts an Int64 to a UInt64. + + An Int64. + A UInt64. + + + + Gets the external representation. + + + + + Gets whether to allow overflow. + + + + + Gets whether to allow truncation. + + + + + Represents a serializer for BsonArrays. + + + + + Initializes a new instance of the BsonArraySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonArraySerializer class. + + + + + Represents a serializer for BsonBinaryDatas. + + + + + Initializes a new instance of the BsonBinaryDataSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonBinaryDataSerializer class. + + + + + Represents a serializer for BsonBooleans. + + + + + Initializes a new instance of the BsonBooleanSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonBooleanSerializer class. + + + + + Represents a serializer for BsonDateTimes. + + + + + Initializes a new instance of the BsonDateTimeSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonDateTimeSerializer class. + + + + + Represents a serializer for BsonDocuments. + + + + + Initializes a new instance of the BsonDocumentSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Gets the document Id. + + The document. + The Id. + The nominal type of the Id. + The IdGenerator for the Id type. + True if the document has an Id. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Sets the document Id. + + The document. + The Id. + + + + Gets an instance of the BsonDocumentSerializer class. + + + + + Represents a serializer for BsonDocumentWrappers. + + + + + Initializes a new instance of the BsonDocumentWrapperSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonDocumentWrapperSerializer class. + + + + + Represents a serializer for BsonDoubles. + + + + + Initializes a new instance of the BsonDoubleSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonDoubleSerializer class. + + + + + Represents a serializer for BsonInt32s. + + + + + Initializes a new instance of the BsonInt32Serializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonInt32Serializer class. + + + + + Represents a serializer for BsonInt64s. + + + + + Initializes a new instance of the BsonInt64Serializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonInt64Serializer class. + + + + + Represents a serializer for BsonJavaScripts. + + + + + Initializes a new instance of the BsonJavaScriptSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonJavaScriptSerializer class. + + + + + Represents a serializer for BsonJavaScriptWithScopes. + + + + + Initializes a new instance of the BsonJavaScriptWithScopeSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonJavaScriptWithScopeSerializer class. + + + + + Represents a serializer for BsonMaxKeys. + + + + + Initializes a new instance of the BsonMaxKeySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonMaxKeySerializer class. + + + + + Represents a serializer for BsonMinKeys. + + + + + Initializes a new instance of the BsonMinKeySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonMinKeySerializer class. + + + + + Represents a serializer for BsonNulls. + + + + + Initializes a new instance of the BsonNullSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonNullSerializer class. + + + + + Represents a serializer for BsonObjectIds. + + + + + Initializes a new instance of the BsonObjectIdSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonObjectIdSerializer class. + + + + + Represents a serializer for BsonRegularExpressions. + + + + + Initializes a new instance of the BsonRegularExpressionSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonRegularExpressionSerializer class. + + + + + Represents a serializer for BsonStrings. + + + + + Initializes a new instance of the BsonStringSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonStringSerializer class. + + + + + Represents a serializer for BsonSymbols. + + + + + Initializes a new instance of the BsonSymbolSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonSymbolSerializer class. + + + + + Represents a serializer for BsonTimestamps. + + + + + Initializes a new instance of the BsonTimestampSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonTimestampSerializer class. + + + + + Represents a serializer for BsonUndefineds. + + + + + Initializes a new instance of the BsonUndefinedSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonUndefinedSerializer class. + + + + + Represents a serializer for BsonValues. + + + + + Initializes a new instance of the BsonValueSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the BsonValueSerializer class. + + + + + Represents a BSON boolean value. + + + + + Converts a bool to a BsonBoolean. + + A bool. + A BsonBoolean. + + + + Returns one of the two possible BsonBoolean values. + + The bool value. + The corresponding BsonBoolean value. + + + + Returns one of the two possible BsonBoolean values. + + An object to be mapped to a BsonBoolean. + A BsonBoolean or null. + + + + Compares this BsonBoolean to another BsonBoolean. + + The other BsonBoolean. + A 32-bit signed integer that indicates whether this BsonBoolean is less than, equal to, or greather than the other. + + + + Compares the BsonBoolean to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonBoolean is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonBoolean to another BsonBoolean. + + The other BsonBoolean. + True if the two BsonBoolean values are equal. + + + + Compares this BsonBoolean to another object. + + The other object. + True if the other object is a BsonBoolean and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the instance of BsonBoolean that represents false. + + + + + Gets the instance of BsonBoolean that represents true. + + + + + Gets the BsonBoolean as a bool. + + + + + Gets the value of this BsonBoolean. + + + + + Represents a BSON array. + + + + + Initializes a new instance of the BsonArray class. + + + + + Initializes a new instance of the BsonArray class. + + A list of values to add to the array. + + + + Initializes a new instance of the BsonArray class. + + A list of values to add to the array. + + + + Initializes a new instance of the BsonArray class. + + A list of values to add to the array. + + + + Initializes a new instance of the BsonArray class. + + A list of values to add to the array. + + + + Initializes a new instance of the BsonArray class. + + A list of values to add to the array. + + + + Initializes a new instance of the BsonArray class. + + A list of values to add to the array. + + + + Initializes a new instance of the BsonArray class. + + A list of values to add to the array. + + + + Initializes a new instance of the BsonArray class. + + A list of values to add to the array. + + + + Initializes a new instance of the BsonArray class. + + A list of values to add to the array. + + + + Initializes a new instance of the BsonArray class. + + The initial capacity of the array. + + + + Creates a new BsonArray. + + A list of values to add to the array. + A BsonArray or null. + + + + Creates a new BsonArray. + + A list of values to add to the array. + A BsonArray or null. + + + + Creates a new BsonArray. + + A list of values to add to the array. + A BsonArray or null. + + + + Creates a new BsonArray. + + A list of values to add to the array. + A BsonArray or null. + + + + Creates a new BsonArray. + + A list of values to add to the array. + A BsonArray or null. + + + + Creates a new BsonArray. + + A list of values to add to the array. + A BsonArray or null. + + + + Creates a new BsonArray. + + A list of values to add to the array. + A BsonArray or null. + + + + Creates a new BsonArray. + + A list of values to add to the array. + A BsonArray or null. + + + + Creates a new BsonArray. + + A list of values to add to the array. + A BsonArray or null. + + + + Creates a new BsonArray. + + A value to be mapped to a BsonArray. + A BsonArray or null. + + + + Reads a BsonArray from a BsonReader. + + The reader. + A BsonArray. + + + + Adds an element to the array. + + The value to add to the array. + The array (so method calls can be chained). + + + + Adds multiple elements to the array. + + A list of values to add to the array. + The array (so method calls can be chained). + + + + Adds multiple elements to the array. + + A list of values to add to the array. + The array (so method calls can be chained). + + + + Adds multiple elements to the array. + + A list of values to add to the array. + The array (so method calls can be chained). + + + + Adds multiple elements to the array. + + A list of values to add to the array. + The array (so method calls can be chained). + + + + Adds multiple elements to the array. + + A list of values to add to the array. + The array (so method calls can be chained). + + + + Adds multiple elements to the array. + + A list of values to add to the array. + The array (so method calls can be chained). + + + + Adds multiple elements to the array. + + A list of values to add to the array. + The array (so method calls can be chained). + + + + Adds multiple elements to the array. + + A list of values to add to the array. + The array (so method calls can be chained). + + + + Adds multiple elements to the array. + + A list of values to add to the array. + The array (so method calls can be chained). + + + + Creates a shallow clone of the array (see also DeepClone). + + A shallow clone of the array. + + + + Clears the array. + + + + + Compares the array to another array. + + The other array. + A 32-bit signed integer that indicates whether this array is less than, equal to, or greather than the other. + + + + Compares the array to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this array is less than, equal to, or greather than the other BsonValue. + + + + Tests whether the array contains a value. + + The value to test for. + True if the array contains the value. + + + + Copies elements from this array to another array. + + The other array. + The zero based index of the other array at which to start copying. + + + + Copies elements from this array to another array as raw values (see BsonValue.RawValue). + + The other array. + The zero based index of the other array at which to start copying. + + + + Creates a deep clone of the array (see also Clone). + + A deep clone of the array. + + + + Compares this array to another array. + + The other array. + True if the two arrays are equal. + + + + Compares this BsonArray to another object. + + The other object. + True if the other object is a BsonArray and equal to this one. + + + + Gets an enumerator that can enumerate the elements of the array. + + An enumerator. + + + + Gets the hash code. + + The hash code. + + + + Gets the index of a value in the array. + + The value to search for. + The zero based index of the value (or -1 if not found). + + + + Gets the index of a value in the array. + + The value to search for. + The zero based index at which to start the search. + The zero based index of the value (or -1 if not found). + + + + Gets the index of a value in the array. + + The value to search for. + The zero based index at which to start the search. + The number of elements to search. + The zero based index of the value (or -1 if not found). + + + + Inserts a new value into the array. + + The zero based index at which to insert the new value. + The new value. + + + + Removes the first occurrence of a value from the array. + + The value to remove. + True if the value was removed. + + + + Removes an element from the array. + + The zero based index of the element to remove. + + + + Converts the BsonArray to an array of BsonValues. + + An array of BsonValues. + + + + Converts the BsonArray to a list of BsonValues. + + A list of BsonValues. + + + + Returns a string representation of the array. + + A string representation of the array. + + + + Writes the array to a BsonWriter. + + The writer. + + + + Gets or sets the total number of elements the internal data structure can hold without resizing. + + + + + Gets the count of array elements. + + + + + Gets whether the array is read-only. + + + + + Gets the array elements as raw values (see BsonValue.RawValue). + + + + + Gets the array elements. + + + + + Gets or sets an array element. + + The zero based index of the element. + The value of the element. + + + + Represents a mapping between a class and a BSON document. + + + + + Initializes a new instance of the BsonClassMap class. + + The class type. + + + + Gets the type of a member. + + The member info. + The type of the member. + + + + Gets a loadable type name (like AssemblyQualifiedName but shortened when possible) + + The type. + The type name. + + + + Checks whether a class map is registered for a type. + + The type to check. + True if there is a class map registered for the type. + + + + Looks up a class map (will AutoMap the class if no class map is registered). + + The class type. + The class map. + + + + Looks up the conventions profile for a type. + + The type. + The conventions profile for that type. + + + + Creates and registers a class map. + + The class. + The class map. + + + + Creates and registers a class map. + + The class. + The class map initializer. + The class map. + + + + Registers a class map. + + The class map. + + + + Registers a conventions profile. + + The conventions profile. + The filter function that determines which types this profile applies to. + + + + Automaps the class. + + + + + Creates an instance of the class. + + An object. + + + + Freezes the class map. + + The class map. + + + + Gets a member map. + + The member name. + The member map. + + + + Gets the member map for a BSON element. + + The name of the element. + The member map. + + + + Creates a member map for the extra elements field and adds it to the class map. + + The name of the extra elements field. + The member map (so method calls can be chained). + + + + Creates a member map for the extra elements member and adds it to the class map. + + The member info for the extra elements member. + The member map (so method calls can be chained). + + + + Creates a member map for the extra elements property and adds it to the class map. + + The name of the property. + The member map (so method calls can be chained). + + + + Creates a member map for a field and adds it to the class map. + + The name of the field. + The member map (so method calls can be chained). + + + + Creates a member map for the Id field and adds it to the class map. + + The name of the Id field. + The member map (so method calls can be chained). + + + + Creates a member map for the Id member and adds it to the class map. + + The member info for the Id member. + The member map (so method calls can be chained). + + + + Creates a member map for the Id property and adds it to the class map. + + The name of the Id property. + The member map (so method calls can be chained). + + + + Creates a member map for a member and adds it to the class map. + + The member info. + The member map (so method calls can be chained). + + + + Creates a member map for a property and adds it to the class map. + + The name of the property. + The member map (so method calls can be chained). + + + + Sets the discriminator. + + The discriminator. + + + + Sets whether a discriminator is required when serializing this class. + + Whether a discriminator is required. + + + + Sets the member map of the member used to hold extra elements. + + The extra elements member map. + + + + Sets the Id member. + + The Id member. + + + + Sets whether extra elements should be ignored when deserializing. + + Whether extra elements should be ignored when deserializing. + + + + Sets whether this class is a root class. + + Whether this class is a root class. + + + + Removes the member map for a field from the class map. + + The name of the field. + + + + Removes a member map from the class map. + + The member info. + + + + Removes the member map for a property from the class map. + + The name of the property. + + + + Gets the base class map. + + + + + Gets the class type. + + + + + Gets the discriminator. + + + + + Gets whether a discriminator is required when serializing this class. + + + + + Gets the member map of the member used to hold extra elements. + + + + + Gets whether this class has a root class ancestor. + + + + + Gets the Id member map. + + + + + Gets whether extra elements should be ignored when deserializing. + + + + + Gets whether this class is anonymous. + + + + + Gets whether the class map is frozen. + + + + + Gets whether this class is a root class. + + + + + Gets the known types of this class. + + + + + Gets the member maps. + + + + + Represents a mapping between a class and a BSON document. + + The class. + + + + Initializes a new instance of the BsonClassMap class. + + + + + Initializes a new instance of the BsonClassMap class. + + The class map initializer. + + + + Gets a member map. + + The member type. + A lambda expression specifying the member. + The member map. + + + + Creates a member map for the extra elements field and adds it to the class map. + + The member type. + A lambda expression specifying the extra elements field. + The member map. + + + + Creates a member map for the extra elements member and adds it to the class map. + + The member type. + A lambda expression specifying the extra elements member. + The member map. + + + + Creates a member map for the extra elements property and adds it to the class map. + + The member type. + A lambda expression specifying the extra elements property. + The member map. + + + + Creates a member map for a field and adds it to the class map. + + The member type. + A lambda expression specifying the field. + The member map. + + + + Creates a member map for the Id field and adds it to the class map. + + The member type. + A lambda expression specifying the Id field. + The member map. + + + + Creates a member map for the Id member and adds it to the class map. + + The member type. + A lambda expression specifying the Id member. + The member map. + + + + Creates a member map for the Id property and adds it to the class map. + + The member type. + A lambda expression specifying the Id property. + The member map. + + + + Creates a member map and adds it to the class map. + + The member type. + A lambda expression specifying the member. + The member map. + + + + Creates a member map for the Id property and adds it to the class map. + + The member type. + A lambda expression specifying the Id property. + The member map. + + + + Removes the member map for a field from the class map. + + The member type. + A lambda expression specifying the field. + + + + Removes a member map from the class map. + + The member type. + A lambda expression specifying the member. + + + + Removes a member map for a property from the class map. + + The member type. + A lambda expression specifying the property. + + + + Represents a serializer for nullable values. + + + + + Initializes a new instance of the NullableSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Represents an element name convention. + + + + + Gets the element name for a member. + + The member. + The element name. + + + + Represents an element name convention where the element name is the same as the member name. + + + + + Gets the element name for a member. + + The member. + The element name. + + + + Represents an element name convention where the element name is the member name with the first character lower cased. + + + + + Gets the element name for a member. + + The member. + The element name. + + + + Represents a default value convention. + + + + + Gets the default value for a member. + + The member. + The default value. + + + + Represents a default value convention of null. + + + + + Gets the default value for a member. + + The member. + null. + + + + Specifies the external representation and related options for this field or property. + + + + + Initializes a new instance of the BsonRepresentationAttribute class. + + The external representation. + + + + Gets the serialization options specified by this attribute. + + The serialization options. + + + + Gets the external representation. + + + + + Gets or sets whether to allow overflow. + + + + + Gets or sets whether to allow truncation. + + + + + Represents a BSON int value. + + + + + Creates a new instance of the BsonInt32 class. + + The value. + + + + Converts an int to a BsonInt32. + + An int. + A BsonInt32. + + + + Creates a new instance of the BsonInt32 class. + + An int. + A BsonInt32. + + + + Creates a new BsonInt32. + + An object to be mapped to a BsonInt32. + A BsonInt32 or null. + + + + Compares this BsonInt32 to another BsonInt32. + + The other BsonInt32. + A 32-bit signed integer that indicates whether this BsonInt32 is less than, equal to, or greather than the other. + + + + Compares the BsonInt32 to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonInt32 is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonInt32 to another BsonInt32. + + The other BsonInt32. + True if the two BsonInt32 values are equal. + + + + Compares this BsonInt32 to another object. + + The other object. + True if the other object is a BsonInt32 and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets an instance of BsonInt32 that represents -1. + + + + + Gets an instance of BsonInt32 that represents -0. + + + + + Gets an instance of BsonInt32 that represents 1. + + + + + Gets an instance of BsonInt32 that represents 2. + + + + + Gets an instance of BsonInt32 that represents 3. + + + + + Gets the BsonInt32 as an int. + + + + + Gets the value of this BsonInt32. + + + + + Represents the BSON Null value. + + + + + Compares this BsonNull to another BsonNull. + + The other BsonNull. + A 32-bit signed integer that indicates whether this BsonNull is less than, equal to, or greather than the other. + + + + Compares the BsonNull to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonNull is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonNull to another BsonNull. + + The other BsonNull. + True if the two BsonNull values are equal. + + + + Compares this BsonNull to another object. + + The other object. + True if the other object is a BsonNull and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the singleton instance of BsonNull. + + + + + Represents a BSON DateTime value. + + + + + Initializes a new instance of the BsonDateTime class. + + A DateTime. + + + + Initializes a new instance of the BsonDateTime class. + + Milliseconds since Unix Epoch. + + + + Converts a DateTime to a BsonDateTime. + + A DateTime. + A BsonDateTime. + + + + Creates a new BsonDateTime. + + A DateTime. + A BsonDateTime. + + + + Creates a new BsonDateTime. + + A DateTime. + Milliseconds since Unix Epoch. + + + + Creates a new BsonDateTime. + + An object to be mapped to a BsonDateTime. + A BsonDateTime or null. + + + + Compares this BsonDateTime to another BsonDateTime. + + The other BsonDateTime. + A 32-bit signed integer that indicates whether this BsonDateTime is less than, equal to, or greather than the other. + + + + Compares the BsonDateTime to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonDateTime is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonDateTime to another BsonDateTime. + + The other BsonDateTime. + True if the two BsonDateTime values are equal. + + + + Compares this BsonDateTime to another object. + + The other object. + True if the other object is a BsonDateTime and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets whether this BsonDateTime is a valid .NET DateTime. + + + + + Gets the number of milliseconds since the Unix Epoch. + + + + + Gets the number of milliseconds since the Unix Epoch. + + + + + Gets the DateTime value. + + + + + Represents settings for a BsonBinaryReader. + + + + + Initializes a new instance of the BsonBinaryReaderSettings class. + + + + + Initializes a new instance of the BsonBinaryReaderSettings class. + + Whether to close the input stream when the reader is closed. + Whether to fix occurrences of the old binary subtype on input. + Whether to fix occurrences of the old representation of DateTime.MaxValue on input. + The representation for Guids. + The max document size. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Gets or sets the default settings for a BsonBinaryReader. + + + + + Gets or sets whether to close the input stream when the reader is closed. + + + + + Gets or sets whether to fix occurrences of the old binary subtype on input. + + + + + Gets or sets whether to fix occurrences of the old representation of DateTime.MaxValue on input. + + + + + Gets or sets the max document size. + + + + + Represents an ignore extra elements convention. + + + + + Determines whether to ignore extra elements for a class. + + The class. + Whether to ignore extra elements. + + + + Represents an ignore extra elements convention where extra elements are never ignored. + + + + + Determines whether to ignore extra elements for a class. + + The class. + Whether to ignore extra elements. + + + + Represents an ignore extra elements convention where extra elements are always ignored. + + + + + Determines whether to ignore extra elements for a class. + + The class. + Whether to ignore extra elements. + + + + Represents a serialize default value convention. + + + + + Determines whether to serialize the default value for a member. + + The member. + Whether to serialize the default value. + + + + Represents a serialize default value convention where default values are never serialized. + + + + + Determines whether to serialize the default value for a member. + + The member. + Whether to serialize the default value. + + + + Represents a serialize default value convention where default values are always serialized. + + + + + Determines whether to serialize the default value for a member. + + The member. + Whether to serialize the default value. + + + + Represents a bookmark that can be used to return a reader to the current position and state. + + + + + Represents a BSON symbol value. + + + + + Converts a string to a BsonSymbol. + + A string. + A BsonSymbol. + + + + Creates a new BsonSymbol. + + An object to be mapped to a BsonSymbol. + A BsonSymbol or null. + + + + Creates a new instance of the BsonSymbol class. + + A string. + A BsonSymbol. + + + + Compares this BsonSymbol to another BsonSymbol. + + The other BsonSymbol. + A 32-bit signed integer that indicates whether this BsonSymbol is less than, equal to, or greather than the other. + + + + Compares the BsonSymbol to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonSymbol is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonSymbol to another BsonSymbol. + + The other BsonSymbol. + True if the two BsonSymbol values are equal. + + + + Compares this BsonSymbol to another object. + + The other object. + True if the other object is a BsonSymbol and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the name of the symbol. + + + + + Represents settings for a BsonBinaryWriter. + + + + + Initializes a new instance of the BsonBinaryWriterSettings class. + + + + + Initializes a new instance of the BsonBinaryWriterSettings class. + + Whether to close the output stream when the writer is closed. + Whether to fix old binary data subtype on output. + The representation for Guids. + The max document size. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Gets or sets the default BsonBinaryWriter settings. + + + + + Gets or sets whether to close the output when the writer is closed. + + + + + Gets or sets whether to fix the old binary data subtype on output. + + + + + Gets or sets the max document size. + + + + + Represents a BSON long value. + + + + + Initializes a new instance of the BsonInt64 class. + + The value. + + + + Converts a long to a BsonInt64. + + A long. + A BsonInt64. + + + + Creates a new instance of the BsonInt64 class. + + A long. + A BsonInt64. + + + + Creates a new BsonInt64. + + An object to be mapped to a BsonInt64. + A BsonInt64 or null. + + + + Compares this BsonInt64 to another BsonInt64. + + The other BsonInt64. + A 32-bit signed integer that indicates whether this BsonInt64 is less than, equal to, or greather than the other. + + + + Compares the BsonInt64 to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonInt64 is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonInt64 to another BsonInt64. + + The other BsonInt64. + True if the two BsonInt64 values are equal. + + + + Compares this BsonInt64 to another object. + + The other object. + True if the other object is a BsonInt64 and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the BsonInt64 as a long. + + + + + Gets the value of this BsonInt64. + + + + + Represents a serializer for enumerable values. + + + + + Initializes a new instance of the EnumerableSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the EnumerableSerializer class. + + + + + Represents a serializer for Queues. + + + + + Initializes a new instance of the QueueSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the QueueSerializer class. + + + + + Represents a serializer for Stacks. + + + + + Initializes a new instance of the StackSerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the StackSerializer class. + + + + + A static class containing methods to convert to and from Guids and byte arrays in various byte orders. + + + + + Converts a byte array to a Guid. + + The byte array. + The representation of the Guid in the byte array. + A Guid. + + + + Converts a Guid to a byte array. + + The Guid. + The representation of the Guid in the byte array. + A byte array. + + + + Represents the symbol table of BsonSymbols. + + + + + Looks up a symbol (and creates a new one if necessary). + + The name of the symbol. + The symbol. + + + + Represents a BSON double value. + + + + + Initializes a new instance of the BsonDouble class. + + The value. + + + + Converts a double to a BsonDouble. + + A double. + A BsonDouble. + + + + Creates a new instance of the BsonDouble class. + + A double. + A BsonDouble. + + + + Creates a new instance of the BsonDouble class. + + An object to be mapped to a BsonDouble. + A BsonDouble. + + + + Compares this BsonDouble to another BsonDouble. + + The other BsonDouble. + A 32-bit signed integer that indicates whether this BsonDouble is less than, equal to, or greather than the other. + + + + Compares the BsonDouble to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonDouble is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonDouble to another BsonDouble. + + The other BsonDouble. + True if the two BsonDouble values are equal. + + + + Compares this BsonDouble to another object. + + The other object. + True if the other object is a BsonDouble and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the BsonDouble as a double. + + + + + Gets the value of this BsonDouble. + + + + + Represents a BSON writer to a BsonDocument. + + + + + Initializes a new instance of the BsonDocumentWriter class. + + The document to write to (normally starts out as an empty document). + The settings. + + + + Closes the writer. + + + + + Flushes any pending data to the output destination. + + + + + Writes BSON binary data to the writer. + + The binary data. + The binary data subtype. + The representation for Guids. + + + + Writes a BSON Boolean to the writer. + + The Boolean value. + + + + Writes a BSON DateTime to the writer. + + The number of milliseconds since the Unix epoch. + + + + Writes a BSON Double to the writer. + + The Double value. + + + + Writes the end of a BSON array to the writer. + + + + + Writes the end of a BSON document to the writer. + + + + + Writes a BSON Int32 to the writer. + + The Int32 value. + + + + Writes a BSON Int64 to the writer. + + The Int64 value. + + + + Writes a BSON JavaScript to the writer. + + The JavaScript code. + + + + Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope). + + The JavaScript code. + + + + Writes a BSON MaxKey to the writer. + + + + + Writes a BSON MinKey to the writer. + + + + + Writes the name of an element to the writer. + + The name of the element. + + + + Writes a BSON null to the writer. + + + + + Writes a BSON ObjectId to the writer. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Writes a BSON regular expression to the writer. + + A regular expression pattern. + A regular expression options. + + + + Writes the start of a BSON array to the writer. + + + + + Writes the start of a BSON document to the writer. + + + + + Writes a BSON String to the writer. + + The String value. + + + + Writes a BSON Symbol to the writer. + + The symbol. + + + + Writes a BSON timestamp to the writer. + + The combined timestamp/increment value. + + + + Writes a BSON undefined to the writer. + + + + + Disposes of any resources used by the writer. + + True if called from Dispose. + + + + Gets the top level BsonDocument. + + + + + Represents a BSON reader for a BsonDocument. + + + + + Initializes a new instance of the BsonDocumentReader class. + + A BsonDocument. + The reader settings. + + + + Closes the reader. + + + + + Gets a bookmark to the reader's current position and state. + + A bookmark. + + + + Reads BSON binary data from the reader. + + The binary data. + The binary data subtype. + The representation for Guids. + + + + Reads a BSON boolean from the reader. + + A Boolean. + + + + Reads a BsonType from the reader. + + A BsonType. + + + + Reads a BSON DateTime from the reader. + + The number of milliseconds since the Unix epoch. + + + + Reads a BSON Double from the reader. + + A Double. + + + + Reads the end of a BSON array from the reader. + + + + + Reads the end of a BSON document from the reader. + + + + + Reads a BSON Int32 from the reader. + + An Int32. + + + + Reads a BSON Int64 from the reader. + + An Int64. + + + + Reads a BSON JavaScript from the reader. + + A string. + + + + Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope). + + A string. + + + + Reads a BSON MaxKey from the reader. + + + + + Reads a BSON MinKey from the reader. + + + + + Reads a BSON null from the reader. + + + + + Reads a BSON ObjectId from the reader. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Reads a BSON regular expression from the reader. + + A regular expression pattern. + A regular expression options. + + + + Reads the start of a BSON array. + + + + + Reads the start of a BSON document. + + + + + Reads a BSON string from the reader. + + A String. + + + + Reads a BSON symbol from the reader. + + A string. + + + + Reads a BSON timestamp from the reader. + + The combined timestamp/increment. + + + + Reads a BSON undefined from the reader. + + + + + Returns the reader to previously bookmarked position and state. + + The bookmark. + + + + Skips the name (reader must be positioned on a name). + + + + + Skips the value (reader must be positioned on a value). + + + + + Disposes of any resources used by the reader. + + True if called from Dispose. + + + + Represents serialization options for a document. + + + + + Initializes a new instance of the DocumentSerializationOptions class. + + Whether to serialize the Id as the first element. + + + + Gets or sets the default document serialization options. + + + + + Gets an instance of DocumentSerializationOptions that specifies to serialize the Id as the first element. + + + + + Gets whether to serialize the Id as the first element. + + + + + Represents settings for a JsonWriter. + + + + + Initializes a new instance of the JsonWriterSettings class. + + + + + Initializes a new instance of the JsonWriterSettings class. + + Whether to close the output when the writer is closed. + The output Encoding. + The representation for Guids. + Whether to indent the output. + The indentation characters. + The new line characters. + The output mode. + The version of the shell to target. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Gets or sets the default JsonWriterSettings. + + + + + Gets or sets whether to close the output when the writer is closed. + + + + + Gets or sets the output Encoding. + + + + + Gets or sets whether to indent the output. + + + + + Gets or sets the indent characters. + + + + + Gets or sets the new line characters. + + + + + Gets or sets the output mode. + + + + + Gets or sets the shell version (used with OutputMode Shell). + + + + + Represents a serializer for dictionaries. + + + + + Initializes a new instance of the DictionarySerializer class. + + + + + Deserializes an object from a BsonReader. + + The BsonReader. + The nominal type of the object. + The actual type of the object. + The serialization options. + An object. + + + + Serializes an object to a BsonWriter. + + The BsonWriter. + The nominal type. + The object. + The serialization options. + + + + Gets an instance of the DictionarySerializer class. + + + + + Specifies serialization options for a DateTime field or property. + + + + + Initializes a new instance of the BsonDateTimeOptionsAttribute class. + + + + + Gets the serialization options specified by this attribute. + + The serialization options. + + + + Gets or sets whether the DateTime consists of a Date only. + + + + + Gets or sets the DateTimeKind (Local, Unspecified or Utc). + + + + + Gets or sets the external representation. + + + + + Represents settings for a JsonReader. + + + + + Initializes a new instance of the JsonReaderSettings class. + + + + + Initializes a new instance of the JsonReaderSettings class. + + Whether to close the input stream when the reader is closed. + The representation for Guids. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Gets or sets the default settings for a JsonReader. + + + + + Gets or sets whether to close the input stream when the reader is closed. + + + + + Represents the default serialization provider. + + + + + Initializes a new instance of the BsonDefaultSerializer class. + + + + + Returns whether the given type has any discriminators registered for any of its subclasses. + + A Type. + True if the type is discriminated. + + + + Looks up the actual type of an object to be deserialized. + + The nominal type of the object. + The discriminator. + The actual type of the object. + + + + Looks up the discriminator convention for a type. + + The type. + A discriminator convention. + + + + Registers the discriminator for a type. + + The type. + The discriminator. + + + + Registers the discriminator convention for a type. + + Type type. + The discriminator convention. + + + + Gets the serializer for a type. + + The type. + The serializer. + + + + Gets an instance of the BsonDefaultSerializer class. + + + + + Represents a BSON regular expression value. + + + + + Initializes a new instance of the BsonRegularExpression class. + + A regular expression pattern. + + + + Initializes a new instance of the BsonRegularExpression class. + + A regular expression pattern. + Regular expression options. + + + + Initializes a new instance of the BsonRegularExpression class. + + A Regex. + + + + Converts a Regex to a BsonRegularExpression. + + A Regex. + A BsonRegularExpression. + + + + Converts a string to a BsonRegularExpression. + + A string. + A BsonRegularExpression. + + + + Creates a new BsonRegularExpression. + + An object to be mapped to a BsonRegularExpression. + A BsonRegularExpression or null. + + + + Creates a new instance of the BsonRegularExpression class. + + A Regex. + A BsonRegularExpression. + + + + Creates a new instance of the BsonRegularExpression class. + + A regular expression pattern. + A BsonRegularExpression. + + + + Creates a new instance of the BsonRegularExpression class. + + A regular expression pattern. + Regular expression options. + A BsonRegularExpression. + + + + Compares this BsonRegularExpression to another BsonRegularExpression. + + The other BsonRegularExpression. + A 32-bit signed integer that indicates whether this BsonRegularExpression is less than, equal to, or greather than the other. + + + + Compares the BsonRegularExpression to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonRegularExpression is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonRegularExpression to another BsonRegularExpression. + + The other BsonRegularExpression. + True if the two BsonRegularExpression values are equal. + + + + Compares this BsonRegularExpression to another object. + + The other object. + True if the other object is a BsonRegularExpression and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Converts the BsonRegularExpression to a Regex. + + A Regex. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the regular expression pattern. + + + + + Gets the regular expression options. + + + + + Represents a BSON ObjectId value (see also ObjectId). + + + + + Initializes a new instance of the BsonObjectId class. + + The value. + + + + Initializes a new instance of the BsonObjectId class. + + The value. + + + + Initializes a new instance of the BsonObjectId class. + + The timestamp. + The machine hash. + The PID. + The increment. + + + + Initializes a new instance of the BsonObjectId class. + + The value. + + + + Converts an ObjectId to a BsonObjectId. + + An ObjectId. + A BsonObjectId. + + + + Creates a new instance of the BsonObjectId class. + + An ObjectId. + A BsonObjectId. + + + + Creates a new instance of the BsonObjectId class. + + A byte array. + A BsonObjectId. + + + + Creates a new instance of the BsonObjectId class. + + The timestamp. + The machine hash. + The pid. + The increment. + A BsonObjectId. + + + + Creates a new BsonObjectId. + + An object to be mapped to a BsonObjectId. + A BsonObjectId or null. + + + + Creates a new instance of the BsonObjectId class. + + A string. + A BsonObjectId. + + + + Generates a new BsonObjectId with a unique value. + + A BsonObjectId. + + + + Parses a string and creates a new BsonObjectId. + + The string value. + A BsonObjectId. + + + + Tries to parse a string and create a new BsonObjectId. + + The string value. + The new BsonObjectId. + True if the string was parsed successfully. + + + + Compares this BsonObjectId to another BsonObjectId. + + The other BsonObjectId. + A 32-bit signed integer that indicates whether this BsonObjectId is less than, equal to, or greather than the other. + + + + Compares the BsonObjectId to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonObjectId is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonObjectId to another BsonObjectId. + + The other BsonObjectId. + True if the two BsonObjectId values are equal. + + + + Compares this BsonObjectId to another object. + + The other object. + True if the other object is a BsonObjectId and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Converts the BsonObjectId to a byte array. + + A byte array. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets an instance of BsonObjectId where the value is empty. + + + + + Gets the timestamp. + + + + + Gets the machine. + + + + + Gets the PID. + + + + + Gets the increment. + + + + + Gets the creation time (derived from the timestamp). + + + + + Gets the BsonObjectId as an ObjectId. + + + + + Gets the value of this BsonObjectId. + + + + + Represents a BSON timestamp value. + + + + + Initializes a new instance of the BsonTimestamp class. + + The combined timestamp/increment value. + + + + Initializes a new instance of the BsonTimestamp class. + + The timestamp. + The increment. + + + + Creates a new instance of the BsonTimestamp class. + + The combined timestamp/increment value. + A BsonTimestamp. + + + + Creates a new instance of the BsonTimestamp class. + + The timestamp. + The increment. + A BsonTimestamp. + + + + Creates a new BsonTimestamp. + + An object to be mapped to a BsonTimestamp. + A BsonTimestamp or null. + + + + Compares this BsonTimestamp to another BsonTimestamp. + + The other BsonTimestamp. + A 32-bit signed integer that indicates whether this BsonTimestamp is less than, equal to, or greather than the other. + + + + Compares the BsonTimestamp to another BsonValue. + + The other BsonValue. + A 32-bit signed integer that indicates whether this BsonTimestamp is less than, equal to, or greather than the other BsonValue. + + + + Compares this BsonTimestamp to another BsonTimestamp. + + The other BsonTimestamp. + True if the two BsonTimestamp values are equal. + + + + Compares this BsonTimestamp to another object. + + The other object. + True if the other object is a BsonTimestamp and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the value. + + A string representation of the value. + + + + Gets the value of this BsonTimestamp. + + + + + Gets the increment. + + + + + Gets the timestamp. + + + + + Specifies whether extra elements should be ignored when this class is deserialized. + + + + + Initializes a new instance of the BsonIgnoreExtraElementsAttribute class. + + + + + Initializes a new instance of the BsonIgnoreExtraElementsAttribute class. + + Whether extra elements should be ignored when this class is deserialized. + + + + Gets whether extra elements should be ignored when this class is deserialized. + + + + + Represents an Id member convention. + + + + + Finds the Id member of a class. + + The class. + The name of the Id member. + + + + Represents an Id member convention where the Id member name is one of a set of possible Id member names. + + + + + Initializes a new instance of the NamedIdMemberConvention class. + + A set of possible Id member names. + + + + Finds the Id member of a class. + + The class. + The name of the Id member. + + + + Gets the set of possible Id member names. + + + + + Represents an Id generator convention. + + + + + Gets the Id generator for an Id member. + + The member. + An Id generator. + + + + Represents an Id generator convention where the Id generator is looked up based on the member type. + + + + + Gets the Id generator for an Id member. + + The member. + An Id generator. + + + + Represents serialization options for a DateTime value. + + + + + Initializes a new instance of the DateTimeSerializationOptions class. + + + + + Initializes a new instance of the DateTimeSerializationOptions class. + + Whether this DateTime consists of a Date only. + + + + Initializes a new instance of the DateTimeSerializationOptions class. + + Whether this DateTime consists of a Date only. + The external representation. + + + + Initializes a new instance of theDateTimeSerializationOptions class. + + The DateTimeKind (Local, Unspecified or Utc). + + + + Initializes a new instance of the DateTimeSerializationOptions class. + + The DateTimeKind (Local, Unspecified or Utc). + The external representation. + + + + Gets an instance of DateTimeSerializationOptions with DateOnly=true. + + + + + Gets or sets the default DateTime serialization options. + + + + + Gets an instance of DateTimeSerializationOptions with Kind=Local. + + + + + Gets an instance of DateTimeSerializationOptions with Kind=Utc. + + + + + Gets whether this DateTime consists of a Date only. + + + + + Gets the DateTimeKind (Local, Unspecified or Utc). + + + + + Gets the external representation. + + + + + An interface for custom mappers that map an object to a BsonValue. + + + + + Tries to map an object to a BsonValue. + + An object. + The BsonValue. + True if the mapping was successfull. + + + diff --git a/packages/mongocsharpdriver.1.2/lib/net35/MongoDB.Driver.XML b/packages/mongocsharpdriver.1.2/lib/net35/MongoDB.Driver.XML index a9a7cad..bb443fb 100644 --- a/packages/mongocsharpdriver.1.2/lib/net35/MongoDB.Driver.XML +++ b/packages/mongocsharpdriver.1.2/lib/net35/MongoDB.Driver.XML @@ -1,9459 +1,9459 @@ - - - - MongoDB.Driver - - - - - Represents a MongoDB internal exception (almost surely the result of a bug). - - - - - Represents a MongoDB exception. - - - - - Initializes a new instance of the MongoException class. - - The error message. - - - - Initializes a new instance of the MongoException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the MongoException class (this overload supports deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Initializes a new instance of the MongoInternalException class. - - The error message. - - - - Initializes a new instance of the MongoInternalException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the MongoInternalException class (this overload supports deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Represents a MongoDB connection exception. - - - - - Initializes a new instance of the MongoConnectionException class. - - The error message. - - - - Initializes a new instance of the MongoConnectionException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the MongoConnectionException class (this overload supports deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Represents a wrapped object that can be used where an IMongoGeoNearOptions is expected (the wrapped object is expected to serialize properly). - - - - - Abstract base class for wrapper classes. - - - - - Initializes a new instance of the BaseWrapper class. - - The wrapped object. - - - - Initializes a new instance of the BaseWrapper class. - - The nominal type of the wrapped object. - The wrapped object. - - - - Deserialize is an invalid operation for wrapper classes. - - Not applicable. - Not applicable. - Not applicable. - Not applicable. - - - - GetDocumentId is an invalid operation for wrapper classes. - - Not applicable. - Not applicable. - Not applicable. - Not applicable. - - - - Serializes a wrapped object to a BsonWriter. - - The writer. - The nominal type (ignored). - The serialization options. - - - - SetDocumentId is an invalid operation for wrapper classes. - - Not applicable. - - - - A marker interface that represents geo search options (see GeoNearOptionsDocument and the GeoNearOptions builder). - - - - - Initializes a new instance of the GeoNearOptionsWrapper class. - - The wrapped object. - - - - Creates a new instance of the GeoNearOptionsWrapper class. - - The wrapped object. - A new instance of GeoNearOptionsWrapper or null. - - - - A marker interface that represents a list of fields (see FieldsDocument and the Fields builder). - - - - - A builder for the options used when creating a collection. - - - - - Sets whether to automatically create an index on the _id element. - - Whether to automatically create an index on the _id element. - The builder (so method calls can be chained). - - - - Sets whether the collection is capped. - - Whether the collection is capped. - The builder (so method calls can be chained). - - - - Sets the max number of documents in a capped collection. - - The max number of documents. - The builder (so method calls can be chained). - - - - Sets the max size of a capped collection. - - The max size. - The builder (so method calls can be chained). - - - - Gets a null value with a type of IMongoCollectionOptions. - - - - - A builder for the options used when creating a collection. - - - - - Abstract base class for the builders. - - - - - Initializes a new instance of the BuilderBase class. - - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Returns a string representation of the settings. - - A string representation of the settings. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - A marker interface that represents options for creating a collection (see CollectionOptionsDocument and the CollectionOptions builder). - - - - - Initializes a new instance of the CollectionOptionsBuilder class. - - - - - Sets whether to automatically create an index on the _id element. - - Whether to automatically create an index on the _id element. - The builder (so method calls can be chained). - - - - Sets whether the collection is capped. - - Whether the collection is capped. - The builder (so method calls can be chained). - - - - Sets the max number of documents in a capped collection. - - The max number of documents. - The builder (so method calls can be chained). - - - - Sets the max size of a capped collection. - - The max size. - The builder (so method calls can be chained). - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - Default values for various Mongo settings. - - - - - Gets or sets whether the driver should assign a value to empty Ids on Insert. - - - - - Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize). - - - - - Gets or sets the connect timeout. - - - - - Gets or sets the representation to use for Guids (this is an alias for BsonDefaults.GuidRepresentation). - - - - - Gets or sets the max connection idle time. - - - - - Gets or sets the max connection life time. - - - - - Gets or sets the max connection pool size. - - - - - Gets or sets the max document size (this is an alias for BsonDefaults.MaxDocumentSize). - - - - - Gets or sets the max message length. - - - - - Gets or sets the min connection pool size. - - - - - Gets or sets the safe mode. - - - - - Gets or sets the socket timeout. - - - - - Gets or sets the TCP receive buffer size. - - - - - Gets or sets the TCP send buffer size. - - - - - Gets or sets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize, see also WaitQueueSize). - - - - - Gets or sets the wait queue size (see also WaitQueueMultiple). - - - - - Gets or sets the wait queue timeout. - - - - - Represents a BSON document that can be used where an IMongoSortBy is expected. - - - - - A marker interface that represents a sort order (see SortByDocument and the SortBy builder). - - - - - Initializes a new instance of the SortByDocument class. - - - - - Initializes a new instance of the SortByDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the SortByDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the SortByDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the SortByDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the SortByDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - Represents a BSON document that can be used where an IMongoCommand is expected. - - - - - Represents a BSON document that can be used where an IMongoQuery is expected. - - - - - A marker interface that represents a query (see QueryDocument and the Query builder). - - - - - Initializes a new instance of the QueryDocument class. - - - - - Initializes a new instance of the QueryDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the QueryDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the QueryDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the QueryDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the QueryDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - A marker interface that represents a command (see CommandDocument). - - - - - Initializes a new instance of the CommandDocument class. - - - - - Initializes a new instance of the CommandDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the CommandDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the CommandDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the CommandDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the CommandDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - A marker interface that represents options for a map/reduce operation (see MapReduceOptionsDocument and the MapReduceOptions builder). - - - - - A marker interface that represents options for creating an index (see IndexOptionsDocument and the IndexOptions builder). - - - - - Represents a MongoDB database and the settings used to access it. This class is thread-safe. - - - - - Creates a new instance of MongoDatabase. Normally you would call one of the indexers or GetDatabase methods - of MongoServer instead. - - The server that contains this database. - The settings to use to access this database. - - - - Creates a new instance or returns an existing instance of MongoDatabase. Only one instance - is created for each combination of database settings. Automatically creates an instance - of MongoServer if needed. - - Server and database settings in the form of a MongoConnectionStringBuilder. - - A new or existing instance of MongoDatabase. - - - - - Creates a new instance or returns an existing instance of MongoDatabase. Only one instance - is created for each combination of database settings. Automatically creates an instance - of MongoServer if needed. - - The server settings for the server that contains this database. - The name of this database (will be accessed using default settings). - - A new or existing instance of MongoDatabase. - - - - - Creates a new instance or returns an existing instance of MongoDatabase. Only one instance - is created for each combination of database settings. Automatically creates an instance - of MongoServer if needed. - - Server and database settings in the form of a MongoUrl. - - A new or existing instance of MongoDatabase. - - - - - Creates a new instance or returns an existing instance of MongoDatabase. Only one instance - is created for each combination of database settings. Automatically creates an instance - of MongoServer if needed. - - Server and database settings in the form of a connection string. - - A new or existing instance of MongoDatabase. - - - - - Creates a new instance or returns an existing instance of MongoDatabase. Only one instance - is created for each combination of database settings. Automatically creates an instance - of MongoServer if needed. - - Server and database settings in the form of a Uri. - - A new or existing instance of MongoDatabase. - - - - - Adds a user to this database. - - The user's credentials. - - - - Adds a user to this database. - - The user's credentials. - True if the user is a read-only user. - - - - Adds a user to this database. - - The user. - - - - Tests whether a collection exists on this database. - - The name of the collection. - True if the collection exists. - - - - Creates a collection. MongoDB creates collections automatically when they are first used, so - this command is mainly here for frameworks. - - The name of the collection. - A CommandResult. - - - - Creates a collection. MongoDB creates collections automatically when they are first used, so - you only need to call this method if you want to provide non-default options. - - The name of the collection. - Options for creating this collection (usually a CollectionOptionsDocument or constructed using the CollectionOptions builder). - A CommandResult. - - - - Creates an instance of MongoCollectionSettings for the named collection with the rest of the settings inherited. - You can override some of these settings before calling GetCollection. - - The default document type for this collection. - The name of this collection. - A MongoCollectionSettings. - - - - Creates an instance of MongoCollectionSettings for the named collection with the rest of the settings inherited. - You can override some of these settings before calling GetCollection. - - The default document type for this collection. - The name of this collection. - A MongoCollectionSettings. - - - - Drops a database. - - - - - Drops a collection. - - The name of the collection to drop. - A CommandResult. - - - - Evaluates JavaScript code at the server. - - Flags that control Eval options. - The code to evaluate. - Optional arguments (only used when the code is a function with parameters). - The result of evaluating the code. - - - - Evaluates JavaScript code at the server. - - The code to evaluate. - Optional arguments (only used when the code is a function with parameters). - The result of evaluating the code. - - - - Fetches the document referred to by the DBRef. - - The to fetch. - A BsonDocument (or null if the document was not found). - - - - Fetches the document referred to by the DBRef, deserialized as a . - - The nominal type of the document to fetch. - The to fetch. - A (or null if the document was not found). - - - - Fetches the document referred to by the DBRef. - - The nominal type of the document to fetch. - The to fetch. - An instance of nominalType (or null if the document was not found). - - - - Finds all users of this database. - - An array of users. - - - - Finds a user of this database. - - The username. - The user. - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of TDefaultDocument. - - The default document type for this collection. - The settings to use when accessing this collection. - An instance of MongoCollection. - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of TDefaultDocument. - - The name of the collection. - An instance of MongoCollection. - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of TDefaultDocument. - - The name of the collection. - The safe mode to use when accessing this collection. - An instance of MongoCollection. - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of TDefaultDocument. - - The settings to use when accessing this collection. - An instance of MongoCollection. - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of BsonDocument. - - The name of the collection. - An instance of MongoCollection. - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of BsonDocument. - - The name of the collection. - The safe mode to use when accessing this collection. - An instance of MongoCollection. - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of BsonDocument. - - The default document type. - The name of the collection. - An instance of MongoCollection. - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of BsonDocument. - - The default document type. - The name of the collection. - The safe mode to use when accessing this collection. - An instance of MongoCollection. - - - - Gets a list of the names of all the collections in this database. - - A list of collection names. - - - - Gets the current operation. - - The current operation. - - - - Gets an instance of MongoGridFS for this database using custom GridFS settings. - - The GridFS settings to use. - An instance of MongoGridFS. - - - - Gets a sister database on the same server. - - The name of the sister database. - An instance of MongoDatabase. - - - - Gets the current database stats. - - An instance of DatabaseStatsResult. - - - - Removes a user from this database. - - The user to remove. - - - - Removes a user from this database. - - The username to remove. - - - - Renames a collection on this database. - - The old name for the collection. - The new name for the collection. - A CommandResult. - - - - Renames a collection on this database. - - The old name for the collection. - The new name for the collection. - Whether to drop the target collection first if it already exists. - A CommandResult. - - - - Lets the server know that this thread is done with a series of related operations. Instead of calling this method it is better - to put the return value of RequestStart in a using statement. - - - - - Lets the server know that this thread is about to begin a series of related operations that must all occur - on the same connection. The return value of this method implements IDisposable and can be placed in a - using statement (in which case RequestDone will be called automatically when leaving the using statement). - - A helper object that implements IDisposable and calls from the Dispose method. - - - - Lets the server know that this thread is about to begin a series of related operations that must all occur - on the same connection. The return value of this method implements IDisposable and can be placed in a - using statement (in which case RequestDone will be called automatically when leaving the using statement). - - Whether queries should be sent to secondary servers. - A helper object that implements IDisposable and calls from the Dispose method. - - - - Removes all entries for this database in the index cache used by EnsureIndex. Call this method - when you know (or suspect) that a process other than this one may have dropped one or - more indexes. - - - - - Runs a command on this database. - - The command object. - A CommandResult - - - - Runs a command on this database. - - The name of the command. - A CommandResult - - - - Runs a command on this database and returns the result as a TCommandResult. - - The command object. - A TCommandResult - - - - Runs a command on this database and returns the result as a TCommandResult. - - The name of the command. - A TCommandResult - - - - Runs a command on this database and returns the result as a TCommandResult. - - The command result type. - The command object. - A TCommandResult - - - - Runs a command on this database and returns the result as a TCommandResult. - - The command result type. - The name of the command. - A TCommandResult - - - - Gets a canonical string representation for this database. - - A canonical string representation for this database. - - - - Gets the command collection for this database. - - - - - Gets the credentials being used to access this database. - - - - - Gets the default GridFS instance for this database. The default GridFS instance uses default GridFS - settings. See also GetGridFS if you need to use GridFS with custom settings. - - - - - Gets the name of this database. - - - - - Gets the server that contains this database. - - - - - Gets the settings being used to access this database. - - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of BsonDocument. - - The name of the collection. - An instance of MongoCollection. - - - - Gets a MongoCollection instance representing a collection on this database - with a default document type of BsonDocument. - - The name of the collection. - The safe mode to use when accessing this collection. - An instance of MongoCollection. - - - - Represents a MongoDB server (either a single instance or a replica set) and the settings used to access it. This class is thread-safe. - - - - - Creates a new instance of MongoServer. Normally you will use one of the Create methods instead - of the constructor to create instances of this class. - - The settings for this instance of MongoServer. - - - - Creates a new instance or returns an existing instance of MongoServer. Only one instance - is created for each combination of server settings. - - - A new or existing instance of MongoServer. - - - - - Creates a new instance or returns an existing instance of MongoServer. Only one instance - is created for each combination of server settings. - - Server settings in the form of a MongoConnectionStringBuilder. - - A new or existing instance of MongoServer. - - - - - Creates a new instance or returns an existing instance of MongoServer. Only one instance - is created for each combination of server settings. - - Server settings. - - A new or existing instance of MongoServer. - - - - - Creates a new instance or returns an existing instance of MongoServer. Only one instance - is created for each combination of server settings. - - Server settings in the form of a MongoUrl. - - A new or existing instance of MongoServer. - - - - - Creates a new instance or returns an existing instance of MongoServer. Only one instance - is created for each combination of server settings. - - Server settings in the form of a connection string. - - A new or existing instance of MongoServer. - - - - - Creates a new instance or returns an existing instance of MongoServer. Only one instance - is created for each combination of server settings. - - Server settings in the form of a Uri. - - A new or existing instance of MongoServer. - - - - - Unregisters a server from the dictionary used by Create to remember which servers have already been created. - - The server to unregister. - - - - Connects to the server. Normally there is no need to call this method as - the driver will connect to the server automatically when needed. - - - - - Connects to the server. Normally there is no need to call this method as - the driver will connect to the server automatically when needed. - - What to wait for before returning (when connecting to a replica set). - - - - Connects to the server. Normally there is no need to call this method as - the driver will connect to the server automatically when needed. - - How long to wait before timing out. - - - - Connects to the server. Normally there is no need to call this method as - the driver will connect to the server automatically when needed. - - How long to wait before timing out. - What to wait for before returning (when connecting to a replica set). - - - - Copies a database. - - The name of an existing database. - The name of the new database. - - - - Creates an instance of MongoDatabaseSettings for the named database with the rest of the settings inherited. - You can override some of these settings before calling GetDatabase. - - The name of the database. - An instance of MongoDatabase for . - - - - Tests whether a database exists. - - The name of the database. - True if the database exists. - - - - Disconnects from the server. Normally there is no need to call this method so - you should be sure to have a good reason to call it. - - - - - Drops a database. - - The name of the database to be dropped. - A . - - - - Fetches the document referred to by the DBRef. - - The to fetch. - A BsonDocument (or null if the document was not found). - - - - Fetches the document referred to by the DBRef, deserialized as a . - - The nominal type of the document to fetch. - The to fetch. - A (or null if the document was not found). - - - - Fetches the document referred to by the DBRef. - - The nominal type of the document to fetch. - The to fetch. - The document (or null if the document was not found). - - - - Gets a MongoDatabase instance representing the admin database on this server. Only one instance - is created for each combination of database settings. - - The credentials to use with the admin database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing the admin database on this server. Only one instance - is created for each combination of database settings. - - The credentials to use with the admin database. - The safe mode to use with the admin database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing the admin database on this server. Only one instance - is created for each combination of database settings. - - The safe mode to use with the admin database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The settings to use with this database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The name of the database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The name of the database. - The credentials to use with this database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The name of the database. - The credentials to use with this database. - The safe mode to use with this database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The name of the database. - The safe mode to use with this database. - A new or existing instance of MongoDatabase. - - - - Gets the names of the databases on this server. - - A list of database names. - - - - Gets the last error (if any) that occurred on this connection. You MUST be within a RequestStart to call this method. - - The last error () - - - - Checks whether the server is alive (throws an exception if not). If server is a replica set, pings all members one at a time. - - - - - Reconnects to the server. Normally there is no need to call this method. All connections - are closed and new connections will be opened as needed. Calling - this method frequently will result in connection thrashing. - - - - - Lets the server know that this thread is done with a series of related operations. Instead of calling this method it is better - to put the return value of RequestStart in a using statement. - - - - - Lets the server know that this thread is about to begin a series of related operations that must all occur - on the same connection. The return value of this method implements IDisposable and can be placed in a - using statement (in which case RequestDone will be called automatically when leaving the using statement). - - One of the databases involved in the related operations. - A helper object that implements IDisposable and calls from the Dispose method. - - - - Lets the server know that this thread is about to begin a series of related operations that must all occur - on the same connection. The return value of this method implements IDisposable and can be placed in a - using statement (in which case RequestDone will be called automatically when leaving the using statement). - - One of the databases involved in the related operations. - Whether queries should be sent to secondary servers. - A helper object that implements IDisposable and calls from the Dispose method. - - - - Removes all entries in the index cache used by EnsureIndex. Call this method - when you know (or suspect) that a process other than this one may have dropped one or - more indexes. - - - - - Runs a command on the admin database. - - The command to run. - The result of the command (see ). - - - - Runs a command on the admin database. - - The name of the command to run. - The result of the command (as a ). - - - - Runs a command on the admin database. - - The type to use for the command result. - The command to run. - The result of the command (as a ). - - - - Runs a command on the admin database. - - The type to use for the command result. - The name of the command to run. - The result of the command (as a ). - - - - Runs a command on the admin database. - - The type to use for the command result. - The command to run. - The result of the command. - - - - Runs a command on the admin database. - - The type to use for the command result. - The name of the command to run. - The result of the command. - - - - Shuts down the server. - - - - - Verifies the state of the server (in the case of a replica set all members are contacted one at a time). - - - - - Gets or sets the maximum number of instances of MongoServer that will be allowed to be created. - - - - - Gets the number of instances of MongoServer that have been created. - - - - - Gets the admin database for this server. - - - - - Gets the arbiter instances. - - - - - Gets the build info of the server. - - - - - Gets the most recent connection attempt number. - - - - - Gets the index cache (used by EnsureIndex) for this server. - - - - - Gets the one and only instance for this server. - - - - - Gets the instances for this server. - - - - - Gets the passive instances. - - - - - Gets the primary instance (null if there is no primary). - - - - - Gets the name of the replica set (null if not connected to a replica set). - - - - - Gets the connection reserved by the current RequestStart scope (null if not in the scope of a RequestStart). - - - - - Gets the RequestStart nesting level for the current thread. - - - - - Gets the secondary instances. - - - - - Gets the unique sequential Id for this server. - - - - - Gets the settings for this server. - - - - - Gets the current state of this server (as of the last operation, not updated until another operation is performed). - - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The name of the database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The name of the database. - The credentials to use with this database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The settings to use with this database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The name of the database. - The credentials to use with this database. - The safe mode to use with this database. - A new or existing instance of MongoDatabase. - - - - Gets a MongoDatabase instance representing a database on this server. Only one instance - is created for each combination of database settings. - - The name of the database. - The safe mode to use with this database. - A new or existing instance of MongoDatabase. - - - - Represents the state of a connection. - - - - - The connection has not yet been initialized. - - - - - The connection is open. - - - - - The connection is closed. - - - - - Represents a connection to a MongoServerInstance. - - - - - Gets the connection pool that this connection belongs to. - - - - - Gets the DateTime that this connection was created at. - - - - - Gets the generation of the connection pool that this connection belongs to. - - - - - Gets the DateTime that this connection was last used at. - - - - - Gets a count of the number of messages that have been sent using this connection. - - - - - Gets the RequestId of the last message sent on this connection. - - - - - Gets the server instance this connection is connected to. - - - - - Gets the state of this connection. - - - - - Represents a wrapped object that can be used where an IMongoUpdate is expected (the wrapped object is expected to serialize properly). - - - - - A marker interface that represents an update modifier (see UpdateDocument and the Update builder). - - - - - Initializes a new instance of the UpdateWrapper class. - - The nominal type of the wrapped object. - The wrapped object. - - - - Creates a new instance of the UpdateWrapper class (this overload is used when the update - modifier is a replacement document). - - The nominal type of the wrapped object. - The wrapped object. - A new instance of UpdateWrapper or null. - - - - Creates a new instance of the UpdateWrapper class. - - The nominal type of the wrapped object. - The wrapped object. - A new instance of UpdateWrapper or null. - - - - Represents a BSON document that can be used where an IMongoGeoNearOptions is expected. - - - - - Initializes a new instance of the GeoNearOptionsDocument class. - - - - - Initializes a new instance of the GeoNearOptionsDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the GeoNearOptionsDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the GeoNearOptionsDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the GeoNearOptionsDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - Represents the options to use for an Insert or InsertBatch operation - - - - - Initializes a new instance of the MongoInsertOptions class. - - The collection from which to get default settings for the options. - - - - Gets or sets whether to check element names before proceeding with the Insert. - - - - - Gets or sets the SafeMode to use for the Insert. - - - - - Represents the results of the collection stats command. - - - - - Represents the result of a command (there are also subclasses for various commands). - - - - - Initializes a new instance of the CommandResult class. - - - - - Initializes a new instance of the CommandResult class. - - The command. - The response. - - - - Initializes an existing instance of the CommandResult class. - - The command. - The response. - - - - Gets the command. - - - - - Gets the command name. - - - - - Gets the response. - - - - - Gets the error message (null if none). - - - - - Gets the Ok value from the response. - - - - - Initializes a new instance of the CollectionStatsResult class. - - - - - Gets the average object size. - - - - - Gets the data size. - - - - - Gets the extent count. - - - - - Gets the flags. - - - - - Gets the index count. - - - - - Gets the index sizes. - - - - - Gets whether the collection is capped. - - - - - Gets the last extent size. - - - - - Gets the index count. - - - - - Gets the namespace. - - - - - Gets the object count. - - - - - Gets the padding factor. - - - - - Gets the storage size. - - - - - Gets the total index size. - - - - - Represents a collection of index sizes. - - - - - Initializes a new instance of the IndexSizesResult class. - - The index sizes document. - - - - Tests whether the results contain the size of an index. - - The name of the index. - True if the results contain the size of the index. - - - - Gets the size of an index. - - The name of the index. - The size of the index. - - - - Gets the count of indexes. - - - - - Gets the names of the indexes. - - - - - Gets the sizes of the indexes. - - - - - A builder for specifying which fields of a document the server should return. - - - - - Adds one or more field names to be excluded from the results. - - One or more field names. - The builder (so method calls can be chained). - - - - Adds one or more field names to be included in the results. - - One or more field names. - The builder (so method calls can be chained). - - - - Adds a slice to be included in the results. - - The name of the field to slice. - The size of the slice (negative sizes are taken from the end). - The builder (so method calls can be chained). - - - - Adds a slice to be included in the results. - - The name of the field to slice. - The number of values to skip. - The number of values to extract. - The builder (so method calls can be chained). - - - - Gets a null value with a type of IMongoFields. - - - - - A builder for specifying which fields of a document the server should return. - - - - - Initializes a new instance of the FieldsBuilder class. - - - - - Adds one or more field names to be excluded from the results. - - One or more field names. - The builder (so method calls can be chained). - - - - Adds one or more field names to be included in the results. - - One or more field names. - The builder (so method calls can be chained). - - - - Adds a slice to be included in the results. - - The name of the field to slice. - The size of the slice (negative sizes are taken from the end). - The builder (so method calls can be chained). - - - - Adds a slice to be included in the results. - - The name of the field to slice. - The number of values to skip. - The number of values to extract. - The builder (so method calls can be chained). - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - Represents a BSON document that can be used where an IMongoFields is expected. - - - - - Initializes a new instance of the FieldsDocument class. - - - - - Initializes a new instance of the FieldsDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the FieldsDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the FieldsDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the FieldsDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the FieldsDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - Represents a wrapped object that can be used where an IMongoIndexOptions is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the IndexOptionsWrapper class. - - The wrapped object. - - - - Creates a new instance of the IndexOptionsWrapper class. - - The wrapped object. - A new instance of IndexOptionsWrapper or null. - - - - Represents a BSON document that can be used where an IMongoIndexOptions is expected. - - - - - Initializes a new instance of the IndexOptionsDocument class. - - - - - Initializes a new instance of the IndexOptionsDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the IndexOptionsDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the IndexOptionsDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the IndexOptionsDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the IndexOptionsDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - A builder for the options of the GeoNear command. - - - - - Sets the distance multiplier. - - The distance multiplier. - The builder (so method calls can be chained). - - - - Sets the max distance. - - The max distance. - The builder (so method calls can be chained). - - - - Sets whether to use a spherical search. - - Whether to use a spherical search. - The builder (so method calls can be chained). - - - - Gets a null value with a type of IMongoGeoNearOptions. - - - - - A builder for the options of the GeoNear command. - - - - - Initializes a new instance of the GeoNearOptionsBuilder class. - - - - - Sets the distance multiplier. - - The distance multiplier. - The builder (so method calls can be chained). - - - - Sets the max distance. - - The max distance. - The builder (so method calls can be chained). - - - - Sets whether to use a spherical search. - - Whether to use a spherical search. - The builder (so method calls can be chained). - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - Represents information about a GridFS file (patterned after .NET's FileInfo class). - - - - - Initializes a new instance of the GridFSFileInfo class. - - The GridFS file system that contains the GridFS file. - The remote file name. - - - - Initializes a new instance of the GridFSFileInfo class. - - The GridFS file system that contains the GridFS file. - The remote file name. - The chunk size. - - - - Initializes a new instance of the GridFSFileInfo class. - - The GridFS file system that contains the GridFS file. - The remote file name. - The create options. - - - - Compares two MongoGridFSFileInfos. - - The first MongoGridFSFileInfo. - The other MongoGridFSFileInfo. - True if the two MongoGridFSFileInfos are not equal (or one is null and the other is not). - - - - Compares two MongoGridFSFileInfos. - - The first MongoGridFSFileInfo. - The other MongoGridFSFileInfo. - True if the two MongoGridFSFileInfos are equal (or both null). - - - - Appends UTF-8 encoded text to an existing GridFS file. - - A StreamWriter. - - - - Copies a GridFS file. - - The destination file name. - The file info of the new GridFS file. - - - - Copies a GridFS file. - - The destination file name. - The create options. - The file info of the new GridFS file. - - - - Creates or overwrites a GridFS file. - - A stream. - - - - Creates or opens a GridFS file for writing UTF-8 encoded text. - - A stream. - - - - Deletes a GridFS file. - - - - - Compares this MongoGridFSFileInfo to another MongoGridFSFileInfo. - - The other MongoGridFSFileInfo. - True if the two MongoGridFSFileInfos are equal. - - - - Compares this MongoGridFSFileInfo to another object. - - The other object. - True if the other object is a MongoGridFSFileInfo and equal to this one. - - - - Gets the hash code. - - The hash code. - - - - Moves the most recent version of a GridFS file. - - The destination file name. - - - - Opens a GridFS file with the specified mode. - - The mode. - A stream. - - - - Opens a GridFS file with the specified mode and access. - - The mode. - The access. - A stream. - - - - Opens an existing GridFS file for reading. - - A stream. - - - - Opens an existing UTF-8 encoded text GridFS file for reading. - - A stream reader. - - - - Opens an existing GridFS file for writing. - - A stream. - - - - Refreshes the GridFS file info from the server. - - - - - Gets the aliases. - - - - - Gets the chunk size. - - - - - Gets the content type. - - - - - Gets whether the GridFS file exists. - - - - - Gets the GridFS file system that contains this GridFS file. - - - - - Gets the GridFS file Id. - - - - - Gets the file lenth. - - - - - Gets the MD5 hash of the file contents. - - - - - Gets the metadata. - - - - - Gets the remote file name. - - - - - Gets the upload date. - - - - - Represents a MongoDB authentication exception - - - - - Initializes a new instance of the MongoAuthenticationException class. - - The error message. - - - - Initializes a new instance of the MongoAuthenticationException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the MongoAuthenticationException class (this overload supports deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Represents a BSON document that can be used where an IMongoUpdate is expected. - - - - - Initializes a new instance of the UpdateDocument class. - - - - - Initializes a new instance of the UpdateDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the UpdateDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the UpdateDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the UpdateDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the UpdateDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - Represents a wrapped object that can be used where an IMongoQuery is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the QueryWrapper class. - - The wrapped object. - - - - Creates a new instance of the QueryWrapper class. - - The wrapped object. - A new instance of QueryWrapper or null. - - - - Represents a wrapped object that can be used where an IMongoCommand is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the CommandWrapper class. - - The wrapped object. - - - - Creates a new instance of the CommandWrapper class. - - The wrapped object. - A new instance of CommandWrapper or null. - - - - Represents a MongoDB GridFS exception. - - - - - Initializes a new instance of the MongoGridFSException class. - - The error message. - - - - Initializes a new instance of the MongoGridFSException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the MongoGridFSException class (this overload supports deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Represents a wrapped object that can be used where an IMongoMapReduceOptions is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the MapReduceOptionsWrapper class. - - The wrapped object. - - - - Creates a new instance of the MapReduceOptionsWrapper class. - - The wrapped object. - A new instance of MapReduceOptionsWrapper or null. - - - - Represents a MongoDB user. - - - - - Creates a new instance of MongoUser. - - The user's credentials. - Whether the user has read-only access. - - - - Creates a new instance of MongoUser. - - The username. - The password hash. - Whether the user has read-only access. - - - - Calculates the password hash. - - The username. - The password. - - - - - Returns a string representation of the credentials. - - A string representation of the user. - - - - Gets or sets the username. - - - - - Gets or sets the password hash. - - - - - Gets or sets whether the user is a read-only user. - - - - - Represents the result of a GeoNear command. - - - - - Initializes a new instance of the GeoNearResult class. - - - - - Gets the hits. - - - - - Gets the namespace. - - - - - Gets the stats. - - - - - Gets the hits. - - - - - Represents a collection of GeoNear hits. - - - - - Initializes a new instance of the GeoNearHits class. - - - - - Gets an enumerator for the hits. - - An enumerator. - - - - Gets the enumerator. - - - - - - Gets an individual hit. - - The zero based index of the hit. - The hit. - - - - Gets the count of the number of hits. - - - - - Gets an individual hit. - - The zero based index of the hit. - The hit. - - - - Represents a GeoNear hit. - - - - - Initializes a new instance of the GeoNearHit class. - - The hit. - - - - Gets the distance. - - - - - Gets the document. - - - - - Gets the document as a BsonDocument. - - - - - Gets the document. - - - - - Represents the stats of a GeoNear command. - - - - - Initializes a new instance of the GeoNearStats class. - - The stats. - - - - Gets the average distance. - - - - - Gets the count of b-tree locations. - - - - - Gets the duration. - - - - - Gets the max distance. - - - - - Gets the number of documents scanned. - - - - - Gets the number of documents loaded. - - - - - Represents the result of a GeoNear command. - - The type of the returned documents. - - - - Initializes a new instance of the GeoNearResult class. - - - - - Gets the hits. - - - - - Gets the hits. - - - - - Represents a collection of GeoNear hits. - - - - - Initializes a new instance of the GeoNearHits class. - - The hits. - - - - Gets an enumerator for the hits. - - An enumerator. - - - - Gets a hit. - - The zero based index of the hit. - The hit. - - - - Gets an enumerator for the hits. - - An enumerator. - - - - Gets the count of the number of hits. - - - - - Gets an individual hit. - - The zero based index of the hit. - The hit. - - - - Represents a GeoNear hit. - - - - - Initializes a new instance of the GeoNearHit class. - - The hit. - - - - Gets the document. - - - - - Gets the document. - - - - - Represents the output options of a map/reduce operation. - - - - - Allows strings to be implicitly used as the name of the output collection. - - The output collection name. - A MapReduceOutput. - - - - Gets a MapReduceOutput value that specifies that the output should be stored in a collection (replaces the entire collection). - - The output collection name. - A MapReduceOutput. - - - - Gets a MapReduceOutput value that specifies that the output should be stored in a collection (replaces the entire collection). - - The output database name. - The output collection name. - A MapReduceOutput. - - - - Gets a MapReduceOutput value that specifies that the output should be stored in a collection (adding new values and overwriting existing ones). - - The output collection name. - A MapReduceOutput. - - - - Gets a MapReduceOutput value that specifies that the output should be stored in a collection (adding new values and overwriting existing ones). - - The output database name. - The output collection name. - A MapReduceOutput. - - - - Gets a MapReduceOutput value that specifies that the output should be stored in a collection (using the reduce function to combine new values with existing values). - - The output collection name. - A MapReduceOutput. - - - - Gets a MapReduceOutput value that specifies that the output should be stored in a collection (using the reduce function to combine new values with existing values). - - The output database name. - The output collection name. - A MapReduceOutput. - - - - Gets a MapReduceOutput value that specifies that the output should returned inline. - - - - - A builder for the options of a Map/Reduce operation. - - - - - Sets the finalize function. - - The finalize function. - The builder (so method calls can be chained). - - - - Sets whether to keep the temp collection (obsolete in 1.8.0+). - - Whether to keep the temp collection. - The builder (so method calls can be chained). - - - - Sets the number of documents to send to the map function (useful in combination with SetSortOrder). - - The number of documents to send to the map function. - The builder (so method calls can be chained). - - - - Sets the output option (see MapReduceOutput). - - The output option. - The builder (so method calls can be chained). - - - - Sets the optional query that filters which documents are sent to the map function (also useful in combination with SetSortOrder and SetLimit). - - The query. - The builder (so method calls can be chained). - - - - Sets a scope that contains variables that can be accessed by the map, reduce and finalize functions. - - The scope. - The builder (so method calls can be chained). - - - - Sets the sort order (useful in combination with SetLimit, your map function should not depend on the order the documents are sent to it). - - The sort order. - The builder (so method calls can be chained). - - - - Sets the sort order (useful in combination with SetLimit, your map function should not depend on the order the documents are sent to it). - - The names of the keys to sort by. - The builder (so method calls can be chained). - - - - Sets whether the server should be more verbose when logging map/reduce operations. - - Whether the server should be more verbose. - The builder (so method calls can be chained). - - - - Gets a null value with a type of IMongoMapReduceOptions. - - - - - A builder for the options of a Map/Reduce operation. - - - - - Initializes a new instance of the MapReduceOptionsBuilder class. - - - - - Sets the finalize function. - - The finalize function. - The builder (so method calls can be chained). - - - - Sets whether to keep the temp collection (obsolete in 1.8.0+). - - Whether to keep the temp collection. - The builder (so method calls can be chained). - - - - Sets the number of documents to send to the map function (useful in combination with SetSortOrder). - - The number of documents to send to the map function. - The builder (so method calls can be chained). - - - - Sets the output option (see MapReduceOutput). - - The output option. - The builder (so method calls can be chained). - - - - Sets the optional query that filters which documents are sent to the map function (also useful in combination with SetSortOrder and SetLimit). - - The query. - The builder (so method calls can be chained). - - - - Sets a scope that contains variables that can be accessed by the map, reduce and finalize functions. - - The scope. - The builder (so method calls can be chained). - - - - Sets the sort order (useful in combination with SetLimit, your map function should not depend on the order the documents are sent to it). - - The sort order. - The builder (so method calls can be chained). - - - - Sets the sort order (useful in combination with SetLimit, your map function should not depend on the order the documents are sent to it). - - The names of the keys to sort by. - The builder (so method calls can be chained). - - - - Sets whether the server should be more verbose when logging map/reduce operations. - - Whether the server should be more verbose. - The builder (so method calls can be chained). - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - Flags used with the Remove method of MongoCollection. - - - - - No flags. - - - - - Remove only a single document. - - - - - Represents setting for GridFS. - - - - - Initializes a new instance of the MongoGridFSSettings class. - - - - - Initializes a new instance of the MongoGridFSSettings class. - - The chunk size. - The root collection name. - The safe mode. - - - - Compares two MongoGridFSSettings. - - The first MongoGridFSSettings. - The other MongoGridFSSettings. - True if the two MongoGridFSSettings are not equal (or one is null and the other is not). - - - - Compares two MongoGridFSSettingss. - - The first MongoGridFSSettings. - The other MongoGridFSSettings. - True if the two MongoGridFSSettings are equal (or both null). - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Compares this MongoGridFSSettings to another one. - - The other MongoGridFSSettings. - True if the two settings are equal. - - - - Compares this MongoGridFSSettings to another object. - - The other object. - True if the other objects is a MongoGridFSSettings and is equal to this one. - - - - Freezes the settings. - - The settings. - - - - Gets the hash code. - - The hash code. - - - - Gets or sets the default GridFS settings. - - - - - Gets the chunks collection name. - - - - - Gets or sets the chunk size. - - - - - Gets the files collection name. - - - - - Gets whether the settings are frozen. - - - - - Gets or sets the root collection name (the files and chunks collection names are derived from the root). - - - - - Gets or sets the safe mode. - - - - - A marker interface that represents what to group by (see GroupByDocument and the GroupBy builder). - - - - - Represents the result of the database stats command. - - - - - Initializes a new instance of the DatabaseStatsResult class. - - - - - Gets the average object size. - - - - - Gets the collection count. - - - - - Gets the data size. - - - - - Gets the extent count. - - - - - Gets the file size. - - - - - Gets the index count. - - - - - Gets the index size. - - - - - Gets the object count. - - - - - Gets the storage size. - - - - - A builder for creating update modifiers. - - - - - Adds a value to a named array element if the value is not already in the array (see $addToSet). - - The name of the array element. - The value to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The values to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The values to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The values to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The wrapped values to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The wrapped values to add to the set. - The builder (so method calls can be chained). - - - - Adds a wrapped value to a named array element if the value is not already in the array (see $addToSet). - - The name of the array element. - The wrapped value to add to the set. - The builder (so method calls can be chained). - - - - Sets the named element to the bitwise and of its value with another value (see $bit with "and"). - - The name of the element to be modified. - The value to be and-ed with the current value. - The builder (so method calls can be chained). - - - - Sets the named element to the bitwise and of its value with another value (see $bit with "and"). - - The name of the element to be modified. - The value to be and-ed with the current value. - The builder (so method calls can be chained). - - - - Sets the named element to the bitwise or of its value with another value (see $bit with "or"). - - The name of the element to be modified. - The value to be or-ed with the current value. - The builder (so method calls can be chained). - - - - Sets the named element to the bitwise or of its value with another value (see $bit with "or"). - - The name of the element to be modified. - The value to be or-ed with the current value. - The builder (so method calls can be chained). - - - - Combines several UpdateBuilders into a single UpdateBuilder. - - The UpdateBuilders to combine. - A combined UpdateBuilder. - - - - Combines several UpdateBuilders into a single UpdateBuilder. - - The UpdateBuilders to combine. - A combined UpdateBuilder. - - - - Increments the named element by a value (see $inc). - - The name of the element to be incremented. - The value to increment by. - The builder (so method calls can be chained). - - - - Increments the named element by a value (see $inc). - - The name of the element to be incremented. - The value to increment by. - The builder (so method calls can be chained). - - - - Increments the named element by a value (see $inc). - - The name of the element to be incremented. - The value to increment by. - The builder (so method calls can be chained). - - - - Removes the first value from the named array element (see $pop). - - The name of the array element. - The builder (so method calls can be chained). - - - - Removes the last value from the named array element (see $pop). - - The name of the array element. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to some value (see $pull). - - The name of the array element. - The value to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that match some query (see $pull). - - The name of the array element. - A query that specifies which elements to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of values (see $pullAll). - - The name of the array element. - The values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of values (see $pullAll). - - The name of the array element. - The values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of values (see $pullAll). - - The name of the array element. - The values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll). - - The name of the array element. - The wrapped values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll). - - The name of the array element. - The wrapped values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to some wrapped value (see $pull). - - The name of the array element. - The wrapped value to remove. - The builder (so method calls can be chained). - - - - Adds a value to the end of the named array element (see $push). - - The name of the array element. - The value to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of values to the end of the named array element (see $pushAll). - - The name of the array element. - The values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of values to the end of the named array element (see $pushAll). - - The name of the array element. - The values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of values to the end of the named array element (see $pushAll). - - The name of the array element. - The values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of wrapped values to the end of the named array element (see $pushAll). - - The name of the array element. - The wrapped values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of wrapped values to the end of the named array element (see $pushAll). - - The name of the array element. - The wrapped values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a wrapped value to the end of the named array element (see $push). - - The name of the array element. - The wrapped value to add to the end of the array. - The builder (so method calls can be chained). - - - - Renames an element (see $rename). - - The name of the element to be renamed. - The new name of the element. - An UpdateDocuemnt. - - - - Replaces the entire document with a new document (the _id must remain the same). - - The nominal type of the replacement document - The replacement document. - An UpdateWrapper. - - - - Replaces the entire document with a new document (the _id must remain the same). - - The nominal type of the replacement document - The replacement document. - An UpdateWrapper. - - - - Sets the value of the named element to a new value (see $set). - - The name of the element to be set. - The new value. - The builder (so method calls can be chained). - - - - Sets the value of the named element to a new wrapped value (see $set). - - The name of the element to be set. - The new wrapped value. - The builder (so method calls can be chained). - - - - Removes the named element from the document (see $unset). - - The name of the element to be removed. - The builder (so method calls can be chained). - - - - A builder for creating update modifiers. - - - - - Initializes a new instance of the UpdateBuilder class. - - - - - Adds a value to a named array element if the value is not already in the array (see $addToSet). - - The name of the array element. - The value to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The values to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The values to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The values to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The wrapped values to add to the set. - The builder (so method calls can be chained). - - - - Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each). - - The name of the array element. - The wrapped values to add to the set. - The builder (so method calls can be chained). - - - - Adds a wrapped value to a named array element if the value is not already in the array (see $addToSet). - - The name of the array element. - The wrapped value to add to the set. - The builder (so method calls can be chained). - - - - Sets the named element to the bitwise and of its value with another value (see $bit with "and"). - - The name of the element to be modified. - The value to be and-ed with the current value. - The builder (so method calls can be chained). - - - - Sets the named element to the bitwise and of its value with another value (see $bit with "and"). - - The name of the element to be modified. - The value to be and-ed with the current value. - The builder (so method calls can be chained). - - - - Sets the named element to the bitwise or of its value with another value (see $bit with "or"). - - The name of the element to be modified. - The value to be or-ed with the current value. - The builder (so method calls can be chained). - - - - Sets the named element to the bitwise or of its value with another value (see $bit with "or"). - - The name of the element to be modified. - The value to be or-ed with the current value. - The builder (so method calls can be chained). - - - - Combines another UpdateBuilder into this one. - - The UpdateBuilder to combine into this one. - A combined UpdateBuilder. - - - - Increments the named element by a value (see $inc). - - The name of the element to be incremented. - The value to increment by. - The builder (so method calls can be chained). - - - - Increments the named element by a value (see $inc). - - The name of the element to be incremented. - The value to increment by. - The builder (so method calls can be chained). - - - - Increments the named element by a value (see $inc). - - The name of the element to be incremented. - The value to increment by. - The builder (so method calls can be chained). - - - - Removes the first value from the named array element (see $pop). - - The name of the array element. - The builder (so method calls can be chained). - - - - Removes the last value from the named array element (see $pop). - - The name of the array element. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to some value (see $pull). - - The name of the array element. - The value to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that match some query (see $pull). - - The name of the array element. - A query that specifies which elements to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of values (see $pullAll). - - The name of the array element. - The values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of values (see $pullAll). - - The name of the array element. - The values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of values (see $pullAll). - - The name of the array element. - The values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll). - - The name of the array element. - The wrapped values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll). - - The name of the array element. - The wrapped values to remove. - The builder (so method calls can be chained). - - - - Removes all values from the named array element that are equal to some wrapped value (see $pull). - - The name of the array element. - The wrapped value to remove. - The builder (so method calls can be chained). - - - - Adds a value to the end of the named array element (see $push). - - The name of the array element. - The value to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of values to the end of the named array element (see $pushAll). - - The name of the array element. - The values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of values to the end of the named array element (see $pushAll). - - The name of the array element. - The values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of values to the end of the named array element (see $pushAll). - - The name of the array element. - The values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of wrapped values to the end of the named array element (see $pushAll). - - The name of the array element. - The wrapped values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a list of wrapped values to the end of the named array element (see $pushAll). - - The name of the array element. - The wrapped values to add to the end of the array. - The builder (so method calls can be chained). - - - - Adds a wrapped value to the end of the named array element (see $push). - - The name of the array element. - The wrapped value to add to the end of the array. - The builder (so method calls can be chained). - - - - Renames an element (see $rename). - - The old element name. - The new element name. - The builder (so method calls can be chained). - - - - Sets the value of the named element to a new value (see $set). - - The name of the element to be set. - The new value. - The builder (so method calls can be chained). - - - - Sets the value of the named element to a new wrapped value (see $set). - - The name of the element to be set. - The new wrapped value. - The builder (so method calls can be chained). - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Removes the named element from the document (see $unset). - - The name of the element to be removed. - The builder (so method calls can be chained). - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - The address of a MongoDB server. - - - - - Initializes a new instance of MongoServerAddress. - - The server's host name. - - - - Initializes a new instance of MongoServerAddress. - - The server's host name. - The server's port number. - - - - Parses a string representation of a server address. - - The string representation of a server address. - A new instance of MongoServerAddress initialized with values parsed from the string. - - - - Tries to parse a string representation of a server address. - - The string representation of a server address. - The server address (set to null if TryParse fails). - True if the string is parsed succesfully. - - - - Compares two server addresses. - - The first address. - The other address. - True if the two addresses are equal (or both are null). - - - - Compares two server addresses. - - The first address. - The other address. - True if the two addresses are not equal (or one is null and the other is not). - - - - Compares two server addresses. - - The first server address. - The other server address. - True if the two server addresses are equal (or both are null). - - - - Compares two server addresses. - - The other server address. - True if the two server addresses are equal. - - - - Compares two server addresses. - - The other server address. - True if the two server addresses are equal. - - - - Gets the hash code for this object. - - The hash code. - - - - Returns a string representation of the server address. - - A string representation of the server address. - - - - Returns the server address as an IPEndPoint (does a DNS lookup). - - The IPEndPoint of the server. - - - - Gets the server's host name. - - - - - Gets the server's port number. - - - - - Represents a BSON document that can be used where an IMongoMapReduceOptions is expected. - - - - - Initializes a new instance of the MapReduceOptionsDocument class. - - - - - Initializes a new instance of the MapReduceOptionsDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the MapReduceOptionsDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the MapReduceOptionsDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the MapReduceOptionsDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - A builder for specifying what the GroupBy command should group by. - - - - - Sets a key function. - - The key function. - A BsonJavaScript. - - - - Sets one or more key names. - - One or more key names. - The builder (so method calls can be chained). - - - - A builder for specifying what the GroupBy command should group by. - - - - - Initializes a new instance of the GroupByBuilder class. - - One or more key names. - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - Represents the result of a map/reduce command. - - - - - Initializes a new instance of the MapReduceResult class. - - - - - Gets the inline results as TDocuments. - - The type of the documents. - The documents. - - - - Gets the inline results as TDocuments. - - The type of the documents. - The documents. - - - - Gets the results (either inline or fetched from the output collection). - - The documents. - - - - Gets the results as TDocuments (either inline or fetched from the output collection). - - The type of the documents. - The documents. - - - - Gets the results as TDocuments (either inline or fetched from the output collection). - - The type of the documents. - The documents. - - - - Gets the output collection name (null if none). - - - - - Gets the output database name (null if none). - - - - - Gets the duration. - - - - - Gets the emit count. - - - - - Gets the output count. - - - - - Gets the inline results. - - - - - Gets the input count. - - - - - Flags used with queries (see the SetQueryFlags method of MongoCursor). - - - - - No flags. - - - - - This cursor should be tailable. - - - - - It's OK for the query to be handled by a secondary server. - - - - - Tell the server not to let the cursor timeout. - - - - - Tell the server to wait for data to become available before returning (only used with TailableCursor). - - - - - Tell the server to send all the data at once (in multiple messages if necessary) without waiting for GetMore messages. - - - - - Allow partial results in a sharded system if some of the shards are down. - - - - - The state of a MongoServer instance. - - - - - Disconnected from the server. - - - - - Connecting to the server (in progress). - - - - - Connected to the server. - - - - - Connected to a subset of the replica set members. - - - - - The state is temporarily unknown. - - - - - Disconnecting from the server (in progress). - - - - - Represents a MongoDB command exception. - - - - - Initializes a new instance of the MongoCommandException class. - - The command result (an error message will be constructed using the result). - - - - Initializes a new instance of the MongoCommandException class. - - The error message. - - - - Initializes a new instance of the MongoCommandException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the MongoCommandException class. - - The error message. - The command result. - - - - Initializes a new instance of the MongoCommandException class (this overload supports deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Gets the command result. - - - - - Represents a wrapped object that can be used where an IMongoSortBy is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the SortByWrapper class. - - The wrapped object. - - - - Creates a new instance of the SortByWrapper class. - - The wrapped object. - A new instance of SortByWrapper or null. - - - - Represents a BSON document that can be used where an IMongoIndexKeys is expected. - - - - - A marker interface that represents the keys of an index (see IndexKeysDocument and the IndexKeys builder). - - - - - Initializes a new instance of the IndexKeysDocument class. - - - - - Initializes a new instance of the IndexKeysDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the IndexKeysDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the IndexKeysDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the IndexKeysDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the IndexKeysDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - The settings used to access a MongoDB server. - - - - - Creates a new instance of MongoServerSettings. Usually you would use a connection string instead. - - - - - Creates a new instance of MongoServerSettings. Usually you would use a connection string instead. - - The connection mode (Direct or ReplicaSet). - The connect timeout. - The default credentials. - The representation for Guids. - Whether to use IPv6. - The max connection idle time. - The max connection life time. - The max connection pool size. - The min connection pool size. - The name of the replica set. - The safe mode. - The server addresses (normally one unless it is the seed list for connecting to a replica set). - Whether queries should be sent to secondary servers. - The socket timeout. - The wait queue size. - The wait queue timeout. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Compares two MongoServerSettings instances. - - The other instance. - True if the two instances are equal. - - - - Freezes the settings to prevent any further changes to them. - - Itself. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the settings. - - A string representation of the settings. - - - - Gets the AddressFamily for the IPEndPoint (derived from the IPv6 setting). - - - - - Gets or sets the connection mode. - - - - - Gets or sets the connect timeout. - - - - - Gets or sets the default credentials. - - - - - Gets or sets the representation to use for Guids. - - - - - Gets whether the settings have been frozen to prevent further changes. - - - - - Gets or sets whether to use IPv6. - - - - - Gets or sets the max connection idle time. - - - - - Gets or sets the max connection life time. - - - - - Gets or sets the max connection pool size. - - - - - Gets or sets the min connection pool size. - - - - - Gets or sets the name of the replica set. - - - - - Gets or sets the SafeMode to use. - - - - - Gets or sets the address of the server (see also Servers if using more than one address). - - - - - Gets or sets the list of server addresses (see also Server if using only one address). - - - - - Gets or sets whether queries should be sent to secondary servers. - - - - - Gets or sets the socket timeout. - - - - - Gets or sets the wait queue size. - - - - - Gets or sets the wait queue timeout. - - - - - The settings used to access a database. - - - - - Creates a new instance of MongoDatabaseSettings. Usually you would call MongoServer.CreateDatabaseSettings instead. - - The name of the database. - The credentials to access the database. - The representation for Guids. - The safe mode to use. - Whether queries should be sent to secondary servers. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Compares two MongoDatabaseSettings instances. - - The other instance. - True if the two instances are equal. - - - - Freezes the settings to prevent any further changes to them. - - Itself. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the settings. - - A string representation of the settings. - - - - Gets or sets the credentials to access the database. - - - - - Gets the name of the database. - - - - - Gets or sets the representation to use for Guids. - - - - - Gets whether the settings have been frozen to prevent further changes. - - - - - Gets or sets the SafeMode to use. - - - - - Gets or sets whether queries should be sent to secondary servers. - - - - - The settings used to access a collection (an abstract class, see MongoCollectionSettings{TDefaultDocument}). - - - - - Creates a clone of the settings. - - A clone of the settings. - - - - Compares two MongoCollectionSettings instances. - - The other instance. - True if the two instances are equal. - - - - Freezes the settings to prevent any further changes to them. - - Itself. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the settings. - - A string representation of the settings. - - - - Gets or sets whether the driver should assign Id values when missing. - - - - - Gets the name of the collection. - - - - - Gets the default document type of the collection. - - - - - Gets or sets the representation used for Guids. - - - - - Gets whether the settings have been frozen to prevent further changes. - - - - - Gets or sets the SafeMode to use. - - - - - Gets or sets whether queries should be sent to secondary servers. - - - - - Settings used to access a collection. - - The default document type of the collection. - - - - Creates a new instance of MongoCollectionSettings. Usually you would call MongoDatabase.CreateCollectionSettings instead. - - The name of the collection. - Whether the driver should assign the Id values if necessary. - The representation for Guids. - The safe mode to use. - Whether queries should be sent to secondary servers. - - - - Creates a clone of the settings. - - A clone of the settings. - - - - A marker interface that represents a scope (a set of variables with values, see ScopeDocument). - - - - - Flags used with the Eval method in MongoDatabase. - - - - - No flags. - - - - - Do not take a write lock. - - - - - Represents the different safe modes that can be used. - - - - - Creates a new instance of SafeMode. - - Whether safe mode is enabled. - - - - Creates a new instance of SafeMode. - - Whether safe mode is enabled. - Whether the server should call fsync after each operation. - - - - Creates a new instance of SafeMode. - - Whether safe mode is enabled. - Whether the server should call fsync after each operation. - The number of write replications that should be completed before server returns. - - - - Creates a new instance of SafeMode. - - Whether safe mode is enabled. - Whether the server should call fsync after each operation. - The number of write replications that should be completed before server returns. - The timeout for each operation. - - - - Creates a new instance of SafeMode. - - The number of write replications that should be completed before server returns. - - - - Creates a new instance of SafeMode. - - The number of write replications that should be completed before server returns. - The timeout for each operation. - - - - Compares two SafeMode values. - - The first SafeMode value. - The other SafeMode value. - True if the values are equal (or both null). - - - - Compares two SafeMode values. - - The first SafeMode value. - The other SafeMode value. - True if the values are not equal (or one is null and the other is not). - - - - Creates a SafeMode instance (or returns an existing instance). - - Whether safe mode is enabled. - A SafeMode instance. - - - - Creates a SafeMode instance (or returns an existing instance). - - Whether safe mode is enabled. - Whether fysnc is true. - A SafeMode instance. - - - - Creates a SafeMode instance (or returns an existing instance). - - Whether safe mode is enabled. - Whether fysnc is true. - The number of write replications that should be completed before server returns. - A SafeMode instance. - - - - Creates a SafeMode instance (or returns an existing instance). - - Whether safe mode is enabled. - Whether fysnc is true. - The number of write replications that should be completed before server returns. - The timeout for each operation. - A SafeMode instance. - - - - Creates a SafeMode instance (or returns an existing instance). - - The number of write replications that should be completed before server returns. - A SafeMode instance. - - - - Creates a SafeMode instance (or returns an existing instance). - - The number of write replications that should be completed before server returns. - The timeout for each operation. - A SafeMode instance. - - - - Compares two SafeMode values. - - The other SafeMode value. - True if the values are equal. - - - - Compares two SafeMode values. - - The other SafeMode value. - True if the values are equal. - - - - Gets the hash code. - - The hash code. - - - - Returns a string representation of the SafeMode. - - A string representation of the SafeMode. - - - - Gets an instance of SafeMode with safe mode off. - - - - - Gets an instance of SafeMode with fsync=true. - - - - - Gets an instance of SafeMode with safe mode on. - - - - - Gets an instance of SafeMode with safe mode on and w=2. - - - - - Gets an instance of SafeMode with safe mode on and w=3. - - - - - Gets an instance of SafeMode with safe mode on and w=4. - - - - - Gets whether safe mode is enabled. - - - - - Gets whether fsync is true. - - - - - Gets the w value (the number of write replications that must complete before the server returns). - - - - - Gets the wtimeout value (the timeout before which the server must return). - - - - - Represents the result of a FindAndModify command. - - - - - Initializes a new instance of the FindAndModifyResult class. - - - - - Gets the modified document as a TDocument. - - The nominal type of the modified document. - The modified document. - - - - Gets the modified document as a TDocument. - - The nominal type of the modified document. - The modified document. - - - - Gets the modified document. - - - - - Flags used with the Update method in MongoCollection. - - - - - No flags. - - - - - If document doesn't exist then do an Insert. - - - - - Update all matching documents (instead of just one). - - - - - Represents .NET style connection strings. We recommend you use URL style connection strings - (see MongoUrl and MongoUrlBuilder). - - - - - Creates a new instance of MongoConnectionStringBuilder. - - - - - Creates a new instance of MongoConnectionStringBuilder. - - The initial settings. - - - - Clears all settings to their default values. - - - - - Tests whether a keyword is valid. - - The keyword. - True if the keyword is valid. - - - - Creates a new instance of MongoServerSettings based on the settings in this MongoConnectionStringBuilder. - - A new instance of MongoServerSettings. - - - - Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize). - - - - - Gets or sets the connection mode. - - - - - Gets or sets the connect timeout. - - - - - Gets or sets the optional database name. - - - - - Gets or sets the representation for Guids. - - - - - Gets or sets whether to use IPv6. - - - - - Gets or sets the max connection idle time. - - - - - Gets or sets the max connection life time. - - - - - Gets or sets the max connection pool size. - - - - - Gets or sets the min connection pool size. - - - - - Gets or sets the default password. - - - - - Gets or sets the name of the replica set. - - - - - Gets or sets the SafeMode to use. - - - - - Gets or sets the address of the server (see also Servers if using more than one address). - - - - - Gets or sets the list of server addresses (see also Server if using only one address). - - - - - Gets or sets whether queries should be sent to secondary servers. - - - - - Gets or sets the socket timeout. - - - - - Gets or sets the default username. - - - - - Gets or sets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize). - - - - - Gets or sets the wait queue size. - - - - - Gets or sets the wait queue timeout. - - - - - Gets or sets individual settings by keyword. - - The keyword. - The value of the setting. - - - - Represents a MongoDB collection and the settings used to access it. This class is thread-safe. - - - - - Protected constructor for abstract base class. - - The database that contains this collection. - The settings to use to access this collection. - - - - Counts the number of documents in this collection. - - The number of documents in this collection. - - - - Counts the number of documents in this collection that match a query. - - The query (usually a QueryDocument or constructed using the Query builder). - The number of documents in this collection that match the query. - - - - Creates an index for this collection. - - The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). - The index options(usually an IndexOptionsDocument or created using the IndexOption builder). - A SafeModeResult. - - - - Creates an index for this collection. - - The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). - A SafeModeResult. - - - - Creates an index for this collection. - - The names of the indexed fields. - A SafeModeResult. - - - - Returns the distinct values for a given field. - - The key of the field. - The distint values of the field. - - - - Returns the distinct values for a given field for documents that match a query. - - The key of the field. - The query (usually a QueryDocument or constructed using the Query builder). - The distint values of the field. - - - - Drops this collection. - - - - - Drops all indexes on this collection. - - A . - - - - Drops an index on this collection. - - The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). - A . - - - - Drops an index on this collection. - - The names of the indexed fields. - A . - - - - Drops an index on this collection. - - The name of the index. - A . - - - - Ensures that the desired index exists and creates it if it does not. - - The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). - The index options(usually an IndexOptionsDocument or created using the IndexOption builder). - - - - Ensures that the desired index exists and creates it if it does not. - - The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). - - - - Ensures that the desired index exists and creates it if it does not. - - The names of the indexed fields. - - - - Tests whether this collection exists. - - True if this collection exists. - - - - Returns a cursor that can be used to find all documents in this collection as TDocuments. - - The nominal type of the documents. - A . - - - - Returns a cursor that can be used to find all documents in this collection as TDocuments. - - The nominal type of the documents. - A . - - - - Finds one matching document using the query and sortBy parameters and applies the specified update to it. - - The query (usually a QueryDocument or constructed using the Query builder). - The sort order to select one of the matching documents. - The update to apply to the matching document. - A . - - - - Finds one matching document using the query and sortBy parameters and applies the specified update to it. - - The query (usually a QueryDocument or constructed using the Query builder). - The sort order to select one of the matching documents. - The update to apply to the matching document. - Whether to return the new or old version of the modified document in the . - A . - - - - Finds one matching document using the query and sortBy parameters and applies the specified update to it. - - The query (usually a QueryDocument or constructed using the Query builder). - The sort order to select one of the matching documents. - The update to apply to the matching document. - Whether to return the new or old version of the modified document in the . - Whether to do an upsert if no matching document is found. - A . - - - - Finds one matching document using the query and sortBy parameters and applies the specified update to it. - - The query (usually a QueryDocument or constructed using the Query builder). - The sort order to select one of the matching documents. - The update to apply to the matching document. - Which fields of the modified document to return in the . - Whether to return the new or old version of the modified document in the . - Whether to do an upsert if no matching document is found. - A . - - - - Finds one matching document using the query and sortBy parameters and removes it from this collection. - - The query (usually a QueryDocument or constructed using the Query builder). - The sort order to select one of the matching documents. - A . - - - - Returns a cursor that can be used to find all documents in this collection that match the query as TDocuments. - - The type to deserialize the documents as. - The query (usually a QueryDocument or constructed using the Query builder). - A . - - - - Returns a cursor that can be used to find all documents in this collection that match the query as TDocuments. - - The nominal type of the documents. - The query (usually a QueryDocument or constructed using the Query builder). - A . - - - - Returns a cursor that can be used to find one document in this collection as a TDocument. - - The type to deserialize the documents as. - A TDocument (or null if not found). - - - - Returns a cursor that can be used to find one document in this collection that matches a query as a TDocument. - - The type to deserialize the documents as. - The query (usually a QueryDocument or constructed using the Query builder). - A TDocument (or null if not found). - - - - Returns a cursor that can be used to find one document in this collection as a TDocument. - - The nominal type of the documents. - A document (or null if not found). - - - - Returns a cursor that can be used to find one document in this collection that matches a query as a TDocument. - - The type to deserialize the documents as. - The query (usually a QueryDocument or constructed using the Query builder). - A TDocument (or null if not found). - - - - Returns a cursor that can be used to find one document in this collection by its _id value as a TDocument. - - The nominal type of the document. - The id of the document. - A TDocument (or null if not found). - - - - Returns a cursor that can be used to find one document in this collection by its _id value as a TDocument. - - The nominal type of the document. - The id of the document. - A TDocument (or null if not found). - - - - Runs a GeoNear command on this collection. - - The type to deserialize the documents as. - The query (usually a QueryDocument or constructed using the Query builder). - The x coordinate of the starting location. - The y coordinate of the starting location. - The maximum number of results returned. - A . - - - - Runs a GeoNear command on this collection. - - The type to deserialize the documents as. - The query (usually a QueryDocument or constructed using the Query builder). - The x coordinate of the starting location. - The y coordinate of the starting location. - The maximum number of results returned. - The GeoNear command options (usually a GeoNearOptionsDocument or constructed using the GeoNearOptions builder). - A . - - - - Runs a GeoNear command on this collection. - - The type to deserialize the documents as. - The query (usually a QueryDocument or constructed using the Query builder). - The x coordinate of the starting location. - The y coordinate of the starting location. - The maximum number of results returned. - A . - - - - Runs a GeoNear command on this collection. - - The type to deserialize the documents as. - The query (usually a QueryDocument or constructed using the Query builder). - The x coordinate of the starting location. - The y coordinate of the starting location. - The maximum number of results returned. - The GeoNear command options (usually a GeoNearOptionsDocument or constructed using the GeoNearOptions builder). - A . - - - - Gets the indexes for this collection. - - A list of BsonDocuments that describe the indexes. - - - - Gets the stats for this collection. - - The stats for this collection as a . - - - - Gets the total data size for this collection (data + indexes). - - The total data size. - - - - Gets the total storage size for this collection (data + indexes + overhead). - - The total storage size. - - - - Runs the group command on this collection. - - The query (usually a QueryDocument or constructed using the Query builder). - A JavaScript function that returns the key value to group on. - Initial value passed to the reduce function for each group. - A JavaScript function that is called for each matching document in a group. - A JavaScript function that is called at the end of the group command. - A list of results as BsonDocuments. - - - - Runs the group command on this collection. - - The query (usually a QueryDocument or constructed using the Query builder). - The names of the fields to group on. - Initial value passed to the reduce function for each group. - A JavaScript function that is called for each matching document in a group. - A JavaScript function that is called at the end of the group command. - A list of results as BsonDocuments. - - - - Runs the group command on this collection. - - The query (usually a QueryDocument or constructed using the Query builder). - The name of the field to group on. - Initial value passed to the reduce function for each group. - A JavaScript function that is called for each matching document in a group. - A JavaScript function that is called at the end of the group command. - A list of results as BsonDocuments. - - - - Tests whether an index exists. - - The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). - True if the index exists. - - - - Tests whether an index exists. - - The names of the fields in the index. - True if the index exists. - - - - Tests whether an index exists. - - The name of the index. - True if the index exists. - - - - Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). - - The nominal type of the document to insert. - The document to insert. - A SafeModeResult (or null if SafeMode is not being used). - - - - Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). - - The nominal type of the document to insert. - The document to insert. - The options to use for this Insert. - A SafeModeResult (or null if SafeMode is not being used). - - - - Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). - - The nominal type of the document to insert. - The document to insert. - The SafeMode to use for this Insert. - A SafeModeResult (or null if SafeMode is not being used). - - - - Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). - - The nominal type of the document to insert. - The document to insert. - A SafeModeResult (or null if SafeMode is not being used). - - - - Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). - - The nominal type of the document to insert. - The document to insert. - The options to use for this Insert. - A SafeModeResult (or null if SafeMode is not being used). - - - - Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). - - The nominal type of the document to insert. - The document to insert. - The SafeMode to use for this Insert. - A SafeModeResult (or null if SafeMode is not being used). - - - - Inserts multiple documents at once into this collection (see also Insert to insert a single document). - - The type of the documents to insert. - The documents to insert. - A list of SafeModeResults (or null if SafeMode is not being used). - - - - Inserts multiple documents at once into this collection (see also Insert to insert a single document). - - The type of the documents to insert. - The documents to insert. - The options to use for this Insert. - A list of SafeModeResults (or null if SafeMode is not being used). - - - - Inserts multiple documents at once into this collection (see also Insert to insert a single document). - - The type of the documents to insert. - The documents to insert. - The SafeMode to use for this Insert. - A list of SafeModeResults (or null if SafeMode is not being used). - - - - Inserts multiple documents at once into this collection (see also Insert to insert a single document). - - The nominal type of the documents to insert. - The documents to insert. - A list of SafeModeResults (or null if SafeMode is not being used). - - - - Inserts multiple documents at once into this collection (see also Insert to insert a single document). - - The nominal type of the documents to insert. - The documents to insert. - The SafeMode to use for this Insert. - A list of SafeModeResults (or null if SafeMode is not being used). - - - - Inserts multiple documents at once into this collection (see also Insert to insert a single document). - - The nominal type of the documents to insert. - The documents to insert. - The options to use for this Insert. - A list of SafeModeResults (or null if SafeMode is not being used). - - - - Tests whether this collection is capped. - - True if this collection is capped. - - - - Runs a Map/Reduce command on this collection. - - A JavaScript function called for each document. - A JavaScript function called on the values emitted by the map function. - Options for this map/reduce command (see , and the builder). - A . - - - - Runs a Map/Reduce command on document in this collection that match a query. - - The query (usually a QueryDocument or constructed using the Query builder). - A JavaScript function called for each document. - A JavaScript function called on the values emitted by the map function. - Options for this map/reduce command (see , and the builder). - A . - - - - Runs a Map/Reduce command on document in this collection that match a query. - - The query (usually a QueryDocument or constructed using the Query builder). - A JavaScript function called for each document. - A JavaScript function called on the values emitted by the map function. - A . - - - - Runs a Map/Reduce command on this collection. - - A JavaScript function called for each document. - A JavaScript function called on the values emitted by the map function. - A . - - - - Runs the ReIndex command on this collection. - - - - - Removes documents from this collection that match a query. - - The query (usually a QueryDocument or constructed using the Query builder). - A SafeModeResult (or null if SafeMode is not being used). - - - - Removes documents from this collection that match a query. - - The query (usually a QueryDocument or constructed using the Query builder). - The SafeMode to use for this operation. - A SafeModeResult (or null if SafeMode is not being used). - - - - Removes documents from this collection that match a query. - - The query (usually a QueryDocument or constructed using the Query builder). - The flags for this Remove (see ). - A SafeModeResult (or null if SafeMode is not being used). - - - - Removes documents from this collection that match a query. - - The query (usually a QueryDocument or constructed using the Query builder). - The flags for this Remove (see ). - The SafeMode to use for this operation. - A SafeModeResult (or null if SafeMode is not being used). - - - - Removes all documents from this collection (see also ). - - A SafeModeResult (or null if SafeMode is not being used). - - - - Removes all documents from this collection (see also ). - - The SafeMode to use for this operation. - A SafeModeResult (or null if SafeMode is not being used). - - - - Removes all entries for this collection in the index cache used by EnsureIndex. Call this method - when you know (or suspect) that a process other than this one may have dropped one or - more indexes. - - - - - Saves a document to this collection. The document must have an identifiable Id field. Based on the value - of the Id field Save will perform either an Insert or an Update. - - The type of the document to save. - The document to save. - A SafeModeResult (or null if SafeMode is not being used). - - - - Saves a document to this collection. The document must have an identifiable Id field. Based on the value - of the Id field Save will perform either an Insert or an Update. - - The type of the document to save. - The document to save. - The options to use for this Save. - A SafeModeResult (or null if SafeMode is not being used). - - - - Saves a document to this collection. The document must have an identifiable Id field. Based on the value - of the Id field Save will perform either an Insert or an Update. - - The type of the document to save. - The document to save. - The SafeMode to use for this operation. - A SafeModeResult (or null if SafeMode is not being used). - - - - Saves a document to this collection. The document must have an identifiable Id field. Based on the value - of the Id field Save will perform either an Insert or an Update. - - The type of the document to save. - The document to save. - A SafeModeResult (or null if SafeMode is not being used). - - - - Saves a document to this collection. The document must have an identifiable Id field. Based on the value - of the Id field Save will perform either an Insert or an Update. - - The type of the document to save. - The document to save. - The options to use for this Save. - A SafeModeResult (or null if SafeMode is not being used). - - - - Saves a document to this collection. The document must have an identifiable Id field. Based on the value - of the Id field Save will perform either an Insert or an Update. - - The type of the document to save. - The document to save. - The SafeMode to use for this operation. - A SafeModeResult (or null if SafeMode is not being used). - - - - Gets a canonical string representation for this database. - - A canonical string representation for this database. - - - - Updates one matching document in this collection. - - The query (usually a QueryDocument or constructed using the Query builder). - The update to perform on the matching document. - A SafeModeResult (or null if SafeMode is not being used). - - - - Updates one matching document in this collection. - - The query (usually a QueryDocument or constructed using the Query builder). - The update to perform on the matching document. - The SafeMode to use for this operation. - A SafeModeResult (or null if SafeMode is not being used). - - - - Updates one or more matching documents in this collection (for multiple updates use UpdateFlags.Multi). - - The query (usually a QueryDocument or constructed using the Query builder). - The update to perform on the matching document. - The flags for this Update. - A SafeModeResult (or null if SafeMode is not being used). - - - - Updates one or more matching documents in this collection (for multiple updates use UpdateFlags.Multi). - - The query (usually a QueryDocument or constructed using the Query builder). - The update to perform on the matching document. - The flags for this Update. - The SafeMode to use for this operation. - A SafeModeResult (or null if SafeMode is not being used). - - - - Validates the integrity of this collection. - - A . - - - - Gets the database that contains this collection. - - - - - Gets the fully qualified name of this collection. - - - - - Gets the name of this collection. - - - - - Gets the settings being used to access this collection. - - - - - Represents a MongoDB collection and the settings used to access it as well as a default document type. This class is thread-safe. - - - - - Creates a new instance of MongoCollection. Normally you would call one of the indexers or GetCollection methods - of MongoDatabase instead. - - The database that contains this collection. - The settings to use to access this collection. - - - - Returns a cursor that can be used to find all documents in this collection that match the query as TDefaultDocuments. - - The query (usually a QueryDocument or constructed using the Query builder). - A . - - - - Returns a cursor that can be used to find all documents in this collection as TDefaultDocuments. - - A . - - - - Returns a cursor that can be used to find one document in this collection as a TDefaultDocument. - - A TDefaultDocument (or null if not found). - - - - Returns a cursor that can be used to find one document in this collection that matches a query as a TDefaultDocument. - - The query (usually a QueryDocument or constructed using the Query builder). - A TDefaultDocument (or null if not found). - - - - Returns a cursor that can be used to find one document in this collection by its _id value as a TDefaultDocument. - - The id of the document. - A TDefaultDocument (or null if not found). - - - - Runs a GeoNear command on this collection. - - The query (usually a QueryDocument or constructed using the Query builder). - The x coordinate of the starting location. - The y coordinate of the starting location. - The maximum number of results returned. - A . - - - - Runs a GeoNear command on this collection. - - The query (usually a QueryDocument or constructed using the Query builder). - The x coordinate of the starting location. - The y coordinate of the starting location. - The maximum number of results returned. - Options for the GeoNear command (see , , and the builder). - A . - - - - Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). - - The document to insert. - A SafeModeResult (or null if SafeMode is not being used). - - - - Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). - - The document to insert. - The options to use for this Insert. - A SafeModeResult (or null if SafeMode is not being used). - - - - Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). - - The document to insert. - The SafeMode to use for this Insert. - A SafeModeResult (or null if SafeMode is not being used). - - - - Inserts multiple documents at once into this collection (see also Insert to insert a single document). - - The documents to insert. - A list of SafeModeResults (or null if SafeMode is not being used). - - - - Inserts multiple documents at once into this collection (see also Insert to insert a single document). - - The documents to insert. - The options to use for this Insert. - A list of SafeModeResults (or null if SafeMode is not being used). - - - - Inserts multiple documents at once into this collection (see also Insert to insert a single document). - - The documents to insert. - The SafeMode to use for this Insert. - A list of SafeModeResults (or null if SafeMode is not being used). - - - - Saves a document to this collection. The document must have an identifiable Id field. Based on the value - of the Id field Save will perform either an Insert or an Update. - - The document to save. - A SafeModeResult (or null if SafeMode is not being used). - - - - Saves a document to this collection. The document must have an identifiable Id field. Based on the value - of the Id field Save will perform either an Insert or an Update. - - The document to save. - The options to use for this Save. - A SafeModeResult (or null if SafeMode is not being used). - - - - Saves a document to this collection. The document must have an identifiable Id field. Based on the value - of the Id field Save will perform either an Insert or an Update. - - The document to save. - The SafeMode to use for this operation. - A SafeModeResult (or null if SafeMode is not being used). - - - - Represents a MongoDB safe mode exception. - - - - - Initializes a new instance of the MongoSafeModeException class. - - The error message. - The command result. - - - - Initializes a new instance of the MongoSafeModeException class (this overload supports deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Represents a BSON document that can be used where an IMongoScope is expected. - - - - - Initializes a new instance of the ScopeDocument class. - - - - - Initializes a new instance of the ScopeDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the ScopeDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the ScopeDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the ScopeDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the ScopeDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - Represents URL style connection strings. This is the recommended connection string style, but see also - MongoConnectionStringBuilder if you wish to use .NET style connection strings. - - - - - Creates a new instance of MongoUrlBuilder. - - - - - Creates a new instance of MongoUrlBuilder. - - The initial settings. - - - - Parses a URL and sets all settings to match the URL. - - The URL. - - - - Creates a new instance of MongoUrl based on the settings in this MongoUrlBuilder. - - A new instance of MongoUrl. - - - - Creates a new instance of MongoServerSettings based on the settings in this MongoUrlBuilder. - - A new instance of MongoServerSettings. - - - - Returns the canonical URL based on the settings in this MongoUrlBuilder. - - The canonical URL. - - - - Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize). - - - - - Gets or sets the connection mode. - - - - - Gets or sets the connect timeout. - - - - - Gets or sets the optional database name. - - - - - Gets or sets the default credentials. - - - - - Gets or sets the representation to use for Guids. - - - - - Gets or sets whether to use IPv6. - - - - - Gets or sets the max connection idle time. - - - - - Gets or sets the max connection life time. - - - - - Gets or sets the max connection pool size. - - - - - Gets or sets the min connection pool size. - - - - - Gets or sets the name of the replica set. - - - - - Gets or sets the SafeMode to use. - - - - - Gets or sets the address of the server (see also Servers if using more than one address). - - - - - Gets or sets the list of server addresses (see also Server if using only one address). - - - - - Gets or sets whether queries should be sent to secondary servers. - - - - - Gets or sets the socket timeout. - - - - - Gets or sets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize). - - - - - Gets or sets the wait queue size. - - - - - Gets or sets the wait queue timeout. - - - - - Represents build info about a server instance. - - - - - Creates a new instance of MongoServerBuildInfo. - - The number of bits (32 or 64). - The GIT version. - The sysInfo. - The version string. - - - - Gets the number of bits (32 or 64). - - - - - Gets the GIT version. - - - - - Gets the sysInfo. - - - - - Gets the version. - - - - - Gets the version string. - - - - - Credentials to access a MongoDB database. - - - - - Creates a new instance of MongoCredentials. - - The username. - The password. - - - - Creates a new instance of MongoCredentials. - - The username. - The password. - Whether the credentials should be validated against the admin database. - - - - Creates an instance of MongoCredentials. - - The username. - The password. - A new instance of MongoCredentials (or null if either parameter is null). - - - - Compares two MongoCredentials. - - The first credentials. - The other credentials. - True if the two credentials are equal (or both null). - - - - Compares two MongoCredentials. - - The first credentials. - The other credentials. - True if the two credentials are not equal (or one is null and the other is not). - - - - Compares two MongoCredentials. - - The first credentials. - The second credentials. - True if the two credentials are equal (or both null). - - - - Compares this MongoCredentials to another MongoCredentials. - - The other credentials. - True if the two credentials are equal. - - - - Compares this MongoCredentials to another MongoCredentials. - - The other credentials. - True if the two credentials are equal. - - - - Gets the hashcode for the credentials. - - The hashcode. - - - - Returns a string representation of the credentials. - - A string representation of the credentials. - - - - Gets the username. - - - - - Gets the password. - - - - - Gets whether the credentials should be validated against the admin database. - - - - - Represents a stream interface to a GridFS file (patterned after .NET's Stream class). - - - - - Initializes a new instance of the MongoGridFSStream class. - - The GridFS file info. - The mode. - - - - Initializes a new instance of the MongoGridFSStream class. - - The GridFS file info. - The mode. - The acess. - - - - Flushes any unsaved data in the buffers to the GridFS file. - - - - - Reads bytes from the GridFS stream. - - The destination buffer. - The offset in the destination buffer at which to place the read bytes. - The number of bytes to read. - The number of bytes read. - - - - Reads one byte from the GridFS stream. - - The byte (-1 if at the end of the GridFS stream). - - - - Seeks to a new position. - - The seek offset. - The seek origin. - The new position. - - - - Sets the length of the GridFS file. - - The length. - - - - Writes bytes to the GridFS stream. - - The source buffer. - The offset in the source buffer to the bytes. - The number of bytes to write. - - - - Writes one byte to the GridFS stream. - - The byte. - - - - Disposes of any resources used by the stream. - - True if called from Dispose. - - - - Gets whether the GridFS stream supports reading. - - - - - Gets whether the GridFS stream supports seeking. - - - - - Gets whether the GridFS stream supports writing. - - - - - Gets the current length (use SetLength to change the length). - - - - - Gets or sets the current position. - - - - - Gets or sets whether to compute and update the MD5 hash for the file when the stream is closed. - - - - - Represents a pool of connections to a MongoDB server. - - - - - Gets the number of available connections (connections that are open but not currently in use). - - - - - Gets the number of connections in the connection pool (includes both available and in use connections). - - - - - Gets the current generation Id of the connection pool. - - - - - Gets the server instance. - - - - - Represents a thread-safe queue. - - The type of elements. - - - - Initializes a new instance of the BlockingQueue class. - - - - - Dequeues one item from the queue. Will block waiting for an item if the queue is empty. - - The timeout for waiting for an item to appear in the queue. - The first item in the queue (null if it timed out). - - - - Enqueues an item on to the queue. - - The item to be queued. - - - - Represents a cache of the names of indexes that are known to exist on a given server. - - - - - Initializes a new instance of the IndexCache class. - - - - - Adds the name of an index to the cache. - - The collection that contains the index. - The name of the index. - - - - Tests whether the cache contains the name of an index. - - The collection that contains the index. - The name of the index. - True if the cache contains the named index. - - - - Removes the name of an index from the cache. - - The collection that contains the index. - The name of the index. - - - - Resets the cache. - - - - - Resets part of the cache by removing all indexes for a collection. - - The collection. - - - - Resets part of the cache by removing all indexes for a database. - - The database. - - - - Resets part of the cache by removing all indexes for a database. - - The name of the database. - - - - Resets part of the cache by removing all indexes for a collection. - - The name of the database containing the collection. - The name of the collection. - - - - Represents a GridFS file system. - - - - - Initializes a new instance of the MongoGridFS class. - - The database containing the GridFS collections. - - - - Initializes a new instance of the MongoGridFS class. - - The database containing the GridFS collections. - The GridFS settings. - - - - Appends UTF-8 encoded text to an existing GridFS file. - - The remote file name. - A StreamWriter. - - - - Copies a GridFS file. - - The source file name. - The destination file name. - The file info of the new GridFS file. - - - - Copies a GridFS file. - - The source file name. - The destination file name. - The create options. - The file info of the new GridFS file. - - - - Creates or overwrites a GridFS file. - - The remote file name. - A stream. - - - - Creates or overwrites a GridFS file. - - The remote file name. - The create options. - A stream. - - - - Creates or opens a GridFS file for writing UTF-8 encoded text. - - The remote file name. - A stream writer. - - - - Creates or opens a GridFS file for writing UTF-8 encoded text. - - The remote file name. - The create options. - A stream writer. - - - - Deletes GridFS files. - - A query that specifies the GridFS files to delete. - - - - Deletes all versions of a GridFS file. - - The remote file name. - - - - Deletes a GridFS file. - - The GridFS file Id. - - - - Downloads the most recent version of a GridFS file. - - The destination stream. - The GridFS file. - - - - Downloads a specific version of a GridFS file. - - The destination stream. - The GridFS file. - The version to download. - - - - Downloads a GridFS file. - - The destination stream. - The GridFS file. - - - - Downloads the most recent version of a GridFS file. - - The destination stream. - The remote file name. - - - - Downloads a specific version of a GridFS file. - - The destination stream. - The remote file name. - The version to download. - - - - Downloads the most recent version of a GridFS file. - - The file name (same local and remote names). - - - - Downloads a specific version of a GridFS file. - - The file name (same local and remote names). - The version to download. - - - - Downloads the most recent version of a GridFS file. - - The local file name. - The GridFS file. - - - - Downloads a specific version of a GridFS file. - - The local file name. - The GridFS file. - The version to download. - - - - Downloads a GridFS file. - - The local file name. - The GridFS file. - - - - Downloads the most recent version of a GridFS file. - - The local file name. - The remote file name. - - - - Downloads a specific version of a GridFS file. - - The local file name. - The remote file name. - The version to download. - - - - Ensures that the proper indexes for GridFS exist (only creates the new indexes if there are fewer than 1000 GridFS files). - - - - - Ensures that the proper indexes for GridFS exist. - - Only create new indexes if there are fewer than this number of GridFS files). - - - - Tests whether a GridFS file exists. - - The GridFS file. - True if the GridFS file exists. - - - - Tests whether a GridFS file exists. - - The GridFS file. - True if the GridFS file exists. - - - - Tests whether a GridFS file exists. - - The GridFS file. - True if the GridFS file exists. - - - - Finds matching GridFS files. - - A query. - The matching GridFS files. - - - - Finds matching GridFS files. - - The remote file name. - The matching GridFS files. - - - - Finds all GridFS files. - - The matching GridFS files. - - - - Finds the most recent version of a GridFS file. - - The GridFS file. - The matching GridFS file. - - - - Finds a specific version of a GridFS file. - - The GridFS file. - The version to find. - The matching GridFS file. - - - - Finds the most recent version of a GridFS file. - - The remote file name. - The matching GridFS file. - - - - Finds a specific version of a GridFS file. - - The remote file name. - The version to find. - The matching GridFS file. - - - - Finds a GridFS file. - - The GridFS file Id. - The GridFS file. - - - - Moves the most recent version of a GridFS file. - - The source file name. - The destination file name. - - - - Opens a GridFS file with the specified mode. - - The remote file name. - The mode. - A stream. - - - - Opens a GridFS file with the specified mode and access. - - The remote file name. - The mode. - The access. - A stream. - - - - Opens a GridFS file with the specified mode, access and create options. - - The remote file name. - The mode. - The access. - The create options. - A stream. - - - - Opens an existing GridFS file for reading. - - The remote file name. - A stream. - - - - Opens an existing UTF-8 encoded text GridFS file for reading. - - The remote file name. - A stream reader. - - - - Opens an existing GridFS file for writing. - - The remote file name. - A stream. - - - - Opens an existing GridFS file for writing. - - The remote file name. - The create options. - A stream. - - - - Sets the aliases for an existing GridFS file. - - The GridFS file. - The aliases. - - - - Sets the content type for an existing GridFS file. - - The GridFS file. - The content type. - - - - Sets the metadata for an existing GridFS file. - - The GridFS file. - The metadata. - - - - Uploads a GridFS file. - - The source stream. - The remote file name. - The file info of the new GridFS file. - - - - Uploads a GridFS file. - - The source stream. - The remote file name. - The create options. - The file info of the new GridFS file. - - - - Uploads a GridFS file. - - The file name (same local and remote names). - The file info of the new GridFS file. - - - - Uploads a GridFS file. - - The local file name. - The remote file name. - The file info of the new GridFS file. - - - - Gets the chunks collection. - - - - - Gets the database containing the GridFS collections. - - - - - Gets the files collection. - - - - - Gets the GridFS settings. - - - - - Various static utility methods. - - - - - Gets the MD5 hash of a string. - - The string to get the MD5 hash of. - The MD5 hash. - - - - Converts a string to camel case by lower casing the first letter (only the first letter is modified). - - The string to camel case. - The camel cased string. - - - - Represents a wrapped object that can be used where an IMongoScope is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the ScopeWrapper class. - - The wrapped object. - - - - Creates a new instance of the ScopeWrapper class. - - The wrapped object. - A new instance of ScopeWrapper or null. - - - - Represents a BSON document that can be used where an IMongoCollectionOptions is expected. - - - - - Initializes a new instance of the CollectionOptionsDocument class. - - - - - Initializes a new instance of the CollectionOptionsDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the CollectionOptionsDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the CollectionOptionsDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the CollectionOptionsDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - Represents the results of a GetLastError command. - - - - - Initializes a new instance of the GetLastErrorResult class. - - - - - Gets the number of documents affected. - - - - - Gets whether the result has a LastErrorMessage. - - - - - Gets the last error message (null if none). - - - - - Gets whether the last command updated an existing document. - - - - - A builder for the options used when creating an index. - - - - - Sets whether to build the index in the background. - - Whether to build the index in the background. - The builder (so method calls can be chained). - - - - Sets whether duplicates should be dropped. - - Whether duplicates should be dropped. - The builder (so method calls can be chained). - - - - Sets the geospatial range. - - The min value of the range. - The max value of the range. - The builder (so method calls can be chained). - - - - Sets the name of the index. - - The name of the index. - The builder (so method calls can be chained). - - - - Sets whether the index is a sparse index. - - Whether the index is a sparse index. - The builder (so method calls can be chained). - - - - Sets whether the index enforces unique values. - - Whether the index enforces unique values. - The builder (so method calls can be chained). - - - - Gets a null value with a type of IMongoIndexOptions. - - - - - A builder for the options used when creating an index. - - - - - Initializes a new instance of the IndexOptionsBuilder class. - - - - - Sets whether to build the index in the background. - - Whether to build the index in the background. - The builder (so method calls can be chained). - - - - Sets whether duplicates should be dropped. - - Whether duplicates should be dropped. - The builder (so method calls can be chained). - - - - Sets the geospatial range. - - The min value of the range. - The max value of the range. - The builder (so method calls can be chained). - - - - Sets the name of the index. - - The name of the index. - The builder (so method calls can be chained). - - - - Sets whether the index is a sparse index. - - Whether the index is a sparse index. - The builder (so method calls can be chained). - - - - Sets whether the index enforces unique values. - - Whether the index enforces unique values. - The builder (so method calls can be chained). - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - An object that can be enumerated to fetch the results of a query. The query is not sent - to the server until you begin enumerating the results. - - - - - Creates a new MongoCursor. It is very unlikely that you will call this constructor. Instead, see all the Find methods in MongoCollection. - - The collection. - The query. - - - - Creates a cursor. - - The type of the returned documents. - The collection to query. - A query. - A cursor. - - - - Creates a clone of the cursor. - - The type of the documents returned. - A clone of the cursor. - - - - Creates a clone of the cursor. - - The type of the documents returned. - A clone of the cursor. - - - - Returns the number of documents that match the query (ignores Skip and Limit, unlike Size which honors them). - - The number of documents that match the query. - - - - Returns an explanation of how the query was executed (instead of the results). - - An explanation of thow the query was executed. - - - - Returns an explanation of how the query was executed (instead of the results). - - Whether the explanation should contain more details. - An explanation of thow the query was executed. - - - - Sets the batch size (the number of documents returned per batch). - - The number of documents in each batch. - The cursor (so you can chain method calls to it). - - - - Sets the fields that will be returned from the server. - - The fields that will be returned from the server. - The cursor (so you can chain method calls to it). - - - - Sets the fields that will be returned from the server. - - The fields that will be returned from the server. - The cursor (so you can chain method calls to it). - - - - Sets the query flags. - - The query flags. - The cursor (so you can chain method calls to it). - - - - Sets the index hint for the query. - - The index hint. - The cursor (so you can chain method calls to it). - - - - Sets the index hint for the query. - - The name of the index. - The cursor (so you can chain method calls to it). - - - - Sets the limit on the number of documents to be returned. - - The limit on the number of documents to be returned. - The cursor (so you can chain method calls to it). - - - - Sets the max value for the index key range of documents to return (note: the max value itself is excluded from the range). - Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically). - - The max value. - The cursor (so you can chain method calls to it). - - - - Sets the maximum number of documents to scan. - - The maximum number of documents to scan. - The cursor (so you can chain method calls to it). - - - - Sets the min value for the index key range of documents to return (note: the min value itself is included in the range). - Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically). - - The min value. - The cursor (so you can chain method calls to it). - - - - Sets a cursor option. - - The name of the option. - The value of the option. - The cursor (so you can chain method calls to it). - - - - Sets multiple cursor options. See also the individual Set{Option} methods, which are easier to use. - - The options. - The cursor (so you can chain method calls to it). - - - - Sets the serialization options (only needed in rare cases). - - The serialization options. - The cursor (so you can chain method calls to it). - - - - Sets the $showDiskLoc option. - - The cursor (so you can chain method calls to it). - - - - Sets the number of documents the server should skip before returning the rest of the documents. - - The number of documents to skip. - The cursor (so you can chain method calls to it). - - - - Sets whether the query should be sent to a secondary server. - - Whether the query should be sent to a secondary server. - The cursor (so you can chain method calls to it). - - - - Sets the $snapshot option. - - The cursor (so you can chain method calls to it). - - - - Sets the sort order for the server to sort the documents by before returning them. - - The sort order. - The cursor (so you can chain method calls to it). - - - - Sets the sort order for the server to sort the documents by before returning them. - - The names of the fields to sort by. - The cursor (so you can chain method calls to it). - - - - Returns the size of the result set (honors Skip and Limit, unlike Count which does not). - - The size of the result set. - - - - Gets the non-generic enumerator. - - The enumerator. - - - - Gets the server that the query will be sent to. - - - - - Gets the database that constains the collection that is being queried. - - - - - Gets the collection that is being queried. - - - - - Gets the query that will be sent to the server. - - - - - Gets or sets the fields that will be returned from the server. - - - - - Gets or sets the cursor options. See also the individual Set{Option} methods, which are easier to use. - - - - - Gets or sets the query flags. - - - - - Gets or sets whether the query should be sent to a secondary server. - - - - - Gets or sets the number of documents the server should skip before returning the rest of the documents. - - - - - Gets or sets the limit on the number of documents to be returned. - - - - - Gets or sets the batch size (the number of documents returned per batch). - - - - - Gets or sets the serialization options (only needed in rare cases). - - - - - Gets whether the cursor has been frozen to prevent further changes. - - - - - An object that can be enumerated to fetch the results of a query. The query is not sent - to the server until you begin enumerating the results. - - The type of the documents returned. - - - - Creates a new MongoCursor. It is very unlikely that you will call this constructor. Instead, see all the Find methods in MongoCollection. - - The collection. - The query. - - - - Returns an enumerator that can be used to enumerate the cursor. Normally you will use the foreach statement - to enumerate the cursor (foreach will call GetEnumerator for you). - - An enumerator that can be used to iterate over the cursor. - - - - Sets the batch size (the number of documents returned per batch). - - The number of documents in each batch. - The cursor (so you can chain method calls to it). - - - - Sets the fields that will be returned from the server. - - The fields that will be returned from the server. - The cursor (so you can chain method calls to it). - - - - Sets the fields that will be returned from the server. - - The fields that will be returned from the server. - The cursor (so you can chain method calls to it). - - - - Sets the query flags. - - The query flags. - The cursor (so you can chain method calls to it). - - - - Sets the index hint for the query. - - The index hint. - The cursor (so you can chain method calls to it). - - - - Sets the index hint for the query. - - The name of the index. - The cursor (so you can chain method calls to it). - - - - Sets the limit on the number of documents to be returned. - - The limit on the number of documents to be returned. - The cursor (so you can chain method calls to it). - - - - Sets the max value for the index key range of documents to return (note: the max value itself is excluded from the range). - Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically). - - The max value. - The cursor (so you can chain method calls to it). - - - - Sets the maximum number of documents to scan. - - The maximum number of documents to scan. - The cursor (so you can chain method calls to it). - - - - Sets the min value for the index key range of documents to return (note: the min value itself is included in the range). - Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically). - - The min value. - The cursor (so you can chain method calls to it). - - - - Sets a cursor option. - - The name of the option. - The value of the option. - The cursor (so you can chain method calls to it). - - - - Sets multiple cursor options. See also the individual Set{Option} methods, which are easier to use. - - The options. - The cursor (so you can chain method calls to it). - - - - Sets the serialization options (only needed in rare cases). - - The serialization options. - The cursor (so you can chain method calls to it). - - - - Sets the $showDiskLoc option. - - The cursor (so you can chain method calls to it). - - - - Sets the number of documents the server should skip before returning the rest of the documents. - - The number of documents to skip. - The cursor (so you can chain method calls to it). - - - - Sets whether the query should be sent to a secondary server. - - Whether the query should be sent to a secondary server. - The cursor (so you can chain method calls to it). - - - - Sets the $snapshot option. - - The cursor (so you can chain method calls to it). - - - - Sets the sort order for the server to sort the documents by before returning them. - - The sort order. - The cursor (so you can chain method calls to it). - - - - Sets the sort order for the server to sort the documents by before returning them. - - The names of the fields to sort by. - The cursor (so you can chain method calls to it). - - - - Gets the non-generic enumerator. - - The enumerator. - - - - Represents a wrapped object that can be used where an IMongoGroupBy is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the GroupByWrapper class. - - The wrapped object. - - - - Creates a new instance of the GroupByWrapper class. - - The wrapped object. - A new instance of GroupByWrapper or null. - - - - Represents a BSON document that can be used where an IMongoGroupBy is expected. - - - - - Initializes a new instance of the GroupByDocument class. - - - - - Initializes a new instance of the GroupByDocument class specifying whether duplicate element names are allowed - (allowing duplicate element names is not recommended). - - Whether duplicate element names are allowed. - - - - Initializes a new instance of the GroupByDocument class and adds one element. - - An element to add to the document. - - - - Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - - - - Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. - - A dictionary to initialize the document from. - A list of keys to select values from the dictionary. - - - - Initializes a new instance of the GroupByDocument class and adds new elements from a list of elements. - - A list of elements to add to the document. - - - - Initializes a new instance of the GroupByDocument class and adds one or more elements. - - One or more elements to add to the document. - - - - Initializes a new instance of the GroupByDocument class and creates and adds a new element. - - The name of the element to add to the document. - The value of the element to add to the document. - - - - Represents a wrapped object that can be used where an IMongoFields is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the FieldsWrapper class. - - The wrapped object. - - - - Creates a new instance of the FieldsWrapper class. - - The wrapped object. - A new instance of FieldsWrapper or null. - - - - Used with the Connect method when connecting to a replica set to specify what subset of the replica set must be connected before returning. - - - - - Wait for all members of the replica set to be connected. - - - - - Wait for the primary member of the replica set to be connected. - - - - - Wait for any slaveOk member of the replica set to be connected (includes primary, secondaries and passives). - - - - - Represents the results of an operation performed with a safe mode. - - - - - Initializes a new instance of the SafeModeResult class. - - - - - A builder for specifying the keys for an index. - - - - - Sets one or more key names to index in ascending order. - - One or more key names. - The builder (so method calls can be chained). - - - - Sets one or more key names to index in descending order. - - One or more key names. - The builder (so method calls can be chained). - - - - Sets the key name to create a geospatial index on. - - The key name. - The builder (so method calls can be chained). - - - - A builder for specifying the keys for an index. - - - - - Initializes a new instance of the IndexKeysBuilder class. - - - - - Sets one or more key names to index in ascending order. - - One or more key names. - The builder (so method calls can be chained). - - - - Sets one or more key names to index in descending order. - - One or more key names. - The builder (so method calls can be chained). - - - - Sets the key name to create a geospatial index on. - - The key name. - The builder (so method calls can be chained). - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - Server connection mode. - - - - - Connect directly to a server. - - - - - Connect to a replica set. - - - - - Represents an immutable URL style connection string. See also MongoUrlBuilder. - - - - - Creates a new instance of MongoUrl. - - The URL containing the settings. - - - - Compares two MongoUrls. - - The first URL. - The other URL. - True if the two URLs are equal (or both null). - - - - Compares two MongoUrls. - - The first URL. - The other URL. - True if the two URLs are not equal (or one is null and the other is not). - - - - Clears the URL cache. When a URL is parsed it is stored in the cache so that it doesn't have to be - parsed again. There is rarely a need to call this method. - - - - - Creates an instance of MongoUrl (might be an existing existence if the same URL has been used before). - - The URL containing the settings. - An instance of MongoUrl. - - - - Compares two MongoUrls. - - The other URL. - True if the two URLs are equal. - - - - Compares two MongoUrls. - - The other URL. - True if the two URLs are equal. - - - - Gets the hash code. - - The hash code. - - - - Creates a new instance of MongoServerSettings based on the settings in this MongoUrlBuilder. - - A new instance of MongoServerSettings. - - - - Returns the canonical URL based on the settings in this MongoUrlBuilder. - - The canonical URL. - - - - Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize). - - - - - Gets the connection mode. - - - - - Gets the connect timeout. - - - - - Gets the optional database name. - - - - - Gets the default credentials. - - - - - Gets the representation to use for Guids. - - - - - Gets whether to use IPv6. - - - - - Gets the max connection idle time. - - - - - Gets the max connection life time. - - - - - Gets the max connection pool size. - - - - - Gets the min connection pool size. - - - - - Gets the name of the replica set. - - - - - Gets the SafeMode to use. - - - - - Gets the address of the server (see also Servers if using more than one address). - - - - - Gets the list of server addresses (see also Server if using only one address). - - - - - Gets whether queries should be sent to secondary servers. - - - - - Gets the socket timeout. - - - - - Gets the URL (in canonical form). - - - - - Gets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize). - - - - - Gets the wait queue size. - - - - - Gets the wait queue timeout. - - - - - Reprsents an enumerator that fetches the results of a query sent to the server. - - - - - - Initializes a new instance of the MongoCursorEnumerator class. - - The cursor to be enumerated. - - - - Disposes of any resources held by this enumerator. - - - - - Moves to the next result and returns true if another result is available. - - True if another result is available. - - - - Resets the enumerator (not supported by MongoCursorEnumerator). - - - - - Gets the current document. - - - - - Gets whether the cursor is dead (used with tailable cursors). - - - - - Gets whether the server is await capable (used with tailable cursors). - - - - - Represents options used when creating a GridFS file. - - - - - Initializes a new instance of the MongoGridFSCreateOptions class. - - - - - Gets or sets the aliases. - - - - - Gets or sets the chunk size. - - - - - Gets or sets the content type. - - - - - Gets or sets the file Id. - - - - - Gets or sets the metadata. - - - - - Gets or sets the upload date. - - - - - Represents a MongoDB query exception. - - - - - Initializes a new instance of the MongoQueryException class. - - The error message. - - - - Initializes a new instance of the MongoQueryException class. - - The error message. - The inner exception. - - - - Initializes a new instance of the MongoQueryException class. - - The error message. - The error document returned by the server. - - - - Initializes a new instance of the MongoQueryException class (this overload supports deserialization). - - The SerializationInfo. - The StreamingContext. - - - - Gets the error document returned by the server. - - - - - Represents a wrapped object that can be used where an IMongoIndexKeys is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the IndexKeysWrapper class. - - The wrapped object. - - - - Creates a new instance of the IndexKeysWrapper class. - - The wrapped object. - A new instance of IndexKeysWrapper or null. - - - - Represents a wrapped object that can be used where an IMongoCollectionOptions is expected (the wrapped object is expected to serialize properly). - - - - - Initializes a new instance of the CollectionOptionsWrapper class. - - The wrapped object. - - - - Creates a new instance of the CollectionOptionsWrapper class. - - The wrapped object. - A new instance of CollectionOptionsWrapper or null. - - - - Represents an instance of a MongoDB server host (in the case of a replica set a MongoServer uses multiple MongoServerInstances). - - - - - Checks whether the server is alive (throws an exception if not). - - - - - Verifies the state of the server instance. - - - - - Occurs when the value of the State property changes. - - - - - Gets the address of this server instance. - - - - - Gets the version of this server instance. - - - - - Gets the exception thrown the last time Connect was called (null if Connect did not throw an exception). - - - - - Gets the connection pool for this server instance. - - - - - Gets the IP end point of this server instance. - - - - - Gets whether this server instance is an arbiter instance. - - - - - Gets the result of the most recent ismaster command sent to this server instance. - - - - - Gets whether this server instance is a passive instance. - - - - - Gets whether this server instance is a primary. - - - - - Gets whether this server instance is a secondary. - - - - - Gets the max document size for this server instance. - - - - - Gets the max message length for this server instance. - - - - - Gets the unique sequential Id for this server instance. - - - - - Gets the server for this server instance. - - - - - Gets the state of this server instance. - - - - - Represents a DBRef (a convenient way to refer to a document). - - - - - Creates a MongoDBRef. - - The name of the collection that contains the document. - The Id of the document. - - - - Creates a MongoDBRef. - - The name of the database that contains the document. - The name of the collection that contains the document. - The Id of the document. - - - - Gets the name of the database that contains the document. - - - - - Gets the name of the collection that contains the document. - - - - - Gets the Id of the document. - - - - - Represents the results of a validate collection command. - - - - - Initializes a new instance of the ValidateCollectionResult class. - - - - - Gets the data size of the collection. - - - - - Gets the number of documents that have been deleted from the collection. - - - - - Gets the number of documents that have been deleted from the collection. - - - - - Gets the errors returned by validate (or an empty array if there were no errors). - - - - - Gets the number of extents in the collection. - - - - - Gets the first extent of the collection. - - - - - Gets details of the first extent of the collection. - - - - - Gets the number of indexes in the collection. - - - - - Gets whether the collection is valid. - - - - - Gets a dictionary containing the number of keys per index. - - - - - Gets the last extent of the collection. - - - - - Gets the size of the last extent of the collection. - - - - - Gets the namespace. - - - - - Gets the padding factor of the collection. - - - - - Gets the number of records in the collection. - - - - - Gets the result string. - - - - - Gets any warning returned by the validate command (or null if there is no warning). - - - - - Represents the details of the first extent of the collection. - - - - - Gets the location of the extent. - - - - - Gets the location of the first record of the extent. - - - - - Gets the location of the last record of the extent. - - - - - Gets the nsdiag value of the extent. - - - - - Gets the size of the extent. - - - - - Gets the next extent. - - - - - Gets the prev extent. - - - - - A builder for specifying a sort order. - - - - - Adds keys to be sorted by in ascending order. - - One or more key names. - The builder (so method calls can be chained). - - - - Adds keys to be sorted by in descending order. - - One or more key names. - The builder (so method calls can be chained). - - - - Gets a null value with a type of IMongoSortBy. - - - - - A builder for specifying a sort order. - - - - - Initializes a new instance of the SortByBuider class. - - - - - Adds keys to be sorted by in ascending order. - - One or more key names. - The builder (so method calls can be chained). - - - - Adds keys to be sorted by in descending order. - - One or more key names. - The builder (so method calls can be chained). - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - A builder for creating queries. - - - - - Tests that the named array element contains all of the values (see $all). - - The name of the element to test. - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the named array element contains all of the values (see $all). - - The name of the element to test. - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the named array element contains all of the values (see $all). - - The name of the element to test. - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that all the subqueries are true (see $and in newer versions of the server). - - A list of subqueries. - A query. - - - - Tests that at least one item of the named array element matches a query (see $elemMatch). - - The name of the element to test. - The query to match elements with. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to some value. - - The name of the element to test. - The value to compare to. - A query. - - - - Tests that an element of that name does or does not exist (see $exists). - - The name of the element to test. - Whether to test for the existence or absence of an element. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is greater than some value (see $gt). - - The name of the element to test. - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is greater than or equal to some value (see $gte). - - The name of the element to test. - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The name of the element to test. - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The name of the element to test. - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The name of the element to test. - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is less than some value (see $lt). - - The name of the element to test. - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is less than or equal to some value (see $lte). - - The name of the element to test. - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element matches a regular expression (see $regex). - - The name of the element to test. - The regular expression to match against. - A query. - - - - Tests that the modulus of the value of the named element matches some value (see $mod). - - The name of the element to test. - The modulus. - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to some value (see $ne). - - The name of the element to test. - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is near some location (see $near). - - The name of the element to test. - The x value of the origin. - The y value of the origin. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is near some location (see $near). - - The name of the element to test. - The x value of the origin. - The y value of the origin. - The max distance for a document to be included in the results. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is near some location (see $near and $nearSphere). - - The name of the element to test. - The x value of the origin. - The y value of the origin. - The max distance for a document to be included in the results. - Whether to do a spherical search. - The builder (so method calls can be chained). - - - - Tests that none of the subqueries is true (see $nor). - - The subqueries. - A query. - - - - Tests that the value of the named element does not match any of the tests that follow (see $not). - - The name of the element to test. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The name of the element to test. - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The name of the element to test. - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The name of the element to test. - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that at least one of the subqueries is true (see $or). - - The subqueries. - A query. - - - - Tests that the size of the named array is equal to some value (see $size). - - The name of the element to test. - The size to compare to. - The builder (so method calls can be chained). - - - - Tests that the type of the named element is equal to some type (see $type). - - The name of the element to test. - The type to compare to. - The builder (so method calls can be chained). - - - - Tests that a JavaScript expression is true (see $where). - - The where clause. - A query. - - - - Tests that the value of the named element is within a circle (see $within and $center). - - The name of the element to test. - The x coordinate of the origin. - The y coordinate of the origin. - The radius of the circle. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is within a circle (see $within and $center/$centerSphere). - - The name of the element to test. - The x coordinate of the origin. - The y coordinate of the origin. - The radius of the circle. - Whether to do a spherical search. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is within a rectangle (see $within and $box). - - The name of the element to test. - The x coordinate of the lower left corner. - The y coordinate of the lower left corner. - The x coordinate of the upper right corner. - The y coordinate of the upper right corner. - The builder (so method calls can be chained). - - - - Gets a null value with a type of IMongoQuery. - - - - - A builder for creating queries. - - - - - Initializes a new instance of the QueryBuilder class. - - A document representing the query. - - - - Returns the result of the builder as a BsonDocument. - - A BsonDocument. - - - - Serializes the result of the builder to a BsonWriter. - - The writer. - The nominal type. - The serialization options. - - - - A builder for creating queries. - - - - - Initializes a new instance of the QueryComplete class. - - A document representing the query. - - - - A builder for creating queries. - - - - - Initializes a new instance of the QueryConditionList class. - - The name of the element to test. - - - - Tests that the named array element contains all of the values (see $all). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the named array element contains all of the values (see $all). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the named array element contains all of the values (see $all). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that at least one item of the named array element matches a query (see $elemMatch). - - The query to match elements with. - The builder (so method calls can be chained). - - - - Tests that an element of that name does or does not exist (see $exists). - - Whether to test for the existence or absence of an element. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is greater than some value (see $gt). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is greater than or equal to some value (see $gte). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is less than some value (see $lt). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is less than or equal to some value (see $lte). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the modulus of the value of the named element matches some value (see $mod). - - The modulus. - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to some value (see $ne). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is near some location (see $near). - - The x value of the origin. - The y value of the origin. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is near some location (see $near). - - The x value of the origin. - The y value of the origin. - The max distance for a document to be included in the results. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is near some location (see $near and $nearSphere). - - The x value of the origin. - The y value of the origin. - The max distance for a document to be included in the results. - Whether to do a spherical search. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the size of the named array is equal to some value (see $size). - - The size of the array. - The builder (so method calls can be chained). - - - - Tests that the type of the named element is equal to some type (see $type). - - The type. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is within a circle (see $within and $center). - - The x coordinate of the origin. - The y coordinate of the origin. - The radius of the circle. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is within a circle (see $within and $center/$centerSphere). - - The x coordinate of the origin. - The y coordinate of the origin. - The radius of the circle. - Whether to do a spherical search. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is within a rectangle (see $within and $box). - - The x coordinate of the lower left corner. - The y coordinate of the lower left corner. - The x coordinate of the upper right corner. - The y coordinate of the upper right corner. - The builder (so method calls can be chained). - - - - A builder for creating queries. - - - - - Initializes a new instance of the QueryNot class. - - The name of the element to test. - - - - Tests that the named array element contains all of the values (see $all). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the named array element contains all of the values (see $all). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the named array element contains all of the values (see $all). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that at least one item of the named array element matches a query (see $elemMatch). - - The query to match elements with. - The builder (so method calls can be chained). - - - - Tests that an element of that name does or does not exist (see $exists). - - Whether to test for the existence or absence of an element. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is greater than some value (see $gt). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is greater than or equal to some value (see $gte). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is less than some value (see $lt). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is less than or equal to some value (see $lte). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the modulus of the value of the named element matches some value (see $mod). - - The modulus. - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to some value (see $ne). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element matches a regular expression (see $regex). - - The regular expression to match against. - A query. - - - - Tests that the size of the named array is equal to some value (see $size). - - The size of the array. - The builder (so method calls can be chained). - - - - Tests that the type of the named element is equal to some type (see $type). - - The type. - The builder (so method calls can be chained). - - - - A builder for creating queries. - - - - - Initializes a new instance of the QueryNotConditionList. - - The name of the first element to test. - - - - Tests that the named array element contains all of the values (see $all). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the named array element contains all of the values (see $all). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the named array element contains all of the values (see $all). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that at least one item of the named array element matches a query (see $elemMatch). - - The query to match elements with. - The builder (so method calls can be chained). - - - - Tests that an element of that name does or does not exist (see $exists). - - Whether to test for the existence or absence of an element. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is greater than some value (see $gt). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is greater than or equal to some value (see $gte). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is equal to one of a list of values (see $in). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is less than some value (see $lt). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is less than or equal to some value (see $lte). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the modulus of the value of the named element matches some value (see $mod). - - The modulus. - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to some value ($ne). - - The value to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the value of the named element is not equal to any of a list of values (see $nin). - - The values to compare to. - The builder (so method calls can be chained). - - - - Tests that the size of the named array is equal to some value (see $size). - - The size of the array. - The builder (so method calls can be chained). - - - - Tests that the type of the named element is equal to some type (see $type). - - The type. - The builder (so method calls can be chained). - - - + + + + MongoDB.Driver + + + + + Represents a MongoDB internal exception (almost surely the result of a bug). + + + + + Represents a MongoDB exception. + + + + + Initializes a new instance of the MongoException class. + + The error message. + + + + Initializes a new instance of the MongoException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the MongoException class (this overload supports deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Initializes a new instance of the MongoInternalException class. + + The error message. + + + + Initializes a new instance of the MongoInternalException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the MongoInternalException class (this overload supports deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Represents a MongoDB connection exception. + + + + + Initializes a new instance of the MongoConnectionException class. + + The error message. + + + + Initializes a new instance of the MongoConnectionException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the MongoConnectionException class (this overload supports deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Represents a wrapped object that can be used where an IMongoGeoNearOptions is expected (the wrapped object is expected to serialize properly). + + + + + Abstract base class for wrapper classes. + + + + + Initializes a new instance of the BaseWrapper class. + + The wrapped object. + + + + Initializes a new instance of the BaseWrapper class. + + The nominal type of the wrapped object. + The wrapped object. + + + + Deserialize is an invalid operation for wrapper classes. + + Not applicable. + Not applicable. + Not applicable. + Not applicable. + + + + GetDocumentId is an invalid operation for wrapper classes. + + Not applicable. + Not applicable. + Not applicable. + Not applicable. + + + + Serializes a wrapped object to a BsonWriter. + + The writer. + The nominal type (ignored). + The serialization options. + + + + SetDocumentId is an invalid operation for wrapper classes. + + Not applicable. + + + + A marker interface that represents geo search options (see GeoNearOptionsDocument and the GeoNearOptions builder). + + + + + Initializes a new instance of the GeoNearOptionsWrapper class. + + The wrapped object. + + + + Creates a new instance of the GeoNearOptionsWrapper class. + + The wrapped object. + A new instance of GeoNearOptionsWrapper or null. + + + + A marker interface that represents a list of fields (see FieldsDocument and the Fields builder). + + + + + A builder for the options used when creating a collection. + + + + + Sets whether to automatically create an index on the _id element. + + Whether to automatically create an index on the _id element. + The builder (so method calls can be chained). + + + + Sets whether the collection is capped. + + Whether the collection is capped. + The builder (so method calls can be chained). + + + + Sets the max number of documents in a capped collection. + + The max number of documents. + The builder (so method calls can be chained). + + + + Sets the max size of a capped collection. + + The max size. + The builder (so method calls can be chained). + + + + Gets a null value with a type of IMongoCollectionOptions. + + + + + A builder for the options used when creating a collection. + + + + + Abstract base class for the builders. + + + + + Initializes a new instance of the BuilderBase class. + + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Returns a string representation of the settings. + + A string representation of the settings. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + A marker interface that represents options for creating a collection (see CollectionOptionsDocument and the CollectionOptions builder). + + + + + Initializes a new instance of the CollectionOptionsBuilder class. + + + + + Sets whether to automatically create an index on the _id element. + + Whether to automatically create an index on the _id element. + The builder (so method calls can be chained). + + + + Sets whether the collection is capped. + + Whether the collection is capped. + The builder (so method calls can be chained). + + + + Sets the max number of documents in a capped collection. + + The max number of documents. + The builder (so method calls can be chained). + + + + Sets the max size of a capped collection. + + The max size. + The builder (so method calls can be chained). + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + Default values for various Mongo settings. + + + + + Gets or sets whether the driver should assign a value to empty Ids on Insert. + + + + + Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize). + + + + + Gets or sets the connect timeout. + + + + + Gets or sets the representation to use for Guids (this is an alias for BsonDefaults.GuidRepresentation). + + + + + Gets or sets the max connection idle time. + + + + + Gets or sets the max connection life time. + + + + + Gets or sets the max connection pool size. + + + + + Gets or sets the max document size (this is an alias for BsonDefaults.MaxDocumentSize). + + + + + Gets or sets the max message length. + + + + + Gets or sets the min connection pool size. + + + + + Gets or sets the safe mode. + + + + + Gets or sets the socket timeout. + + + + + Gets or sets the TCP receive buffer size. + + + + + Gets or sets the TCP send buffer size. + + + + + Gets or sets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize, see also WaitQueueSize). + + + + + Gets or sets the wait queue size (see also WaitQueueMultiple). + + + + + Gets or sets the wait queue timeout. + + + + + Represents a BSON document that can be used where an IMongoSortBy is expected. + + + + + A marker interface that represents a sort order (see SortByDocument and the SortBy builder). + + + + + Initializes a new instance of the SortByDocument class. + + + + + Initializes a new instance of the SortByDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the SortByDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the SortByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the SortByDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the SortByDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the SortByDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + Represents a BSON document that can be used where an IMongoCommand is expected. + + + + + Represents a BSON document that can be used where an IMongoQuery is expected. + + + + + A marker interface that represents a query (see QueryDocument and the Query builder). + + + + + Initializes a new instance of the QueryDocument class. + + + + + Initializes a new instance of the QueryDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the QueryDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the QueryDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the QueryDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the QueryDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the QueryDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + A marker interface that represents a command (see CommandDocument). + + + + + Initializes a new instance of the CommandDocument class. + + + + + Initializes a new instance of the CommandDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the CommandDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the CommandDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the CommandDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the CommandDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + A marker interface that represents options for a map/reduce operation (see MapReduceOptionsDocument and the MapReduceOptions builder). + + + + + A marker interface that represents options for creating an index (see IndexOptionsDocument and the IndexOptions builder). + + + + + Represents a MongoDB database and the settings used to access it. This class is thread-safe. + + + + + Creates a new instance of MongoDatabase. Normally you would call one of the indexers or GetDatabase methods + of MongoServer instead. + + The server that contains this database. + The settings to use to access this database. + + + + Creates a new instance or returns an existing instance of MongoDatabase. Only one instance + is created for each combination of database settings. Automatically creates an instance + of MongoServer if needed. + + Server and database settings in the form of a MongoConnectionStringBuilder. + + A new or existing instance of MongoDatabase. + + + + + Creates a new instance or returns an existing instance of MongoDatabase. Only one instance + is created for each combination of database settings. Automatically creates an instance + of MongoServer if needed. + + The server settings for the server that contains this database. + The name of this database (will be accessed using default settings). + + A new or existing instance of MongoDatabase. + + + + + Creates a new instance or returns an existing instance of MongoDatabase. Only one instance + is created for each combination of database settings. Automatically creates an instance + of MongoServer if needed. + + Server and database settings in the form of a MongoUrl. + + A new or existing instance of MongoDatabase. + + + + + Creates a new instance or returns an existing instance of MongoDatabase. Only one instance + is created for each combination of database settings. Automatically creates an instance + of MongoServer if needed. + + Server and database settings in the form of a connection string. + + A new or existing instance of MongoDatabase. + + + + + Creates a new instance or returns an existing instance of MongoDatabase. Only one instance + is created for each combination of database settings. Automatically creates an instance + of MongoServer if needed. + + Server and database settings in the form of a Uri. + + A new or existing instance of MongoDatabase. + + + + + Adds a user to this database. + + The user's credentials. + + + + Adds a user to this database. + + The user's credentials. + True if the user is a read-only user. + + + + Adds a user to this database. + + The user. + + + + Tests whether a collection exists on this database. + + The name of the collection. + True if the collection exists. + + + + Creates a collection. MongoDB creates collections automatically when they are first used, so + this command is mainly here for frameworks. + + The name of the collection. + A CommandResult. + + + + Creates a collection. MongoDB creates collections automatically when they are first used, so + you only need to call this method if you want to provide non-default options. + + The name of the collection. + Options for creating this collection (usually a CollectionOptionsDocument or constructed using the CollectionOptions builder). + A CommandResult. + + + + Creates an instance of MongoCollectionSettings for the named collection with the rest of the settings inherited. + You can override some of these settings before calling GetCollection. + + The default document type for this collection. + The name of this collection. + A MongoCollectionSettings. + + + + Creates an instance of MongoCollectionSettings for the named collection with the rest of the settings inherited. + You can override some of these settings before calling GetCollection. + + The default document type for this collection. + The name of this collection. + A MongoCollectionSettings. + + + + Drops a database. + + + + + Drops a collection. + + The name of the collection to drop. + A CommandResult. + + + + Evaluates JavaScript code at the server. + + Flags that control Eval options. + The code to evaluate. + Optional arguments (only used when the code is a function with parameters). + The result of evaluating the code. + + + + Evaluates JavaScript code at the server. + + The code to evaluate. + Optional arguments (only used when the code is a function with parameters). + The result of evaluating the code. + + + + Fetches the document referred to by the DBRef. + + The to fetch. + A BsonDocument (or null if the document was not found). + + + + Fetches the document referred to by the DBRef, deserialized as a . + + The nominal type of the document to fetch. + The to fetch. + A (or null if the document was not found). + + + + Fetches the document referred to by the DBRef. + + The nominal type of the document to fetch. + The to fetch. + An instance of nominalType (or null if the document was not found). + + + + Finds all users of this database. + + An array of users. + + + + Finds a user of this database. + + The username. + The user. + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of TDefaultDocument. + + The default document type for this collection. + The settings to use when accessing this collection. + An instance of MongoCollection. + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of TDefaultDocument. + + The name of the collection. + An instance of MongoCollection. + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of TDefaultDocument. + + The name of the collection. + The safe mode to use when accessing this collection. + An instance of MongoCollection. + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of TDefaultDocument. + + The settings to use when accessing this collection. + An instance of MongoCollection. + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of BsonDocument. + + The name of the collection. + An instance of MongoCollection. + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of BsonDocument. + + The name of the collection. + The safe mode to use when accessing this collection. + An instance of MongoCollection. + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of BsonDocument. + + The default document type. + The name of the collection. + An instance of MongoCollection. + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of BsonDocument. + + The default document type. + The name of the collection. + The safe mode to use when accessing this collection. + An instance of MongoCollection. + + + + Gets a list of the names of all the collections in this database. + + A list of collection names. + + + + Gets the current operation. + + The current operation. + + + + Gets an instance of MongoGridFS for this database using custom GridFS settings. + + The GridFS settings to use. + An instance of MongoGridFS. + + + + Gets a sister database on the same server. + + The name of the sister database. + An instance of MongoDatabase. + + + + Gets the current database stats. + + An instance of DatabaseStatsResult. + + + + Removes a user from this database. + + The user to remove. + + + + Removes a user from this database. + + The username to remove. + + + + Renames a collection on this database. + + The old name for the collection. + The new name for the collection. + A CommandResult. + + + + Renames a collection on this database. + + The old name for the collection. + The new name for the collection. + Whether to drop the target collection first if it already exists. + A CommandResult. + + + + Lets the server know that this thread is done with a series of related operations. Instead of calling this method it is better + to put the return value of RequestStart in a using statement. + + + + + Lets the server know that this thread is about to begin a series of related operations that must all occur + on the same connection. The return value of this method implements IDisposable and can be placed in a + using statement (in which case RequestDone will be called automatically when leaving the using statement). + + A helper object that implements IDisposable and calls from the Dispose method. + + + + Lets the server know that this thread is about to begin a series of related operations that must all occur + on the same connection. The return value of this method implements IDisposable and can be placed in a + using statement (in which case RequestDone will be called automatically when leaving the using statement). + + Whether queries should be sent to secondary servers. + A helper object that implements IDisposable and calls from the Dispose method. + + + + Removes all entries for this database in the index cache used by EnsureIndex. Call this method + when you know (or suspect) that a process other than this one may have dropped one or + more indexes. + + + + + Runs a command on this database. + + The command object. + A CommandResult + + + + Runs a command on this database. + + The name of the command. + A CommandResult + + + + Runs a command on this database and returns the result as a TCommandResult. + + The command object. + A TCommandResult + + + + Runs a command on this database and returns the result as a TCommandResult. + + The name of the command. + A TCommandResult + + + + Runs a command on this database and returns the result as a TCommandResult. + + The command result type. + The command object. + A TCommandResult + + + + Runs a command on this database and returns the result as a TCommandResult. + + The command result type. + The name of the command. + A TCommandResult + + + + Gets a canonical string representation for this database. + + A canonical string representation for this database. + + + + Gets the command collection for this database. + + + + + Gets the credentials being used to access this database. + + + + + Gets the default GridFS instance for this database. The default GridFS instance uses default GridFS + settings. See also GetGridFS if you need to use GridFS with custom settings. + + + + + Gets the name of this database. + + + + + Gets the server that contains this database. + + + + + Gets the settings being used to access this database. + + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of BsonDocument. + + The name of the collection. + An instance of MongoCollection. + + + + Gets a MongoCollection instance representing a collection on this database + with a default document type of BsonDocument. + + The name of the collection. + The safe mode to use when accessing this collection. + An instance of MongoCollection. + + + + Represents a MongoDB server (either a single instance or a replica set) and the settings used to access it. This class is thread-safe. + + + + + Creates a new instance of MongoServer. Normally you will use one of the Create methods instead + of the constructor to create instances of this class. + + The settings for this instance of MongoServer. + + + + Creates a new instance or returns an existing instance of MongoServer. Only one instance + is created for each combination of server settings. + + + A new or existing instance of MongoServer. + + + + + Creates a new instance or returns an existing instance of MongoServer. Only one instance + is created for each combination of server settings. + + Server settings in the form of a MongoConnectionStringBuilder. + + A new or existing instance of MongoServer. + + + + + Creates a new instance or returns an existing instance of MongoServer. Only one instance + is created for each combination of server settings. + + Server settings. + + A new or existing instance of MongoServer. + + + + + Creates a new instance or returns an existing instance of MongoServer. Only one instance + is created for each combination of server settings. + + Server settings in the form of a MongoUrl. + + A new or existing instance of MongoServer. + + + + + Creates a new instance or returns an existing instance of MongoServer. Only one instance + is created for each combination of server settings. + + Server settings in the form of a connection string. + + A new or existing instance of MongoServer. + + + + + Creates a new instance or returns an existing instance of MongoServer. Only one instance + is created for each combination of server settings. + + Server settings in the form of a Uri. + + A new or existing instance of MongoServer. + + + + + Unregisters a server from the dictionary used by Create to remember which servers have already been created. + + The server to unregister. + + + + Connects to the server. Normally there is no need to call this method as + the driver will connect to the server automatically when needed. + + + + + Connects to the server. Normally there is no need to call this method as + the driver will connect to the server automatically when needed. + + What to wait for before returning (when connecting to a replica set). + + + + Connects to the server. Normally there is no need to call this method as + the driver will connect to the server automatically when needed. + + How long to wait before timing out. + + + + Connects to the server. Normally there is no need to call this method as + the driver will connect to the server automatically when needed. + + How long to wait before timing out. + What to wait for before returning (when connecting to a replica set). + + + + Copies a database. + + The name of an existing database. + The name of the new database. + + + + Creates an instance of MongoDatabaseSettings for the named database with the rest of the settings inherited. + You can override some of these settings before calling GetDatabase. + + The name of the database. + An instance of MongoDatabase for . + + + + Tests whether a database exists. + + The name of the database. + True if the database exists. + + + + Disconnects from the server. Normally there is no need to call this method so + you should be sure to have a good reason to call it. + + + + + Drops a database. + + The name of the database to be dropped. + A . + + + + Fetches the document referred to by the DBRef. + + The to fetch. + A BsonDocument (or null if the document was not found). + + + + Fetches the document referred to by the DBRef, deserialized as a . + + The nominal type of the document to fetch. + The to fetch. + A (or null if the document was not found). + + + + Fetches the document referred to by the DBRef. + + The nominal type of the document to fetch. + The to fetch. + The document (or null if the document was not found). + + + + Gets a MongoDatabase instance representing the admin database on this server. Only one instance + is created for each combination of database settings. + + The credentials to use with the admin database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing the admin database on this server. Only one instance + is created for each combination of database settings. + + The credentials to use with the admin database. + The safe mode to use with the admin database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing the admin database on this server. Only one instance + is created for each combination of database settings. + + The safe mode to use with the admin database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The settings to use with this database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The name of the database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The name of the database. + The credentials to use with this database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The name of the database. + The credentials to use with this database. + The safe mode to use with this database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The name of the database. + The safe mode to use with this database. + A new or existing instance of MongoDatabase. + + + + Gets the names of the databases on this server. + + A list of database names. + + + + Gets the last error (if any) that occurred on this connection. You MUST be within a RequestStart to call this method. + + The last error () + + + + Checks whether the server is alive (throws an exception if not). If server is a replica set, pings all members one at a time. + + + + + Reconnects to the server. Normally there is no need to call this method. All connections + are closed and new connections will be opened as needed. Calling + this method frequently will result in connection thrashing. + + + + + Lets the server know that this thread is done with a series of related operations. Instead of calling this method it is better + to put the return value of RequestStart in a using statement. + + + + + Lets the server know that this thread is about to begin a series of related operations that must all occur + on the same connection. The return value of this method implements IDisposable and can be placed in a + using statement (in which case RequestDone will be called automatically when leaving the using statement). + + One of the databases involved in the related operations. + A helper object that implements IDisposable and calls from the Dispose method. + + + + Lets the server know that this thread is about to begin a series of related operations that must all occur + on the same connection. The return value of this method implements IDisposable and can be placed in a + using statement (in which case RequestDone will be called automatically when leaving the using statement). + + One of the databases involved in the related operations. + Whether queries should be sent to secondary servers. + A helper object that implements IDisposable and calls from the Dispose method. + + + + Removes all entries in the index cache used by EnsureIndex. Call this method + when you know (or suspect) that a process other than this one may have dropped one or + more indexes. + + + + + Runs a command on the admin database. + + The command to run. + The result of the command (see ). + + + + Runs a command on the admin database. + + The name of the command to run. + The result of the command (as a ). + + + + Runs a command on the admin database. + + The type to use for the command result. + The command to run. + The result of the command (as a ). + + + + Runs a command on the admin database. + + The type to use for the command result. + The name of the command to run. + The result of the command (as a ). + + + + Runs a command on the admin database. + + The type to use for the command result. + The command to run. + The result of the command. + + + + Runs a command on the admin database. + + The type to use for the command result. + The name of the command to run. + The result of the command. + + + + Shuts down the server. + + + + + Verifies the state of the server (in the case of a replica set all members are contacted one at a time). + + + + + Gets or sets the maximum number of instances of MongoServer that will be allowed to be created. + + + + + Gets the number of instances of MongoServer that have been created. + + + + + Gets the admin database for this server. + + + + + Gets the arbiter instances. + + + + + Gets the build info of the server. + + + + + Gets the most recent connection attempt number. + + + + + Gets the index cache (used by EnsureIndex) for this server. + + + + + Gets the one and only instance for this server. + + + + + Gets the instances for this server. + + + + + Gets the passive instances. + + + + + Gets the primary instance (null if there is no primary). + + + + + Gets the name of the replica set (null if not connected to a replica set). + + + + + Gets the connection reserved by the current RequestStart scope (null if not in the scope of a RequestStart). + + + + + Gets the RequestStart nesting level for the current thread. + + + + + Gets the secondary instances. + + + + + Gets the unique sequential Id for this server. + + + + + Gets the settings for this server. + + + + + Gets the current state of this server (as of the last operation, not updated until another operation is performed). + + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The name of the database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The name of the database. + The credentials to use with this database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The settings to use with this database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The name of the database. + The credentials to use with this database. + The safe mode to use with this database. + A new or existing instance of MongoDatabase. + + + + Gets a MongoDatabase instance representing a database on this server. Only one instance + is created for each combination of database settings. + + The name of the database. + The safe mode to use with this database. + A new or existing instance of MongoDatabase. + + + + Represents the state of a connection. + + + + + The connection has not yet been initialized. + + + + + The connection is open. + + + + + The connection is closed. + + + + + Represents a connection to a MongoServerInstance. + + + + + Gets the connection pool that this connection belongs to. + + + + + Gets the DateTime that this connection was created at. + + + + + Gets the generation of the connection pool that this connection belongs to. + + + + + Gets the DateTime that this connection was last used at. + + + + + Gets a count of the number of messages that have been sent using this connection. + + + + + Gets the RequestId of the last message sent on this connection. + + + + + Gets the server instance this connection is connected to. + + + + + Gets the state of this connection. + + + + + Represents a wrapped object that can be used where an IMongoUpdate is expected (the wrapped object is expected to serialize properly). + + + + + A marker interface that represents an update modifier (see UpdateDocument and the Update builder). + + + + + Initializes a new instance of the UpdateWrapper class. + + The nominal type of the wrapped object. + The wrapped object. + + + + Creates a new instance of the UpdateWrapper class (this overload is used when the update + modifier is a replacement document). + + The nominal type of the wrapped object. + The wrapped object. + A new instance of UpdateWrapper or null. + + + + Creates a new instance of the UpdateWrapper class. + + The nominal type of the wrapped object. + The wrapped object. + A new instance of UpdateWrapper or null. + + + + Represents a BSON document that can be used where an IMongoGeoNearOptions is expected. + + + + + Initializes a new instance of the GeoNearOptionsDocument class. + + + + + Initializes a new instance of the GeoNearOptionsDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the GeoNearOptionsDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the GeoNearOptionsDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the GeoNearOptionsDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + Represents the options to use for an Insert or InsertBatch operation + + + + + Initializes a new instance of the MongoInsertOptions class. + + The collection from which to get default settings for the options. + + + + Gets or sets whether to check element names before proceeding with the Insert. + + + + + Gets or sets the SafeMode to use for the Insert. + + + + + Represents the results of the collection stats command. + + + + + Represents the result of a command (there are also subclasses for various commands). + + + + + Initializes a new instance of the CommandResult class. + + + + + Initializes a new instance of the CommandResult class. + + The command. + The response. + + + + Initializes an existing instance of the CommandResult class. + + The command. + The response. + + + + Gets the command. + + + + + Gets the command name. + + + + + Gets the response. + + + + + Gets the error message (null if none). + + + + + Gets the Ok value from the response. + + + + + Initializes a new instance of the CollectionStatsResult class. + + + + + Gets the average object size. + + + + + Gets the data size. + + + + + Gets the extent count. + + + + + Gets the flags. + + + + + Gets the index count. + + + + + Gets the index sizes. + + + + + Gets whether the collection is capped. + + + + + Gets the last extent size. + + + + + Gets the index count. + + + + + Gets the namespace. + + + + + Gets the object count. + + + + + Gets the padding factor. + + + + + Gets the storage size. + + + + + Gets the total index size. + + + + + Represents a collection of index sizes. + + + + + Initializes a new instance of the IndexSizesResult class. + + The index sizes document. + + + + Tests whether the results contain the size of an index. + + The name of the index. + True if the results contain the size of the index. + + + + Gets the size of an index. + + The name of the index. + The size of the index. + + + + Gets the count of indexes. + + + + + Gets the names of the indexes. + + + + + Gets the sizes of the indexes. + + + + + A builder for specifying which fields of a document the server should return. + + + + + Adds one or more field names to be excluded from the results. + + One or more field names. + The builder (so method calls can be chained). + + + + Adds one or more field names to be included in the results. + + One or more field names. + The builder (so method calls can be chained). + + + + Adds a slice to be included in the results. + + The name of the field to slice. + The size of the slice (negative sizes are taken from the end). + The builder (so method calls can be chained). + + + + Adds a slice to be included in the results. + + The name of the field to slice. + The number of values to skip. + The number of values to extract. + The builder (so method calls can be chained). + + + + Gets a null value with a type of IMongoFields. + + + + + A builder for specifying which fields of a document the server should return. + + + + + Initializes a new instance of the FieldsBuilder class. + + + + + Adds one or more field names to be excluded from the results. + + One or more field names. + The builder (so method calls can be chained). + + + + Adds one or more field names to be included in the results. + + One or more field names. + The builder (so method calls can be chained). + + + + Adds a slice to be included in the results. + + The name of the field to slice. + The size of the slice (negative sizes are taken from the end). + The builder (so method calls can be chained). + + + + Adds a slice to be included in the results. + + The name of the field to slice. + The number of values to skip. + The number of values to extract. + The builder (so method calls can be chained). + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + Represents a BSON document that can be used where an IMongoFields is expected. + + + + + Initializes a new instance of the FieldsDocument class. + + + + + Initializes a new instance of the FieldsDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the FieldsDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the FieldsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the FieldsDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the FieldsDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the FieldsDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + Represents a wrapped object that can be used where an IMongoIndexOptions is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the IndexOptionsWrapper class. + + The wrapped object. + + + + Creates a new instance of the IndexOptionsWrapper class. + + The wrapped object. + A new instance of IndexOptionsWrapper or null. + + + + Represents a BSON document that can be used where an IMongoIndexOptions is expected. + + + + + Initializes a new instance of the IndexOptionsDocument class. + + + + + Initializes a new instance of the IndexOptionsDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the IndexOptionsDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the IndexOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the IndexOptionsDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the IndexOptionsDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the IndexOptionsDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + A builder for the options of the GeoNear command. + + + + + Sets the distance multiplier. + + The distance multiplier. + The builder (so method calls can be chained). + + + + Sets the max distance. + + The max distance. + The builder (so method calls can be chained). + + + + Sets whether to use a spherical search. + + Whether to use a spherical search. + The builder (so method calls can be chained). + + + + Gets a null value with a type of IMongoGeoNearOptions. + + + + + A builder for the options of the GeoNear command. + + + + + Initializes a new instance of the GeoNearOptionsBuilder class. + + + + + Sets the distance multiplier. + + The distance multiplier. + The builder (so method calls can be chained). + + + + Sets the max distance. + + The max distance. + The builder (so method calls can be chained). + + + + Sets whether to use a spherical search. + + Whether to use a spherical search. + The builder (so method calls can be chained). + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + Represents information about a GridFS file (patterned after .NET's FileInfo class). + + + + + Initializes a new instance of the GridFSFileInfo class. + + The GridFS file system that contains the GridFS file. + The remote file name. + + + + Initializes a new instance of the GridFSFileInfo class. + + The GridFS file system that contains the GridFS file. + The remote file name. + The chunk size. + + + + Initializes a new instance of the GridFSFileInfo class. + + The GridFS file system that contains the GridFS file. + The remote file name. + The create options. + + + + Compares two MongoGridFSFileInfos. + + The first MongoGridFSFileInfo. + The other MongoGridFSFileInfo. + True if the two MongoGridFSFileInfos are not equal (or one is null and the other is not). + + + + Compares two MongoGridFSFileInfos. + + The first MongoGridFSFileInfo. + The other MongoGridFSFileInfo. + True if the two MongoGridFSFileInfos are equal (or both null). + + + + Appends UTF-8 encoded text to an existing GridFS file. + + A StreamWriter. + + + + Copies a GridFS file. + + The destination file name. + The file info of the new GridFS file. + + + + Copies a GridFS file. + + The destination file name. + The create options. + The file info of the new GridFS file. + + + + Creates or overwrites a GridFS file. + + A stream. + + + + Creates or opens a GridFS file for writing UTF-8 encoded text. + + A stream. + + + + Deletes a GridFS file. + + + + + Compares this MongoGridFSFileInfo to another MongoGridFSFileInfo. + + The other MongoGridFSFileInfo. + True if the two MongoGridFSFileInfos are equal. + + + + Compares this MongoGridFSFileInfo to another object. + + The other object. + True if the other object is a MongoGridFSFileInfo and equal to this one. + + + + Gets the hash code. + + The hash code. + + + + Moves the most recent version of a GridFS file. + + The destination file name. + + + + Opens a GridFS file with the specified mode. + + The mode. + A stream. + + + + Opens a GridFS file with the specified mode and access. + + The mode. + The access. + A stream. + + + + Opens an existing GridFS file for reading. + + A stream. + + + + Opens an existing UTF-8 encoded text GridFS file for reading. + + A stream reader. + + + + Opens an existing GridFS file for writing. + + A stream. + + + + Refreshes the GridFS file info from the server. + + + + + Gets the aliases. + + + + + Gets the chunk size. + + + + + Gets the content type. + + + + + Gets whether the GridFS file exists. + + + + + Gets the GridFS file system that contains this GridFS file. + + + + + Gets the GridFS file Id. + + + + + Gets the file lenth. + + + + + Gets the MD5 hash of the file contents. + + + + + Gets the metadata. + + + + + Gets the remote file name. + + + + + Gets the upload date. + + + + + Represents a MongoDB authentication exception + + + + + Initializes a new instance of the MongoAuthenticationException class. + + The error message. + + + + Initializes a new instance of the MongoAuthenticationException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the MongoAuthenticationException class (this overload supports deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Represents a BSON document that can be used where an IMongoUpdate is expected. + + + + + Initializes a new instance of the UpdateDocument class. + + + + + Initializes a new instance of the UpdateDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the UpdateDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the UpdateDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the UpdateDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the UpdateDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the UpdateDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + Represents a wrapped object that can be used where an IMongoQuery is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the QueryWrapper class. + + The wrapped object. + + + + Creates a new instance of the QueryWrapper class. + + The wrapped object. + A new instance of QueryWrapper or null. + + + + Represents a wrapped object that can be used where an IMongoCommand is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the CommandWrapper class. + + The wrapped object. + + + + Creates a new instance of the CommandWrapper class. + + The wrapped object. + A new instance of CommandWrapper or null. + + + + Represents a MongoDB GridFS exception. + + + + + Initializes a new instance of the MongoGridFSException class. + + The error message. + + + + Initializes a new instance of the MongoGridFSException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the MongoGridFSException class (this overload supports deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Represents a wrapped object that can be used where an IMongoMapReduceOptions is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the MapReduceOptionsWrapper class. + + The wrapped object. + + + + Creates a new instance of the MapReduceOptionsWrapper class. + + The wrapped object. + A new instance of MapReduceOptionsWrapper or null. + + + + Represents a MongoDB user. + + + + + Creates a new instance of MongoUser. + + The user's credentials. + Whether the user has read-only access. + + + + Creates a new instance of MongoUser. + + The username. + The password hash. + Whether the user has read-only access. + + + + Calculates the password hash. + + The username. + The password. + + + + + Returns a string representation of the credentials. + + A string representation of the user. + + + + Gets or sets the username. + + + + + Gets or sets the password hash. + + + + + Gets or sets whether the user is a read-only user. + + + + + Represents the result of a GeoNear command. + + + + + Initializes a new instance of the GeoNearResult class. + + + + + Gets the hits. + + + + + Gets the namespace. + + + + + Gets the stats. + + + + + Gets the hits. + + + + + Represents a collection of GeoNear hits. + + + + + Initializes a new instance of the GeoNearHits class. + + + + + Gets an enumerator for the hits. + + An enumerator. + + + + Gets the enumerator. + + + + + + Gets an individual hit. + + The zero based index of the hit. + The hit. + + + + Gets the count of the number of hits. + + + + + Gets an individual hit. + + The zero based index of the hit. + The hit. + + + + Represents a GeoNear hit. + + + + + Initializes a new instance of the GeoNearHit class. + + The hit. + + + + Gets the distance. + + + + + Gets the document. + + + + + Gets the document as a BsonDocument. + + + + + Gets the document. + + + + + Represents the stats of a GeoNear command. + + + + + Initializes a new instance of the GeoNearStats class. + + The stats. + + + + Gets the average distance. + + + + + Gets the count of b-tree locations. + + + + + Gets the duration. + + + + + Gets the max distance. + + + + + Gets the number of documents scanned. + + + + + Gets the number of documents loaded. + + + + + Represents the result of a GeoNear command. + + The type of the returned documents. + + + + Initializes a new instance of the GeoNearResult class. + + + + + Gets the hits. + + + + + Gets the hits. + + + + + Represents a collection of GeoNear hits. + + + + + Initializes a new instance of the GeoNearHits class. + + The hits. + + + + Gets an enumerator for the hits. + + An enumerator. + + + + Gets a hit. + + The zero based index of the hit. + The hit. + + + + Gets an enumerator for the hits. + + An enumerator. + + + + Gets the count of the number of hits. + + + + + Gets an individual hit. + + The zero based index of the hit. + The hit. + + + + Represents a GeoNear hit. + + + + + Initializes a new instance of the GeoNearHit class. + + The hit. + + + + Gets the document. + + + + + Gets the document. + + + + + Represents the output options of a map/reduce operation. + + + + + Allows strings to be implicitly used as the name of the output collection. + + The output collection name. + A MapReduceOutput. + + + + Gets a MapReduceOutput value that specifies that the output should be stored in a collection (replaces the entire collection). + + The output collection name. + A MapReduceOutput. + + + + Gets a MapReduceOutput value that specifies that the output should be stored in a collection (replaces the entire collection). + + The output database name. + The output collection name. + A MapReduceOutput. + + + + Gets a MapReduceOutput value that specifies that the output should be stored in a collection (adding new values and overwriting existing ones). + + The output collection name. + A MapReduceOutput. + + + + Gets a MapReduceOutput value that specifies that the output should be stored in a collection (adding new values and overwriting existing ones). + + The output database name. + The output collection name. + A MapReduceOutput. + + + + Gets a MapReduceOutput value that specifies that the output should be stored in a collection (using the reduce function to combine new values with existing values). + + The output collection name. + A MapReduceOutput. + + + + Gets a MapReduceOutput value that specifies that the output should be stored in a collection (using the reduce function to combine new values with existing values). + + The output database name. + The output collection name. + A MapReduceOutput. + + + + Gets a MapReduceOutput value that specifies that the output should returned inline. + + + + + A builder for the options of a Map/Reduce operation. + + + + + Sets the finalize function. + + The finalize function. + The builder (so method calls can be chained). + + + + Sets whether to keep the temp collection (obsolete in 1.8.0+). + + Whether to keep the temp collection. + The builder (so method calls can be chained). + + + + Sets the number of documents to send to the map function (useful in combination with SetSortOrder). + + The number of documents to send to the map function. + The builder (so method calls can be chained). + + + + Sets the output option (see MapReduceOutput). + + The output option. + The builder (so method calls can be chained). + + + + Sets the optional query that filters which documents are sent to the map function (also useful in combination with SetSortOrder and SetLimit). + + The query. + The builder (so method calls can be chained). + + + + Sets a scope that contains variables that can be accessed by the map, reduce and finalize functions. + + The scope. + The builder (so method calls can be chained). + + + + Sets the sort order (useful in combination with SetLimit, your map function should not depend on the order the documents are sent to it). + + The sort order. + The builder (so method calls can be chained). + + + + Sets the sort order (useful in combination with SetLimit, your map function should not depend on the order the documents are sent to it). + + The names of the keys to sort by. + The builder (so method calls can be chained). + + + + Sets whether the server should be more verbose when logging map/reduce operations. + + Whether the server should be more verbose. + The builder (so method calls can be chained). + + + + Gets a null value with a type of IMongoMapReduceOptions. + + + + + A builder for the options of a Map/Reduce operation. + + + + + Initializes a new instance of the MapReduceOptionsBuilder class. + + + + + Sets the finalize function. + + The finalize function. + The builder (so method calls can be chained). + + + + Sets whether to keep the temp collection (obsolete in 1.8.0+). + + Whether to keep the temp collection. + The builder (so method calls can be chained). + + + + Sets the number of documents to send to the map function (useful in combination with SetSortOrder). + + The number of documents to send to the map function. + The builder (so method calls can be chained). + + + + Sets the output option (see MapReduceOutput). + + The output option. + The builder (so method calls can be chained). + + + + Sets the optional query that filters which documents are sent to the map function (also useful in combination with SetSortOrder and SetLimit). + + The query. + The builder (so method calls can be chained). + + + + Sets a scope that contains variables that can be accessed by the map, reduce and finalize functions. + + The scope. + The builder (so method calls can be chained). + + + + Sets the sort order (useful in combination with SetLimit, your map function should not depend on the order the documents are sent to it). + + The sort order. + The builder (so method calls can be chained). + + + + Sets the sort order (useful in combination with SetLimit, your map function should not depend on the order the documents are sent to it). + + The names of the keys to sort by. + The builder (so method calls can be chained). + + + + Sets whether the server should be more verbose when logging map/reduce operations. + + Whether the server should be more verbose. + The builder (so method calls can be chained). + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + Flags used with the Remove method of MongoCollection. + + + + + No flags. + + + + + Remove only a single document. + + + + + Represents setting for GridFS. + + + + + Initializes a new instance of the MongoGridFSSettings class. + + + + + Initializes a new instance of the MongoGridFSSettings class. + + The chunk size. + The root collection name. + The safe mode. + + + + Compares two MongoGridFSSettings. + + The first MongoGridFSSettings. + The other MongoGridFSSettings. + True if the two MongoGridFSSettings are not equal (or one is null and the other is not). + + + + Compares two MongoGridFSSettingss. + + The first MongoGridFSSettings. + The other MongoGridFSSettings. + True if the two MongoGridFSSettings are equal (or both null). + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Compares this MongoGridFSSettings to another one. + + The other MongoGridFSSettings. + True if the two settings are equal. + + + + Compares this MongoGridFSSettings to another object. + + The other object. + True if the other objects is a MongoGridFSSettings and is equal to this one. + + + + Freezes the settings. + + The settings. + + + + Gets the hash code. + + The hash code. + + + + Gets or sets the default GridFS settings. + + + + + Gets the chunks collection name. + + + + + Gets or sets the chunk size. + + + + + Gets the files collection name. + + + + + Gets whether the settings are frozen. + + + + + Gets or sets the root collection name (the files and chunks collection names are derived from the root). + + + + + Gets or sets the safe mode. + + + + + A marker interface that represents what to group by (see GroupByDocument and the GroupBy builder). + + + + + Represents the result of the database stats command. + + + + + Initializes a new instance of the DatabaseStatsResult class. + + + + + Gets the average object size. + + + + + Gets the collection count. + + + + + Gets the data size. + + + + + Gets the extent count. + + + + + Gets the file size. + + + + + Gets the index count. + + + + + Gets the index size. + + + + + Gets the object count. + + + + + Gets the storage size. + + + + + A builder for creating update modifiers. + + + + + Adds a value to a named array element if the value is not already in the array (see $addToSet). + + The name of the array element. + The value to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The values to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The values to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The values to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The wrapped values to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The wrapped values to add to the set. + The builder (so method calls can be chained). + + + + Adds a wrapped value to a named array element if the value is not already in the array (see $addToSet). + + The name of the array element. + The wrapped value to add to the set. + The builder (so method calls can be chained). + + + + Sets the named element to the bitwise and of its value with another value (see $bit with "and"). + + The name of the element to be modified. + The value to be and-ed with the current value. + The builder (so method calls can be chained). + + + + Sets the named element to the bitwise and of its value with another value (see $bit with "and"). + + The name of the element to be modified. + The value to be and-ed with the current value. + The builder (so method calls can be chained). + + + + Sets the named element to the bitwise or of its value with another value (see $bit with "or"). + + The name of the element to be modified. + The value to be or-ed with the current value. + The builder (so method calls can be chained). + + + + Sets the named element to the bitwise or of its value with another value (see $bit with "or"). + + The name of the element to be modified. + The value to be or-ed with the current value. + The builder (so method calls can be chained). + + + + Combines several UpdateBuilders into a single UpdateBuilder. + + The UpdateBuilders to combine. + A combined UpdateBuilder. + + + + Combines several UpdateBuilders into a single UpdateBuilder. + + The UpdateBuilders to combine. + A combined UpdateBuilder. + + + + Increments the named element by a value (see $inc). + + The name of the element to be incremented. + The value to increment by. + The builder (so method calls can be chained). + + + + Increments the named element by a value (see $inc). + + The name of the element to be incremented. + The value to increment by. + The builder (so method calls can be chained). + + + + Increments the named element by a value (see $inc). + + The name of the element to be incremented. + The value to increment by. + The builder (so method calls can be chained). + + + + Removes the first value from the named array element (see $pop). + + The name of the array element. + The builder (so method calls can be chained). + + + + Removes the last value from the named array element (see $pop). + + The name of the array element. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to some value (see $pull). + + The name of the array element. + The value to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that match some query (see $pull). + + The name of the array element. + A query that specifies which elements to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of values (see $pullAll). + + The name of the array element. + The values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of values (see $pullAll). + + The name of the array element. + The values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of values (see $pullAll). + + The name of the array element. + The values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll). + + The name of the array element. + The wrapped values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll). + + The name of the array element. + The wrapped values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to some wrapped value (see $pull). + + The name of the array element. + The wrapped value to remove. + The builder (so method calls can be chained). + + + + Adds a value to the end of the named array element (see $push). + + The name of the array element. + The value to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of values to the end of the named array element (see $pushAll). + + The name of the array element. + The values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of values to the end of the named array element (see $pushAll). + + The name of the array element. + The values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of values to the end of the named array element (see $pushAll). + + The name of the array element. + The values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of wrapped values to the end of the named array element (see $pushAll). + + The name of the array element. + The wrapped values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of wrapped values to the end of the named array element (see $pushAll). + + The name of the array element. + The wrapped values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a wrapped value to the end of the named array element (see $push). + + The name of the array element. + The wrapped value to add to the end of the array. + The builder (so method calls can be chained). + + + + Renames an element (see $rename). + + The name of the element to be renamed. + The new name of the element. + An UpdateDocuemnt. + + + + Replaces the entire document with a new document (the _id must remain the same). + + The nominal type of the replacement document + The replacement document. + An UpdateWrapper. + + + + Replaces the entire document with a new document (the _id must remain the same). + + The nominal type of the replacement document + The replacement document. + An UpdateWrapper. + + + + Sets the value of the named element to a new value (see $set). + + The name of the element to be set. + The new value. + The builder (so method calls can be chained). + + + + Sets the value of the named element to a new wrapped value (see $set). + + The name of the element to be set. + The new wrapped value. + The builder (so method calls can be chained). + + + + Removes the named element from the document (see $unset). + + The name of the element to be removed. + The builder (so method calls can be chained). + + + + A builder for creating update modifiers. + + + + + Initializes a new instance of the UpdateBuilder class. + + + + + Adds a value to a named array element if the value is not already in the array (see $addToSet). + + The name of the array element. + The value to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The values to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The values to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The values to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The wrapped values to add to the set. + The builder (so method calls can be chained). + + + + Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each). + + The name of the array element. + The wrapped values to add to the set. + The builder (so method calls can be chained). + + + + Adds a wrapped value to a named array element if the value is not already in the array (see $addToSet). + + The name of the array element. + The wrapped value to add to the set. + The builder (so method calls can be chained). + + + + Sets the named element to the bitwise and of its value with another value (see $bit with "and"). + + The name of the element to be modified. + The value to be and-ed with the current value. + The builder (so method calls can be chained). + + + + Sets the named element to the bitwise and of its value with another value (see $bit with "and"). + + The name of the element to be modified. + The value to be and-ed with the current value. + The builder (so method calls can be chained). + + + + Sets the named element to the bitwise or of its value with another value (see $bit with "or"). + + The name of the element to be modified. + The value to be or-ed with the current value. + The builder (so method calls can be chained). + + + + Sets the named element to the bitwise or of its value with another value (see $bit with "or"). + + The name of the element to be modified. + The value to be or-ed with the current value. + The builder (so method calls can be chained). + + + + Combines another UpdateBuilder into this one. + + The UpdateBuilder to combine into this one. + A combined UpdateBuilder. + + + + Increments the named element by a value (see $inc). + + The name of the element to be incremented. + The value to increment by. + The builder (so method calls can be chained). + + + + Increments the named element by a value (see $inc). + + The name of the element to be incremented. + The value to increment by. + The builder (so method calls can be chained). + + + + Increments the named element by a value (see $inc). + + The name of the element to be incremented. + The value to increment by. + The builder (so method calls can be chained). + + + + Removes the first value from the named array element (see $pop). + + The name of the array element. + The builder (so method calls can be chained). + + + + Removes the last value from the named array element (see $pop). + + The name of the array element. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to some value (see $pull). + + The name of the array element. + The value to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that match some query (see $pull). + + The name of the array element. + A query that specifies which elements to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of values (see $pullAll). + + The name of the array element. + The values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of values (see $pullAll). + + The name of the array element. + The values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of values (see $pullAll). + + The name of the array element. + The values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll). + + The name of the array element. + The wrapped values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll). + + The name of the array element. + The wrapped values to remove. + The builder (so method calls can be chained). + + + + Removes all values from the named array element that are equal to some wrapped value (see $pull). + + The name of the array element. + The wrapped value to remove. + The builder (so method calls can be chained). + + + + Adds a value to the end of the named array element (see $push). + + The name of the array element. + The value to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of values to the end of the named array element (see $pushAll). + + The name of the array element. + The values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of values to the end of the named array element (see $pushAll). + + The name of the array element. + The values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of values to the end of the named array element (see $pushAll). + + The name of the array element. + The values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of wrapped values to the end of the named array element (see $pushAll). + + The name of the array element. + The wrapped values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a list of wrapped values to the end of the named array element (see $pushAll). + + The name of the array element. + The wrapped values to add to the end of the array. + The builder (so method calls can be chained). + + + + Adds a wrapped value to the end of the named array element (see $push). + + The name of the array element. + The wrapped value to add to the end of the array. + The builder (so method calls can be chained). + + + + Renames an element (see $rename). + + The old element name. + The new element name. + The builder (so method calls can be chained). + + + + Sets the value of the named element to a new value (see $set). + + The name of the element to be set. + The new value. + The builder (so method calls can be chained). + + + + Sets the value of the named element to a new wrapped value (see $set). + + The name of the element to be set. + The new wrapped value. + The builder (so method calls can be chained). + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Removes the named element from the document (see $unset). + + The name of the element to be removed. + The builder (so method calls can be chained). + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + The address of a MongoDB server. + + + + + Initializes a new instance of MongoServerAddress. + + The server's host name. + + + + Initializes a new instance of MongoServerAddress. + + The server's host name. + The server's port number. + + + + Parses a string representation of a server address. + + The string representation of a server address. + A new instance of MongoServerAddress initialized with values parsed from the string. + + + + Tries to parse a string representation of a server address. + + The string representation of a server address. + The server address (set to null if TryParse fails). + True if the string is parsed succesfully. + + + + Compares two server addresses. + + The first address. + The other address. + True if the two addresses are equal (or both are null). + + + + Compares two server addresses. + + The first address. + The other address. + True if the two addresses are not equal (or one is null and the other is not). + + + + Compares two server addresses. + + The first server address. + The other server address. + True if the two server addresses are equal (or both are null). + + + + Compares two server addresses. + + The other server address. + True if the two server addresses are equal. + + + + Compares two server addresses. + + The other server address. + True if the two server addresses are equal. + + + + Gets the hash code for this object. + + The hash code. + + + + Returns a string representation of the server address. + + A string representation of the server address. + + + + Returns the server address as an IPEndPoint (does a DNS lookup). + + The IPEndPoint of the server. + + + + Gets the server's host name. + + + + + Gets the server's port number. + + + + + Represents a BSON document that can be used where an IMongoMapReduceOptions is expected. + + + + + Initializes a new instance of the MapReduceOptionsDocument class. + + + + + Initializes a new instance of the MapReduceOptionsDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the MapReduceOptionsDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the MapReduceOptionsDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the MapReduceOptionsDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the MapReduceOptionsDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + A builder for specifying what the GroupBy command should group by. + + + + + Sets a key function. + + The key function. + A BsonJavaScript. + + + + Sets one or more key names. + + One or more key names. + The builder (so method calls can be chained). + + + + A builder for specifying what the GroupBy command should group by. + + + + + Initializes a new instance of the GroupByBuilder class. + + One or more key names. + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + Represents the result of a map/reduce command. + + + + + Initializes a new instance of the MapReduceResult class. + + + + + Gets the inline results as TDocuments. + + The type of the documents. + The documents. + + + + Gets the inline results as TDocuments. + + The type of the documents. + The documents. + + + + Gets the results (either inline or fetched from the output collection). + + The documents. + + + + Gets the results as TDocuments (either inline or fetched from the output collection). + + The type of the documents. + The documents. + + + + Gets the results as TDocuments (either inline or fetched from the output collection). + + The type of the documents. + The documents. + + + + Gets the output collection name (null if none). + + + + + Gets the output database name (null if none). + + + + + Gets the duration. + + + + + Gets the emit count. + + + + + Gets the output count. + + + + + Gets the inline results. + + + + + Gets the input count. + + + + + Flags used with queries (see the SetQueryFlags method of MongoCursor). + + + + + No flags. + + + + + This cursor should be tailable. + + + + + It's OK for the query to be handled by a secondary server. + + + + + Tell the server not to let the cursor timeout. + + + + + Tell the server to wait for data to become available before returning (only used with TailableCursor). + + + + + Tell the server to send all the data at once (in multiple messages if necessary) without waiting for GetMore messages. + + + + + Allow partial results in a sharded system if some of the shards are down. + + + + + The state of a MongoServer instance. + + + + + Disconnected from the server. + + + + + Connecting to the server (in progress). + + + + + Connected to the server. + + + + + Connected to a subset of the replica set members. + + + + + The state is temporarily unknown. + + + + + Disconnecting from the server (in progress). + + + + + Represents a MongoDB command exception. + + + + + Initializes a new instance of the MongoCommandException class. + + The command result (an error message will be constructed using the result). + + + + Initializes a new instance of the MongoCommandException class. + + The error message. + + + + Initializes a new instance of the MongoCommandException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the MongoCommandException class. + + The error message. + The command result. + + + + Initializes a new instance of the MongoCommandException class (this overload supports deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Gets the command result. + + + + + Represents a wrapped object that can be used where an IMongoSortBy is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the SortByWrapper class. + + The wrapped object. + + + + Creates a new instance of the SortByWrapper class. + + The wrapped object. + A new instance of SortByWrapper or null. + + + + Represents a BSON document that can be used where an IMongoIndexKeys is expected. + + + + + A marker interface that represents the keys of an index (see IndexKeysDocument and the IndexKeys builder). + + + + + Initializes a new instance of the IndexKeysDocument class. + + + + + Initializes a new instance of the IndexKeysDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the IndexKeysDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the IndexKeysDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the IndexKeysDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the IndexKeysDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the IndexKeysDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + The settings used to access a MongoDB server. + + + + + Creates a new instance of MongoServerSettings. Usually you would use a connection string instead. + + + + + Creates a new instance of MongoServerSettings. Usually you would use a connection string instead. + + The connection mode (Direct or ReplicaSet). + The connect timeout. + The default credentials. + The representation for Guids. + Whether to use IPv6. + The max connection idle time. + The max connection life time. + The max connection pool size. + The min connection pool size. + The name of the replica set. + The safe mode. + The server addresses (normally one unless it is the seed list for connecting to a replica set). + Whether queries should be sent to secondary servers. + The socket timeout. + The wait queue size. + The wait queue timeout. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Compares two MongoServerSettings instances. + + The other instance. + True if the two instances are equal. + + + + Freezes the settings to prevent any further changes to them. + + Itself. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the settings. + + A string representation of the settings. + + + + Gets the AddressFamily for the IPEndPoint (derived from the IPv6 setting). + + + + + Gets or sets the connection mode. + + + + + Gets or sets the connect timeout. + + + + + Gets or sets the default credentials. + + + + + Gets or sets the representation to use for Guids. + + + + + Gets whether the settings have been frozen to prevent further changes. + + + + + Gets or sets whether to use IPv6. + + + + + Gets or sets the max connection idle time. + + + + + Gets or sets the max connection life time. + + + + + Gets or sets the max connection pool size. + + + + + Gets or sets the min connection pool size. + + + + + Gets or sets the name of the replica set. + + + + + Gets or sets the SafeMode to use. + + + + + Gets or sets the address of the server (see also Servers if using more than one address). + + + + + Gets or sets the list of server addresses (see also Server if using only one address). + + + + + Gets or sets whether queries should be sent to secondary servers. + + + + + Gets or sets the socket timeout. + + + + + Gets or sets the wait queue size. + + + + + Gets or sets the wait queue timeout. + + + + + The settings used to access a database. + + + + + Creates a new instance of MongoDatabaseSettings. Usually you would call MongoServer.CreateDatabaseSettings instead. + + The name of the database. + The credentials to access the database. + The representation for Guids. + The safe mode to use. + Whether queries should be sent to secondary servers. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Compares two MongoDatabaseSettings instances. + + The other instance. + True if the two instances are equal. + + + + Freezes the settings to prevent any further changes to them. + + Itself. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the settings. + + A string representation of the settings. + + + + Gets or sets the credentials to access the database. + + + + + Gets the name of the database. + + + + + Gets or sets the representation to use for Guids. + + + + + Gets whether the settings have been frozen to prevent further changes. + + + + + Gets or sets the SafeMode to use. + + + + + Gets or sets whether queries should be sent to secondary servers. + + + + + The settings used to access a collection (an abstract class, see MongoCollectionSettings{TDefaultDocument}). + + + + + Creates a clone of the settings. + + A clone of the settings. + + + + Compares two MongoCollectionSettings instances. + + The other instance. + True if the two instances are equal. + + + + Freezes the settings to prevent any further changes to them. + + Itself. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the settings. + + A string representation of the settings. + + + + Gets or sets whether the driver should assign Id values when missing. + + + + + Gets the name of the collection. + + + + + Gets the default document type of the collection. + + + + + Gets or sets the representation used for Guids. + + + + + Gets whether the settings have been frozen to prevent further changes. + + + + + Gets or sets the SafeMode to use. + + + + + Gets or sets whether queries should be sent to secondary servers. + + + + + Settings used to access a collection. + + The default document type of the collection. + + + + Creates a new instance of MongoCollectionSettings. Usually you would call MongoDatabase.CreateCollectionSettings instead. + + The name of the collection. + Whether the driver should assign the Id values if necessary. + The representation for Guids. + The safe mode to use. + Whether queries should be sent to secondary servers. + + + + Creates a clone of the settings. + + A clone of the settings. + + + + A marker interface that represents a scope (a set of variables with values, see ScopeDocument). + + + + + Flags used with the Eval method in MongoDatabase. + + + + + No flags. + + + + + Do not take a write lock. + + + + + Represents the different safe modes that can be used. + + + + + Creates a new instance of SafeMode. + + Whether safe mode is enabled. + + + + Creates a new instance of SafeMode. + + Whether safe mode is enabled. + Whether the server should call fsync after each operation. + + + + Creates a new instance of SafeMode. + + Whether safe mode is enabled. + Whether the server should call fsync after each operation. + The number of write replications that should be completed before server returns. + + + + Creates a new instance of SafeMode. + + Whether safe mode is enabled. + Whether the server should call fsync after each operation. + The number of write replications that should be completed before server returns. + The timeout for each operation. + + + + Creates a new instance of SafeMode. + + The number of write replications that should be completed before server returns. + + + + Creates a new instance of SafeMode. + + The number of write replications that should be completed before server returns. + The timeout for each operation. + + + + Compares two SafeMode values. + + The first SafeMode value. + The other SafeMode value. + True if the values are equal (or both null). + + + + Compares two SafeMode values. + + The first SafeMode value. + The other SafeMode value. + True if the values are not equal (or one is null and the other is not). + + + + Creates a SafeMode instance (or returns an existing instance). + + Whether safe mode is enabled. + A SafeMode instance. + + + + Creates a SafeMode instance (or returns an existing instance). + + Whether safe mode is enabled. + Whether fysnc is true. + A SafeMode instance. + + + + Creates a SafeMode instance (or returns an existing instance). + + Whether safe mode is enabled. + Whether fysnc is true. + The number of write replications that should be completed before server returns. + A SafeMode instance. + + + + Creates a SafeMode instance (or returns an existing instance). + + Whether safe mode is enabled. + Whether fysnc is true. + The number of write replications that should be completed before server returns. + The timeout for each operation. + A SafeMode instance. + + + + Creates a SafeMode instance (or returns an existing instance). + + The number of write replications that should be completed before server returns. + A SafeMode instance. + + + + Creates a SafeMode instance (or returns an existing instance). + + The number of write replications that should be completed before server returns. + The timeout for each operation. + A SafeMode instance. + + + + Compares two SafeMode values. + + The other SafeMode value. + True if the values are equal. + + + + Compares two SafeMode values. + + The other SafeMode value. + True if the values are equal. + + + + Gets the hash code. + + The hash code. + + + + Returns a string representation of the SafeMode. + + A string representation of the SafeMode. + + + + Gets an instance of SafeMode with safe mode off. + + + + + Gets an instance of SafeMode with fsync=true. + + + + + Gets an instance of SafeMode with safe mode on. + + + + + Gets an instance of SafeMode with safe mode on and w=2. + + + + + Gets an instance of SafeMode with safe mode on and w=3. + + + + + Gets an instance of SafeMode with safe mode on and w=4. + + + + + Gets whether safe mode is enabled. + + + + + Gets whether fsync is true. + + + + + Gets the w value (the number of write replications that must complete before the server returns). + + + + + Gets the wtimeout value (the timeout before which the server must return). + + + + + Represents the result of a FindAndModify command. + + + + + Initializes a new instance of the FindAndModifyResult class. + + + + + Gets the modified document as a TDocument. + + The nominal type of the modified document. + The modified document. + + + + Gets the modified document as a TDocument. + + The nominal type of the modified document. + The modified document. + + + + Gets the modified document. + + + + + Flags used with the Update method in MongoCollection. + + + + + No flags. + + + + + If document doesn't exist then do an Insert. + + + + + Update all matching documents (instead of just one). + + + + + Represents .NET style connection strings. We recommend you use URL style connection strings + (see MongoUrl and MongoUrlBuilder). + + + + + Creates a new instance of MongoConnectionStringBuilder. + + + + + Creates a new instance of MongoConnectionStringBuilder. + + The initial settings. + + + + Clears all settings to their default values. + + + + + Tests whether a keyword is valid. + + The keyword. + True if the keyword is valid. + + + + Creates a new instance of MongoServerSettings based on the settings in this MongoConnectionStringBuilder. + + A new instance of MongoServerSettings. + + + + Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize). + + + + + Gets or sets the connection mode. + + + + + Gets or sets the connect timeout. + + + + + Gets or sets the optional database name. + + + + + Gets or sets the representation for Guids. + + + + + Gets or sets whether to use IPv6. + + + + + Gets or sets the max connection idle time. + + + + + Gets or sets the max connection life time. + + + + + Gets or sets the max connection pool size. + + + + + Gets or sets the min connection pool size. + + + + + Gets or sets the default password. + + + + + Gets or sets the name of the replica set. + + + + + Gets or sets the SafeMode to use. + + + + + Gets or sets the address of the server (see also Servers if using more than one address). + + + + + Gets or sets the list of server addresses (see also Server if using only one address). + + + + + Gets or sets whether queries should be sent to secondary servers. + + + + + Gets or sets the socket timeout. + + + + + Gets or sets the default username. + + + + + Gets or sets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize). + + + + + Gets or sets the wait queue size. + + + + + Gets or sets the wait queue timeout. + + + + + Gets or sets individual settings by keyword. + + The keyword. + The value of the setting. + + + + Represents a MongoDB collection and the settings used to access it. This class is thread-safe. + + + + + Protected constructor for abstract base class. + + The database that contains this collection. + The settings to use to access this collection. + + + + Counts the number of documents in this collection. + + The number of documents in this collection. + + + + Counts the number of documents in this collection that match a query. + + The query (usually a QueryDocument or constructed using the Query builder). + The number of documents in this collection that match the query. + + + + Creates an index for this collection. + + The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). + The index options(usually an IndexOptionsDocument or created using the IndexOption builder). + A SafeModeResult. + + + + Creates an index for this collection. + + The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). + A SafeModeResult. + + + + Creates an index for this collection. + + The names of the indexed fields. + A SafeModeResult. + + + + Returns the distinct values for a given field. + + The key of the field. + The distint values of the field. + + + + Returns the distinct values for a given field for documents that match a query. + + The key of the field. + The query (usually a QueryDocument or constructed using the Query builder). + The distint values of the field. + + + + Drops this collection. + + + + + Drops all indexes on this collection. + + A . + + + + Drops an index on this collection. + + The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). + A . + + + + Drops an index on this collection. + + The names of the indexed fields. + A . + + + + Drops an index on this collection. + + The name of the index. + A . + + + + Ensures that the desired index exists and creates it if it does not. + + The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). + The index options(usually an IndexOptionsDocument or created using the IndexOption builder). + + + + Ensures that the desired index exists and creates it if it does not. + + The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). + + + + Ensures that the desired index exists and creates it if it does not. + + The names of the indexed fields. + + + + Tests whether this collection exists. + + True if this collection exists. + + + + Returns a cursor that can be used to find all documents in this collection as TDocuments. + + The nominal type of the documents. + A . + + + + Returns a cursor that can be used to find all documents in this collection as TDocuments. + + The nominal type of the documents. + A . + + + + Finds one matching document using the query and sortBy parameters and applies the specified update to it. + + The query (usually a QueryDocument or constructed using the Query builder). + The sort order to select one of the matching documents. + The update to apply to the matching document. + A . + + + + Finds one matching document using the query and sortBy parameters and applies the specified update to it. + + The query (usually a QueryDocument or constructed using the Query builder). + The sort order to select one of the matching documents. + The update to apply to the matching document. + Whether to return the new or old version of the modified document in the . + A . + + + + Finds one matching document using the query and sortBy parameters and applies the specified update to it. + + The query (usually a QueryDocument or constructed using the Query builder). + The sort order to select one of the matching documents. + The update to apply to the matching document. + Whether to return the new or old version of the modified document in the . + Whether to do an upsert if no matching document is found. + A . + + + + Finds one matching document using the query and sortBy parameters and applies the specified update to it. + + The query (usually a QueryDocument or constructed using the Query builder). + The sort order to select one of the matching documents. + The update to apply to the matching document. + Which fields of the modified document to return in the . + Whether to return the new or old version of the modified document in the . + Whether to do an upsert if no matching document is found. + A . + + + + Finds one matching document using the query and sortBy parameters and removes it from this collection. + + The query (usually a QueryDocument or constructed using the Query builder). + The sort order to select one of the matching documents. + A . + + + + Returns a cursor that can be used to find all documents in this collection that match the query as TDocuments. + + The type to deserialize the documents as. + The query (usually a QueryDocument or constructed using the Query builder). + A . + + + + Returns a cursor that can be used to find all documents in this collection that match the query as TDocuments. + + The nominal type of the documents. + The query (usually a QueryDocument or constructed using the Query builder). + A . + + + + Returns a cursor that can be used to find one document in this collection as a TDocument. + + The type to deserialize the documents as. + A TDocument (or null if not found). + + + + Returns a cursor that can be used to find one document in this collection that matches a query as a TDocument. + + The type to deserialize the documents as. + The query (usually a QueryDocument or constructed using the Query builder). + A TDocument (or null if not found). + + + + Returns a cursor that can be used to find one document in this collection as a TDocument. + + The nominal type of the documents. + A document (or null if not found). + + + + Returns a cursor that can be used to find one document in this collection that matches a query as a TDocument. + + The type to deserialize the documents as. + The query (usually a QueryDocument or constructed using the Query builder). + A TDocument (or null if not found). + + + + Returns a cursor that can be used to find one document in this collection by its _id value as a TDocument. + + The nominal type of the document. + The id of the document. + A TDocument (or null if not found). + + + + Returns a cursor that can be used to find one document in this collection by its _id value as a TDocument. + + The nominal type of the document. + The id of the document. + A TDocument (or null if not found). + + + + Runs a GeoNear command on this collection. + + The type to deserialize the documents as. + The query (usually a QueryDocument or constructed using the Query builder). + The x coordinate of the starting location. + The y coordinate of the starting location. + The maximum number of results returned. + A . + + + + Runs a GeoNear command on this collection. + + The type to deserialize the documents as. + The query (usually a QueryDocument or constructed using the Query builder). + The x coordinate of the starting location. + The y coordinate of the starting location. + The maximum number of results returned. + The GeoNear command options (usually a GeoNearOptionsDocument or constructed using the GeoNearOptions builder). + A . + + + + Runs a GeoNear command on this collection. + + The type to deserialize the documents as. + The query (usually a QueryDocument or constructed using the Query builder). + The x coordinate of the starting location. + The y coordinate of the starting location. + The maximum number of results returned. + A . + + + + Runs a GeoNear command on this collection. + + The type to deserialize the documents as. + The query (usually a QueryDocument or constructed using the Query builder). + The x coordinate of the starting location. + The y coordinate of the starting location. + The maximum number of results returned. + The GeoNear command options (usually a GeoNearOptionsDocument or constructed using the GeoNearOptions builder). + A . + + + + Gets the indexes for this collection. + + A list of BsonDocuments that describe the indexes. + + + + Gets the stats for this collection. + + The stats for this collection as a . + + + + Gets the total data size for this collection (data + indexes). + + The total data size. + + + + Gets the total storage size for this collection (data + indexes + overhead). + + The total storage size. + + + + Runs the group command on this collection. + + The query (usually a QueryDocument or constructed using the Query builder). + A JavaScript function that returns the key value to group on. + Initial value passed to the reduce function for each group. + A JavaScript function that is called for each matching document in a group. + A JavaScript function that is called at the end of the group command. + A list of results as BsonDocuments. + + + + Runs the group command on this collection. + + The query (usually a QueryDocument or constructed using the Query builder). + The names of the fields to group on. + Initial value passed to the reduce function for each group. + A JavaScript function that is called for each matching document in a group. + A JavaScript function that is called at the end of the group command. + A list of results as BsonDocuments. + + + + Runs the group command on this collection. + + The query (usually a QueryDocument or constructed using the Query builder). + The name of the field to group on. + Initial value passed to the reduce function for each group. + A JavaScript function that is called for each matching document in a group. + A JavaScript function that is called at the end of the group command. + A list of results as BsonDocuments. + + + + Tests whether an index exists. + + The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder). + True if the index exists. + + + + Tests whether an index exists. + + The names of the fields in the index. + True if the index exists. + + + + Tests whether an index exists. + + The name of the index. + True if the index exists. + + + + Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). + + The nominal type of the document to insert. + The document to insert. + A SafeModeResult (or null if SafeMode is not being used). + + + + Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). + + The nominal type of the document to insert. + The document to insert. + The options to use for this Insert. + A SafeModeResult (or null if SafeMode is not being used). + + + + Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). + + The nominal type of the document to insert. + The document to insert. + The SafeMode to use for this Insert. + A SafeModeResult (or null if SafeMode is not being used). + + + + Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). + + The nominal type of the document to insert. + The document to insert. + A SafeModeResult (or null if SafeMode is not being used). + + + + Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). + + The nominal type of the document to insert. + The document to insert. + The options to use for this Insert. + A SafeModeResult (or null if SafeMode is not being used). + + + + Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). + + The nominal type of the document to insert. + The document to insert. + The SafeMode to use for this Insert. + A SafeModeResult (or null if SafeMode is not being used). + + + + Inserts multiple documents at once into this collection (see also Insert to insert a single document). + + The type of the documents to insert. + The documents to insert. + A list of SafeModeResults (or null if SafeMode is not being used). + + + + Inserts multiple documents at once into this collection (see also Insert to insert a single document). + + The type of the documents to insert. + The documents to insert. + The options to use for this Insert. + A list of SafeModeResults (or null if SafeMode is not being used). + + + + Inserts multiple documents at once into this collection (see also Insert to insert a single document). + + The type of the documents to insert. + The documents to insert. + The SafeMode to use for this Insert. + A list of SafeModeResults (or null if SafeMode is not being used). + + + + Inserts multiple documents at once into this collection (see also Insert to insert a single document). + + The nominal type of the documents to insert. + The documents to insert. + A list of SafeModeResults (or null if SafeMode is not being used). + + + + Inserts multiple documents at once into this collection (see also Insert to insert a single document). + + The nominal type of the documents to insert. + The documents to insert. + The SafeMode to use for this Insert. + A list of SafeModeResults (or null if SafeMode is not being used). + + + + Inserts multiple documents at once into this collection (see also Insert to insert a single document). + + The nominal type of the documents to insert. + The documents to insert. + The options to use for this Insert. + A list of SafeModeResults (or null if SafeMode is not being used). + + + + Tests whether this collection is capped. + + True if this collection is capped. + + + + Runs a Map/Reduce command on this collection. + + A JavaScript function called for each document. + A JavaScript function called on the values emitted by the map function. + Options for this map/reduce command (see , and the builder). + A . + + + + Runs a Map/Reduce command on document in this collection that match a query. + + The query (usually a QueryDocument or constructed using the Query builder). + A JavaScript function called for each document. + A JavaScript function called on the values emitted by the map function. + Options for this map/reduce command (see , and the builder). + A . + + + + Runs a Map/Reduce command on document in this collection that match a query. + + The query (usually a QueryDocument or constructed using the Query builder). + A JavaScript function called for each document. + A JavaScript function called on the values emitted by the map function. + A . + + + + Runs a Map/Reduce command on this collection. + + A JavaScript function called for each document. + A JavaScript function called on the values emitted by the map function. + A . + + + + Runs the ReIndex command on this collection. + + + + + Removes documents from this collection that match a query. + + The query (usually a QueryDocument or constructed using the Query builder). + A SafeModeResult (or null if SafeMode is not being used). + + + + Removes documents from this collection that match a query. + + The query (usually a QueryDocument or constructed using the Query builder). + The SafeMode to use for this operation. + A SafeModeResult (or null if SafeMode is not being used). + + + + Removes documents from this collection that match a query. + + The query (usually a QueryDocument or constructed using the Query builder). + The flags for this Remove (see ). + A SafeModeResult (or null if SafeMode is not being used). + + + + Removes documents from this collection that match a query. + + The query (usually a QueryDocument or constructed using the Query builder). + The flags for this Remove (see ). + The SafeMode to use for this operation. + A SafeModeResult (or null if SafeMode is not being used). + + + + Removes all documents from this collection (see also ). + + A SafeModeResult (or null if SafeMode is not being used). + + + + Removes all documents from this collection (see also ). + + The SafeMode to use for this operation. + A SafeModeResult (or null if SafeMode is not being used). + + + + Removes all entries for this collection in the index cache used by EnsureIndex. Call this method + when you know (or suspect) that a process other than this one may have dropped one or + more indexes. + + + + + Saves a document to this collection. The document must have an identifiable Id field. Based on the value + of the Id field Save will perform either an Insert or an Update. + + The type of the document to save. + The document to save. + A SafeModeResult (or null if SafeMode is not being used). + + + + Saves a document to this collection. The document must have an identifiable Id field. Based on the value + of the Id field Save will perform either an Insert or an Update. + + The type of the document to save. + The document to save. + The options to use for this Save. + A SafeModeResult (or null if SafeMode is not being used). + + + + Saves a document to this collection. The document must have an identifiable Id field. Based on the value + of the Id field Save will perform either an Insert or an Update. + + The type of the document to save. + The document to save. + The SafeMode to use for this operation. + A SafeModeResult (or null if SafeMode is not being used). + + + + Saves a document to this collection. The document must have an identifiable Id field. Based on the value + of the Id field Save will perform either an Insert or an Update. + + The type of the document to save. + The document to save. + A SafeModeResult (or null if SafeMode is not being used). + + + + Saves a document to this collection. The document must have an identifiable Id field. Based on the value + of the Id field Save will perform either an Insert or an Update. + + The type of the document to save. + The document to save. + The options to use for this Save. + A SafeModeResult (or null if SafeMode is not being used). + + + + Saves a document to this collection. The document must have an identifiable Id field. Based on the value + of the Id field Save will perform either an Insert or an Update. + + The type of the document to save. + The document to save. + The SafeMode to use for this operation. + A SafeModeResult (or null if SafeMode is not being used). + + + + Gets a canonical string representation for this database. + + A canonical string representation for this database. + + + + Updates one matching document in this collection. + + The query (usually a QueryDocument or constructed using the Query builder). + The update to perform on the matching document. + A SafeModeResult (or null if SafeMode is not being used). + + + + Updates one matching document in this collection. + + The query (usually a QueryDocument or constructed using the Query builder). + The update to perform on the matching document. + The SafeMode to use for this operation. + A SafeModeResult (or null if SafeMode is not being used). + + + + Updates one or more matching documents in this collection (for multiple updates use UpdateFlags.Multi). + + The query (usually a QueryDocument or constructed using the Query builder). + The update to perform on the matching document. + The flags for this Update. + A SafeModeResult (or null if SafeMode is not being used). + + + + Updates one or more matching documents in this collection (for multiple updates use UpdateFlags.Multi). + + The query (usually a QueryDocument or constructed using the Query builder). + The update to perform on the matching document. + The flags for this Update. + The SafeMode to use for this operation. + A SafeModeResult (or null if SafeMode is not being used). + + + + Validates the integrity of this collection. + + A . + + + + Gets the database that contains this collection. + + + + + Gets the fully qualified name of this collection. + + + + + Gets the name of this collection. + + + + + Gets the settings being used to access this collection. + + + + + Represents a MongoDB collection and the settings used to access it as well as a default document type. This class is thread-safe. + + + + + Creates a new instance of MongoCollection. Normally you would call one of the indexers or GetCollection methods + of MongoDatabase instead. + + The database that contains this collection. + The settings to use to access this collection. + + + + Returns a cursor that can be used to find all documents in this collection that match the query as TDefaultDocuments. + + The query (usually a QueryDocument or constructed using the Query builder). + A . + + + + Returns a cursor that can be used to find all documents in this collection as TDefaultDocuments. + + A . + + + + Returns a cursor that can be used to find one document in this collection as a TDefaultDocument. + + A TDefaultDocument (or null if not found). + + + + Returns a cursor that can be used to find one document in this collection that matches a query as a TDefaultDocument. + + The query (usually a QueryDocument or constructed using the Query builder). + A TDefaultDocument (or null if not found). + + + + Returns a cursor that can be used to find one document in this collection by its _id value as a TDefaultDocument. + + The id of the document. + A TDefaultDocument (or null if not found). + + + + Runs a GeoNear command on this collection. + + The query (usually a QueryDocument or constructed using the Query builder). + The x coordinate of the starting location. + The y coordinate of the starting location. + The maximum number of results returned. + A . + + + + Runs a GeoNear command on this collection. + + The query (usually a QueryDocument or constructed using the Query builder). + The x coordinate of the starting location. + The y coordinate of the starting location. + The maximum number of results returned. + Options for the GeoNear command (see , , and the builder). + A . + + + + Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). + + The document to insert. + A SafeModeResult (or null if SafeMode is not being used). + + + + Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). + + The document to insert. + The options to use for this Insert. + A SafeModeResult (or null if SafeMode is not being used). + + + + Inserts a document into this collection (see also InsertBatch to insert multiple documents at once). + + The document to insert. + The SafeMode to use for this Insert. + A SafeModeResult (or null if SafeMode is not being used). + + + + Inserts multiple documents at once into this collection (see also Insert to insert a single document). + + The documents to insert. + A list of SafeModeResults (or null if SafeMode is not being used). + + + + Inserts multiple documents at once into this collection (see also Insert to insert a single document). + + The documents to insert. + The options to use for this Insert. + A list of SafeModeResults (or null if SafeMode is not being used). + + + + Inserts multiple documents at once into this collection (see also Insert to insert a single document). + + The documents to insert. + The SafeMode to use for this Insert. + A list of SafeModeResults (or null if SafeMode is not being used). + + + + Saves a document to this collection. The document must have an identifiable Id field. Based on the value + of the Id field Save will perform either an Insert or an Update. + + The document to save. + A SafeModeResult (or null if SafeMode is not being used). + + + + Saves a document to this collection. The document must have an identifiable Id field. Based on the value + of the Id field Save will perform either an Insert or an Update. + + The document to save. + The options to use for this Save. + A SafeModeResult (or null if SafeMode is not being used). + + + + Saves a document to this collection. The document must have an identifiable Id field. Based on the value + of the Id field Save will perform either an Insert or an Update. + + The document to save. + The SafeMode to use for this operation. + A SafeModeResult (or null if SafeMode is not being used). + + + + Represents a MongoDB safe mode exception. + + + + + Initializes a new instance of the MongoSafeModeException class. + + The error message. + The command result. + + + + Initializes a new instance of the MongoSafeModeException class (this overload supports deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Represents a BSON document that can be used where an IMongoScope is expected. + + + + + Initializes a new instance of the ScopeDocument class. + + + + + Initializes a new instance of the ScopeDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the ScopeDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the ScopeDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the ScopeDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the ScopeDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the ScopeDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + Represents URL style connection strings. This is the recommended connection string style, but see also + MongoConnectionStringBuilder if you wish to use .NET style connection strings. + + + + + Creates a new instance of MongoUrlBuilder. + + + + + Creates a new instance of MongoUrlBuilder. + + The initial settings. + + + + Parses a URL and sets all settings to match the URL. + + The URL. + + + + Creates a new instance of MongoUrl based on the settings in this MongoUrlBuilder. + + A new instance of MongoUrl. + + + + Creates a new instance of MongoServerSettings based on the settings in this MongoUrlBuilder. + + A new instance of MongoServerSettings. + + + + Returns the canonical URL based on the settings in this MongoUrlBuilder. + + The canonical URL. + + + + Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize). + + + + + Gets or sets the connection mode. + + + + + Gets or sets the connect timeout. + + + + + Gets or sets the optional database name. + + + + + Gets or sets the default credentials. + + + + + Gets or sets the representation to use for Guids. + + + + + Gets or sets whether to use IPv6. + + + + + Gets or sets the max connection idle time. + + + + + Gets or sets the max connection life time. + + + + + Gets or sets the max connection pool size. + + + + + Gets or sets the min connection pool size. + + + + + Gets or sets the name of the replica set. + + + + + Gets or sets the SafeMode to use. + + + + + Gets or sets the address of the server (see also Servers if using more than one address). + + + + + Gets or sets the list of server addresses (see also Server if using only one address). + + + + + Gets or sets whether queries should be sent to secondary servers. + + + + + Gets or sets the socket timeout. + + + + + Gets or sets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize). + + + + + Gets or sets the wait queue size. + + + + + Gets or sets the wait queue timeout. + + + + + Represents build info about a server instance. + + + + + Creates a new instance of MongoServerBuildInfo. + + The number of bits (32 or 64). + The GIT version. + The sysInfo. + The version string. + + + + Gets the number of bits (32 or 64). + + + + + Gets the GIT version. + + + + + Gets the sysInfo. + + + + + Gets the version. + + + + + Gets the version string. + + + + + Credentials to access a MongoDB database. + + + + + Creates a new instance of MongoCredentials. + + The username. + The password. + + + + Creates a new instance of MongoCredentials. + + The username. + The password. + Whether the credentials should be validated against the admin database. + + + + Creates an instance of MongoCredentials. + + The username. + The password. + A new instance of MongoCredentials (or null if either parameter is null). + + + + Compares two MongoCredentials. + + The first credentials. + The other credentials. + True if the two credentials are equal (or both null). + + + + Compares two MongoCredentials. + + The first credentials. + The other credentials. + True if the two credentials are not equal (or one is null and the other is not). + + + + Compares two MongoCredentials. + + The first credentials. + The second credentials. + True if the two credentials are equal (or both null). + + + + Compares this MongoCredentials to another MongoCredentials. + + The other credentials. + True if the two credentials are equal. + + + + Compares this MongoCredentials to another MongoCredentials. + + The other credentials. + True if the two credentials are equal. + + + + Gets the hashcode for the credentials. + + The hashcode. + + + + Returns a string representation of the credentials. + + A string representation of the credentials. + + + + Gets the username. + + + + + Gets the password. + + + + + Gets whether the credentials should be validated against the admin database. + + + + + Represents a stream interface to a GridFS file (patterned after .NET's Stream class). + + + + + Initializes a new instance of the MongoGridFSStream class. + + The GridFS file info. + The mode. + + + + Initializes a new instance of the MongoGridFSStream class. + + The GridFS file info. + The mode. + The acess. + + + + Flushes any unsaved data in the buffers to the GridFS file. + + + + + Reads bytes from the GridFS stream. + + The destination buffer. + The offset in the destination buffer at which to place the read bytes. + The number of bytes to read. + The number of bytes read. + + + + Reads one byte from the GridFS stream. + + The byte (-1 if at the end of the GridFS stream). + + + + Seeks to a new position. + + The seek offset. + The seek origin. + The new position. + + + + Sets the length of the GridFS file. + + The length. + + + + Writes bytes to the GridFS stream. + + The source buffer. + The offset in the source buffer to the bytes. + The number of bytes to write. + + + + Writes one byte to the GridFS stream. + + The byte. + + + + Disposes of any resources used by the stream. + + True if called from Dispose. + + + + Gets whether the GridFS stream supports reading. + + + + + Gets whether the GridFS stream supports seeking. + + + + + Gets whether the GridFS stream supports writing. + + + + + Gets the current length (use SetLength to change the length). + + + + + Gets or sets the current position. + + + + + Gets or sets whether to compute and update the MD5 hash for the file when the stream is closed. + + + + + Represents a pool of connections to a MongoDB server. + + + + + Gets the number of available connections (connections that are open but not currently in use). + + + + + Gets the number of connections in the connection pool (includes both available and in use connections). + + + + + Gets the current generation Id of the connection pool. + + + + + Gets the server instance. + + + + + Represents a thread-safe queue. + + The type of elements. + + + + Initializes a new instance of the BlockingQueue class. + + + + + Dequeues one item from the queue. Will block waiting for an item if the queue is empty. + + The timeout for waiting for an item to appear in the queue. + The first item in the queue (null if it timed out). + + + + Enqueues an item on to the queue. + + The item to be queued. + + + + Represents a cache of the names of indexes that are known to exist on a given server. + + + + + Initializes a new instance of the IndexCache class. + + + + + Adds the name of an index to the cache. + + The collection that contains the index. + The name of the index. + + + + Tests whether the cache contains the name of an index. + + The collection that contains the index. + The name of the index. + True if the cache contains the named index. + + + + Removes the name of an index from the cache. + + The collection that contains the index. + The name of the index. + + + + Resets the cache. + + + + + Resets part of the cache by removing all indexes for a collection. + + The collection. + + + + Resets part of the cache by removing all indexes for a database. + + The database. + + + + Resets part of the cache by removing all indexes for a database. + + The name of the database. + + + + Resets part of the cache by removing all indexes for a collection. + + The name of the database containing the collection. + The name of the collection. + + + + Represents a GridFS file system. + + + + + Initializes a new instance of the MongoGridFS class. + + The database containing the GridFS collections. + + + + Initializes a new instance of the MongoGridFS class. + + The database containing the GridFS collections. + The GridFS settings. + + + + Appends UTF-8 encoded text to an existing GridFS file. + + The remote file name. + A StreamWriter. + + + + Copies a GridFS file. + + The source file name. + The destination file name. + The file info of the new GridFS file. + + + + Copies a GridFS file. + + The source file name. + The destination file name. + The create options. + The file info of the new GridFS file. + + + + Creates or overwrites a GridFS file. + + The remote file name. + A stream. + + + + Creates or overwrites a GridFS file. + + The remote file name. + The create options. + A stream. + + + + Creates or opens a GridFS file for writing UTF-8 encoded text. + + The remote file name. + A stream writer. + + + + Creates or opens a GridFS file for writing UTF-8 encoded text. + + The remote file name. + The create options. + A stream writer. + + + + Deletes GridFS files. + + A query that specifies the GridFS files to delete. + + + + Deletes all versions of a GridFS file. + + The remote file name. + + + + Deletes a GridFS file. + + The GridFS file Id. + + + + Downloads the most recent version of a GridFS file. + + The destination stream. + The GridFS file. + + + + Downloads a specific version of a GridFS file. + + The destination stream. + The GridFS file. + The version to download. + + + + Downloads a GridFS file. + + The destination stream. + The GridFS file. + + + + Downloads the most recent version of a GridFS file. + + The destination stream. + The remote file name. + + + + Downloads a specific version of a GridFS file. + + The destination stream. + The remote file name. + The version to download. + + + + Downloads the most recent version of a GridFS file. + + The file name (same local and remote names). + + + + Downloads a specific version of a GridFS file. + + The file name (same local and remote names). + The version to download. + + + + Downloads the most recent version of a GridFS file. + + The local file name. + The GridFS file. + + + + Downloads a specific version of a GridFS file. + + The local file name. + The GridFS file. + The version to download. + + + + Downloads a GridFS file. + + The local file name. + The GridFS file. + + + + Downloads the most recent version of a GridFS file. + + The local file name. + The remote file name. + + + + Downloads a specific version of a GridFS file. + + The local file name. + The remote file name. + The version to download. + + + + Ensures that the proper indexes for GridFS exist (only creates the new indexes if there are fewer than 1000 GridFS files). + + + + + Ensures that the proper indexes for GridFS exist. + + Only create new indexes if there are fewer than this number of GridFS files). + + + + Tests whether a GridFS file exists. + + The GridFS file. + True if the GridFS file exists. + + + + Tests whether a GridFS file exists. + + The GridFS file. + True if the GridFS file exists. + + + + Tests whether a GridFS file exists. + + The GridFS file. + True if the GridFS file exists. + + + + Finds matching GridFS files. + + A query. + The matching GridFS files. + + + + Finds matching GridFS files. + + The remote file name. + The matching GridFS files. + + + + Finds all GridFS files. + + The matching GridFS files. + + + + Finds the most recent version of a GridFS file. + + The GridFS file. + The matching GridFS file. + + + + Finds a specific version of a GridFS file. + + The GridFS file. + The version to find. + The matching GridFS file. + + + + Finds the most recent version of a GridFS file. + + The remote file name. + The matching GridFS file. + + + + Finds a specific version of a GridFS file. + + The remote file name. + The version to find. + The matching GridFS file. + + + + Finds a GridFS file. + + The GridFS file Id. + The GridFS file. + + + + Moves the most recent version of a GridFS file. + + The source file name. + The destination file name. + + + + Opens a GridFS file with the specified mode. + + The remote file name. + The mode. + A stream. + + + + Opens a GridFS file with the specified mode and access. + + The remote file name. + The mode. + The access. + A stream. + + + + Opens a GridFS file with the specified mode, access and create options. + + The remote file name. + The mode. + The access. + The create options. + A stream. + + + + Opens an existing GridFS file for reading. + + The remote file name. + A stream. + + + + Opens an existing UTF-8 encoded text GridFS file for reading. + + The remote file name. + A stream reader. + + + + Opens an existing GridFS file for writing. + + The remote file name. + A stream. + + + + Opens an existing GridFS file for writing. + + The remote file name. + The create options. + A stream. + + + + Sets the aliases for an existing GridFS file. + + The GridFS file. + The aliases. + + + + Sets the content type for an existing GridFS file. + + The GridFS file. + The content type. + + + + Sets the metadata for an existing GridFS file. + + The GridFS file. + The metadata. + + + + Uploads a GridFS file. + + The source stream. + The remote file name. + The file info of the new GridFS file. + + + + Uploads a GridFS file. + + The source stream. + The remote file name. + The create options. + The file info of the new GridFS file. + + + + Uploads a GridFS file. + + The file name (same local and remote names). + The file info of the new GridFS file. + + + + Uploads a GridFS file. + + The local file name. + The remote file name. + The file info of the new GridFS file. + + + + Gets the chunks collection. + + + + + Gets the database containing the GridFS collections. + + + + + Gets the files collection. + + + + + Gets the GridFS settings. + + + + + Various static utility methods. + + + + + Gets the MD5 hash of a string. + + The string to get the MD5 hash of. + The MD5 hash. + + + + Converts a string to camel case by lower casing the first letter (only the first letter is modified). + + The string to camel case. + The camel cased string. + + + + Represents a wrapped object that can be used where an IMongoScope is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the ScopeWrapper class. + + The wrapped object. + + + + Creates a new instance of the ScopeWrapper class. + + The wrapped object. + A new instance of ScopeWrapper or null. + + + + Represents a BSON document that can be used where an IMongoCollectionOptions is expected. + + + + + Initializes a new instance of the CollectionOptionsDocument class. + + + + + Initializes a new instance of the CollectionOptionsDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the CollectionOptionsDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the CollectionOptionsDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the CollectionOptionsDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the CollectionOptionsDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + Represents the results of a GetLastError command. + + + + + Initializes a new instance of the GetLastErrorResult class. + + + + + Gets the number of documents affected. + + + + + Gets whether the result has a LastErrorMessage. + + + + + Gets the last error message (null if none). + + + + + Gets whether the last command updated an existing document. + + + + + A builder for the options used when creating an index. + + + + + Sets whether to build the index in the background. + + Whether to build the index in the background. + The builder (so method calls can be chained). + + + + Sets whether duplicates should be dropped. + + Whether duplicates should be dropped. + The builder (so method calls can be chained). + + + + Sets the geospatial range. + + The min value of the range. + The max value of the range. + The builder (so method calls can be chained). + + + + Sets the name of the index. + + The name of the index. + The builder (so method calls can be chained). + + + + Sets whether the index is a sparse index. + + Whether the index is a sparse index. + The builder (so method calls can be chained). + + + + Sets whether the index enforces unique values. + + Whether the index enforces unique values. + The builder (so method calls can be chained). + + + + Gets a null value with a type of IMongoIndexOptions. + + + + + A builder for the options used when creating an index. + + + + + Initializes a new instance of the IndexOptionsBuilder class. + + + + + Sets whether to build the index in the background. + + Whether to build the index in the background. + The builder (so method calls can be chained). + + + + Sets whether duplicates should be dropped. + + Whether duplicates should be dropped. + The builder (so method calls can be chained). + + + + Sets the geospatial range. + + The min value of the range. + The max value of the range. + The builder (so method calls can be chained). + + + + Sets the name of the index. + + The name of the index. + The builder (so method calls can be chained). + + + + Sets whether the index is a sparse index. + + Whether the index is a sparse index. + The builder (so method calls can be chained). + + + + Sets whether the index enforces unique values. + + Whether the index enforces unique values. + The builder (so method calls can be chained). + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + An object that can be enumerated to fetch the results of a query. The query is not sent + to the server until you begin enumerating the results. + + + + + Creates a new MongoCursor. It is very unlikely that you will call this constructor. Instead, see all the Find methods in MongoCollection. + + The collection. + The query. + + + + Creates a cursor. + + The type of the returned documents. + The collection to query. + A query. + A cursor. + + + + Creates a clone of the cursor. + + The type of the documents returned. + A clone of the cursor. + + + + Creates a clone of the cursor. + + The type of the documents returned. + A clone of the cursor. + + + + Returns the number of documents that match the query (ignores Skip and Limit, unlike Size which honors them). + + The number of documents that match the query. + + + + Returns an explanation of how the query was executed (instead of the results). + + An explanation of thow the query was executed. + + + + Returns an explanation of how the query was executed (instead of the results). + + Whether the explanation should contain more details. + An explanation of thow the query was executed. + + + + Sets the batch size (the number of documents returned per batch). + + The number of documents in each batch. + The cursor (so you can chain method calls to it). + + + + Sets the fields that will be returned from the server. + + The fields that will be returned from the server. + The cursor (so you can chain method calls to it). + + + + Sets the fields that will be returned from the server. + + The fields that will be returned from the server. + The cursor (so you can chain method calls to it). + + + + Sets the query flags. + + The query flags. + The cursor (so you can chain method calls to it). + + + + Sets the index hint for the query. + + The index hint. + The cursor (so you can chain method calls to it). + + + + Sets the index hint for the query. + + The name of the index. + The cursor (so you can chain method calls to it). + + + + Sets the limit on the number of documents to be returned. + + The limit on the number of documents to be returned. + The cursor (so you can chain method calls to it). + + + + Sets the max value for the index key range of documents to return (note: the max value itself is excluded from the range). + Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically). + + The max value. + The cursor (so you can chain method calls to it). + + + + Sets the maximum number of documents to scan. + + The maximum number of documents to scan. + The cursor (so you can chain method calls to it). + + + + Sets the min value for the index key range of documents to return (note: the min value itself is included in the range). + Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically). + + The min value. + The cursor (so you can chain method calls to it). + + + + Sets a cursor option. + + The name of the option. + The value of the option. + The cursor (so you can chain method calls to it). + + + + Sets multiple cursor options. See also the individual Set{Option} methods, which are easier to use. + + The options. + The cursor (so you can chain method calls to it). + + + + Sets the serialization options (only needed in rare cases). + + The serialization options. + The cursor (so you can chain method calls to it). + + + + Sets the $showDiskLoc option. + + The cursor (so you can chain method calls to it). + + + + Sets the number of documents the server should skip before returning the rest of the documents. + + The number of documents to skip. + The cursor (so you can chain method calls to it). + + + + Sets whether the query should be sent to a secondary server. + + Whether the query should be sent to a secondary server. + The cursor (so you can chain method calls to it). + + + + Sets the $snapshot option. + + The cursor (so you can chain method calls to it). + + + + Sets the sort order for the server to sort the documents by before returning them. + + The sort order. + The cursor (so you can chain method calls to it). + + + + Sets the sort order for the server to sort the documents by before returning them. + + The names of the fields to sort by. + The cursor (so you can chain method calls to it). + + + + Returns the size of the result set (honors Skip and Limit, unlike Count which does not). + + The size of the result set. + + + + Gets the non-generic enumerator. + + The enumerator. + + + + Gets the server that the query will be sent to. + + + + + Gets the database that constains the collection that is being queried. + + + + + Gets the collection that is being queried. + + + + + Gets the query that will be sent to the server. + + + + + Gets or sets the fields that will be returned from the server. + + + + + Gets or sets the cursor options. See also the individual Set{Option} methods, which are easier to use. + + + + + Gets or sets the query flags. + + + + + Gets or sets whether the query should be sent to a secondary server. + + + + + Gets or sets the number of documents the server should skip before returning the rest of the documents. + + + + + Gets or sets the limit on the number of documents to be returned. + + + + + Gets or sets the batch size (the number of documents returned per batch). + + + + + Gets or sets the serialization options (only needed in rare cases). + + + + + Gets whether the cursor has been frozen to prevent further changes. + + + + + An object that can be enumerated to fetch the results of a query. The query is not sent + to the server until you begin enumerating the results. + + The type of the documents returned. + + + + Creates a new MongoCursor. It is very unlikely that you will call this constructor. Instead, see all the Find methods in MongoCollection. + + The collection. + The query. + + + + Returns an enumerator that can be used to enumerate the cursor. Normally you will use the foreach statement + to enumerate the cursor (foreach will call GetEnumerator for you). + + An enumerator that can be used to iterate over the cursor. + + + + Sets the batch size (the number of documents returned per batch). + + The number of documents in each batch. + The cursor (so you can chain method calls to it). + + + + Sets the fields that will be returned from the server. + + The fields that will be returned from the server. + The cursor (so you can chain method calls to it). + + + + Sets the fields that will be returned from the server. + + The fields that will be returned from the server. + The cursor (so you can chain method calls to it). + + + + Sets the query flags. + + The query flags. + The cursor (so you can chain method calls to it). + + + + Sets the index hint for the query. + + The index hint. + The cursor (so you can chain method calls to it). + + + + Sets the index hint for the query. + + The name of the index. + The cursor (so you can chain method calls to it). + + + + Sets the limit on the number of documents to be returned. + + The limit on the number of documents to be returned. + The cursor (so you can chain method calls to it). + + + + Sets the max value for the index key range of documents to return (note: the max value itself is excluded from the range). + Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically). + + The max value. + The cursor (so you can chain method calls to it). + + + + Sets the maximum number of documents to scan. + + The maximum number of documents to scan. + The cursor (so you can chain method calls to it). + + + + Sets the min value for the index key range of documents to return (note: the min value itself is included in the range). + Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically). + + The min value. + The cursor (so you can chain method calls to it). + + + + Sets a cursor option. + + The name of the option. + The value of the option. + The cursor (so you can chain method calls to it). + + + + Sets multiple cursor options. See also the individual Set{Option} methods, which are easier to use. + + The options. + The cursor (so you can chain method calls to it). + + + + Sets the serialization options (only needed in rare cases). + + The serialization options. + The cursor (so you can chain method calls to it). + + + + Sets the $showDiskLoc option. + + The cursor (so you can chain method calls to it). + + + + Sets the number of documents the server should skip before returning the rest of the documents. + + The number of documents to skip. + The cursor (so you can chain method calls to it). + + + + Sets whether the query should be sent to a secondary server. + + Whether the query should be sent to a secondary server. + The cursor (so you can chain method calls to it). + + + + Sets the $snapshot option. + + The cursor (so you can chain method calls to it). + + + + Sets the sort order for the server to sort the documents by before returning them. + + The sort order. + The cursor (so you can chain method calls to it). + + + + Sets the sort order for the server to sort the documents by before returning them. + + The names of the fields to sort by. + The cursor (so you can chain method calls to it). + + + + Gets the non-generic enumerator. + + The enumerator. + + + + Represents a wrapped object that can be used where an IMongoGroupBy is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the GroupByWrapper class. + + The wrapped object. + + + + Creates a new instance of the GroupByWrapper class. + + The wrapped object. + A new instance of GroupByWrapper or null. + + + + Represents a BSON document that can be used where an IMongoGroupBy is expected. + + + + + Initializes a new instance of the GroupByDocument class. + + + + + Initializes a new instance of the GroupByDocument class specifying whether duplicate element names are allowed + (allowing duplicate element names is not recommended). + + Whether duplicate element names are allowed. + + + + Initializes a new instance of the GroupByDocument class and adds one element. + + An element to add to the document. + + + + Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + + + + Initializes a new instance of the GroupByDocument class and adds new elements from a dictionary of key/value pairs. + + A dictionary to initialize the document from. + A list of keys to select values from the dictionary. + + + + Initializes a new instance of the GroupByDocument class and adds new elements from a list of elements. + + A list of elements to add to the document. + + + + Initializes a new instance of the GroupByDocument class and adds one or more elements. + + One or more elements to add to the document. + + + + Initializes a new instance of the GroupByDocument class and creates and adds a new element. + + The name of the element to add to the document. + The value of the element to add to the document. + + + + Represents a wrapped object that can be used where an IMongoFields is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the FieldsWrapper class. + + The wrapped object. + + + + Creates a new instance of the FieldsWrapper class. + + The wrapped object. + A new instance of FieldsWrapper or null. + + + + Used with the Connect method when connecting to a replica set to specify what subset of the replica set must be connected before returning. + + + + + Wait for all members of the replica set to be connected. + + + + + Wait for the primary member of the replica set to be connected. + + + + + Wait for any slaveOk member of the replica set to be connected (includes primary, secondaries and passives). + + + + + Represents the results of an operation performed with a safe mode. + + + + + Initializes a new instance of the SafeModeResult class. + + + + + A builder for specifying the keys for an index. + + + + + Sets one or more key names to index in ascending order. + + One or more key names. + The builder (so method calls can be chained). + + + + Sets one or more key names to index in descending order. + + One or more key names. + The builder (so method calls can be chained). + + + + Sets the key name to create a geospatial index on. + + The key name. + The builder (so method calls can be chained). + + + + A builder for specifying the keys for an index. + + + + + Initializes a new instance of the IndexKeysBuilder class. + + + + + Sets one or more key names to index in ascending order. + + One or more key names. + The builder (so method calls can be chained). + + + + Sets one or more key names to index in descending order. + + One or more key names. + The builder (so method calls can be chained). + + + + Sets the key name to create a geospatial index on. + + The key name. + The builder (so method calls can be chained). + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + Server connection mode. + + + + + Connect directly to a server. + + + + + Connect to a replica set. + + + + + Represents an immutable URL style connection string. See also MongoUrlBuilder. + + + + + Creates a new instance of MongoUrl. + + The URL containing the settings. + + + + Compares two MongoUrls. + + The first URL. + The other URL. + True if the two URLs are equal (or both null). + + + + Compares two MongoUrls. + + The first URL. + The other URL. + True if the two URLs are not equal (or one is null and the other is not). + + + + Clears the URL cache. When a URL is parsed it is stored in the cache so that it doesn't have to be + parsed again. There is rarely a need to call this method. + + + + + Creates an instance of MongoUrl (might be an existing existence if the same URL has been used before). + + The URL containing the settings. + An instance of MongoUrl. + + + + Compares two MongoUrls. + + The other URL. + True if the two URLs are equal. + + + + Compares two MongoUrls. + + The other URL. + True if the two URLs are equal. + + + + Gets the hash code. + + The hash code. + + + + Creates a new instance of MongoServerSettings based on the settings in this MongoUrlBuilder. + + A new instance of MongoServerSettings. + + + + Returns the canonical URL based on the settings in this MongoUrlBuilder. + + The canonical URL. + + + + Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize). + + + + + Gets the connection mode. + + + + + Gets the connect timeout. + + + + + Gets the optional database name. + + + + + Gets the default credentials. + + + + + Gets the representation to use for Guids. + + + + + Gets whether to use IPv6. + + + + + Gets the max connection idle time. + + + + + Gets the max connection life time. + + + + + Gets the max connection pool size. + + + + + Gets the min connection pool size. + + + + + Gets the name of the replica set. + + + + + Gets the SafeMode to use. + + + + + Gets the address of the server (see also Servers if using more than one address). + + + + + Gets the list of server addresses (see also Server if using only one address). + + + + + Gets whether queries should be sent to secondary servers. + + + + + Gets the socket timeout. + + + + + Gets the URL (in canonical form). + + + + + Gets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize). + + + + + Gets the wait queue size. + + + + + Gets the wait queue timeout. + + + + + Reprsents an enumerator that fetches the results of a query sent to the server. + + + + + + Initializes a new instance of the MongoCursorEnumerator class. + + The cursor to be enumerated. + + + + Disposes of any resources held by this enumerator. + + + + + Moves to the next result and returns true if another result is available. + + True if another result is available. + + + + Resets the enumerator (not supported by MongoCursorEnumerator). + + + + + Gets the current document. + + + + + Gets whether the cursor is dead (used with tailable cursors). + + + + + Gets whether the server is await capable (used with tailable cursors). + + + + + Represents options used when creating a GridFS file. + + + + + Initializes a new instance of the MongoGridFSCreateOptions class. + + + + + Gets or sets the aliases. + + + + + Gets or sets the chunk size. + + + + + Gets or sets the content type. + + + + + Gets or sets the file Id. + + + + + Gets or sets the metadata. + + + + + Gets or sets the upload date. + + + + + Represents a MongoDB query exception. + + + + + Initializes a new instance of the MongoQueryException class. + + The error message. + + + + Initializes a new instance of the MongoQueryException class. + + The error message. + The inner exception. + + + + Initializes a new instance of the MongoQueryException class. + + The error message. + The error document returned by the server. + + + + Initializes a new instance of the MongoQueryException class (this overload supports deserialization). + + The SerializationInfo. + The StreamingContext. + + + + Gets the error document returned by the server. + + + + + Represents a wrapped object that can be used where an IMongoIndexKeys is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the IndexKeysWrapper class. + + The wrapped object. + + + + Creates a new instance of the IndexKeysWrapper class. + + The wrapped object. + A new instance of IndexKeysWrapper or null. + + + + Represents a wrapped object that can be used where an IMongoCollectionOptions is expected (the wrapped object is expected to serialize properly). + + + + + Initializes a new instance of the CollectionOptionsWrapper class. + + The wrapped object. + + + + Creates a new instance of the CollectionOptionsWrapper class. + + The wrapped object. + A new instance of CollectionOptionsWrapper or null. + + + + Represents an instance of a MongoDB server host (in the case of a replica set a MongoServer uses multiple MongoServerInstances). + + + + + Checks whether the server is alive (throws an exception if not). + + + + + Verifies the state of the server instance. + + + + + Occurs when the value of the State property changes. + + + + + Gets the address of this server instance. + + + + + Gets the version of this server instance. + + + + + Gets the exception thrown the last time Connect was called (null if Connect did not throw an exception). + + + + + Gets the connection pool for this server instance. + + + + + Gets the IP end point of this server instance. + + + + + Gets whether this server instance is an arbiter instance. + + + + + Gets the result of the most recent ismaster command sent to this server instance. + + + + + Gets whether this server instance is a passive instance. + + + + + Gets whether this server instance is a primary. + + + + + Gets whether this server instance is a secondary. + + + + + Gets the max document size for this server instance. + + + + + Gets the max message length for this server instance. + + + + + Gets the unique sequential Id for this server instance. + + + + + Gets the server for this server instance. + + + + + Gets the state of this server instance. + + + + + Represents a DBRef (a convenient way to refer to a document). + + + + + Creates a MongoDBRef. + + The name of the collection that contains the document. + The Id of the document. + + + + Creates a MongoDBRef. + + The name of the database that contains the document. + The name of the collection that contains the document. + The Id of the document. + + + + Gets the name of the database that contains the document. + + + + + Gets the name of the collection that contains the document. + + + + + Gets the Id of the document. + + + + + Represents the results of a validate collection command. + + + + + Initializes a new instance of the ValidateCollectionResult class. + + + + + Gets the data size of the collection. + + + + + Gets the number of documents that have been deleted from the collection. + + + + + Gets the number of documents that have been deleted from the collection. + + + + + Gets the errors returned by validate (or an empty array if there were no errors). + + + + + Gets the number of extents in the collection. + + + + + Gets the first extent of the collection. + + + + + Gets details of the first extent of the collection. + + + + + Gets the number of indexes in the collection. + + + + + Gets whether the collection is valid. + + + + + Gets a dictionary containing the number of keys per index. + + + + + Gets the last extent of the collection. + + + + + Gets the size of the last extent of the collection. + + + + + Gets the namespace. + + + + + Gets the padding factor of the collection. + + + + + Gets the number of records in the collection. + + + + + Gets the result string. + + + + + Gets any warning returned by the validate command (or null if there is no warning). + + + + + Represents the details of the first extent of the collection. + + + + + Gets the location of the extent. + + + + + Gets the location of the first record of the extent. + + + + + Gets the location of the last record of the extent. + + + + + Gets the nsdiag value of the extent. + + + + + Gets the size of the extent. + + + + + Gets the next extent. + + + + + Gets the prev extent. + + + + + A builder for specifying a sort order. + + + + + Adds keys to be sorted by in ascending order. + + One or more key names. + The builder (so method calls can be chained). + + + + Adds keys to be sorted by in descending order. + + One or more key names. + The builder (so method calls can be chained). + + + + Gets a null value with a type of IMongoSortBy. + + + + + A builder for specifying a sort order. + + + + + Initializes a new instance of the SortByBuider class. + + + + + Adds keys to be sorted by in ascending order. + + One or more key names. + The builder (so method calls can be chained). + + + + Adds keys to be sorted by in descending order. + + One or more key names. + The builder (so method calls can be chained). + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + A builder for creating queries. + + + + + Tests that the named array element contains all of the values (see $all). + + The name of the element to test. + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the named array element contains all of the values (see $all). + + The name of the element to test. + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the named array element contains all of the values (see $all). + + The name of the element to test. + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that all the subqueries are true (see $and in newer versions of the server). + + A list of subqueries. + A query. + + + + Tests that at least one item of the named array element matches a query (see $elemMatch). + + The name of the element to test. + The query to match elements with. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to some value. + + The name of the element to test. + The value to compare to. + A query. + + + + Tests that an element of that name does or does not exist (see $exists). + + The name of the element to test. + Whether to test for the existence or absence of an element. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is greater than some value (see $gt). + + The name of the element to test. + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is greater than or equal to some value (see $gte). + + The name of the element to test. + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The name of the element to test. + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The name of the element to test. + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The name of the element to test. + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is less than some value (see $lt). + + The name of the element to test. + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is less than or equal to some value (see $lte). + + The name of the element to test. + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element matches a regular expression (see $regex). + + The name of the element to test. + The regular expression to match against. + A query. + + + + Tests that the modulus of the value of the named element matches some value (see $mod). + + The name of the element to test. + The modulus. + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to some value (see $ne). + + The name of the element to test. + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is near some location (see $near). + + The name of the element to test. + The x value of the origin. + The y value of the origin. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is near some location (see $near). + + The name of the element to test. + The x value of the origin. + The y value of the origin. + The max distance for a document to be included in the results. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is near some location (see $near and $nearSphere). + + The name of the element to test. + The x value of the origin. + The y value of the origin. + The max distance for a document to be included in the results. + Whether to do a spherical search. + The builder (so method calls can be chained). + + + + Tests that none of the subqueries is true (see $nor). + + The subqueries. + A query. + + + + Tests that the value of the named element does not match any of the tests that follow (see $not). + + The name of the element to test. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The name of the element to test. + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The name of the element to test. + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The name of the element to test. + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that at least one of the subqueries is true (see $or). + + The subqueries. + A query. + + + + Tests that the size of the named array is equal to some value (see $size). + + The name of the element to test. + The size to compare to. + The builder (so method calls can be chained). + + + + Tests that the type of the named element is equal to some type (see $type). + + The name of the element to test. + The type to compare to. + The builder (so method calls can be chained). + + + + Tests that a JavaScript expression is true (see $where). + + The where clause. + A query. + + + + Tests that the value of the named element is within a circle (see $within and $center). + + The name of the element to test. + The x coordinate of the origin. + The y coordinate of the origin. + The radius of the circle. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is within a circle (see $within and $center/$centerSphere). + + The name of the element to test. + The x coordinate of the origin. + The y coordinate of the origin. + The radius of the circle. + Whether to do a spherical search. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is within a rectangle (see $within and $box). + + The name of the element to test. + The x coordinate of the lower left corner. + The y coordinate of the lower left corner. + The x coordinate of the upper right corner. + The y coordinate of the upper right corner. + The builder (so method calls can be chained). + + + + Gets a null value with a type of IMongoQuery. + + + + + A builder for creating queries. + + + + + Initializes a new instance of the QueryBuilder class. + + A document representing the query. + + + + Returns the result of the builder as a BsonDocument. + + A BsonDocument. + + + + Serializes the result of the builder to a BsonWriter. + + The writer. + The nominal type. + The serialization options. + + + + A builder for creating queries. + + + + + Initializes a new instance of the QueryComplete class. + + A document representing the query. + + + + A builder for creating queries. + + + + + Initializes a new instance of the QueryConditionList class. + + The name of the element to test. + + + + Tests that the named array element contains all of the values (see $all). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the named array element contains all of the values (see $all). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the named array element contains all of the values (see $all). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that at least one item of the named array element matches a query (see $elemMatch). + + The query to match elements with. + The builder (so method calls can be chained). + + + + Tests that an element of that name does or does not exist (see $exists). + + Whether to test for the existence or absence of an element. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is greater than some value (see $gt). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is greater than or equal to some value (see $gte). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is less than some value (see $lt). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is less than or equal to some value (see $lte). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the modulus of the value of the named element matches some value (see $mod). + + The modulus. + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to some value (see $ne). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is near some location (see $near). + + The x value of the origin. + The y value of the origin. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is near some location (see $near). + + The x value of the origin. + The y value of the origin. + The max distance for a document to be included in the results. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is near some location (see $near and $nearSphere). + + The x value of the origin. + The y value of the origin. + The max distance for a document to be included in the results. + Whether to do a spherical search. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the size of the named array is equal to some value (see $size). + + The size of the array. + The builder (so method calls can be chained). + + + + Tests that the type of the named element is equal to some type (see $type). + + The type. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is within a circle (see $within and $center). + + The x coordinate of the origin. + The y coordinate of the origin. + The radius of the circle. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is within a circle (see $within and $center/$centerSphere). + + The x coordinate of the origin. + The y coordinate of the origin. + The radius of the circle. + Whether to do a spherical search. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is within a rectangle (see $within and $box). + + The x coordinate of the lower left corner. + The y coordinate of the lower left corner. + The x coordinate of the upper right corner. + The y coordinate of the upper right corner. + The builder (so method calls can be chained). + + + + A builder for creating queries. + + + + + Initializes a new instance of the QueryNot class. + + The name of the element to test. + + + + Tests that the named array element contains all of the values (see $all). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the named array element contains all of the values (see $all). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the named array element contains all of the values (see $all). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that at least one item of the named array element matches a query (see $elemMatch). + + The query to match elements with. + The builder (so method calls can be chained). + + + + Tests that an element of that name does or does not exist (see $exists). + + Whether to test for the existence or absence of an element. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is greater than some value (see $gt). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is greater than or equal to some value (see $gte). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is less than some value (see $lt). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is less than or equal to some value (see $lte). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the modulus of the value of the named element matches some value (see $mod). + + The modulus. + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to some value (see $ne). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element matches a regular expression (see $regex). + + The regular expression to match against. + A query. + + + + Tests that the size of the named array is equal to some value (see $size). + + The size of the array. + The builder (so method calls can be chained). + + + + Tests that the type of the named element is equal to some type (see $type). + + The type. + The builder (so method calls can be chained). + + + + A builder for creating queries. + + + + + Initializes a new instance of the QueryNotConditionList. + + The name of the first element to test. + + + + Tests that the named array element contains all of the values (see $all). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the named array element contains all of the values (see $all). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the named array element contains all of the values (see $all). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that at least one item of the named array element matches a query (see $elemMatch). + + The query to match elements with. + The builder (so method calls can be chained). + + + + Tests that an element of that name does or does not exist (see $exists). + + Whether to test for the existence or absence of an element. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is greater than some value (see $gt). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is greater than or equal to some value (see $gte). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is equal to one of a list of values (see $in). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is less than some value (see $lt). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is less than or equal to some value (see $lte). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the modulus of the value of the named element matches some value (see $mod). + + The modulus. + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to some value ($ne). + + The value to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the value of the named element is not equal to any of a list of values (see $nin). + + The values to compare to. + The builder (so method calls can be chained). + + + + Tests that the size of the named array is equal to some value (see $size). + + The size of the array. + The builder (so method calls can be chained). + + + + Tests that the type of the named element is equal to some type (see $type). + + The type. + The builder (so method calls can be chained). + + + diff --git a/packages/repositories.config b/packages/repositories.config index da429b5..3aaa0c0 100644 --- a/packages/repositories.config +++ b/packages/repositories.config @@ -1,4 +1,5 @@ - - - + + + + \ No newline at end of file