Exemple #1
0
        private CremaDataType(TypeInfo typeInfo)
        {
            this.builder = new CremaDataTypeMemberBuilder(this);
            this.type    = new InternalDataType(this, typeInfo.Name, typeInfo.CategoryPath)
            {
                IsFlag  = typeInfo.IsFlag,
                Comment = typeInfo.Comment,
                Tags    = typeInfo.Tags,
            };
            this.attributes            = new CremaAttributeCollection(this.type);
            this.members               = new CremaDataTypeMemberCollection(this.type);
            this.type.CreationInfo     = typeInfo.CreationInfo;
            this.type.ModificationInfo = typeInfo.ModificationInfo;

            foreach (var item in typeInfo.Members)
            {
                var member = this.NewMember();
                member.Name      = item.Name;
                member.Value     = item.Value;
                member.Comment   = item.Comment;
                member.IsEnabled = item.IsEnabled;
                member.Tags      = item.Tags;
                this.Members.Add(member);
            }
            this.type.AcceptChanges();
            this.AttachEventHandlers();
        }
Exemple #2
0
        internal CremaDataType(InternalDataType type)
        {
            this.type       = type;
            this.builder    = new CremaDataTypeMemberBuilder(this);
            this.attributes = new CremaAttributeCollection(this.type);
            this.members    = new CremaDataTypeMemberCollection(this.type);

            this.AttachEventHandlers();
        }
Exemple #3
0
        public CremaDataType(string name, string categoryPath)
        {
            this.builder    = new CremaDataTypeMemberBuilder(this);
            this.type       = new InternalDataType(this, name, categoryPath);
            this.attributes = new CremaAttributeCollection(this.type);
            this.members    = new CremaDataTypeMemberCollection(this.type);

            this.AttachEventHandlers();
        }
 public CremaDataTypeMember(CremaDataTypeMemberBuilder builder)
 {
     if (builder == null)
     {
         throw new ArgumentNullException();
     }
     this.type   = builder.Type;
     this.member = builder.DataRow;
 }
 public InternalDataTypeMember(CremaDataTypeMemberBuilder builder, InternalDataType table)
     : base(table, builder.InternalBuilder)
 {
     this.table  = table;
     base.Target = builder.NewMember(this);
 }
Exemple #6
0
 internal CremaDataTypeMember InvokeNewTypeMemberFromBuilder(CremaDataTypeMemberBuilder builder)
 {
     return(this.NewTypeMemberFromBuilder(builder));
 }
Exemple #7
0
 protected virtual CremaDataTypeMember NewTypeMemberFromBuilder(CremaDataTypeMemberBuilder builder)
 {
     return(new CremaDataTypeMember(builder));
 }