Class FloatTruncationSerializer
Writes the float value to mongo as double as reads it back as float.
Inheritance
System.Object
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>
FloatTruncationSerializer
Implements
MongoDB.Bson.Serialization.IBsonSerializer<System.Single>
MongoDB.Bson.Serialization.IBsonSerializer
Inherited Members
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>.CreateCannotBeDeserializedException()
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>.CreateCannotBeSerializedException()
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>.CreateCannotDeserializeFromBsonTypeException(MongoDB.Bson.BsonType)
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>.EnsureBsonTypeEquals(MongoDB.Bson.IO.IBsonReader, MongoDB.Bson.BsonType)
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>.MongoDB.Bson.Serialization.IBsonSerializer.Deserialize(MongoDB.Bson.Serialization.BsonDeserializationContext, MongoDB.Bson.Serialization.BsonDeserializationArgs)
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>.MongoDB.Bson.Serialization.IBsonSerializer.Serialize(MongoDB.Bson.Serialization.BsonSerializationContext, MongoDB.Bson.Serialization.BsonSerializationArgs, System.Object)
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>.ValueType
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: TcOpen.Inxton.Data.MongoDb
Assembly: TcOpen.Inxton.MongoDb.dll
Syntax
public class FloatTruncationSerializer : SerializerBase<float>, IBsonSerializer<float>, IBsonSerializer
Methods
| Improve this Doc View SourceDeserialize(BsonDeserializationContext, BsonDeserializationArgs)
Declaration
public override float Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
Parameters
Type | Name | Description |
---|---|---|
MongoDB.Bson.Serialization.BsonDeserializationContext | context | |
MongoDB.Bson.Serialization.BsonDeserializationArgs | args |
Returns
Type | Description |
---|---|
System.Single |
Overrides
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>.Deserialize(MongoDB.Bson.Serialization.BsonDeserializationContext, MongoDB.Bson.Serialization.BsonDeserializationArgs)
|
Improve this Doc
View Source
Serialize(BsonSerializationContext, BsonSerializationArgs, Single)
Declaration
public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, float value)
Parameters
Type | Name | Description |
---|---|---|
MongoDB.Bson.Serialization.BsonSerializationContext | context | |
MongoDB.Bson.Serialization.BsonSerializationArgs | args | |
System.Single | value |
Overrides
MongoDB.Bson.Serialization.Serializers.SerializerBase<System.Single>.Serialize(MongoDB.Bson.Serialization.BsonSerializationContext, MongoDB.Bson.Serialization.BsonSerializationArgs, System.Single)
Implements
MongoDB.Bson.Serialization.IBsonSerializer<TValue>
MongoDB.Bson.Serialization.IBsonSerializer