private IEnumerable<KeyValuePair<string, KRSInputAttribute>> GetInputFieldsAttributes(KRSHinge c) { foreach (var a in c.GetType().GetFields()) { foreach (var b in (KRSInputAttribute[])a.GetCustomAttributes(typeof(KRSInputAttribute), true)) { yield return new KeyValuePair<string, KRSInputAttribute>(a.Name, b); } } }
private void SetInputFieldValue(KRSHinge c, string fieldname, string value) { c.GetType().GetField(fieldname).SetValue(c, value); }
private string GetInputFieldValue(KRSHinge c, string fieldname) { return (string)c.GetType().GetField(fieldname).GetValue(c); }
private string GetInputFieldValue(KRSHinge c, string fieldname) { return((string)c.GetType().GetField(fieldname).GetValue(c)); }
private IEnumerable <KeyValuePair <string, KRSInputAttribute> > GetInputFieldsAttributes(KRSHinge c) { foreach (var a in c.GetType().GetFields()) { foreach (var b in (KRSInputAttribute[])a.GetCustomAttributes(typeof(KRSInputAttribute), true)) { yield return(new KeyValuePair <string, KRSInputAttribute>(a.Name, b)); } } }