public static bool isMessageBoxClass(this ITypeReference typeRef, IMetadataHost host) { Microsoft.Cci.Immutable.PlatformType platform = host.PlatformType as Microsoft.Cci.Immutable.PlatformType;; IAssemblyReference systemAssembly = getSystemWindowsAssemblyReference(host); ITypeReference mbType = platform.CreateReference(systemAssembly, "System", "Windows", "MessageBox"); return(typeRef.isClass(mbType)); }
public static bool isNavigationServiceClass(this ITypeReference typeRef, IMetadataHost host) { Microsoft.Cci.Immutable.PlatformType platform = host.PlatformType as Microsoft.Cci.Immutable.PlatformType; IAssemblyReference phoneAssembly = getPhoneAssemblyReference(host); ITypeReference phoneApplicationPageTypeRef = platform.CreateReference(phoneAssembly, "System", "Windows", "Navigation", "NavigationService"); return(typeRef.isClass(phoneApplicationPageTypeRef)); }
public static bool isRoutedEventHandlerClass(this ITypeReference typeRef, IMetadataHost host) { Microsoft.Cci.Immutable.PlatformType platform = host.PlatformType as Microsoft.Cci.Immutable.PlatformType;; IAssemblyReference systemAssembly = getSystemWindowsAssemblyReference(host); ITypeReference routedEvHandlerType = platform.CreateReference(systemAssembly, "System", "Windows", "RoutedEventHandler"); return(typeRef.isClass(routedEvHandlerType)); }
public static bool isPhoneApplicationPageClass(this ITypeReference typeRef, IMetadataHost host) { Microsoft.Cci.Immutable.PlatformType platform = host.PlatformType as Microsoft.Cci.Immutable.PlatformType; IAssemblyReference phoneAssembly = PhoneTypeHelper.getPhoneAssemblyReference(host); ITypeReference phoneApplicationPageTypeRef = platform.CreateReference(phoneAssembly, "Microsoft", "Phone", "Controls", "PhoneApplicationPage"); return(typeRef.isClass(phoneApplicationPageTypeRef)); }
public static bool isPhoneApplicationClass(this ITypeReference typeRef, IMetadataHost host) { Microsoft.Cci.Immutable.PlatformType platform = host.PlatformType as Microsoft.Cci.Immutable.PlatformType; IAssemblyReference systemAssembly = PhoneTypeHelper.getSystemWindowsAssemblyReference(host); ITypeReference applicationClass = platform.CreateReference(systemAssembly, "System", "Windows", "Application"); return(typeRef.isClass(applicationClass)); }
public static bool isCancelEventArgsClass(this ITypeReference typeRef, IMetadataHost host) { Microsoft.Cci.Immutable.PlatformType platform = host.PlatformType as Microsoft.Cci.Immutable.PlatformType; IAssemblyReference systemAssembly = getSystemAssemblyReference(host); ITypeReference cancelEventArgsClass = platform.CreateReference(systemAssembly, "System", "ComponentModel", "CancelEventArgs"); return(typeRef.isClass(cancelEventArgsClass)); }
public static bool isURIClass(this ITypeReference typeRef, IMetadataHost host) { Microsoft.Cci.Immutable.PlatformType platformType = host.PlatformType as Microsoft.Cci.Immutable.PlatformType; if (platformType == null) { return(false); } IAssemblyReference coreRef = platformType.CoreAssemblyRef; AssemblyIdentity systemAssemblyId = new AssemblyIdentity(host.NameTable.GetNameFor("System"), "", coreRef.Version, coreRef.PublicKeyToken, ""); IAssemblyReference systemAssembly = host.FindAssembly(systemAssemblyId); ITypeReference uriTypeRef = platformType.CreateReference(systemAssembly, "System", "Uri"); return(typeRef.isClass(uriTypeRef)); }
public static bool isStringClass(this ITypeReference typeRef, IMetadataHost host) { ITypeReference targetType = host.PlatformType.SystemString; return(typeRef.isClass(targetType)); }