示例#1
0
 private ClassSchema(Type dataType)
 {
     this._DataType = dataType;
     FieldInfo[] fields = dataType.GetFields();
     PropertyInfo[] properties = dataType.GetProperties();
     this._Acessors = new ClassAcessor[fields.Length + properties.Length];
     for (int i = 0; i < fields.Length; i++)
         _Acessors[i] = new ClassField(fields[i]);
     for (int i = 0; i < properties.Length; i++)
         _Acessors[fields.Length + i] = new ClassProperty(properties[i]);
 }
示例#2
0
 private ClassSchema(Type dataType)
 {
     this._DataType = dataType;
     FieldInfo[]    fields     = dataType.GetFields();
     PropertyInfo[] properties = dataType.GetProperties();
     this._Acessors = new ClassAcessor[fields.Length + properties.Length];
     for (int i = 0; i < fields.Length; i++)
     {
         _Acessors[i] = new ClassField(fields[i]);
     }
     for (int i = 0; i < properties.Length; i++)
     {
         _Acessors[fields.Length + i] = new ClassProperty(properties[i]);
     }
 }