MongoDB.Bson.Serialization.Serializers.BsonSymbolSerializer.Serialize C# (CSharp) Метод

Serialize() публичный Метод

Serializes an object to a BsonWriter.
public Serialize ( BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options ) : void
bsonWriter BsonWriter The BsonWriter.
nominalType System.Type The nominal type.
value object The object.
options IBsonSerializationOptions The serialization options.
Результат void
        public override void Serialize(
            BsonWriter bsonWriter,
            Type nominalType,
            object value,
            IBsonSerializationOptions options)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }

            var symbol = (BsonSymbol)value;
            bsonWriter.WriteSymbol(symbol.Name);
        }
    }