Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 1.79 KB

File metadata and controls

79 lines (59 loc) · 1.79 KB

bUtility

####Extensions: Clear

string Clear(this string value)

In

bool In<T>(this T value, params T[] list)

Concatenate

string Concatenate(this IEnumerable<string> list, Func<string, string, string> pattern)

//example: 
//stringList.Concatenate( (c,n) => $"{c}, {n}");

HasAny

bool HasAny<T>(this IEnumerable<T> collection)

####Reflection Extensions: GetInstance

object GetInstance(this Type type, params object[] parameters)

GetValue

object GetValue(this object obj, string propertyName)
T GetValue<T>(this object obj, string propertyName, T defaultValue) where T : class

SetValue

void SetValue(this object obj, string propertyName, object value)

Invoke

void Invoke(this object obj, string methodName, params object[] parameters)

GetMembers

IEnumerable<T> GetMembers<T>(this Type type, Func<T, Boolean> filter = null) where T :MemberInfo

GetMemberNames

IEnumerable<string> GetMemberNames<T>(this Type type, Func<T, Boolean> filter = null) where T :MemberInfo
IEnumerable<string> GetMemberNames<T>(this object obj, Func<T, Boolean> filter = null) where T :MemberInfo

GetMemberInfo

T GetMemberInfo<T>(this Type type, string memberName) where T : MemberInfo
T GetMemberInfo<T>(this object obj, string memberName) where T : MemberInfo

GetCustomAttribute

T GetCustomAttribute<T>(this MemberInfo memberInfo) where T : System.Attribute