Skip to content

Commit f74ddc3

Browse files
author
rstam
committed
Fixed CSHARP-478. Changed the default for commands from { commandName : true } to { commandName : 1}. They are supposed to be equivalent (and the Java driver also uses true) but there is at least one server command that is picky and wants to see a 1.
1 parent aad28d7 commit f74ddc3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Driver/Core/MongoDatabase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ public virtual CommandResult RunCommandAs(Type commandResultType, IMongoCommand
991991
/// <returns>A TCommandResult</returns>
992992
public virtual CommandResult RunCommandAs(Type commandResultType, string commandName)
993993
{
994-
var command = new CommandDocument(commandName, true);
994+
var command = new CommandDocument(commandName, 1);
995995
return RunCommandAs(commandResultType, command);
996996
}
997997

DriverUnitTests/Core/CommandResults/CommandResultTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void Setup()
4141
[Test]
4242
public void TestOkMissing()
4343
{
44-
var command = new CommandDocument("invalid", true);
44+
var command = new CommandDocument("invalid", 1);
4545
var document = new BsonDocument();
4646
var result = new CommandResult(command, document);
4747
try

0 commit comments

Comments
 (0)