public static FieldInfo[] GetFields(this IDotnetExpander expander, string name) { string assemblyName, typeName, value; expander.ParseName(name, out assemblyName, out typeName, out value); return(expander.GetFields(assemblyName, typeName)); }
public static FieldInfo GetField(this IDotnetExpander expander, string assemblyName, string typeName, string fieldName) { return(Ex.Cache.Read("field", assemblyName ?? "", typeName ?? "", fieldName ?? "", () => { foreach (FieldInfo fieldInfo in expander.GetFields(assemblyName, typeName)) { if (fieldInfo.Name == fieldName) { return fieldInfo; } } return null; })); }
public static FieldInfo[] GetFields <T>(this IDotnetExpander expander) { return(expander.GetFields(typeof(T))); }