public static PropertyInfo[] GetSimpleProperties(this IDotnetExpander expander, string assemblyName, string typeName) { return(Ex.Cache.Read("simpleproperties", assemblyName ?? "", typeName ?? "", "properties", () => { return expander.GetProperties(assemblyName, typeName).Where(p => ValueExtensions.IsPrimitive(p.PropertyType)).ToArray(); })); }
public static PropertyInfo[] GetProperties(this IDotnetExpander expander, string name) { string assemblyName, typeName, value; expander.ParseName(name, out assemblyName, out typeName, out value); return(expander.GetProperties(assemblyName, typeName)); }
public static PropertyInfo GetProperty(this IDotnetExpander expander, string assemblyName, string typeName, string propertyName) { return(Ex.Cache.Read("property", assemblyName ?? "", typeName ?? "", propertyName ?? "", () => { foreach (PropertyInfo propertyInfo in expander.GetProperties(assemblyName, typeName)) { if (propertyInfo.Name == propertyName) { return propertyInfo; } } return null; })); }
public static PropertyInfo[] GetProperties <T>(this IDotnetExpander expander) { return(expander.GetProperties(typeof(T))); }