Skip to content

Commit e998575

Browse files
committed
move overriden method
1 parent 533fe3e commit e998575

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MongoDB.Driver/SortDefinitionBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,12 @@ public ValueDirectionalSortDefinition(SortDirection direction)
308308
_direction = direction;
309309
}
310310

311-
internal override BsonValue RenderAsBsonValue(RenderArgs<TDocument> args) => _direction.Render();
312-
313311
public override BsonDocument Render(RenderArgs<TDocument> args)
314312
{
315313
throw new InvalidOperationException(
316314
"Value-based sort cannot be rendered as a document. You might be trying to use a value-based sort where a field-based sort is expected.");
317315
}
316+
317+
internal override BsonValue RenderAsBsonValue(RenderArgs<TDocument> args) => _direction.Render();
318318
}
319319
}

0 commit comments

Comments
 (0)