Duality.Log.MemberInfo C# (CSharp) Method

MemberInfo() public static method

Returns a string that can be used for representing a(ny) member in log entries.
public static MemberInfo ( MemberInfo info, bool includeDeclaringType = true ) : string
info System.Reflection.MemberInfo
includeDeclaringType bool If true, the members declaring type is included in the returned name.
return string
        public static string MemberInfo(MemberInfo info, bool includeDeclaringType = true)
        {
            if (info is MethodInfo)
                return MethodInfo(info as MethodInfo, includeDeclaringType);
            else if (info is ConstructorInfo)
                return ConstructorInfo(info as ConstructorInfo, includeDeclaringType);
            else if (info is PropertyInfo)
                return PropertyInfo(info as PropertyInfo, includeDeclaringType);
            else if (info is FieldInfo)
                return FieldInfo(info as FieldInfo, includeDeclaringType);
            else if (info is EventInfo)
                return EventInfo(info as EventInfo, includeDeclaringType);
            else if (info is Type)
                return Type(info as Type);
            else if (info != null)
                return info.ToString();
            else
                return "null";
        }