private static bool IsMscorlibType(this Type type, string @namespace, string name) { // Ignore IsMscorlib for now since type.Assembly returns // System.Runtime.dll for some types in mscorlib.dll. // TODO: Re-enable commented out check. return(type.IsType(@namespace, name) /*&& type.Assembly.IsMscorlib()*/); }
internal static bool IsOrInheritsFrom(this Type type, string @namespace, string name) { do { if (type.IsType(@namespace, name)) { return(true); } type = type.BaseType; }while (type != null); return(false); }
internal static bool IsEmptyResultsViewException(this Type type) { return(type.IsType("System.Linq", "SystemCore_EnumerableDebugViewEmptyException")); }
internal static bool IsDynamicDebugViewEmptyException(this Type type) { return(type.IsType("Microsoft.CSharp.RuntimeBinder", "DynamicDebugViewEmptyException")); }
internal static bool IsDynamicProperty(this Type type) { return(type.IsType("Microsoft.CSharp.RuntimeBinder", "DynamicProperty")); }
internal static bool IsComObject(this Type type) { return(type.IsType("System", "__ComObject")); }
internal static bool IsTypeVariables(this Type type) { return(type.IsType(null, "<>c__TypeVariables")); }