Ejemplo n.º 1
0
        public MemberBuilder WithMemberType(IMemberType memberType)
        {
            _memberTypeBuilder = null;
            _memberType        = memberType;

            return(this);
        }
Ejemplo n.º 2
0
        public static MemberType CreateSimpleMemberType(string alias = null, string name = null)
        {
            var         builder    = new MemberTypeBuilder();
            IMemberType memberType = builder
                                     .WithAlias(alias)
                                     .WithName(name)
                                     .AddPropertyGroup()
                                     .WithName("Content")
                                     .WithSortOrder(1)
                                     .AddPropertyType()
                                     .WithAlias("title")
                                     .WithName("Title")
                                     .WithSortOrder(1)
                                     .Done()
                                     .AddPropertyType()
                                     .WithAlias("bodyText")
                                     .WithName("Body text")
                                     .WithSortOrder(2)
                                     .WithDataTypeId(-87)
                                     .Done()
                                     .AddPropertyType()
                                     .WithAlias("author")
                                     .WithName("Author")
                                     .WithSortOrder(3)
                                     .Done()
                                     .Done()
                                     .Build();

            // Ensure that nothing is marked as dirty.
            memberType.ResetDirtyProperties(false);

            return((MemberType)memberType);
        }
Ejemplo n.º 3
0
        public MemberTypeBuilder AddMemberType()
        {
            _memberType = null;
            var builder = new MemberTypeBuilder(this);

            _memberTypeBuilder = builder;
            return(builder);
        }