public SkybrudPublishedProperty(IPublishedElement owner, IPublishedPropertyType propertyType, string alias, object value)
 {
     PropertyType = propertyType;
     Alias        = alias;
     DataValue    = value;
     _sourceValue = new Lazy <object>(() => PropertyType.ConvertSourceToInter(owner, DataValue, false));
     _objectValue = new Lazy <object>(() => PropertyType.ConvertInterToObject(owner, PropertyCacheLevel.None, _sourceValue.Value, false));
     _xpathValue  = new Lazy <object>(() => PropertyType.ConvertInterToXPath(owner, PropertyCacheLevel.None, _sourceValue.Value, false));
 }
예제 #2
0
        public DetachedPublishedProperty(IPublishedPropertyType propertyType, IPublishedElement owner, object value, bool preview)
        {
            PropertyType = propertyType;

            _sourceValue = value;

            _interValue  = new Lazy <object>(() => propertyType.ConvertSourceToInter(owner, _sourceValue, preview));
            _objectValue = new Lazy <object>(() => propertyType.ConvertInterToObject(owner, PropertyCacheLevel.Unknown, _interValue.Value, preview));
            _xpathValue  = new Lazy <object>(() => propertyType.ConvertInterToXPath(owner, PropertyCacheLevel.Unknown, _interValue.Value, preview));
        }
예제 #3
0
        public DetachedPublishedProperty(IPublishedPropertyType propertyType, object value, bool isPreview)
        {
            _propertyType = propertyType;
            _isPreview    = isPreview;

            _rawValue = value;

            _sourceValue = new Lazy <object>(() => _propertyType.ConvertSourceToInter(null, _rawValue, _isPreview));
            _objectValue = new Lazy <object>(() => _propertyType.ConvertInterToObject(null, PropertyEditors.PropertyCacheLevel.None, _sourceValue.Value, _isPreview));
            _xpathValue  = new Lazy <object>(() => _propertyType.ConvertInterToXPath(null, PropertyEditors.PropertyCacheLevel.None, _sourceValue.Value, _isPreview));
        }