Permalink
Browse files

Fix some warnings.

  • Loading branch information...
1 parent 13faa3a commit a19dfb5dcbeab25f966a97f93e207727a1d2396b @lanwin lanwin committed Mar 23, 2010
@@ -156,7 +156,7 @@ public string FileName
/// Creates the file named FileName and returns the GridFileStream
/// </summary>
/// <returns></returns>
- /// <exception cref="IOEXception">If the file already exists</exception>
+ /// <exception cref="IOException">If the file already exists</exception>
public GridFileStream Create(){
return Create(FileMode.CreateNew);
}
@@ -284,7 +284,7 @@ public string FileName
if(filedata.Contains("_id") == false) return;
this.gridFile.Chunks.Delete(new Document().Add("files_id", filedata["_id"]));
this.Length = 0;
- this.gridFile.Files.Update(filedata);
+ this.gridFile.Files.Save(filedata);
}
/// <summary>
@@ -262,7 +262,7 @@ public override void Flush ()
if (chunk.Contains ("_id")) {
- chunks.Update (chunk);
+ chunks.Save (chunk);
} else {
chunks.Insert (chunk);
}
@@ -336,7 +336,7 @@ public override void Close ()
EnsureNoHoles ();
string md5 = gridFileInfo.CalcMD5 ();
gridFileInfo.Md5 = md5;
- this.files.Update (gridFileInfo.ToDocument ());
+ this.files.Save (gridFileInfo.ToDocument ());
base.Close ();
}
@@ -28,6 +28,8 @@ public RawConnection(MongoServerEndPoint endPoint,TimeSpan connectionTimeout)
_client.NoDelay = true;
_client.ReceiveTimeout = (int)connectionTimeout.TotalMilliseconds;
_client.SendTimeout = (int)connectionTimeout.TotalMilliseconds;
+
+ //Todo: custom exception?
_client.Connect(EndPoint.Host, EndPoint.Port);
}
View
@@ -58,7 +58,7 @@ class MainClass
category["name"] = "Bluess";
//The following will do the same thing.
- categories.Update(category);
+ categories.Save(category);
Console.WriteLine("Category after one update " + categories.FindOne(selector).ToString());
@@ -61,7 +61,7 @@ Namespace Simple
category("name") = "Bluess"
'The following will do the same thing.
- categories.Update(category)
+ categories.Save(category)
Console.WriteLine("Category after one update " + categories.FindOne(selector).ToString())

0 comments on commit a19dfb5

Please sign in to comment.