internal TypeTableScheme(Type type) { TkDebug.AssertArgumentNull(type, "type", null); TableName = type.Name; DisplayNameAttribute dispAttr = Attribute.GetCustomAttribute(type, typeof(DisplayNameAttribute), false) as DisplayNameAttribute; if (dispAttr != null) { TableDesc = dispAttr.DisplayName; } else { TableDesc = TableName; } fList = new RegNameList <PropertyFieldInfo>(); PropertyInfo[] props = type.GetProperties(BIND_ATTRIBUTE); if (props != null) { foreach (var prop in props) { PropertyFieldInfo info = PropertyFieldInfo.Create(prop); if (info != null) { fList.Add(info); } } } NameField = MetaDataUtil.GetNameField(fList); }
public InternalTableSchemeEx(ITableScheme scheme, Func <IFieldInfo, IFieldInfoEx> converter) { fScheme = scheme; fFields = (from field in scheme.Fields select CreateFieldInfoEx(field, converter)).ToArray(); NameField = MetaDataUtil.GetNameField(fFields); }