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
setupAction<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
trueif 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
readerIParserThe reader to read from.
typeToConvertTypeThe 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
writerIEmitterThe writer to write to.
valueExceptionDescriptorThe value to convert to YAML.