C# Class YamlDotNet.Serialization.Serializer

Afficher le fichier Open project: aaubry/YamlDotNet Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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
Résultat Serializer

Serialize() public méthode

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

Serialize() public méthode

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.
Résultat void

Serialize() public méthode

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.
Résultat void

Serialize() public méthode

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.
Résultat void

Serialize() public méthode

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.
Résultat void

Serializer() public méthode

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