Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename MetaData propertys to Metadata.

  • Loading branch information...
commit ab343f89e3e6ce62ceb31b6146cf9d1efb4f0f35 1 parent 0ca7fb4
@lanwin lanwin authored
View
2  source/MongoDB.GridFS/GridFile.cs
@@ -55,7 +55,7 @@ public IMongoCollection Chunks
this.db = db;
this.files = db[bucket + ".files"];
this.chunks = db[bucket + ".chunks"];
- this.chunks.MetaData.CreateIndex(new Document().Add("files_id", 1).Add("n", 1), true);
+ this.chunks.Metadata.CreateIndex(new Document().Add("files_id", 1).Add("n", 1), true);
this.name = bucket;
}
View
12 source/MongoDB.Tests/IntegrationTests/TestCollectionMetaData.cs
@@ -33,14 +33,14 @@ public class TestCollectionMetaData : MongoTestBase
[Test]
public void TestGetOptions(){
- CollectionMetadata cmd = DB["reads"].MetaData;
+ CollectionMetadata cmd = DB["reads"].Metadata;
Document options = cmd.Options;
Assert.IsNotNull(options);
}
[Test]
public void TestGetIndexes(){
- CollectionMetadata cmd = DB["indextests"].MetaData;
+ CollectionMetadata cmd = DB["indextests"].Metadata;
Dictionary<string, Document> indexes = cmd.Indexes;
Assert.IsNotNull(indexes);
@@ -52,7 +52,7 @@ public class TestCollectionMetaData : MongoTestBase
[Test]
public void TestCreateIndex(){
- CollectionMetadata cmd = DB["indextests"].MetaData;
+ CollectionMetadata cmd = DB["indextests"].Metadata;
cmd.CreateIndex("lastnames", new Document().Add("lname", IndexOrder.Ascending), false);
Dictionary<string, Document> indexes = cmd.Indexes;
Assert.IsNotNull(indexes["lastnames"]);
@@ -60,7 +60,7 @@ public class TestCollectionMetaData : MongoTestBase
[Test]
public void TestCreateIndexNoNames(){
- CollectionMetadata cmd = DB["indextests"].MetaData;
+ CollectionMetadata cmd = DB["indextests"].Metadata;
cmd.CreateIndex(new Document().Add("lname", IndexOrder.Ascending).Add("fname", IndexOrder.Ascending), true);
Dictionary<string, Document> indexes = cmd.Indexes;
Assert.IsNotNull(indexes["_lname_fname_unique_"]);
@@ -68,7 +68,7 @@ public class TestCollectionMetaData : MongoTestBase
[Test]
public void TestDropIndex(){
- CollectionMetadata cmd = DB["indextests"].MetaData;
+ CollectionMetadata cmd = DB["indextests"].Metadata;
cmd.CreateIndex("firstnames", new Document().Add("fname", IndexOrder.Ascending), false);
Dictionary<string, Document> indexes = cmd.Indexes;
Assert.IsNotNull(indexes["firstnames"]);
@@ -80,7 +80,7 @@ public class TestCollectionMetaData : MongoTestBase
public void TestRename(){
DB["rename"].Insert(new Document(){{"test", "rename"}});
Assert.AreEqual(1, DB["rename"].Count());
- CollectionMetadata cmd = DB["rename"].MetaData;
+ CollectionMetadata cmd = DB["rename"].Metadata;
cmd.Rename("renamed");
Assert.IsFalse(DB.GetCollectionNames().Contains(DB.Name + ".rename"), "Shouldn't have found collection");
Assert.IsTrue(DB.GetCollectionNames().Contains(DB.Name + ".renamed"),"Should have found collection");
View
2  source/MongoDB.Tests/IntegrationTests/TestCollectionSafeMode.cs
@@ -67,7 +67,7 @@ public class TestCollectionSafeMode : MongoTestBase
protected IMongoCollection InitCollection(string name)
{
IMongoCollection col = DB[name];
- col.MetaData.CreateIndex(new Document{{"x", IndexOrder.Ascending}}, true);
+ col.Metadata.CreateIndex(new Document{{"x", IndexOrder.Ascending}}, true);
for(int x = 0; x < 5; x++){
col.Insert(new Document{{"x", x}, {"y", 1}});
}
View
2  source/MongoDB.Tests/IntegrationTests/TestCursor.cs
@@ -113,7 +113,7 @@ public void TestHint()
var exp = reads.FindAll().Hint(hint).Explain();
Assert.IsTrue(exp.Contains("$err"), "No error found");
- reads.MetaData.CreateIndex("hintindex", hint, false);
+ reads.Metadata.CreateIndex("hintindex", hint, false);
exp = reads.FindAll().Hint(hint).Explain();
Assert.IsTrue(exp.Contains("cursor"));
View
4 source/MongoDB.Tests/IntegrationTests/TestDatabase.cs
@@ -72,7 +72,7 @@ public class TestDatabase : MongoTestBase
[Test]
public void TestGetLastError(){
var errcol = DB["errcol"];
- errcol.MetaData.CreateIndex(new Document {{"x", IndexOrder.Ascending}}, true);
+ errcol.Metadata.CreateIndex(new Document {{"x", IndexOrder.Ascending}}, true);
var dup = new Document {{"x", 1}, {"y", 2}};
errcol.Insert(dup);
var error = DB.GetLastError();
@@ -94,7 +94,7 @@ public class TestDatabase : MongoTestBase
[Test]
public void TestGetPrevError(){
var col = DB["preverror"];
- col.MetaData.CreateIndex(new Document {{"x", IndexOrder.Ascending}}, true);
+ col.Metadata.CreateIndex(new Document {{"x", IndexOrder.Ascending}}, true);
var docs = new List<Document>();
for(var x = 0; x < 10; x++)
docs.Add(new Document {{"x", x}, {"y", 2}});
View
2  source/MongoDB/DatabaseJavascript.cs
@@ -34,7 +34,7 @@ internal DatabaseJavascript(IMongoDatabase database)
/// </remarks>
private void EnsureIndexExists()
{
- _collection.MetaData.CreateIndex(new Document("_id", 1), true);
+ _collection.Metadata.CreateIndex(new Document("_id", 1), true);
}
/// <summary>
View
2  source/MongoDB/IMongoCollection_1.cs
@@ -38,7 +38,7 @@ public interface IMongoCollection<T>
/// <summary>
/// Metadata about the collection such as indexes.
/// </summary>
- CollectionMetadata MetaData { get; }
+ CollectionMetadata Metadata { get; }
/// <summary>
/// Finds and returns the first document in a selector query.
View
6 source/MongoDB/MongoCollection_1.cs
@@ -18,7 +18,7 @@ public class MongoCollection<T> : IMongoCollection<T> where T : class
private readonly MongoConfiguration _configuration;
private readonly Connection _connection;
private MongoDatabase _database;
- private CollectionMetadata _metaData;
+ private CollectionMetadata _metadata;
/// <summary>
/// Initializes a new instance of the <see cref="MongoCollection&lt;T&gt;"/> class.
@@ -68,8 +68,8 @@ internal MongoCollection(MongoConfiguration configuration, Connection connection
/// Gets the meta data.
/// </summary>
/// <value>The meta data.</value>
- public CollectionMetadata MetaData {
- get { return _metaData ?? (_metaData = new CollectionMetadata(_configuration, DatabaseName, Name, _connection)); }
+ public CollectionMetadata Metadata {
+ get { return _metadata ?? (_metadata = new CollectionMetadata(_configuration, DatabaseName, Name, _connection)); }
}
/// <summary>
View
2  source/MongoDB/Obsolete/IMongoCollection.cs
@@ -36,7 +36,7 @@ public interface IMongoCollection
/// Gets the meta data.
/// </summary>
/// <value>The meta data.</value>
- CollectionMetadata MetaData { get; }
+ CollectionMetadata Metadata { get; }
/// <summary>
/// Finds the one.
View
4 source/MongoDB/Obsolete/MongoCollection.cs
@@ -64,9 +64,9 @@ public string FullName
/// Gets the meta data.
/// </summary>
/// <value>The meta data.</value>
- public CollectionMetadata MetaData
+ public CollectionMetadata Metadata
{
- get { return _collection.MetaData; }
+ get { return _collection.Metadata; }
}
/// <summary>
View
2  tools/Benchmark/Main.cs
@@ -128,7 +128,7 @@ private static void SetupInsert(IMongoDatabase db, string col, bool index)
if(index)
{
var idx = new Document().Add("x", IndexOrder.Ascending);
- db[col].MetaData.CreateIndex(idx, false);
+ db[col].Metadata.CreateIndex(idx, false);
}
}
catch(MongoCommandException)
Please sign in to comment.
Something went wrong with that request. Please try again.