Table of Contents

Class JsonEnumFallbackAttribute

Namespace
VpnHood.Net.Toolkit.Converters
Assembly
VpnHood.Net.Toolkit.dll

Specifies the value JsonStringEnumFallbackConverter<TEnum> reads for a name the enum does not have: the one a reader takes when the other side is newer, so it must be safe to act on, such as an error for an unknown error code, or the fail-closed mode for an unknown mode.

[AttributeUsage(AttributeTargets.Enum)]
public sealed class JsonEnumFallbackAttribute : Attribute
Inheritance
JsonEnumFallbackAttribute
Inherited Members

Constructors

JsonEnumFallbackAttribute(object)

Specifies the value JsonStringEnumFallbackConverter<TEnum> reads for a name the enum does not have: the one a reader takes when the other side is newer, so it must be safe to act on, such as an error for an unknown error code, or the fail-closed mode for an unknown mode.

public JsonEnumFallbackAttribute(object value)

Parameters

value object

The fallback, one of the enum's values.

Properties

Value

Gets the fallback.

public object Value { get; }

Property Value

object