Skip to content

ExceptionCodec Methods

Serializer for System.Exception types.

DeepCopy(Exception, Exception, CopyContext)

View source
public void DeepCopy(Exception input, Exception output, CopyContext context)
Clones members from input and copies them to output.

Parameters

inputException
The input.
outputException
The output.
contextCopyContext
The context.

GetDataProperty(Exception)

View source
public Dictionary<object, object> GetDataProperty(Exception exception)
Gets the data property from the provided exception.

Parameters

exceptionException
The exception.

Returns

The provided exception's System.Exception.Data property.

GetObjectData(Exception)

View source
public SerializationInfo GetObjectData(Exception value)
Gets the object data from the provided exception.

Parameters

valueException
The value.

Returns

A populated System.Runtime.Serialization.SerializationInfo value.

IsSupportedType(Type)

View source
public bool IsSupportedType(Type type)
Determines whether the specified type is supported by this instance.

Parameters

typeType
The type.

Returns

true if the specified type is supported; otherwise, false.

SetBaseProperties(Exception, string, string, Exception, int, Dictionary<object, object>)

View source
public void SetBaseProperties(Exception value, string message, string stackTrace, Exception innerException, int hResult, Dictionary<object, object> data)
Sets base properties on the provided exception.

Parameters

valueException
The value.
messagestring
The message.
stackTracestring
The stack trace.
innerExceptionException
The inner exception.
hResultint
The HResult.
dataDictionary<object, object>
The data.

WriteField(Writer<TBufferWriter>, uint, Type, Exception)

View source
public void WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, Type expectedType, Exception value)
Writes a field.

Parameters

writerWriter<TBufferWriter>
The writer.
fieldIdDeltauint
The field identifier delta.
expectedTypeType
The expected type.
valueException
The value.

WriteField(Writer<TBufferWriter>, uint, Type, object)

View source
public void WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, Type expectedType, object value)
Writes a field using the provided untyped value. The type must still match the codec instance!

Parameters

writerWriter<TBufferWriter>
fieldIdDeltauint
expectedTypeType
valueobject