public PropertyTypeBuilder <ContentTypeBuilder> AddPropertyType()
        {
            var builder = new PropertyTypeBuilder <ContentTypeBuilder>(this);

            _noGroupPropertyTypeBuilders.Add(builder);
            return(builder);
        }
Esempio n. 2
0
        public PropertyTypeBuilder <PropertyBuilder> AddPropertyType()
        {
            _propertyType = null;
            var builder = new PropertyTypeBuilder <PropertyBuilder>(this);

            _propertyTypeBuilder = builder;
            return(builder);
        }
        public static ContentType CreateSimpleTagsContentType(string alias, string name, IContentType parent = null, bool randomizeAliases = false, string propertyGroupName = "Content", int defaultTemplateId = 1)
        {
            ContentType contentType = CreateSimpleContentType(alias, name, parent, randomizeAliases: randomizeAliases, propertyGroupName: propertyGroupName, defaultTemplateId: defaultTemplateId);

            PropertyType propertyType = new PropertyTypeBuilder()
                                        .WithPropertyEditorAlias(Constants.PropertyEditors.Aliases.Tags)
                                        .WithValueStorageType(ValueStorageType.Nvarchar)
                                        .WithAlias(RandomAlias("tags", randomizeAliases))
                                        .WithName("Tags")
                                        .WithDataTypeId(Constants.DataTypes.Tags)
                                        .WithSortOrder(99)
                                        .Build();

            contentType.AddPropertyType(propertyType);

            return(contentType);
        }
Esempio n. 4
0
 public PropertyBuilder WithPropertyType(IPropertyType propertyType)
 {
     _propertyTypeBuilder = null;
     _propertyType        = propertyType;
     return(this);
 }