Source/NFX/DataAccess/CRUD/Schema.cs
/// <summary>
/// Gets all property members of TypedRow that are tagged as [Field]
/// </summary>
Gets all property members of TypedRow that are tagged as [Field]
Gets all property members of TypedRow that are tagged as [ Field ]
public static IEnumerable<PropertyInfo> GetFieldMembers(Type type)
            {
                var local = type.GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public)
                                .Where(pi => Attribute.IsDefined(pi, typeof(FieldAttribute)));
                if (type.BaseType==typeof(object)) return local;
                var bt = type.BaseType;
                if (bt != null)
                    return GetFieldMembers(type.BaseType).Concat(local);
                else
                    return local;
            }
public static IEnumerable < PropertyInfo > GetFieldMembers ( Type type ) { var local = type . GetProperties ( BindingFlags . DeclaredOnly | BindingFlags . Instance | BindingFlags . Public ) . Where ( pi => Attribute . IsDefined ( pi , typeof ( FieldAttribute ) ) ) ; if ( type . BaseType == typeof ( object ) ) return local ; var bt = type . BaseType ; if ( bt != null ) return GetFieldMembers ( type . BaseType ) . Concat ( local ) ; else return local ; }
Gets all property members of TypedRow that are tagged as [Field]
Gets all property members of TypedRow that are tagged as [ Field ]
//20140926 DKh +DeclaredOnly //null for Object
type
Type