C# Класс ConoHaNet.Objects.IPAddressDetailsConverter

This implementation of JsonConverter allows for JSON serialization and deserialization of IPAddress objects in the "address details" format used by operations such as IComputeProvider.ListAddresses and IComputeProvider.ListAddressesByNetwork.
Наследование: Newtonsoft.Json.JsonConverter
Показать файл Открыть проект

Открытые методы

Метод Описание
CanConvert ( Type objectType ) : bool
ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object Deserialization is performed by deserializing the JSON value as an AddressDetails object, following by using IPAddress.Parse to convert the value of AddressDetails.Address to an IPAddress instance.
WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void Serialization is performed by creating an AddressDetails instance equivalent to the given IPAddress instance and serializing that as a JSON object.

Описание методов

CanConvert() публичный Метод

public CanConvert ( Type objectType ) : bool
objectType System.Type
Результат bool

ReadJson() публичный Метод

Deserialization is performed by deserializing the JSON value as an AddressDetails object, following by using IPAddress.Parse to convert the value of AddressDetails.Address to an IPAddress instance.
public ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object
reader Newtonsoft.Json.JsonReader
objectType System.Type
existingValue object
serializer Newtonsoft.Json.JsonSerializer
Результат object

WriteJson() публичный Метод

Serialization is performed by creating an AddressDetails instance equivalent to the given IPAddress instance and serializing that as a JSON object.
public WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void
writer Newtonsoft.Json.JsonWriter
value object
serializer Newtonsoft.Json.JsonSerializer
Результат void