Ejemplo n.º 1
0
        private CremaDataType(TypeInfo typeInfo)
        {
            this.builder        = new CremaDataTypeMemberBuilder(this);
            this.InternalObject = new InternalDataType(this, typeInfo.Name, typeInfo.CategoryPath)
            {
                IsFlag  = typeInfo.IsFlag,
                Comment = typeInfo.Comment,
                Tags    = typeInfo.Tags,
            };
            this.Attributes = new CremaAttributeCollection(this.InternalObject);
            this.Members    = new CremaDataTypeMemberCollection(this.InternalObject);
            this.InternalObject.CreationInfo     = typeInfo.CreationInfo;
            this.InternalObject.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.InternalObject.AcceptChanges();
            this.AttachEventHandlers();
        }
Ejemplo n.º 2
0
        internal CremaDataType(InternalDataType type)
        {
            this.InternalObject = type;
            this.builder        = new CremaDataTypeMemberBuilder(this);
            this.Attributes     = new CremaAttributeCollection(this.InternalObject);
            this.Members        = new CremaDataTypeMemberCollection(this.InternalObject);

            this.AttachEventHandlers();
        }
Ejemplo n.º 3
0
        public CremaDataType(string name, string categoryPath)
        {
            this.builder        = new CremaDataTypeMemberBuilder(this);
            this.InternalObject = new InternalDataType(this, name, categoryPath);
            this.Attributes     = new CremaAttributeCollection(this.InternalObject);
            this.Members        = new CremaDataTypeMemberCollection(this.InternalObject);

            this.AttachEventHandlers();
        }
Ejemplo n.º 4
0
 public CremaDataTypeMember(CremaDataTypeMemberBuilder builder)
 {
     if (builder == null)
     {
         throw new ArgumentNullException();
     }
     this.Type           = builder.Type;
     this.InternalObject = builder.DataRow;
 }
Ejemplo n.º 5
0
 public InternalDataTypeMember(CremaDataTypeMemberBuilder builder, InternalDataType table)
     : base(table, builder.InternalBuilder)
 {
     this.Table  = table;
     base.Target = builder.NewMember(this);
 }