JsonConfFlagConverter Class

Serializes / Deserializes a flags based enum type between the flag value and a json object with a boolean property for each flag (true if the flags is set).

Definition

Namespace: MFiles.VAF.Configuration
Assembly: MFiles.VAF.Configuration (in MFiles.VAF.Configuration.dll) Version: 23.12.13247.3
C#
public class JsonConfFlagConverter : JsonConverter
Inheritance
Object    JsonConverter    JsonConfFlagConverter

Constructors

Properties

CanRead Gets a value indicating whether this JsonConverter can read JSON.
(Inherited from JsonConverter)
CanWrite Gets a value indicating whether this JsonConverter can write JSON.
(Inherited from JsonConverter)

Methods

CanConvert Determines if the converted can convert a certain type.
(Overrides JsonConverter.CanConvert(Type))
ConvertFlagObject(Type, JObject, Int32) Converts a flag object to a corresponding numeric flags value.
ConvertFlagObjectTFlags(JObject, Int32) Converts a flag object to a corresponding numeric flags value.
ConvertFlags Converts a numeric flags value to a corresponding flag object.
GetFlagPropertyName Gets the json property name for a flag.
ReadJson Converts various json types to a valid flags type.
(Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer))
WriteJson Serializes a flag value to a json value.
(Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer))

See Also