Class YamlDeserializer
A façade for the YAML library with the standard configuration.
Inheritance
YamlDeserializer
Namespace:Microsoft.DocAsCode.YamlSerialization
Assembly:Microsoft.DocAsCode.YamlSerialization.dll
Syntax
public sealed class YamlDeserializer
Constructors
YamlDeserializer(IObjectFactory, INamingConvention, Boolean, Boolean)
Declaration
public YamlDeserializer(IObjectFactory objectFactory = null, INamingConvention namingConvention = null, bool ignoreUnmatched = false, bool ignoreNotFoundAnchor = true)
Parameters
Type |
Name |
Description |
YamlDotNet.Serialization.IObjectFactory |
objectFactory |
|
YamlDotNet.Serialization.INamingConvention |
namingConvention |
|
Boolean |
ignoreUnmatched |
|
Boolean |
ignoreNotFoundAnchor |
|
Properties
NodeDeserializers
Declaration
public IList<INodeDeserializer> NodeDeserializers { get; }
Property Value
Type |
Description |
IList<YamlDotNet.Serialization.INodeDeserializer> |
|
TypeResolvers
Declaration
public IList<INodeTypeResolver> TypeResolvers { get; }
Property Value
Type |
Description |
IList<YamlDotNet.Serialization.INodeTypeResolver> |
|
ValueDeserializer
Declaration
public IValueDeserializer ValueDeserializer { get; }
Property Value
Type |
Description |
YamlDotNet.Serialization.IValueDeserializer |
|
Methods
Deserialize(TextReader, Type, IValueDeserializer)
Declaration
public object Deserialize(TextReader input, Type type, IValueDeserializer deserializer = null)
Parameters
Type |
Name |
Description |
TextReader |
input |
|
Type |
type |
|
YamlDotNet.Serialization.IValueDeserializer |
deserializer |
|
Returns
Deserialize(TextReader, IValueDeserializer)
Declaration
public object Deserialize(TextReader input, IValueDeserializer deserializer = null)
Parameters
Type |
Name |
Description |
TextReader |
input |
|
YamlDotNet.Serialization.IValueDeserializer |
deserializer |
|
Returns
Deserialize(IParser, Type, IValueDeserializer)
Deserializes an object of the specified type.
Declaration
public object Deserialize(IParser parser, Type type, IValueDeserializer deserializer = null)
Parameters
Type |
Name |
Description |
YamlDotNet.Core.IParser |
parser |
The YamlDotNet.Core.IParser where to deserialize the object.
|
Type |
type |
The static type of the object to deserialize.
|
YamlDotNet.Serialization.IValueDeserializer |
deserializer |
|
Returns
Type |
Description |
Object |
Returns the deserialized object.
|
Deserialize(IParser, IValueDeserializer)
Declaration
public object Deserialize(IParser reader, IValueDeserializer deserializer = null)
Parameters
Type |
Name |
Description |
YamlDotNet.Core.IParser |
reader |
|
YamlDotNet.Serialization.IValueDeserializer |
deserializer |
|
Returns
Deserialize<T>(TextReader, IValueDeserializer)
Declaration
public T Deserialize<T>(TextReader input, IValueDeserializer deserializer = null)
Parameters
Type |
Name |
Description |
TextReader |
input |
|
YamlDotNet.Serialization.IValueDeserializer |
deserializer |
|
Returns
Type Parameters
Deserialize<T>(IParser, IValueDeserializer)
Declaration
public T Deserialize<T>(IParser reader, IValueDeserializer deserializer = null)
Parameters
Type |
Name |
Description |
YamlDotNet.Core.IParser |
reader |
|
YamlDotNet.Serialization.IValueDeserializer |
deserializer |
|
Returns
Type Parameters
RegisterTagMapping(String, Type)
Declaration
public void RegisterTagMapping(string tag, Type type)
Parameters
RegisterTypeConverter(IYamlTypeConverter)
Declaration
public void RegisterTypeConverter(IYamlTypeConverter typeConverter)
Parameters
Type |
Name |
Description |
YamlDotNet.Serialization.IYamlTypeConverter |
typeConverter |
|
Extension Methods