Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BsonType.Timestamp support in ObjectSerializer #312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 10, 2018

  1. BsonType.Timestamp support in ObjectSerializer

    ### Scenario
    
    Calling `IMongoDatabase.RunCommandAsync<object>` fails when response contains values with BSON type *Timestamp*. This happens at every request when using replica sets.
    
    A `FormatException` is thrown saying: *ObjectSerializer does not support BSON type Timestamp*.  
    Specialized serializers (like `BsonTimestampSerializer`) can't be used here, because the anonymous response type doesn't allow class mapping.
    
    ### Solution
    
    Add an entry to `ObjectSerializer` type recognition code, in order to support *Timestamp* deserialization.
    
    That's already done for other BSON types (binary, int, decimal, array, string, objectId, etc.)
    
    ### Side effects
    
    None
    udda committed Jan 10, 2018
    Configuration menu
    Copy the full SHA
    553497f View commit details
    Browse the repository at this point in the history