Skip to content

Commit 4724787

Browse files
committed
CSHARP-2280: Simplify deserialization of cursor namespace.
1 parent 7d7071f commit 4724787

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/MongoDB.Driver.Core/Core/Operations/AggregateOperation.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,7 @@ public override AggregateResult Deserialize(BsonDeserializationContext context,
460460

461461
case "ns":
462462
var ns = reader.ReadString();
463-
var separatorIndex = ns.IndexOf('.');
464-
var databaseName = ns.Substring(0, separatorIndex);
465-
var collectionName = ns.Substring(separatorIndex + 1);
466-
result.CollectionNamespace = new CollectionNamespace(new DatabaseNamespace(databaseName), collectionName);
463+
result.CollectionNamespace = CollectionNamespace.FromFullName(ns);
467464
break;
468465

469466
case "firstBatch":

0 commit comments

Comments
 (0)