C# 클래스 ConoHaNet.Services.Compute.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
파일 보기 프로젝트 열기: crowdy/OpenStack-ConoHa

공개 메소드들

메소드 설명
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