Skip to content

Commit

Permalink
Merge branch 'master' into 090beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed Jun 12, 2010
2 parents 0a2a74b + 80c4d55 commit 60e3d41
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 180 deletions.
4 changes: 2 additions & 2 deletions examples/Simple/Main.cs
Expand Up @@ -14,7 +14,7 @@ namespace Simple
/// </summary>
internal class MainClass
{
private IMongoCollection categories;
private IMongoCollection<Document> categories;
private Mongo mongo;
private IMongoDatabase simple;

Expand All @@ -36,7 +36,7 @@ public void Setup()
mongo = new Mongo(connstr);
mongo.Connect();
simple = mongo["simple"];
categories = simple["categories"];
categories = simple.GetCollection<Document>("categories");
Clean();

var names = new[] {"Bluez", "Jazz", "Classical", "Rock", "Oldies", "Heavy Metal"};
Expand Down
6 changes: 3 additions & 3 deletions examples/SimpleVB/Application.vb
Expand Up @@ -17,7 +17,7 @@ Namespace Simple
Public Class Application
Private mongo as Mongo
Private simple as IMongoDatabase
Private categories as IMongoCollection
Private categories As IMongoCollection(Of Document)

Public Shared Sub Main()
Dim app As New Application()
Expand All @@ -37,7 +37,7 @@ Namespace Simple
mongo = new Mongo(connstr)
mongo.Connect()
simple = mongo("simple")
categories = simple("categories")
categories = simple.GetCollection(Of Document)("categories")
Clean()

Dim names() As String = {"Bluez", "Jazz", "Classical", "Rock", "Oldies", "Heavy Metal"}
Expand Down Expand Up @@ -78,7 +78,7 @@ Namespace Simple
'Find(new Document()) is equivalent to FindAll()
'Specifying the cursor in a using block will close it on the server if we decide not
'to iterate through the whole thing.
Dim all As ICursor = categories.Find(New Document())
Dim all As ICursor(Of Document) = categories.Find(New Document())
Try
For Each doc As Document In all.Documents
Console.WriteLine(doc.ToString())
Expand Down
3 changes: 1 addition & 2 deletions source/MongoDB.GridFS/MongoDB.GridFS.csproj
Expand Up @@ -45,8 +45,7 @@
<RegisterForComInterop>false</RegisterForComInterop>
<DocumentationFile>bin\Debug\MongoDB.GridFS.xml</DocumentationFile>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<NoWarn>
</NoWarn>
<NoWarn>0618</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
Expand Down
1 change: 1 addition & 0 deletions source/MongoDB/MongoDB.csproj
Expand Up @@ -53,6 +53,7 @@
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>false</RunCodeAnalysis>
<NoWarn>0618</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
Expand Down
1 change: 1 addition & 0 deletions source/MongoDB/Obsolete/Cursor.cs
Expand Up @@ -62,6 +62,7 @@ public long Id
/// <param name="fields">The fields.</param>
/// <returns></returns>
public ICursor Fields(Document fields){
_cursor.Fields(fields);
return this;
}

Expand Down
1 change: 1 addition & 0 deletions source/MongoDB/Obsolete/ICursor.cs
Expand Up @@ -5,6 +5,7 @@ namespace MongoDB {
/// <summary>
///
/// </summary>
[Obsolete("Uses ICursor<Document> instead. This class will be possible not included in future releases.")]
public interface ICursor : IDisposable
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions source/MongoDB/Obsolete/IMongoCollection.cs
Expand Up @@ -5,6 +5,7 @@ namespace MongoDB
{
/// <summary>
/// </summary>
[Obsolete("Uses IMongoCollection<Document> instead. This class will be possible not included in future releases.")]
public interface IMongoCollection
{
/// <summary>
Expand Down

0 comments on commit 60e3d41

Please sign in to comment.