Class CodecContext
Carries version, diagnostic path, depth limits, and bounded diagnostics for one root codec operation.
public sealed class CodecContext
- Inheritance
-
CodecContext
- Inherited Members
Remarks
Because each context belongs to one root operation, it carries no registry, service, or ambient application state.
Constructors
CodecContext(int)
public CodecContext(int version = 0)
Parameters
versionint
Fields
MaximumPathDepth
public const int MaximumPathDepth = 64
Field Value
MaximumRenderedPathLength
public const int MaximumRenderedPathLength = 1024
Field Value
MaximumRetainedDiagnostics
public const int MaximumRetainedDiagnostics = 64
Field Value
MaximumRetainedMessageLength
public const int MaximumRetainedMessageLength = 1024
Field Value
MaximumSemanticDepth
public const int MaximumSemanticDepth = 64
Field Value
Properties
Diagnostics
public IReadOnlyList<CodecDiagnostic> Diagnostics { get; }
Property Value
DiagnosticsTruncated
public bool DiagnosticsTruncated { get; }
Property Value
HasFailures
public bool HasFailures { get; }
Property Value
IsActive
public bool IsActive { get; }
Property Value
Path
public string Path { get; }
Property Value
Version
public int Version { get; }
Property Value
Methods
Fail(string)
public void Fail(string message)
Parameters
messagestring
PushIndex(int)
Adds an array index to the diagnostic path until the returned scope is disposed.
public CodecPathScope PushIndex(int index)
Parameters
indexint
Returns
PushProperty(string)
Adds a property to the diagnostic path until the returned scope is disposed.
public CodecPathScope PushProperty(string name)
Parameters
namestring
Returns
Warn(string)
public void Warn(string message)
Parameters
messagestring