Пример #1
0
        //public ContentTranslationVersionProperty(ContentType.ContentTypeProperty contentTypeProperty, object value)
        //{
        //    ContentTypeProperty = contentTypeProperty;
        //    SerializedValue = value;
        //}

        public ContentTranslationVersionProperty(object value, DenormalizedContentTypePropertyReference contentTypeProperty)
        {
            if (value == null)
            {
                _serializedValue = null;
            }
            else
            {
                _serializedValue = JsonConvert.SerializeObject(value, new JsonSerializerSettings {
                    DateTimeZoneHandling = DateTimeZoneHandling.Utc
                });
            }

            ContentTypeProperty = contentTypeProperty;
        }
Пример #2
0
 public ContentTranslationVersionProperty(DenormalizedContentTypePropertyReference contentTypeProperty, string serializedValue)
 {
     _serializedValue    = serializedValue;
     ContentTypeProperty = contentTypeProperty;
 }