Table of Contents

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 BsonDocument

The 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 IBsonReader

The 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 Stream

The 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 string

The 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 TextReader

The 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 BsonDocument

The BsonDocument.

nominalType Type

The 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 IBsonReader

The BsonReader.

nominalType Type

The 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 Type

The 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 Stream

The BSON Stream.

nominalType Type

The 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 string

The JSON string.

nominalType Type

The 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 TextReader

The JSON TextReader.

nominalType Type

The nominal type of the object.

configurator Action<BsonDeserializationContext.Builder>

The configurator.

Returns

object

A deserialized value.