tgstation-server 6.12.0
The /tg/station 13 server suite
|
JsonConverter and IYamlTypeConverter for serializing global::System.Versions in semver format. More...
Public Member Functions | |
override void | WriteJson (JsonWriter? writer, object? value, JsonSerializer serializer) |
override? object | ReadJson (JsonReader? reader, Type? objectType, object? existingValue, JsonSerializer serializer) |
override bool | CanConvert (Type objectType) |
bool | Accepts (Type type) |
object | ReadYaml (IParser parser, Type type, ObjectDeserializer rootDeserializer) |
void | WriteYaml (IEmitter? emitter, object? value, Type type, ObjectSerializer serializer) |
Static Private Member Functions | |
static bool | CheckSupportsType (Type? type, bool validate) |
Check if the VersionConverter supports (de)serializing a given type . | |
JsonConverter and IYamlTypeConverter for serializing global::System.Versions in semver format.
Definition at line 16 of file VersionConverter.cs.
bool Tgstation.Server.Shared.VersionConverter.Accepts | ( | Type | type | ) |
override bool Tgstation.Server.Shared.VersionConverter.CanConvert | ( | Type | objectType | ) |
|
staticprivate |
Check if the VersionConverter supports (de)serializing a given type .
type | The Type to check. |
validate | If the method should throw if validation fails. |
true
if type is a global::System.Version, false
otherwise.Definition at line 24 of file VersionConverter.cs.
Referenced by Tgstation.Server.Shared.VersionConverter.ReadJson(), and Tgstation.Server.Shared.VersionConverter.WriteYaml().
override? object Tgstation.Server.Shared.VersionConverter.ReadJson | ( | JsonReader? | reader, |
Type? | objectType, | ||
object? | existingValue, | ||
JsonSerializer | serializer | ||
) |
Definition at line 55 of file VersionConverter.cs.
References Tgstation.Server.Shared.VersionConverter.CheckSupportsType().
object Tgstation.Server.Shared.VersionConverter.ReadYaml | ( | IParser | parser, |
Type | type, | ||
ObjectDeserializer | rootDeserializer | ||
) |
override void Tgstation.Server.Shared.VersionConverter.WriteJson | ( | JsonWriter? | writer, |
object? | value, | ||
JsonSerializer | serializer | ||
) |
Definition at line 36 of file VersionConverter.cs.
void Tgstation.Server.Shared.VersionConverter.WriteYaml | ( | IEmitter? | emitter, |
object? | value, | ||
Type | type, | ||
ObjectSerializer | serializer | ||
) |
Definition at line 91 of file VersionConverter.cs.
References Tgstation.Server.Shared.VersionConverter.CheckSupportsType().