C# Class YamlDotNet.Serialization.Serializer

Mostrar archivo Open project: aaubry/YamlDotNet Class Usage Examples

Public Methods

Method Description
FromValueSerializer ( IValueSerializer valueSerializer ) : Serializer

Creates a new Serializer that uses the specified IValueSerializer. This method is available for advanced scenarios. The preferred way to customize the bahavior of the deserializer is to use SerializerBuilder.

Serialize ( object graph ) : string

Serializes the specified object into a string.

Serialize ( IEmitter emitter, object graph ) : void

Serializes the specified object.

Serialize ( IEmitter emitter, object graph, Type type ) : void

Serializes the specified object.

Serialize ( TextWriter writer, object graph ) : void

Serializes the specified object.

Serialize ( TextWriter writer, object graph, Type type ) : void

Serializes the specified object.

Serializer ( ) : System

Initializes a new instance of Serializer using the default configuration.

To customize the bahavior of the serializer, use SerializerBuilder.

Private Methods

Method Description
EmitDocument ( IEmitter emitter, object graph, Type type ) : void
RegisterTypeConverter ( IYamlTypeConverter converter ) : void
Serializer ( IValueSerializer valueSerializer ) : System This constructor is private to discourage its use. To invoke it, call the FromValueSerializer method.
Serializer ( SerializationOptions options = SerializationOptions.None, INamingConvention namingConvention = null, YamlAttributeOverrides overrides = null ) : System
ThrowUnlessInBackwardsCompatibleMode ( ) : void

Method Details

FromValueSerializer() public static method

Creates a new Serializer that uses the specified IValueSerializer. This method is available for advanced scenarios. The preferred way to customize the bahavior of the deserializer is to use SerializerBuilder.
public static FromValueSerializer ( IValueSerializer valueSerializer ) : Serializer
valueSerializer IValueSerializer
return Serializer

Serialize() public method

Serializes the specified object into a string.
public Serialize ( object graph ) : string
graph object The object to serialize.
return string

Serialize() public method

Serializes the specified object.
public Serialize ( IEmitter emitter, object graph ) : void
emitter IEmitter The where to serialize the object.
graph object The object to serialize.
return void

Serialize() public method

Serializes the specified object.
public Serialize ( IEmitter emitter, object graph, Type type ) : void
emitter IEmitter The where to serialize the object.
graph object The object to serialize.
type System.Type The static type of the object to serialize.
return void

Serialize() public method

Serializes the specified object.
public Serialize ( TextWriter writer, object graph ) : void
writer System.IO.TextWriter The where to serialize the object.
graph object The object to serialize.
return void

Serialize() public method

Serializes the specified object.
public Serialize ( TextWriter writer, object graph, Type type ) : void
writer System.IO.TextWriter The where to serialize the object.
graph object The object to serialize.
type System.Type The static type of the object to serialize.
return void

Serializer() public method

Initializes a new instance of Serializer using the default configuration.
To customize the bahavior of the serializer, use SerializerBuilder.
public Serializer ( ) : System
return System