System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.DescribeClrType C# (CSharp) Method

DescribeClrType() static private method

Describe type for exception message.
static private DescribeClrType ( Type clrType ) : string
clrType Type
return string
        internal static string DescribeClrType(Type clrType)
        {
            // Yes, this is a heuristic... just a best effort way of getting
            // a reasonable exception message
            if (IsCSharpGeneratedClass(clrType.Name, "DisplayClass")
                || IsVBGeneratedClass(clrType.Name, "Closure"))
            {
                return Strings.ELinq_ClosureType;
            }
            if (IsCSharpGeneratedClass(clrType.Name, "AnonymousType")
                || IsVBGeneratedClass(clrType.Name, "AnonymousType"))
            {
                return Strings.ELinq_AnonymousType;
            }

            return clrType.FullName;
        }