Class ExceptionDescriptorConverter
- Namespace
- Codebelt.Extensions.YamlDotNet.Converters
- Assembly
- Codebelt.Extensions.YamlDotNet.dll
Converts an ExceptionDescriptor to YAML.
public class ExceptionDescriptorConverter : YamlConverter<ExceptionDescriptor>, IYamlTypeConverter
- Inheritance
-
ExceptionDescriptorConverter
- Implements
-
IYamlTypeConverter
- Inherited Members
Constructors
ExceptionDescriptorConverter(Action<ExceptionDescriptorOptions>)
Initializes a new instance of the ExceptionDescriptorConverter class.
public ExceptionDescriptorConverter(Action<ExceptionDescriptorOptions> setup = null)
Parameters
setup
Action<ExceptionDescriptorOptions>The ExceptionDescriptorOptions which may be configured.
Methods
CanConvert(Type)
Determines whether this instance can convert the specified object type.
public override bool CanConvert(Type typeToConvert)
Parameters
Returns
- bool
true
if this instance can convert the specified object type; otherwise,false
.
ReadYaml(IParser, Type)
Reads and converts the YAML to ExceptionDescriptor.
public override ExceptionDescriptor ReadYaml(IParser reader, Type typeToConvert)
Parameters
reader
IParserThe reader to read from.
typeToConvert
TypeThe type to convert.
Returns
- ExceptionDescriptor
The converted value.
Exceptions
WriteYaml(IEmitter, ExceptionDescriptor)
Writes a specified value
as YAML.
public override void WriteYaml(IEmitter writer, ExceptionDescriptor value)
Parameters
writer
IEmitterThe writer to write to.
value
ExceptionDescriptorThe value to convert to YAML.