Exemplo n.º 1
0
        public DbTemplate(string name, ID id)
            : base(name, ID.IsNullOrEmpty(id) ? ID.NewID : id, TemplateIDs.Template)
        {
            this.StandardValues = new DbFieldCollection();

            this.Add(new DbField(FieldIDs.BaseTemplate)
            {
                Shared = true
            });

            // TODO:[High] Move these out into the standard template. we have tempalte inheritance now
            this.Add(new DbField(FieldIDs.Lock)
            {
                Shared = true
            });
            this.Add(new DbField(FieldIDs.Security)
            {
                Shared = true
            });
            this.Add(new DbField(FieldIDs.Created));
            this.Add(new DbField(FieldIDs.CreatedBy));
            this.Add(new DbField(FieldIDs.Updated));
            this.Add(new DbField(FieldIDs.UpdatedBy));
            this.Add(new DbField(FieldIDs.Revision));

            this.Add(new DbField(FieldIDs.DisplayName));
            this.Add(new DbField(FieldIDs.Hidden));
            this.Add(new DbField(FieldIDs.ReadOnly));
        }
Exemplo n.º 2
0
 internal DbTemplate(string name, ID id, ID templateId)
     : base(name, ID.IsNullOrEmpty(id) ? ID.NewID : id, templateId)
 {
     this.StandardValues = new DbFieldCollection();
     this.ParentID       = ItemIDs.TemplateRoot;
 }
Exemplo n.º 3
0
 public DbTemplate(string name, ID id)
     : base(name, ID.IsNullOrEmpty(id) ? ID.NewID : id, TemplateIDs.Template)
 {
     this.StandardValues = new DbFieldCollection();
     this.BaseIDs        = Enumerable.Empty <ID>() as ID[];
 }