コード例 #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;
        }