Skip to main content

Class ProductJsonConverter

Namespace: Aurigma.DesignAtoms.Serialization
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class ProductJsonConverter : JsonConverter

Inheritance: System.Object -> ProductJsonConverter

Constructors

ProductJsonConverter

public ProductJsonConverter(IConfiguration configuration, IFontService fontService, IStateResourcesRepository stateResourcesRepository, IRepositoryFileProtectorFactory repositoryFileProtectorFactory, IImageLoader imageLoader, IColorManagement colorManagement, ILifetimeScope scope, ISvgReaderFactory svgReaderFactory, ISerializableStorage serializationStorage = null, IStateResourcesRepository runTimeStorage = null, bool convertUrlSourcesToStorage = false, JsonSerializerSettings jsonSerializerSettings = null)

Properties

ColorConverter

protected virtual JsonConverter ColorConverter { get; }

Methods

GetConverters

protected virtual IEnumerable<JsonConverter> GetConverters(IConfiguration configuration, IStateResourcesRepository stateResourcesRepository, ISerializableStorage serializationStorage, IStateResourcesRepository runTimeStorage, IImageLoader imageLoader, IColorManagement colorManagement, IFontService fontService, ILifetimeScope scope, IRepositoryFileProtector repositoryFileProtector, ISvgReaderFactory svgReaderFactory, bool convertUrlSourcesToStorage)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Configuration.IConfigurationconfiguration
Aurigma.DesignAtoms.Storage.Repositories.Interfaces.IStateResourcesRepositorystateResourcesRepository
Aurigma.DesignAtoms.Cache.Abstractions.Interfaces.ISerializableStorageserializationStorage
Aurigma.DesignAtoms.Storage.Repositories.Interfaces.IStateResourcesRepositoryrunTimeStorage
Aurigma.DesignAtoms.Canvas.IImageLoaderimageLoader
Aurigma.DesignAtoms.ColorManagement.IColorManagementcolorManagement
Aurigma.DesignAtoms.Services.IFontServicefontService
Autofac.ILifetimeScopescope
Aurigma.DesignAtoms.Storage.Repositories.Interfaces.Protectors.IRepositoryFileProtectorrepositoryFileProtector
Aurigma.DesignAtoms.Common.Interfaces.ISvgReaderFactorysvgReaderFactory
System.BooleanconvertUrlSourcesToStorage
Returns

System.Collections.Generic.IEnumerable<Newtonsoft.Json.JsonConverter>

GetInternalConverters

public IEnumerable<JsonConverter> GetInternalConverters()
Returns

System.Collections.Generic.IEnumerable<Newtonsoft.Json.JsonConverter>

WriteJson

public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
TypeNameDescription
Newtonsoft.Json.JsonWriterwriter
System.Objectvalue
Newtonsoft.Json.JsonSerializerserializer

ReadJson

public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer topSerializer)
Parameters
TypeNameDescription
Newtonsoft.Json.JsonReaderreader
System.TypeobjectType
System.ObjectexistingValue
Newtonsoft.Json.JsonSerializertopSerializer
Returns

System.Object

CanConvert

public override bool CanConvert(Type objectType)
Parameters
TypeNameDescription
System.TypeobjectType
Returns

System.Boolean

Fields

_serializationStorage

protected readonly ISerializableStorage _serializationStorage

_runTimeStorage

protected readonly IStateResourcesRepository _runTimeStorage

_stateResourcesRepository

protected readonly IStateResourcesRepository _stateResourcesRepository

_configuration

protected readonly IConfiguration _configuration

_jsonSerializerSettings

protected readonly JsonSerializerSettings _jsonSerializerSettings

_fontService

protected readonly IFontService _fontService

_imageLoader

protected readonly IImageLoader _imageLoader

_colorManagement

protected readonly IColorManagement _colorManagement

_scope

protected readonly ILifetimeScope _scope

_svgReaderFactory

protected readonly ISvgReaderFactory _svgReaderFactory

_repositoryFileProtectorFactory

protected readonly IRepositoryFileProtectorFactory _repositoryFileProtectorFactory
Was this page helpful?