Ejemplo n.º 1
0
        /// <summary>
        /// Creates the property model.
        /// </summary>
        /// <param name="priority">The priority.</param>
        /// <param name="property">The property.</param>
        /// <param name="value">The value.</param>
        /// <param name="item">The item.</param>
        /// <returns>PropertyModel.</returns>
        /// <exception cref="System.ArgumentNullException">property</exception>
        public static PropertyModel CreatePropertyModel(int priority, Property property, PropertyValueBase value, StorageEntity item)
        {
            if (property == null)
            {
                throw new ArgumentNullException("property");
            }

            var model = new PropertyModel { Priority = priority };
            model.InjectFrom<CloneInjection>(property);
            model.Values = new[] { CreatePropertyValueModel(value, property) };
            model.CatalogItem = item;
            return model;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates the property model.
        /// </summary>
        /// <param name="priority">The priority.</param>
        /// <param name="property">The property.</param>
        /// <param name="value">The value.</param>
        /// <param name="item">The item.</param>
        /// <returns>PropertyModel.</returns>
        /// <exception cref="System.ArgumentNullException">property</exception>
        public static PropertyModel CreatePropertyModel(int priority, Property property, PropertyValueBase value, StorageEntity item)
        {
            if (property == null)
            {
                throw new ArgumentNullException("property");
            }

            var model = new PropertyModel { Priority = priority };
            model.InjectFrom<CloneInjection>(property);
            model.Values = new[] { CreatePropertyValueModel(value, property) };
            model.CatalogItem = item;
            return model;
        }