C# Класс YamlDotNet.Serialization.Serializer

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

FromValueSerializer() публичный статический Метод

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
Результат Serializer

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

Serializes the specified object into a string.
public Serialize ( object graph ) : string
graph object The object to serialize.
Результат string

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

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.
Результат void

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

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.
Результат void

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

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.
Результат void

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

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.
Результат void

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

Initializes a new instance of Serializer using the default configuration.
To customize the bahavior of the serializer, use SerializerBuilder.
public Serializer ( ) : System
Результат System