C# Class LongoMatch.DB.ImageConverter

Converts fields with LongoMatch.Core.Common.Image objects into Attachments, using as field value the name of the attachment prefixed with the attachment:: string. In the desrialization process, it loads LongoMatch.Core.Common.Image from the attachment with the same as the set in the property.
Inheritance: Newtonsoft.Json.JsonConverter
ファイルを表示 Open project: GNOME/longomatch

Public Methods

Method Description
CanConvert ( Type objectType ) : bool
ImageConverter ( Couchbase.Lite.Revision rev ) : System
ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object
WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void

Private Methods

Method Description
GetAttachmentName ( JsonWriter writer ) : string

Method Details

CanConvert() public method

public CanConvert ( Type objectType ) : bool
objectType System.Type
return bool

ImageConverter() public method

public ImageConverter ( Couchbase.Lite.Revision rev ) : System
rev Couchbase.Lite.Revision
return System

ReadJson() public method

public ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object
reader Newtonsoft.Json.JsonReader
objectType System.Type
existingValue object
serializer Newtonsoft.Json.JsonSerializer
return object

WriteJson() public method

public WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void
writer Newtonsoft.Json.JsonWriter
value object
serializer Newtonsoft.Json.JsonSerializer
return void