Пример #1
0
        protected ContentTypeBase(IShortStringHelper shortStringHelper, int parentId)
        {
            _shortStringHelper = shortStringHelper;
            if (parentId == 0)
            {
                throw new ArgumentOutOfRangeException(nameof(parentId));
            }
            ParentId = parentId;

            _allowedContentTypes = new List <ContentTypeSort>();
            _propertyGroups      = new PropertyGroupCollection();

            // actually OK as IsPublishing is constant
            // ReSharper disable once VirtualMemberCallInConstructor
            _noGroupPropertyTypes = new PropertyTypeCollection(SupportsPublishing);
            _noGroupPropertyTypes.CollectionChanged += PropertyTypesChanged;

            _variations = ContentVariation.Nothing;
        }
Пример #2
0
        protected ContentTypeBase(IShortStringHelper shortStringHelper, IContentTypeBase parent, string alias)
        {
            if (parent == null)
            {
                throw new ArgumentNullException(nameof(parent));
            }
            SetParent(parent);

            _shortStringHelper   = shortStringHelper;
            _alias               = alias;
            _allowedContentTypes = new List <ContentTypeSort>();
            _propertyGroups      = new PropertyGroupCollection();

            // actually OK as IsPublishing is constant
            // ReSharper disable once VirtualMemberCallInConstructor
            _noGroupPropertyTypes = new PropertyTypeCollection(SupportsPublishing);
            _noGroupPropertyTypes.CollectionChanged += PropertyTypesChanged;

            _variations = ContentVariation.Nothing;
        }
Пример #3
0
 public PropertyGroup(PropertyTypeCollection propertyTypeCollection)
 {
     PropertyTypes = propertyTypeCollection;
     _alias        = string.Empty;
 }
Пример #4
0
 public PropertyGroup(PropertyTypeCollection propertyTypeCollection)
 {
     PropertyTypes = propertyTypeCollection;
 }