IXamlIlMember ResolveMember(IXamlIlType type) { var rv = type.Fields.FirstOrDefault(f => f.IsPublic && f.IsStatic && f.Name == Member) ?? (IXamlIlMember)type.GetAllProperties().FirstOrDefault(p => p.Name == Member && p.Getter != null && p.Getter.IsPublic && p.Getter.IsStatic); if (rv == null) { throw new XamlIlParseException( $"Unable to resolve {Member} as static field, property, constant or enum value", this); } return(rv); }
IXamlIlMember ResolveMember(IXamlIlType type) { return(type.Fields.FirstOrDefault(f => f.IsPublic && f.IsStatic && f.Name == Member) ?? (IXamlIlMember)type.GetAllProperties().FirstOrDefault(p => p.Name == Member && p.Getter != null && p.Getter.IsPublic && p.Getter.IsStatic)); }