Class ValueObjectMessagePackExtensions
Namespace: AdCodicem.ValueObjects.MessagePack
Assembly: AdCodicem.ValueObjects.MessagePack.dll
Wires value objects into MessagePack serializer options.
public static class ValueObjectMessagePackExtensions
Inheritance
object ← ValueObjectMessagePackExtensions
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
WithValueObjects(MessagePackSerializerOptions, bool)
Returns options whose resolver answers value objects first, then the options' own resolver.
public static MessagePackSerializerOptions WithValueObjects(this MessagePackSerializerOptions options, bool trusted = false)
Parameters
options MessagePackSerializerOptions
The options, MessagePackSerializerOptions.Standard or the application's own.
trusted bool
Whether value objects are read without validation, for bytes the application alone wrote, a cache among them; false, the default, reads them through their rules.
Returns
MessagePackSerializerOptions
A copy of options with the resolver in front of theirs.
Remarks
The resolver of the copy is a composite of Native* resolver of the chain is honoured.
Called twice, the last call answers value objects first: its trust is the one that applies.
Exceptions
options is null.