Class SerializerYaml
Yaml serializer.
Implements
Inherited Members
Namespace: Evergine.Common.Serialization
Assembly: Evergine.Common.dll
Syntax
public class SerializerYaml : ISerializer
Methods
CleanCache()
Clean the cache of serializer types.
Declaration
public static void CleanCache()
Deserialize(Stream)
Deserializes the specified stream.
Declaration
public object Deserialize(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream. |
Returns
| Type | Description |
|---|---|
| object | Deserialized object. |
Deserialize(Stream, Type)
Deserializes the specified stream.
Declaration
public object Deserialize(Stream stream, Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream. |
| Type | type | The expected type. |
Returns
| Type | Description |
|---|---|
| object | Deserialized object. |
DeserializeInto<T>(Stream, T)
Deserializes the specified stream.
Declaration
public T DeserializeInto<T>(Stream stream, T existingObject)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream. |
| T | existingObject | The object to deserialize into. If null (the default) then a new object will be created. |
Returns
| Type | Description |
|---|---|
| T | Deserialize object. |
Type Parameters
| Name | Description |
|---|---|
| T | The type to be deserialized. |
GetSerializer(Type)
Get a new serializer instance.
Declaration
public static SerializerYaml GetSerializer(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The serializer type. |
Returns
| Type | Description |
|---|---|
| SerializerYaml | ISerializer instance. |
GetSerializer<T>()
Get a new serializer instance.
Declaration
public static ISerializer GetSerializer<T>()
Returns
| Type | Description |
|---|---|
| ISerializer | ISerializer instance. |
Type Parameters
| Name | Description |
|---|---|
| T | Generic type. |
Serialize(Stream, object)
Serializes the specified obj into the stream.
Declaration
public void Serialize(Stream stream, object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream. |
| object | obj | The object. |
Serialize(Stream, object, Type)
Serializes the specified obj into the stream using the specified type.
Declaration
public void Serialize(Stream stream, object obj, Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream. |
| object | obj | The object. |
| Type | type | The object type. |