Class YamlConverter
- Assembly
- Cuemon.Extensions.YamlDotNet.dll
Converts an object to and from YAML (YAML ain't markup language).
public abstract class YamlConverter : IYamlTypeConverter
- Inheritance
-
ObjectYamlConverter
- Implements
-
IYamlTypeConverter
- Derived
Properties
FormatterOptions
Gets or sets the YamlFormatterOptions associated with this instance. Normally this is done from YamlFormatter
public YamlFormatterOptions FormatterOptions { get; set; }
Property Value
- YamlFormatterOptions
The YamlFormatterOptions associated with this instance.
Methods
CanConvert(Type)
Determines whether this instance can convert the specified object type.
public abstract bool CanConvert(Type typeToConvert)
Parameters
typeToConvert
TypeThe System.Type of the object.
Returns
- Boolean
true
if this instance can convert the specified object type; otherwise,false
.
SetPropertyName(String)
Returns the specified name
adhering to the underlying NamingConvention policy on FormatterOptions.
public string SetPropertyName(string name)
Parameters
name
StringThe name of the property.
Returns
- String
If FormatterOptions is null, the specified
name
is returned unaltered; otherwise it is converted according to the NamingConvention.
Explicit Interface Implementations
IYamlTypeConverter.Accepts(Type)
bool IYamlTypeConverter.Accepts(Type type)
Parameters
type
Type
Returns
- Boolean
IYamlTypeConverter.ReadYaml(IParser, Type)
object IYamlTypeConverter.ReadYaml(IParser parser, Type type)
Parameters
parser
IParsertype
Type
Returns
- Object
IYamlTypeConverter.WriteYaml(IEmitter, Object, Type)
void IYamlTypeConverter.WriteYaml(IEmitter emitter, object value, Type type)
Parameters
emitter
IEmittervalue
Objecttype
Type