public PropertyCacheEntry(object ins, PropertyInfo p) : base(FieldCacheEntry.GetMemberName(ins, p)) { if (p == null) { throw new ArgumentNullException(nameof(p)); } _instance = ins; _prop = p; }
private static string GetMethodName(object ins, MethodBase methodInfo) { if (methodInfo != null) { var name = FieldCacheEntry.GetMemberName(ins, methodInfo); var genericArguments = methodInfo.GetGenericArguments(); if (genericArguments.Any()) { name += "<" + string.Join(", ", genericArguments.Select(x => x.Name).ToArray()) + ">"; } return(name); } return("INVALID"); }