Method Deserialize
- Namespace
- MongoDB.Bson.Serialization
- Assembly
- MongoDB.Bson.dll
Deserialize<TNominalType>(BsonDocument, Action<Builder>)
Deserializes an object from a BsonDocument.
public static TNominalType Deserialize<TNominalType>(BsonDocument document, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
document
BsonDocumentThe BsonDocument.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- TNominalType
A deserialized value.
Type Parameters
TNominalType
The nominal type of the object.
Deserialize<TNominalType>(IBsonReader, Action<Builder>)
Deserializes a value.
public static TNominalType Deserialize<TNominalType>(IBsonReader bsonReader, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
bsonReader
IBsonReaderThe BsonReader.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- TNominalType
A deserialized value.
Type Parameters
TNominalType
The nominal type of the object.
Deserialize<TNominalType>(byte[], Action<Builder>)
Deserializes an object from a BSON byte array.
public static TNominalType Deserialize<TNominalType>(byte[] bytes, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
bytes
byte[]The BSON byte array.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- TNominalType
A deserialized value.
Type Parameters
TNominalType
The nominal type of the object.
Deserialize<TNominalType>(Stream, Action<Builder>)
Deserializes an object from a BSON Stream.
public static TNominalType Deserialize<TNominalType>(Stream stream, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
stream
StreamThe BSON Stream.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- TNominalType
A deserialized value.
Type Parameters
TNominalType
The nominal type of the object.
Deserialize<TNominalType>(string, Action<Builder>)
Deserializes an object from a JSON string.
public static TNominalType Deserialize<TNominalType>(string json, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
json
stringThe JSON string.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- TNominalType
A deserialized value.
Type Parameters
TNominalType
The nominal type of the object.
Deserialize<TNominalType>(TextReader, Action<Builder>)
Deserializes an object from a JSON TextReader.
public static TNominalType Deserialize<TNominalType>(TextReader textReader, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
textReader
TextReaderThe JSON TextReader.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- TNominalType
A deserialized value.
Type Parameters
TNominalType
The nominal type of the object.
Deserialize(BsonDocument, Type, Action<Builder>)
Deserializes an object from a BsonDocument.
public static object Deserialize(BsonDocument document, Type nominalType, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
document
BsonDocumentThe BsonDocument.
nominalType
TypeThe nominal type of the object.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- object
A deserialized value.
Deserialize(IBsonReader, Type, Action<Builder>)
Deserializes a value.
public static object Deserialize(IBsonReader bsonReader, Type nominalType, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
bsonReader
IBsonReaderThe BsonReader.
nominalType
TypeThe nominal type of the object.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- object
A deserialized value.
Deserialize(byte[], Type, Action<Builder>)
Deserializes an object from a BSON byte array.
public static object Deserialize(byte[] bytes, Type nominalType, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
bytes
byte[]The BSON byte array.
nominalType
TypeThe nominal type of the object.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- object
A deserialized value.
Deserialize(Stream, Type, Action<Builder>)
Deserializes an object from a BSON Stream.
public static object Deserialize(Stream stream, Type nominalType, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
stream
StreamThe BSON Stream.
nominalType
TypeThe nominal type of the object.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- object
A deserialized value.
Deserialize(string, Type, Action<Builder>)
Deserializes an object from a JSON string.
public static object Deserialize(string json, Type nominalType, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
json
stringThe JSON string.
nominalType
TypeThe nominal type of the object.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- object
A deserialized value.
Deserialize(TextReader, Type, Action<Builder>)
Deserializes an object from a JSON TextReader.
public static object Deserialize(TextReader textReader, Type nominalType, Action<BsonDeserializationContext.Builder> configurator = null)
Parameters
textReader
TextReaderThe JSON TextReader.
nominalType
TypeThe nominal type of the object.
configurator
Action<BsonDeserializationContext.Builder>The configurator.
Returns
- object
A deserialized value.