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
Afficher le fichier Open project: GNOME/longomatch

Méthodes publiques

Méthode 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

Méthode Description
GetAttachmentName ( JsonWriter writer ) : string

Method Details

CanConvert() public méthode

public CanConvert ( Type objectType ) : bool
objectType System.Type
Résultat bool

ImageConverter() public méthode

public ImageConverter ( Couchbase.Lite.Revision rev ) : System
rev Couchbase.Lite.Revision
Résultat System

ReadJson() public méthode

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

WriteJson() public méthode

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