Class FirewallPortSpecJsonConverter
- Namespace
- FishMMO.Installer
- Assembly
- FishMMO-Installer.dll
Reads a FirewallPortSpec from a JSON number (single TCP port) or a JSON string (port, range, and optional protocol). Writes the canonical string form.
public sealed class FirewallPortSpecJsonConverter : JsonConverter<FirewallPortSpec>
- Inheritance
-
FirewallPortSpecJsonConverter
- Inherited Members
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type FirewallPortSpec.
public override FirewallPortSpec Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
Returns
- FirewallPortSpec
The converted value.
Write(Utf8JsonWriter, FirewallPortSpec, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, FirewallPortSpec value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWriterThe writer to write to.
valueFirewallPortSpecThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.