/// <summary> /// Get a list of properties and fields from a data contract that satisfy the predicate. /// </summary> protected static IEnumerable <IObjectMemberContext> GetDataMemberFields(object dataObject, Predicate <MemberInfo> memberTest) { var walker = new ObjectWalker(memberTest) { IncludeNonPublicFields = true, IncludeNonPublicProperties = true }; return(walker.Walk(dataObject)); }
private IEnumerable <IObjectMemberContext> WalkDataMembers() { ObjectWalker walker = new ObjectWalker( delegate(MemberInfo member) { return(AttributeUtils.HasAttribute <CommandLineParameterAttribute>(member)); }); walker.IncludeNonPublicFields = true; walker.IncludeNonPublicProperties = true; return(walker.Walk(this)); }