private object ConvertFromEditValue(EditFieldTypeConverterArgs args, JToken item) { var fieldTypeMetadata = _fieldTypeMetadataService.Get(args.FieldDefinition.FieldType); var fieldTypeInstance = fieldTypeMetadata.CreateInstance(args.FieldDefinition); return(args.FieldDefinition.Id.Equals(SystemFieldDefinitionConstants.ThumbnailsMetadata, StringComparison.OrdinalIgnoreCase) ? item.ToObject(Type.GetType("System.Collections.Generic.List`1[[Litium.Application.Common.ThumbnailMetadata, Litium.Application]], mscorlib"), _jsonSerializer) : fieldTypeInstance.ConvertFromJsonValue(item.ToObject(fieldTypeMetadata.JsonType, _jsonSerializer))); }
public GoogleMapEditFieldTypeConverter(FieldTypeMetadataService fieldTypeMetadataService) { _fieldTypeMetadata = fieldTypeMetadataService.Get(FieldTypeConstants.GoogleMap); }
public FieldTypeConverterBase(FieldTypeMetadataService fieldTypeMetadataService, string fieldTypeMetadataServiceName) { _fieldTypeMetadata = fieldTypeMetadataService.Get(fieldTypeMetadataServiceName); }