using System; using System.Collections; using System.Collections.Generic; using System.Configuration.Assemblies; using System.Globalization; using System.IO; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Contexts; using System.Runtime.Remoting.Messaging; using System.Security; using System.Security.Permissions; using System.Security.Policy; using System.Security.Principal; using System.Threading; using Mono.Security; namespace System { /// Represents an application domain, which is an isolated environment where applications execute. This class cannot be inherited. /// 1 // Token: 0x02000630 RID: 1584 [ClassInterface(ClassInterfaceType.None)] [ComVisible(true)] public sealed class AppDomain : MarshalByRefObject { // Token: 0x06003A37 RID: 14903 RVA: 0x000C7AD0 File Offset: 0x000C5CD0 private AppDomain() { } /// Occurs when an assembly is loaded. /// 2 // Token: 0x14000008 RID: 8 // (add) Token: 0x06003A38 RID: 14904 RVA: 0x000C7AD8 File Offset: 0x000C5CD8 // (remove) Token: 0x06003A39 RID: 14905 RVA: 0x000C7AF4 File Offset: 0x000C5CF4 public event AssemblyLoadEventHandler AssemblyLoad; /// Occurs when the resolution of an assembly fails. /// 2 // Token: 0x14000009 RID: 9 // (add) Token: 0x06003A3A RID: 14906 RVA: 0x000C7B10 File Offset: 0x000C5D10 // (remove) Token: 0x06003A3B RID: 14907 RVA: 0x000C7B2C File Offset: 0x000C5D2C public event ResolveEventHandler AssemblyResolve; /// Occurs when an is about to be unloaded. /// 2 // Token: 0x1400000A RID: 10 // (add) Token: 0x06003A3C RID: 14908 RVA: 0x000C7B48 File Offset: 0x000C5D48 // (remove) Token: 0x06003A3D RID: 14909 RVA: 0x000C7B64 File Offset: 0x000C5D64 public event EventHandler DomainUnload; /// Occurs when the default application domain's parent process exits. /// 2 // Token: 0x1400000B RID: 11 // (add) Token: 0x06003A3E RID: 14910 RVA: 0x000C7B80 File Offset: 0x000C5D80 // (remove) Token: 0x06003A3F RID: 14911 RVA: 0x000C7B9C File Offset: 0x000C5D9C public event EventHandler ProcessExit; /// Occurs when the resolution of a resource fails because the resource is not a valid linked or embedded resource in the assembly. /// 2 // Token: 0x1400000C RID: 12 // (add) Token: 0x06003A40 RID: 14912 RVA: 0x000C7BB8 File Offset: 0x000C5DB8 // (remove) Token: 0x06003A41 RID: 14913 RVA: 0x000C7BD4 File Offset: 0x000C5DD4 public event ResolveEventHandler ResourceResolve; /// Occurs when the resolution of a type fails. /// 2 // Token: 0x1400000D RID: 13 // (add) Token: 0x06003A42 RID: 14914 RVA: 0x000C7BF0 File Offset: 0x000C5DF0 // (remove) Token: 0x06003A43 RID: 14915 RVA: 0x000C7C0C File Offset: 0x000C5E0C public event ResolveEventHandler TypeResolve; /// Occurs when an exception is not caught. /// 2 // Token: 0x1400000E RID: 14 // (add) Token: 0x06003A44 RID: 14916 RVA: 0x000C7C28 File Offset: 0x000C5E28 // (remove) Token: 0x06003A45 RID: 14917 RVA: 0x000C7C44 File Offset: 0x000C5E44 public event UnhandledExceptionEventHandler UnhandledException; /// Occurs when the resolution of an assembly fails in the reflection-only context. // Token: 0x1400000F RID: 15 // (add) Token: 0x06003A46 RID: 14918 RVA: 0x000C7C60 File Offset: 0x000C5E60 // (remove) Token: 0x06003A47 RID: 14919 RVA: 0x000C7C7C File Offset: 0x000C5E7C public event ResolveEventHandler ReflectionOnlyAssemblyResolve; // Token: 0x06003A48 RID: 14920 [MethodImpl(MethodImplOptions.InternalCall)] private extern AppDomainSetup getSetup(); // Token: 0x17000B21 RID: 2849 // (get) Token: 0x06003A49 RID: 14921 RVA: 0x000C7C98 File Offset: 0x000C5E98 internal AppDomainSetup SetupInformationNoCopy { get { return this.getSetup(); } } /// Gets the application domain configuration information for this instance. /// The application domain initialization information. /// The operation is attempted on an unloaded application domain. /// 2 // Token: 0x17000B22 RID: 2850 // (get) Token: 0x06003A4A RID: 14922 RVA: 0x000C7CA0 File Offset: 0x000C5EA0 public AppDomainSetup SetupInformation { get { AppDomainSetup setup = this.getSetup(); return new AppDomainSetup(setup); } } /// Gets the base directory that the assembly resolver uses to probe for assemblies. /// The base directory that the assembly resolver uses to probe for assemblies. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x17000B23 RID: 2851 // (get) Token: 0x06003A4B RID: 14923 RVA: 0x000C7CBC File Offset: 0x000C5EBC public string BaseDirectory { get { string applicationBase = this.SetupInformationNoCopy.ApplicationBase; if (SecurityManager.SecurityEnabled && applicationBase != null && applicationBase.Length > 0) { new FileIOPermission(FileIOPermissionAccess.PathDiscovery, applicationBase).Demand(); } return applicationBase; } } /// Gets the path under the base directory where the assembly resolver should probe for private assemblies. /// The path under the base directory where the assembly resolver should probe for private assemblies. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x17000B24 RID: 2852 // (get) Token: 0x06003A4C RID: 14924 RVA: 0x000C7D00 File Offset: 0x000C5F00 public string RelativeSearchPath { get { string privateBinPath = this.SetupInformationNoCopy.PrivateBinPath; if (SecurityManager.SecurityEnabled && privateBinPath != null && privateBinPath.Length > 0) { new FileIOPermission(FileIOPermissionAccess.PathDiscovery, privateBinPath).Demand(); } return privateBinPath; } } /// Gets the directory that the assembly resolver uses to probe for dynamically created assemblies. /// The directory that the assembly resolver uses to probe for dynamically created assemblies. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x17000B25 RID: 2853 // (get) Token: 0x06003A4D RID: 14925 RVA: 0x000C7D44 File Offset: 0x000C5F44 public string DynamicDirectory { get { AppDomainSetup setupInformationNoCopy = this.SetupInformationNoCopy; if (setupInformationNoCopy.DynamicBase == null) { return null; } string text = Path.Combine(setupInformationNoCopy.DynamicBase, setupInformationNoCopy.ApplicationName); if (SecurityManager.SecurityEnabled && text != null && text.Length > 0) { new FileIOPermission(FileIOPermissionAccess.PathDiscovery, text).Demand(); } return text; } } /// Gets an indication whether the application domain is configured to shadow copy files. /// true if the application domain is configured to shadow copy files; otherwise, false. /// The operation is attempted on an unloaded application domain. /// 2 // Token: 0x17000B26 RID: 2854 // (get) Token: 0x06003A4E RID: 14926 RVA: 0x000C7DA0 File Offset: 0x000C5FA0 public bool ShadowCopyFiles { get { return this.SetupInformationNoCopy.ShadowCopyFiles == "true"; } } // Token: 0x06003A4F RID: 14927 [MethodImpl(MethodImplOptions.InternalCall)] private extern string getFriendlyName(); /// Gets the friendly name of this application domain. /// The friendly name of this application domain. /// The operation is attempted on an unloaded application domain. /// 2 // Token: 0x17000B27 RID: 2855 // (get) Token: 0x06003A50 RID: 14928 RVA: 0x000C7DB8 File Offset: 0x000C5FB8 public string FriendlyName { get { return this.getFriendlyName(); } } /// Gets the associated with this application domain that is used as input to the security policy. /// Gets the associated with this application domain that is used as input to the security policy. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x17000B28 RID: 2856 // (get) Token: 0x06003A51 RID: 14929 RVA: 0x000C7DC0 File Offset: 0x000C5FC0 public Evidence Evidence { get { if (this._evidence == null) { lock (this) { Assembly entryAssembly = Assembly.GetEntryAssembly(); if (entryAssembly == null) { if (this == AppDomain.DefaultDomain) { return new Evidence(); } this._evidence = AppDomain.DefaultDomain.Evidence; } else { this._evidence = Evidence.GetDefaultHostEvidence(entryAssembly); } } } return new Evidence(this._evidence); } } // Token: 0x17000B29 RID: 2857 // (get) Token: 0x06003A52 RID: 14930 RVA: 0x000C7E58 File Offset: 0x000C6058 internal IPrincipal DefaultPrincipal { get { if (AppDomain._principal == null) { switch (this._principalPolicy) { case PrincipalPolicy.UnauthenticatedPrincipal: AppDomain._principal = new GenericPrincipal(new GenericIdentity(string.Empty, string.Empty), null); break; case PrincipalPolicy.WindowsPrincipal: AppDomain._principal = new WindowsPrincipal(WindowsIdentity.GetCurrent()); break; } } return AppDomain._principal; } } // Token: 0x17000B2A RID: 2858 // (get) Token: 0x06003A53 RID: 14931 RVA: 0x000C7EC8 File Offset: 0x000C60C8 internal PermissionSet GrantedPermissionSet { get { return this._granted; } } // Token: 0x06003A54 RID: 14932 [MethodImpl(MethodImplOptions.InternalCall)] private static extern AppDomain getCurDomain(); /// Gets the current application domain for the current . /// The current application domain. /// 1 // Token: 0x17000B2B RID: 2859 // (get) Token: 0x06003A55 RID: 14933 RVA: 0x000C7ED0 File Offset: 0x000C60D0 public static AppDomain CurrentDomain { get { return AppDomain.getCurDomain(); } } // Token: 0x06003A56 RID: 14934 [MethodImpl(MethodImplOptions.InternalCall)] private static extern AppDomain getRootDomain(); // Token: 0x17000B2C RID: 2860 // (get) Token: 0x06003A57 RID: 14935 RVA: 0x000C7ED8 File Offset: 0x000C60D8 internal static AppDomain DefaultDomain { get { if (AppDomain.default_domain == null) { AppDomain rootDomain = AppDomain.getRootDomain(); if (rootDomain == AppDomain.CurrentDomain) { AppDomain.default_domain = rootDomain; } else { AppDomain.default_domain = (AppDomain)RemotingServices.GetDomainProxy(rootDomain); } } return AppDomain.default_domain; } } /// Appends the specified directory name to the private path list. /// The name of the directory to be appended to the private path. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A58 RID: 14936 RVA: 0x000C7F20 File Offset: 0x000C6120 [Obsolete("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead.")] public void AppendPrivatePath(string path) { if (path == null || path.Length == 0) { return; } AppDomainSetup setupInformationNoCopy = this.SetupInformationNoCopy; string text = setupInformationNoCopy.PrivateBinPath; if (text == null || text.Length == 0) { setupInformationNoCopy.PrivateBinPath = path; return; } text = text.Trim(); if (text[text.Length - 1] != Path.PathSeparator) { text += Path.PathSeparator; } setupInformationNoCopy.PrivateBinPath = text + path; } /// Resets the path that specifies the location of private assemblies to the empty string (""). /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A59 RID: 14937 RVA: 0x000C7FA4 File Offset: 0x000C61A4 [Obsolete("AppDomain.ClearPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead.")] public void ClearPrivatePath() { this.SetupInformationNoCopy.PrivateBinPath = string.Empty; } /// Resets the list of directories containing shadow copied assemblies to the empty string (""). /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A5A RID: 14938 RVA: 0x000C7FB8 File Offset: 0x000C61B8 [Obsolete("Use AppDomainSetup.ShadowCopyDirectories")] public void ClearShadowCopyPath() { this.SetupInformationNoCopy.ShadowCopyDirectories = string.Empty; } /// Creates a new instance of the specified type defined in the specified assembly. /// An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object. /// The display name of the assembly. See . /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// The operation is attempted on an unloaded application domain. /// /// or is null. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// /// was not found. /// The caller does not have permission to call this constructor. /// No matching public constructor was found. /// /// was not found in . /// This instance is null. /// 2 /// /// /// // Token: 0x06003A5B RID: 14939 RVA: 0x000C7FCC File Offset: 0x000C61CC public ObjectHandle CreateInstance(string assemblyName, string typeName) { if (assemblyName == null) { throw new ArgumentNullException("assemblyName"); } return Activator.CreateInstance(assemblyName, typeName); } /// Creates a new instance of the specified type defined in the specified assembly. A parameter specifies an array of activation attributes. /// An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object. /// The display name of the assembly. See . /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. /// The operation is attempted on an unloaded application domain. /// /// or is null. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// /// was not found. /// The caller does not have permission to call this constructor. /// No matching public constructor was found. /// The caller cannot provide activation attributes for an object that does not inherit from . /// /// was not found in . /// This instance is null. /// 2 /// /// /// // Token: 0x06003A5C RID: 14940 RVA: 0x000C7FE8 File Offset: 0x000C61E8 public ObjectHandle CreateInstance(string assemblyName, string typeName, object[] activationAttributes) { if (assemblyName == null) { throw new ArgumentNullException("assemblyName"); } return Activator.CreateInstance(assemblyName, typeName, activationAttributes); } /// Creates a new instance of the specified type defined in the specified assembly. Parameters specify a binder, binding flags, constructor arguments, culture-specific information used to interpret arguments, activation attributes, and authorization to create the type. /// An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object. /// The display name of the assembly. See . /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// A Boolean value specifying whether to perform a case-sensitive search or not. /// A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. /// An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used. /// The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. /// Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is null, the for the current thread is used. /// An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. /// Information used to authorize creation of . /// The operation is attempted on an unloaded application domain. /// /// or is null. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// /// was not found. /// The caller does not have permission to call this constructor. /// No matching constructor was found. /// The caller cannot provide activation attributes for an object that does not inherit from . /// /// was not found in . /// This instance is null. /// 2 /// /// /// // Token: 0x06003A5D RID: 14941 RVA: 0x000C8004 File Offset: 0x000C6204 public ObjectHandle CreateInstance(string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityAttributes) { if (assemblyName == null) { throw new ArgumentNullException("assemblyName"); } return Activator.CreateInstance(assemblyName, typeName, ignoreCase, bindingAttr, binder, args, culture, activationAttributes, securityAttributes); } /// Creates a new instance of the specified type. Parameters specify the assembly where the type is defined, and the name of the type. /// An instance of the object specified by . /// The display name of the assembly. See . /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// /// or is null. /// No matching public constructor was found. /// /// was not found in . /// /// was not found. /// The caller does not have permission to call this constructor. /// The operation is attempted on an unloaded application domain. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A5E RID: 14942 RVA: 0x000C8038 File Offset: 0x000C6238 public object CreateInstanceAndUnwrap(string assemblyName, string typeName) { ObjectHandle objectHandle = this.CreateInstance(assemblyName, typeName); return (objectHandle == null) ? null : objectHandle.Unwrap(); } /// Creates a new instance of the specified type. Parameters specify the assembly where the type is defined, the name of the type, and an array of activation attributes. /// An instance of the object specified by . /// The display name of the assembly. See . /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. /// /// or is null. /// No matching public constructor was found. /// /// was not found in . /// /// was not found. /// The caller does not have permission to call this constructor. /// The caller cannot provide activation attributes for an object that does not inherit from . /// The operation is attempted on an unloaded application domain. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A5F RID: 14943 RVA: 0x000C8060 File Offset: 0x000C6260 public object CreateInstanceAndUnwrap(string assemblyName, string typeName, object[] activationAttributes) { ObjectHandle objectHandle = this.CreateInstance(assemblyName, typeName, activationAttributes); return (objectHandle == null) ? null : objectHandle.Unwrap(); } /// Creates a new instance of the specified type. Parameters specify the name of the type, and how it is found and created. /// An instance of the object specified by . /// The display name of the assembly. See . /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// A Boolean value specifying whether to perform a case-sensitive search or not. /// A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. /// An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used. /// The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. /// A culture-specific object used to govern the coercion of types. If is null, the CultureInfo for the current thread is used. /// An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. /// Information used to authorize creation of . /// /// or is null. /// No matching constructor was found. /// /// was not found in . /// /// was not found. /// The caller does not have permission to call this constructor. /// The caller cannot provide activation attributes for an object that does not inherit from . /// The operation is attempted on an unloaded application domain. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A60 RID: 14944 RVA: 0x000C808C File Offset: 0x000C628C public object CreateInstanceAndUnwrap(string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityAttributes) { ObjectHandle objectHandle = this.CreateInstance(assemblyName, typeName, ignoreCase, bindingAttr, binder, args, culture, activationAttributes, securityAttributes); return (objectHandle == null) ? null : objectHandle.Unwrap(); } /// Creates a new instance of the specified type defined in the specified assembly file. /// An object that is a wrapper for the new instance, or null if is not found. The return value needs to be unwrapped to access the real object. /// The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the method. /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// /// is null.-or- is null. /// /// was not found. /// /// was not found in . /// The operation is attempted on an unloaded application domain. /// No parameterless public constructor was found. /// The caller does not have sufficient permission to call this constructor. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// This instance is null. /// 2 /// /// /// // Token: 0x06003A61 RID: 14945 RVA: 0x000C80C4 File Offset: 0x000C62C4 public ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName) { if (assemblyFile == null) { throw new ArgumentNullException("assemblyFile"); } return Activator.CreateInstanceFrom(assemblyFile, typeName); } /// Creates a new instance of the specified type defined in the specified assembly file. /// An object that is a wrapper for the new instance, or null if is not found. The return value needs to be unwrapped to access the real object. /// The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the method. /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. /// /// is null. /// /// was not found. /// /// was not found in . /// The caller does not have sufficient permission to call this constructor. /// No matching public constructor was found. /// The caller cannot provide activation attributes for an object that does not inherit from . /// The operation is attempted on an unloaded application domain. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// This instance is null. /// 2 /// /// /// // Token: 0x06003A62 RID: 14946 RVA: 0x000C80E0 File Offset: 0x000C62E0 public ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, object[] activationAttributes) { if (assemblyFile == null) { throw new ArgumentNullException("assemblyFile"); } return Activator.CreateInstanceFrom(assemblyFile, typeName, activationAttributes); } /// Creates a new instance of the specified type defined in the specified assembly file. /// An object that is a wrapper for the new instance, or null if is not found. The return value needs to be unwrapped to access the real object. /// The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the method. /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// A Boolean value specifying whether to perform a case-sensitive search or not. /// A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. /// An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used. /// The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. /// Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is null, the for the current thread is used. /// An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. /// Information used to authorize creation of . /// /// is null.-or- is null. /// The caller cannot provide activation attributes for an object that does not inherit from . /// The operation is attempted on an unloaded application domain. /// /// was not found. /// /// was not found in . /// No parameterless public constructor was found. /// The caller does not have sufficient permission to call this constructor. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// This instance is null. /// 2 /// /// /// // Token: 0x06003A63 RID: 14947 RVA: 0x000C80FC File Offset: 0x000C62FC public ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityAttributes) { if (assemblyFile == null) { throw new ArgumentNullException("assemblyFile"); } return Activator.CreateInstanceFrom(assemblyFile, typeName, ignoreCase, bindingAttr, binder, args, culture, activationAttributes, securityAttributes); } /// Creates a new instance of the specified type defined in the specified assembly file. /// The requested object, or null if is not found. /// The file name and path of the assembly that defines the requested type. /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// /// is null.-or- is null. /// The operation is attempted on an unloaded application domain. /// /// was not found. /// /// was not found in . /// No parameterless public constructor was found. /// The caller does not have sufficient permission to call this constructor. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A64 RID: 14948 RVA: 0x000C8130 File Offset: 0x000C6330 public object CreateInstanceFromAndUnwrap(string assemblyName, string typeName) { ObjectHandle objectHandle = this.CreateInstanceFrom(assemblyName, typeName); return (objectHandle == null) ? null : objectHandle.Unwrap(); } /// Creates a new instance of the specified type defined in the specified assembly file. /// The requested object, or null if is not found. /// The file name and path of the assembly that defines the requested type. /// The fully qualified name of the requested type, including the namespace but not the assembly (see the property). /// An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. /// /// is null.-or- is null. /// The caller cannot provide activation attributes for an object that does not inherit from . /// The operation is attempted on an unloaded application domain. /// /// was not found. /// /// was not found in . /// No parameterless public constructor was found. /// The caller does not have sufficient permission to call this constructor. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A65 RID: 14949 RVA: 0x000C8158 File Offset: 0x000C6358 public object CreateInstanceFromAndUnwrap(string assemblyName, string typeName, object[] activationAttributes) { ObjectHandle objectHandle = this.CreateInstanceFrom(assemblyName, typeName, activationAttributes); return (objectHandle == null) ? null : objectHandle.Unwrap(); } /// Creates a new instance of the specified type defined in the specified assembly file. /// The requested object, or null if is not found. /// The file name and path of the assembly that defines the requested type. /// The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. /// A Boolean value specifying whether to perform a case-sensitive search or not. /// A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. /// An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used. /// The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. /// Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is null, the for the current thread is used. /// An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. /// Information used to authorize creation of . /// /// is null.-or- is null. /// The caller cannot provide activation attributes for an object that does not inherit from . /// The operation is attempted on an unloaded application domain. /// /// was not found. /// /// was not found in . /// No parameterless public constructor was found. /// The caller does not have sufficient permission to call this constructor. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A66 RID: 14950 RVA: 0x000C8184 File Offset: 0x000C6384 public object CreateInstanceFromAndUnwrap(string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityAttributes) { ObjectHandle objectHandle = this.CreateInstanceFrom(assemblyName, typeName, ignoreCase, bindingAttr, binder, args, culture, activationAttributes, securityAttributes); return (objectHandle == null) ? null : objectHandle.Unwrap(); } /// Defines a dynamic assembly with the specified name and access mode. /// Represents the dynamic assembly created. /// The unique identity of the dynamic assembly. /// The access mode for the dynamic assembly. /// /// is null. /// The Name property of is null.-or- The Name property of begins with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x06003A67 RID: 14951 RVA: 0x000C81BC File Offset: 0x000C63BC public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) { return this.DefineDynamicAssembly(name, access, null, null, null, null, null, false); } /// Defines a dynamic assembly using the specified name, access mode, and evidence. /// Represents the dynamic assembly created. /// The unique identity of the dynamic assembly. /// The mode in which the dynamic assembly will be accessed. /// The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. /// /// is null. /// The Name property of is null.-or- The Name property of begins with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x06003A68 RID: 14952 RVA: 0x000C81D8 File Offset: 0x000C63D8 public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, Evidence evidence) { return this.DefineDynamicAssembly(name, access, null, evidence, null, null, null, false); } /// Defines a dynamic assembly using the specified name, access mode, and storage directory. /// Represents the dynamic assembly created. /// The unique identity of the dynamic assembly. /// The mode in which the dynamic assembly will be accessed. /// The name of the directory where the assembly will be saved. If is null, the directory defaults to the current directory. /// /// is null. /// The Name property of is null.-or- The Name property of begins with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x06003A69 RID: 14953 RVA: 0x000C81F4 File Offset: 0x000C63F4 public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir) { return this.DefineDynamicAssembly(name, access, dir, null, null, null, null, false); } /// Defines a dynamic assembly using the specified name, access mode, storage directory, and evidence. /// Represents the dynamic assembly created. /// The unique identity of the dynamic assembly. /// The mode in which the dynamic assembly will be accessed. /// The name of the directory where the assembly will be saved. If is null, the directory defaults to the current directory. /// The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. /// /// is null. /// The Name property of is null.-or- The Name property of begins with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x06003A6A RID: 14954 RVA: 0x000C8210 File Offset: 0x000C6410 public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence) { return this.DefineDynamicAssembly(name, access, dir, evidence, null, null, null, false); } /// Defines a dynamic assembly using the specified name, access mode, and permission requests. /// Represents the dynamic assembly created. /// The unique identity of the dynamic assembly. /// The mode in which the dynamic assembly will be accessed. /// The required permissions request. /// The optional permissions request. /// The refused permissions request. /// /// is null. /// The Name property of is null.-or- The Name property of begins with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x06003A6B RID: 14955 RVA: 0x000C822C File Offset: 0x000C642C public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions) { return this.DefineDynamicAssembly(name, access, null, null, requiredPermissions, optionalPermissions, refusedPermissions, false); } /// Defines a dynamic assembly using the specified name, access mode, evidence, and permission requests. /// Represents the dynamic assembly created. /// The unique identity of the dynamic assembly. /// The mode in which the dynamic assembly will be accessed. /// The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. /// The required permissions request. /// The optional permissions request. /// The refused permissions request. /// /// is null. /// The Name property of is null.-or- The Name property of begins with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x06003A6C RID: 14956 RVA: 0x000C824C File Offset: 0x000C644C public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions) { return this.DefineDynamicAssembly(name, access, null, evidence, requiredPermissions, optionalPermissions, refusedPermissions, false); } /// Defines a dynamic assembly using the specified name, access mode, storage directory, and permission requests. /// Represents the dynamic assembly created. /// The unique identity of the dynamic assembly. /// The mode in which the dynamic assembly will be accessed. /// The name of the directory where the assembly will be saved. If is null, the directory defaults to the current directory. /// The required permissions request. /// The optional permissions request. /// The refused permissions request. /// /// is null. /// The Name property of is null.-or- The Name property of begins with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x06003A6D RID: 14957 RVA: 0x000C826C File Offset: 0x000C646C public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions) { return this.DefineDynamicAssembly(name, access, dir, null, requiredPermissions, optionalPermissions, refusedPermissions, false); } /// Defines a dynamic assembly using the specified name, access mode, storage directory, evidence, and permission requests. /// Represents the dynamic assembly created. /// The unique identity of the dynamic assembly. /// The mode in which the dynamic assembly will be accessed. /// The name of the directory where the assembly will be saved. If is null, the directory defaults to the current directory. /// The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. /// The required permissions request. /// The optional permissions request. /// The refused permissions request. /// /// is null. /// The Name property of is null.-or- The Name property of begins with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x06003A6E RID: 14958 RVA: 0x000C828C File Offset: 0x000C648C public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions) { return this.DefineDynamicAssembly(name, access, dir, evidence, requiredPermissions, optionalPermissions, refusedPermissions, false); } /// Defines a dynamic assembly using the specified name, access mode, storage directory, evidence, permission requests, and synchronization option. /// Represents the dynamic assembly created. /// The unique identity of the dynamic assembly. /// The mode in which the dynamic assembly will be accessed. /// The name of the directory where the dynamic assembly will be saved. If is null, the directory defaults to the current directory. /// The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. /// The required permissions request. /// The optional permissions request. /// The refused permissions request. /// true to synchronize the creation of modules, types, and members in the dynamic assembly; otherwise, false. /// /// is null. /// The Name property of is null.-or- The Name property of begins with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// /// // Token: 0x06003A6F RID: 14959 RVA: 0x000C82AC File Offset: 0x000C64AC public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, bool isSynchronized) { if (name == null) { throw new ArgumentNullException("name"); } AppDomain.ValidateAssemblyName(name.Name); AssemblyBuilder assemblyBuilder = new AssemblyBuilder(name, dir, access, false); assemblyBuilder.AddPermissionRequests(requiredPermissions, optionalPermissions, refusedPermissions); return assemblyBuilder; } /// Defines a dynamic assembly with the specified name, access mode, storage directory, evidence, permission requests, synchronization option, and custom attributes. /// An object that represents the new dynamic assembly. /// The unique identity of the dynamic assembly. /// The mode in which the dynamic assembly will be accessed. /// The name of the directory where the dynamic assembly will be saved. If is null, the current directory is used. /// The evidence that is supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. /// The required permissions request. /// The optional permissions request. /// The refused permissions request. /// true to synchronize the creation of modules, types, and members in the dynamic assembly; otherwise, false. /// An enumerable list of attributes to be applied to the assembly, or null if there are no attributes. /// /// is null. /// The Name property of is null.-or- The Name property of starts with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. // Token: 0x06003A70 RID: 14960 RVA: 0x000C82EC File Offset: 0x000C64EC public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, bool isSynchronized, IEnumerable assemblyAttributes) { AssemblyBuilder assemblyBuilder = this.DefineDynamicAssembly(name, access, dir, evidence, requiredPermissions, optionalPermissions, refusedPermissions, isSynchronized); if (assemblyAttributes != null) { foreach (CustomAttributeBuilder customAttributeBuilder in assemblyAttributes) { assemblyBuilder.SetCustomAttribute(customAttributeBuilder); } } return assemblyBuilder; } /// Defines a dynamic assembly with the specified name, access mode, and custom attributes. /// An object that represents the new dynamic assembly. /// The unique identity of the dynamic assembly. /// The access mode for the dynamic assembly. /// An enumerable list of attributes to be applied to the assembly, or null if there are no attributes. /// /// is null. /// The Name property of is null.-or- The Name property of starts with white space, or contains a forward or backward slash. /// The operation is attempted on an unloaded application domain. // Token: 0x06003A71 RID: 14961 RVA: 0x000C8368 File Offset: 0x000C6568 public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, IEnumerable assemblyAttributes) { return this.DefineDynamicAssembly(name, access, null, null, null, null, null, false, assemblyAttributes); } // Token: 0x06003A72 RID: 14962 RVA: 0x000C8384 File Offset: 0x000C6584 internal AssemblyBuilder DefineInternalDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) { return new AssemblyBuilder(name, null, access, true); } /// Executes the code in another application domain that is identified by the specified delegate. /// A delegate that specifies a method to call. /// /// is null. /// 2 // Token: 0x06003A73 RID: 14963 RVA: 0x000C8390 File Offset: 0x000C6590 public void DoCallBack(CrossAppDomainDelegate callBackDelegate) { if (callBackDelegate != null) { callBackDelegate(); } } /// Executes the assembly contained in the specified file. /// The value returned by the entry point of the assembly. /// The name of the file that contains the assembly to execute. /// /// is null. /// /// is not found. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// The specified assembly has no entry point. /// 2 /// /// /// // Token: 0x06003A74 RID: 14964 RVA: 0x000C83A0 File Offset: 0x000C65A0 public int ExecuteAssembly(string assemblyFile) { return this.ExecuteAssembly(assemblyFile, null, null); } /// Executes the assembly contained in the specified file, using the specified evidence. /// The value returned by the entry point of the assembly. /// The name of the file that contains the assembly to execute. /// Evidence for loading the assembly. /// /// is null. /// /// is not found. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// The specified assembly has no entry point. /// 2 /// /// /// // Token: 0x06003A75 RID: 14965 RVA: 0x000C83AC File Offset: 0x000C65AC public int ExecuteAssembly(string assemblyFile, Evidence assemblySecurity) { return this.ExecuteAssembly(assemblyFile, assemblySecurity, null); } /// Executes the assembly contained in the specified file, using the specified evidence and arguments. /// The value returned by the entry point of the assembly. /// The name of the file that contains the assembly to execute. /// The supplied evidence for the assembly. /// The arguments to the entry point of the assembly. /// /// is null. /// /// is not found. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// The specified assembly has no entry point. /// 2 /// /// /// // Token: 0x06003A76 RID: 14966 RVA: 0x000C83B8 File Offset: 0x000C65B8 public int ExecuteAssembly(string assemblyFile, Evidence assemblySecurity, string[] args) { Assembly assembly = Assembly.LoadFrom(assemblyFile, assemblySecurity); return this.ExecuteAssemblyInternal(assembly, args); } /// Executes the assembly contained in the specified file, using the specified evidence and arguments. /// The value returned by the entry point of the assembly. /// The name of the file that contains the assembly to execute. /// The supplied evidence for the assembly. /// The arguments to the entry point of the assembly. /// Represents the value of the computed hash code. /// Represents the hash algorithm used by the assembly manifest. /// /// is null. /// /// is not found. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// The specified assembly has no entry point. /// 2 /// /// /// // Token: 0x06003A77 RID: 14967 RVA: 0x000C83D8 File Offset: 0x000C65D8 public int ExecuteAssembly(string assemblyFile, Evidence assemblySecurity, string[] args, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm) { Assembly assembly = Assembly.LoadFrom(assemblyFile, assemblySecurity, hashValue, hashAlgorithm); return this.ExecuteAssemblyInternal(assembly, args); } // Token: 0x06003A78 RID: 14968 RVA: 0x000C83FC File Offset: 0x000C65FC private int ExecuteAssemblyInternal(Assembly a, string[] args) { if (a.EntryPoint == null) { throw new MissingMethodException("Entry point not found in assembly '" + a.FullName + "'."); } return this.ExecuteAssembly(a, args); } // Token: 0x06003A79 RID: 14969 [MethodImpl(MethodImplOptions.InternalCall)] private extern int ExecuteAssembly(Assembly a, string[] args); // Token: 0x06003A7A RID: 14970 [MethodImpl(MethodImplOptions.InternalCall)] private extern Assembly[] GetAssemblies(bool refOnly); /// Gets the assemblies that have been loaded into the execution context of this application domain. /// An array of assemblies in this application domain. /// The operation is attempted on an unloaded application domain. /// 2 // Token: 0x06003A7B RID: 14971 RVA: 0x000C8438 File Offset: 0x000C6638 public Assembly[] GetAssemblies() { return this.GetAssemblies(false); } /// Gets the value stored in the current application domain for the specified name. /// The value of the property, or null if the property does not exist. /// The name of a predefined application domain property, or the name of an application domain property you have defined. /// /// is null. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A7C RID: 14972 [MethodImpl(MethodImplOptions.InternalCall)] public extern object GetData(string name); /// Gets the type of the current instance. /// A . /// 2 // Token: 0x06003A7D RID: 14973 RVA: 0x000C8444 File Offset: 0x000C6644 public new Type GetType() { return base.GetType(); } /// Gives the an infinite lifetime by preventing a lease from being created. /// Always null. /// The operation is attempted on an unloaded application domain. /// 2 // Token: 0x06003A7E RID: 14974 RVA: 0x000C844C File Offset: 0x000C664C public override object InitializeLifetimeService() { return null; } // Token: 0x06003A7F RID: 14975 [MethodImpl(MethodImplOptions.InternalCall)] internal extern Assembly LoadAssembly(string assemblyRef, Evidence securityEvidence, bool refOnly); /// Loads an given its . /// The loaded assembly. /// An object that describes the assembly to load. /// /// is null. /// /// is not found. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A80 RID: 14976 RVA: 0x000C8450 File Offset: 0x000C6650 public Assembly Load(AssemblyName assemblyRef) { return this.Load(assemblyRef, null); } // Token: 0x06003A81 RID: 14977 RVA: 0x000C845C File Offset: 0x000C665C internal Assembly LoadSatellite(AssemblyName assemblyRef, bool throwOnError) { if (assemblyRef == null) { throw new ArgumentNullException("assemblyRef"); } Assembly assembly = this.LoadAssembly(assemblyRef.FullName, null, false); if (assembly == null && throwOnError) { throw new FileNotFoundException(null, assemblyRef.Name); } return assembly; } /// Loads an given its . /// The loaded assembly. /// An object that describes the assembly to load. /// Evidence for loading the assembly. /// /// is null /// /// is not found. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A82 RID: 14978 RVA: 0x000C84A4 File Offset: 0x000C66A4 public Assembly Load(AssemblyName assemblyRef, Evidence assemblySecurity) { if (assemblyRef == null) { throw new ArgumentNullException("assemblyRef"); } if (assemblyRef.Name == null || assemblyRef.Name.Length == 0) { if (assemblyRef.CodeBase != null) { return Assembly.LoadFrom(assemblyRef.CodeBase, assemblySecurity); } throw new ArgumentException(Locale.GetText("assemblyRef.Name cannot be empty."), "assemblyRef"); } else { Assembly assembly = this.LoadAssembly(assemblyRef.FullName, assemblySecurity, false); if (assembly != null) { return assembly; } if (assemblyRef.CodeBase == null) { throw new FileNotFoundException(null, assemblyRef.Name); } string text = assemblyRef.CodeBase; if (text.ToLower(CultureInfo.InvariantCulture).StartsWith("file://")) { text = new Uri(text).LocalPath; } try { assembly = Assembly.LoadFrom(text, assemblySecurity); } catch { throw new FileNotFoundException(null, assemblyRef.Name); } AssemblyName name = assembly.GetName(); if (assemblyRef.Name != name.Name) { throw new FileNotFoundException(null, assemblyRef.Name); } if (assemblyRef.Version != new Version() && assemblyRef.Version != name.Version) { throw new FileNotFoundException(null, assemblyRef.Name); } if (assemblyRef.CultureInfo != null && assemblyRef.CultureInfo.Equals(name)) { throw new FileNotFoundException(null, assemblyRef.Name); } byte[] publicKeyToken = assemblyRef.GetPublicKeyToken(); if (publicKeyToken != null) { byte[] publicKeyToken2 = name.GetPublicKeyToken(); if (publicKeyToken2 == null || publicKeyToken.Length != publicKeyToken2.Length) { throw new FileNotFoundException(null, assemblyRef.Name); } for (int i = publicKeyToken.Length - 1; i >= 0; i--) { if (publicKeyToken2[i] != publicKeyToken[i]) { throw new FileNotFoundException(null, assemblyRef.Name); } } } return assembly; } } /// Loads an given its display name. /// The loaded assembly. /// The display name of the assembly. See . /// /// is null /// /// is not found. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A83 RID: 14979 RVA: 0x000C8698 File Offset: 0x000C6898 public Assembly Load(string assemblyString) { return this.Load(assemblyString, null, false); } /// Loads an given its display name. /// The loaded assembly. /// The display name of the assembly. See . /// Evidence for loading the assembly. /// /// is null /// /// is not found. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A84 RID: 14980 RVA: 0x000C86A4 File Offset: 0x000C68A4 public Assembly Load(string assemblyString, Evidence assemblySecurity) { return this.Load(assemblyString, assemblySecurity, false); } // Token: 0x06003A85 RID: 14981 RVA: 0x000C86B0 File Offset: 0x000C68B0 internal Assembly Load(string assemblyString, Evidence assemblySecurity, bool refonly) { if (assemblyString == null) { throw new ArgumentNullException("assemblyString"); } if (assemblyString.Length == 0) { throw new ArgumentException("assemblyString cannot have zero length"); } Assembly assembly = this.LoadAssembly(assemblyString, assemblySecurity, refonly); if (assembly == null) { throw new FileNotFoundException(null, assemblyString); } return assembly; } /// Loads the with a common object file format (COFF) based image containing an emitted . /// The loaded assembly. /// An array of type byte that is a COFF-based image containing an emitted assembly. /// /// is null. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A86 RID: 14982 RVA: 0x000C8700 File Offset: 0x000C6900 public Assembly Load(byte[] rawAssembly) { return this.Load(rawAssembly, null, null); } /// Loads the with a common object file format (COFF) based image containing an emitted . The raw bytes representing the symbols for the are also loaded. /// The loaded assembly. /// An array of type byte that is a COFF-based image containing an emitted assembly. /// An array of type byte containing the raw bytes representing the symbols for the assembly. /// /// is null. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A87 RID: 14983 RVA: 0x000C870C File Offset: 0x000C690C public Assembly Load(byte[] rawAssembly, byte[] rawSymbolStore) { return this.Load(rawAssembly, rawSymbolStore, null); } // Token: 0x06003A88 RID: 14984 [MethodImpl(MethodImplOptions.InternalCall)] internal extern Assembly LoadAssemblyRaw(byte[] rawAssembly, byte[] rawSymbolStore, Evidence securityEvidence, bool refonly); /// Loads the with a common object file format (COFF) based image containing an emitted . The raw bytes representing the symbols for the are also loaded. /// The loaded assembly. /// An array of type byte that is a COFF-based image containing an emitted assembly. /// An array of type byte containing the raw bytes representing the symbols for the assembly. /// Evidence for loading the assembly. /// /// is null. /// /// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// An assembly or module was loaded twice with two different evidences. /// 2 /// /// /// // Token: 0x06003A89 RID: 14985 RVA: 0x000C8718 File Offset: 0x000C6918 public Assembly Load(byte[] rawAssembly, byte[] rawSymbolStore, Evidence securityEvidence) { return this.Load(rawAssembly, rawSymbolStore, securityEvidence, false); } // Token: 0x06003A8A RID: 14986 RVA: 0x000C8724 File Offset: 0x000C6924 internal Assembly Load(byte[] rawAssembly, byte[] rawSymbolStore, Evidence securityEvidence, bool refonly) { if (rawAssembly == null) { throw new ArgumentNullException("rawAssembly"); } Assembly assembly = this.LoadAssemblyRaw(rawAssembly, rawSymbolStore, securityEvidence, refonly); assembly.FromByteArray = true; return assembly; } /// Establishes the security policy level for this application domain. /// The security policy level. /// /// is null. /// The security policy level has already been set. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A8B RID: 14987 RVA: 0x000C8758 File Offset: 0x000C6958 public void SetAppDomainPolicy(PolicyLevel domainPolicy) { if (domainPolicy == null) { throw new ArgumentNullException("domainPolicy"); } if (this._granted != null) { throw new PolicyException(Locale.GetText("An AppDomain policy is already specified.")); } if (this.IsFinalizingForUnload()) { throw new AppDomainUnloadedException(); } PolicyStatement policyStatement = domainPolicy.Resolve(this._evidence); this._granted = policyStatement.PermissionSet; } /// Establishes the specified directory path as the location where assemblies are shadow copied. /// The fully qualified path to the shadow copy location. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A8C RID: 14988 RVA: 0x000C87BC File Offset: 0x000C69BC [Obsolete("Use AppDomainSetup.SetCachePath")] public void SetCachePath(string path) { this.SetupInformationNoCopy.CachePath = path; } /// Specifies how principal and identity objects should be attached to a thread if the thread attempts to bind to a principal while executing in this application domain. /// One of the values that specifies the type of the principal object to attach to threads. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A8D RID: 14989 RVA: 0x000C87CC File Offset: 0x000C69CC public void SetPrincipalPolicy(PrincipalPolicy policy) { if (this.IsFinalizingForUnload()) { throw new AppDomainUnloadedException(); } this._principalPolicy = policy; AppDomain._principal = null; } /// Turns on shadow copying. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A8E RID: 14990 RVA: 0x000C87EC File Offset: 0x000C69EC [Obsolete("Use AppDomainSetup.ShadowCopyFiles")] public void SetShadowCopyFiles() { this.SetupInformationNoCopy.ShadowCopyFiles = "true"; } /// Establishes the specified directory path as the location of assemblies to be shadow copied. /// A list of directory names, where each name is separated by a semicolon. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A8F RID: 14991 RVA: 0x000C8800 File Offset: 0x000C6A00 [Obsolete("Use AppDomainSetup.ShadowCopyDirectories")] public void SetShadowCopyPath(string path) { this.SetupInformationNoCopy.ShadowCopyDirectories = path; } /// Sets the default principal object to be attached to threads if they attempt to bind to a principal while executing in this application domain. /// The principal object to attach to threads. /// /// is null. /// The thread principal has already been set. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003A90 RID: 14992 RVA: 0x000C8810 File Offset: 0x000C6A10 public void SetThreadPrincipal(IPrincipal principal) { if (principal == null) { throw new ArgumentNullException("principal"); } if (AppDomain._principal != null) { throw new PolicyException(Locale.GetText("principal already present.")); } if (this.IsFinalizingForUnload()) { throw new AppDomainUnloadedException(); } AppDomain._principal = principal; } // Token: 0x06003A91 RID: 14993 [MethodImpl(MethodImplOptions.InternalCall)] private static extern AppDomain InternalSetDomainByID(int domain_id); // Token: 0x06003A92 RID: 14994 [MethodImpl(MethodImplOptions.InternalCall)] private static extern AppDomain InternalSetDomain(AppDomain context); // Token: 0x06003A93 RID: 14995 [MethodImpl(MethodImplOptions.InternalCall)] internal static extern void InternalPushDomainRef(AppDomain domain); // Token: 0x06003A94 RID: 14996 [MethodImpl(MethodImplOptions.InternalCall)] internal static extern void InternalPushDomainRefByID(int domain_id); // Token: 0x06003A95 RID: 14997 [MethodImpl(MethodImplOptions.InternalCall)] internal static extern void InternalPopDomainRef(); // Token: 0x06003A96 RID: 14998 [MethodImpl(MethodImplOptions.InternalCall)] internal static extern Context InternalSetContext(Context context); // Token: 0x06003A97 RID: 14999 [MethodImpl(MethodImplOptions.InternalCall)] internal static extern Context InternalGetContext(); // Token: 0x06003A98 RID: 15000 [MethodImpl(MethodImplOptions.InternalCall)] internal static extern Context InternalGetDefaultContext(); // Token: 0x06003A99 RID: 15001 [MethodImpl(MethodImplOptions.InternalCall)] internal static extern string InternalGetProcessGuid(string newguid); // Token: 0x06003A9A RID: 15002 RVA: 0x000C8860 File Offset: 0x000C6A60 internal static object InvokeInDomain(AppDomain domain, MethodInfo method, object obj, object[] args) { AppDomain currentDomain = AppDomain.CurrentDomain; bool flag = false; object obj3; try { AppDomain.InternalPushDomainRef(domain); flag = true; AppDomain.InternalSetDomain(domain); Exception ex; object obj2 = ((MonoMethod)method).InternalInvoke(obj, args, out ex); if (ex != null) { throw ex; } obj3 = obj2; } finally { AppDomain.InternalSetDomain(currentDomain); if (flag) { AppDomain.InternalPopDomainRef(); } } return obj3; } // Token: 0x06003A9B RID: 15003 RVA: 0x000C88DC File Offset: 0x000C6ADC internal static object InvokeInDomainByID(int domain_id, MethodInfo method, object obj, object[] args) { AppDomain currentDomain = AppDomain.CurrentDomain; bool flag = false; object obj3; try { AppDomain.InternalPushDomainRefByID(domain_id); flag = true; AppDomain.InternalSetDomainByID(domain_id); Exception ex; object obj2 = ((MonoMethod)method).InternalInvoke(obj, args, out ex); if (ex != null) { throw ex; } obj3 = obj2; } finally { AppDomain.InternalSetDomain(currentDomain); if (flag) { AppDomain.InternalPopDomainRef(); } } return obj3; } // Token: 0x06003A9C RID: 15004 RVA: 0x000C8958 File Offset: 0x000C6B58 internal static string GetProcessGuid() { if (AppDomain._process_guid == null) { AppDomain._process_guid = AppDomain.InternalGetProcessGuid(Guid.NewGuid().ToString()); } return AppDomain._process_guid; } /// Creates a new application domain with the specified name. /// The newly created application domain. /// The friendly name of the domain. /// /// is null. /// 1 /// /// /// // Token: 0x06003A9D RID: 15005 RVA: 0x000C898C File Offset: 0x000C6B8C public static AppDomain CreateDomain(string friendlyName) { return AppDomain.CreateDomain(friendlyName, null, null); } /// Creates a new application domain with the given name using the supplied evidence. /// The newly created application domain. /// The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see . /// Evidence mapped through the security policy to establish a top-of-stack permission set. Pass null to use the evidence of the current application domain. /// /// is null. /// 1 /// /// /// // Token: 0x06003A9E RID: 15006 RVA: 0x000C8998 File Offset: 0x000C6B98 public static AppDomain CreateDomain(string friendlyName, Evidence securityInfo) { return AppDomain.CreateDomain(friendlyName, securityInfo, null); } // Token: 0x06003A9F RID: 15007 [MethodImpl(MethodImplOptions.InternalCall)] private static extern AppDomain createDomain(string friendlyName, AppDomainSetup info); /// Creates a new application domain using the specified name, evidence, and application domain setup information. /// The newly created application domain. /// The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see . /// Evidence mapped through the security policy to establish a top-of-stack permission set. Pass null to use the evidence of the current application domain. /// An object that contains application domain initialization information. /// /// is null. /// 1 /// /// /// // Token: 0x06003AA0 RID: 15008 RVA: 0x000C89A4 File Offset: 0x000C6BA4 [MonoLimitation("Currently it does not allow the setup in the other domain")] public static AppDomain CreateDomain(string friendlyName, Evidence securityInfo, AppDomainSetup info) { if (friendlyName == null) { throw new ArgumentNullException("friendlyName"); } AppDomain defaultDomain = AppDomain.DefaultDomain; if (info == null) { if (defaultDomain == null) { info = new AppDomainSetup(); } else { info = defaultDomain.SetupInformation; } } else { info = new AppDomainSetup(info); } if (defaultDomain != null) { if (!info.Equals(defaultDomain.SetupInformation)) { if (info.ApplicationBase == null) { info.ApplicationBase = defaultDomain.SetupInformation.ApplicationBase; } if (info.ConfigurationFile == null) { info.ConfigurationFile = Path.GetFileName(defaultDomain.SetupInformation.ConfigurationFile); } } } else if (info.ConfigurationFile == null) { info.ConfigurationFile = "[I don't have a config file]"; } AppDomain appDomain = (AppDomain)RemotingServices.GetDomainProxy(AppDomain.createDomain(friendlyName, info)); if (securityInfo == null) { if (defaultDomain == null) { appDomain._evidence = null; } else { appDomain._evidence = defaultDomain.Evidence; } } else { appDomain._evidence = new Evidence(securityInfo); } return appDomain; } /// Creates a new application domain with the given name, using evidence, application base path, relative search path, and a parameter that specifies whether a shadow copy of an assembly is to be loaded into the application domain. /// The newly created application domain. /// The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see . /// Evidence mapped through the security policy to establish a top-of-stack permission set. Pass null to use the evidence of the current application domain. /// The base directory that the assembly resolver uses to probe for assemblies. For more information, see . /// The path relative to the base directory where the assembly resolver should probe for private assemblies. For more information, see . /// If true, a shadow copy of an assembly is loaded into this application domain. For more information, see and Shadow Copying Assemblies. /// /// is null. /// 1 /// /// /// // Token: 0x06003AA1 RID: 15009 RVA: 0x000C8AAC File Offset: 0x000C6CAC public static AppDomain CreateDomain(string friendlyName, Evidence securityInfo, string appBasePath, string appRelativeSearchPath, bool shadowCopyFiles) { return AppDomain.CreateDomain(friendlyName, securityInfo, AppDomain.CreateDomainSetup(appBasePath, appRelativeSearchPath, shadowCopyFiles)); } // Token: 0x06003AA2 RID: 15010 RVA: 0x000C8AC0 File Offset: 0x000C6CC0 private static AppDomainSetup CreateDomainSetup(string appBasePath, string appRelativeSearchPath, bool shadowCopyFiles) { AppDomainSetup appDomainSetup = new AppDomainSetup(); appDomainSetup.ApplicationBase = appBasePath; appDomainSetup.PrivateBinPath = appRelativeSearchPath; if (shadowCopyFiles) { appDomainSetup.ShadowCopyFiles = "true"; } else { appDomainSetup.ShadowCopyFiles = "false"; } return appDomainSetup; } // Token: 0x06003AA3 RID: 15011 [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool InternalIsFinalizingForUnload(int domain_id); /// Indicates whether this application domain is unloading, and the objects it contains are being finalized by the common language runtime. /// true if this application domain is unloading and the common language runtime has started invoking finalizers; otherwise, false. /// 2 // Token: 0x06003AA4 RID: 15012 RVA: 0x000C8B04 File Offset: 0x000C6D04 public bool IsFinalizingForUnload() { return AppDomain.InternalIsFinalizingForUnload(this.getDomainID()); } // Token: 0x06003AA5 RID: 15013 [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InternalUnload(int domain_id); // Token: 0x06003AA6 RID: 15014 RVA: 0x000C8B14 File Offset: 0x000C6D14 private int getDomainID() { return Thread.GetDomainID(); } /// Unloads the specified application domain. /// An application domain to unload. /// /// is null. /// /// could not be unloaded. /// An error occurred during the unload process. /// 1 /// /// /// // Token: 0x06003AA7 RID: 15015 RVA: 0x000C8B1C File Offset: 0x000C6D1C [ReliabilityContract(Consistency.MayCorruptAppDomain, Cer.MayFail)] public static void Unload(AppDomain domain) { if (domain == null) { throw new ArgumentNullException("domain"); } AppDomain.InternalUnload(domain.getDomainID()); } /// Assigns the specified value to the specified application domain property. /// The name of a user-defined application domain property to create or change. /// The value of the property. /// The operation is attempted on an unloaded application domain. /// 2 /// /// /// // Token: 0x06003AA8 RID: 15016 [MethodImpl(MethodImplOptions.InternalCall)] public extern void SetData(string name, object data); /// Assigns the specified value to the specified application domain property, with a specified permission to demand of the caller when the property is retrieved. /// The name of a user-defined application domain property to create or change. /// The value of the property. /// The permission to demand of the caller when the property is retrieved. /// /// is null. /// /// specifies a system-defined property string and is not null. // Token: 0x06003AA9 RID: 15017 RVA: 0x000C8B3C File Offset: 0x000C6D3C [MonoTODO] public void SetData(string name, object data, IPermission permission) { throw new NotImplementedException(); } /// Gets the current thread identifier. /// A 32-bit signed integer that is the identifier of the current thread. /// 1 /// /// /// // Token: 0x06003AAA RID: 15018 RVA: 0x000C8B44 File Offset: 0x000C6D44 [Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.'")] public static int GetCurrentThreadId() { return Thread.CurrentThreadId; } /// Obtains a string representation that includes the friendly name of the application domain and any context policies. /// A string formed by concatenating the literal string "Name:", the friendly name of the application domain, and either string representations of the context policies or the string "There are no context policies." /// The application domain represented by the current has been unloaded. /// 2 // Token: 0x06003AAB RID: 15019 RVA: 0x000C8B4C File Offset: 0x000C6D4C public override string ToString() { return this.getFriendlyName(); } // Token: 0x06003AAC RID: 15020 RVA: 0x000C8B54 File Offset: 0x000C6D54 private static void ValidateAssemblyName(string name) { if (name == null || name.Length == 0) { throw new ArgumentException("The Name of AssemblyName cannot be null or a zero-length string."); } bool flag = true; for (int i = 0; i < name.Length; i++) { char c = name[i]; if (i == 0 && char.IsWhiteSpace(c)) { flag = false; break; } if (c == '/' || c == '\\' || c == ':') { flag = false; break; } } if (!flag) { throw new ArgumentException("The Name of AssemblyName cannot start with whitespace, or contain '/', '\\' or ':'."); } } // Token: 0x06003AAD RID: 15021 RVA: 0x000C8BE8 File Offset: 0x000C6DE8 private void DoAssemblyLoad(Assembly assembly) { if (this.AssemblyLoad == null) { return; } this.AssemblyLoad(this, new AssemblyLoadEventArgs(assembly)); } // Token: 0x06003AAE RID: 15022 RVA: 0x000C8C08 File Offset: 0x000C6E08 private Assembly DoAssemblyResolve(string name, bool refonly) { ResolveEventHandler assemblyResolve = this.AssemblyResolve; if (assemblyResolve == null) { return null; } Hashtable hashtable; if (refonly) { hashtable = AppDomain.assembly_resolve_in_progress_refonly; if (hashtable == null) { hashtable = new Hashtable(); AppDomain.assembly_resolve_in_progress_refonly = hashtable; } } else { hashtable = AppDomain.assembly_resolve_in_progress; if (hashtable == null) { hashtable = new Hashtable(); AppDomain.assembly_resolve_in_progress = hashtable; } } string text = (string)hashtable[name]; if (text != null) { return null; } hashtable[name] = name; Assembly assembly2; try { Delegate[] invocationList = assemblyResolve.GetInvocationList(); foreach (Delegate @delegate in invocationList) { ResolveEventHandler resolveEventHandler = (ResolveEventHandler)@delegate; Assembly assembly = resolveEventHandler(this, new ResolveEventArgs(name)); if (assembly != null) { return assembly; } } assembly2 = null; } finally { hashtable.Remove(name); } return assembly2; } // Token: 0x06003AAF RID: 15023 RVA: 0x000C8D04 File Offset: 0x000C6F04 internal Assembly DoTypeResolve(object name_or_tb) { if (this.TypeResolve == null) { return null; } string text; if (name_or_tb is TypeBuilder) { text = ((TypeBuilder)name_or_tb).FullName; } else { text = (string)name_or_tb; } Hashtable hashtable = AppDomain.type_resolve_in_progress; if (hashtable == null) { hashtable = new Hashtable(); AppDomain.type_resolve_in_progress = hashtable; } if (hashtable.Contains(text)) { return null; } hashtable[text] = text; Assembly assembly2; try { foreach (Delegate @delegate in this.TypeResolve.GetInvocationList()) { ResolveEventHandler resolveEventHandler = (ResolveEventHandler)@delegate; Assembly assembly = resolveEventHandler(this, new ResolveEventArgs(text)); if (assembly != null) { return assembly; } } assembly2 = null; } finally { hashtable.Remove(text); } return assembly2; } // Token: 0x06003AB0 RID: 15024 RVA: 0x000C8DF4 File Offset: 0x000C6FF4 private void DoDomainUnload() { if (this.DomainUnload != null) { this.DomainUnload(this, null); } } // Token: 0x06003AB1 RID: 15025 RVA: 0x000C8E10 File Offset: 0x000C7010 internal void ProcessMessageInDomain(byte[] arrRequest, CADMethodCallMessage cadMsg, out byte[] arrResponse, out CADMethodReturnMessage cadMrm) { IMessage message; if (arrRequest != null) { message = CADSerializer.DeserializeMessage(new MemoryStream(arrRequest), null); } else { message = new MethodCall(cadMsg); } IMessage message2 = ChannelServices.SyncDispatchMessage(message); cadMrm = CADMethodReturnMessage.Create(message2); if (cadMrm == null) { arrResponse = CADSerializer.SerializeMessage(message2).GetBuffer(); } else { arrResponse = null; } } /// Gets the domain manager that was provided by the host when the application domain was initialized. /// An object that represents the domain manager provided by the host when the application domain was initialized, or null if no domain manager was provided. /// 2 /// /// /// // Token: 0x17000B2D RID: 2861 // (get) Token: 0x06003AB2 RID: 15026 RVA: 0x000C8E6C File Offset: 0x000C706C public AppDomainManager DomainManager { get { return this._domain_manager; } } /// Gets the activation context for the current application domain. /// An object that represents the activation context for the current application domain, or null if the domain has no activation context. /// 1 // Token: 0x17000B2E RID: 2862 // (get) Token: 0x06003AB3 RID: 15027 RVA: 0x000C8E74 File Offset: 0x000C7074 public ActivationContext ActivationContext { get { return this._activation; } } /// Gets the identity of the application in the application domain. /// An object identifying the application in the application domain. // Token: 0x17000B2F RID: 2863 // (get) Token: 0x06003AB4 RID: 15028 RVA: 0x000C8E7C File Offset: 0x000C707C public ApplicationIdentity ApplicationIdentity { get { return this._applicationIdentity; } } /// Gets an integer that uniquely identifies the application domain within the process. /// An integer that identifies the application domain. /// 2 // Token: 0x17000B30 RID: 2864 // (get) Token: 0x06003AB5 RID: 15029 RVA: 0x000C8E84 File Offset: 0x000C7084 public int Id { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get { return this.getDomainID(); } } /// Returns the assembly display name after policy has been applied. /// A string containing the assembly display name after policy has been applied. /// The assembly display name, in the form provided by the property. /// 1 // Token: 0x06003AB6 RID: 15030 RVA: 0x000C8E8C File Offset: 0x000C708C [ComVisible(false)] [MonoTODO("This routine only returns the parameter currently")] public string ApplyPolicy(string assemblyName) { if (assemblyName == null) { throw new ArgumentNullException("assemblyName"); } if (assemblyName.Length == 0) { throw new ArgumentException("assemblyName"); } return assemblyName; } /// Creates a new application domain with the given name, using evidence, application base path, relative search path, and a parameter that specifies whether a shadow copy of an assembly is to be loaded into the application domain. Specifies a callback method that is invoked when the application domain is initialized, and an array of string arguments to pass the callback method. /// The newly created application domain. /// The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see . /// Evidence mapped through the security policy to establish a top-of-stack permission set. Pass null to use the evidence of the current application domain. /// The base directory that the assembly resolver uses to probe for assemblies. For more information, see . /// The path relative to the base directory where the assembly resolver should probe for private assemblies. For more information, see . /// true to load a shadow copy of an assembly into the application domain. For more information, see and Shadow Copying Assemblies. /// An delegate that represents a callback method to invoke when the new object is initialized. /// An array of string arguments to be passed to the callback represented by , when the new object is initialized. /// /// is null. /// 1 /// /// /// // Token: 0x06003AB7 RID: 15031 RVA: 0x000C8EC4 File Offset: 0x000C70C4 public static AppDomain CreateDomain(string friendlyName, Evidence securityInfo, string appBasePath, string appRelativeSearchPath, bool shadowCopyFiles, AppDomainInitializer adInit, string[] adInitArgs) { AppDomainSetup appDomainSetup = AppDomain.CreateDomainSetup(appBasePath, appRelativeSearchPath, shadowCopyFiles); appDomainSetup.AppDomainInitializerArguments = adInitArgs; appDomainSetup.AppDomainInitializer = adInit; return AppDomain.CreateDomain(friendlyName, securityInfo, appDomainSetup); } /// Executes an assembly given its display name. /// The value returned by the entry point of the assembly. /// The display name of the assembly. See . /// /// is null. /// The assembly specified by is not found. /// The assembly specified by is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// The assembly specified by was found, but could not be loaded. /// The specified assembly has no entry point. /// 2 /// /// /// // Token: 0x06003AB8 RID: 15032 RVA: 0x000C8EF4 File Offset: 0x000C70F4 public int ExecuteAssemblyByName(string assemblyName) { return this.ExecuteAssemblyByName(assemblyName, null, null); } /// Executes an assembly given its display name, using the specified evidence. /// The value returned by the entry point of the assembly. /// The display name of the assembly. See . /// Evidence for loading the assembly. /// /// is null. /// The assembly specified by is not found. /// The assembly specified by was found, but could not be loaded. /// The assembly specified by is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// The specified assembly has no entry point. /// 2 /// /// /// // Token: 0x06003AB9 RID: 15033 RVA: 0x000C8F00 File Offset: 0x000C7100 public int ExecuteAssemblyByName(string assemblyName, Evidence assemblySecurity) { return this.ExecuteAssemblyByName(assemblyName, assemblySecurity, null); } /// Executes the assembly given its display name, using the specified evidence and arguments. /// The value returned by the entry point of the assembly. /// The display name of the assembly. See . /// Evidence for loading the assembly. /// Command-line arguments to pass when starting the process. /// /// is null. /// The assembly specified by is not found. /// The assembly specified by was found, but could not be loaded. /// The assembly specified by is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// The specified assembly has no entry point. /// 2 /// /// /// // Token: 0x06003ABA RID: 15034 RVA: 0x000C8F0C File Offset: 0x000C710C public int ExecuteAssemblyByName(string assemblyName, Evidence assemblySecurity, params string[] args) { Assembly assembly = Assembly.Load(assemblyName, assemblySecurity); return this.ExecuteAssemblyInternal(assembly, args); } /// Executes the assembly given an , using the specified evidence and arguments. /// The value returned by the entry point of the assembly. /// An object representing the name of the assembly. /// Evidence for loading the assembly. /// Command-line arguments to pass when starting the process. /// The assembly specified by is not found. /// The assembly specified by was found, but could not be loaded. /// The assembly specified by is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. /// The operation is attempted on an unloaded application domain. /// The specified assembly has no entry point. /// 2 /// /// /// // Token: 0x06003ABB RID: 15035 RVA: 0x000C8F2C File Offset: 0x000C712C public int ExecuteAssemblyByName(AssemblyName assemblyName, Evidence assemblySecurity, params string[] args) { Assembly assembly = Assembly.Load(assemblyName, assemblySecurity); return this.ExecuteAssemblyInternal(assembly, args); } /// Returns a value that indicates whether the application domain is the default application domain for the process. /// true if the current object represents the default application domain for the process; otherwise, false. /// 1 // Token: 0x06003ABC RID: 15036 RVA: 0x000C8F4C File Offset: 0x000C714C public bool IsDefaultAppDomain() { return object.ReferenceEquals(this, AppDomain.DefaultDomain); } /// Returns the assemblies that have been loaded into the reflection-only context of the application domain. /// An array of objects that represent the assemblies loaded into the reflection-only context of the application domain. /// An operation is attempted on an unloaded application domain. /// 2 // Token: 0x06003ABD RID: 15037 RVA: 0x000C8F5C File Offset: 0x000C715C public Assembly[] ReflectionOnlyGetAssemblies() { return this.GetAssemblies(true); } // Token: 0x0400176B RID: 5995 private IntPtr _mono_app_domain; // Token: 0x0400176C RID: 5996 private static string _process_guid; // Token: 0x0400176D RID: 5997 [ThreadStatic] private static Hashtable type_resolve_in_progress; // Token: 0x0400176E RID: 5998 [ThreadStatic] private static Hashtable assembly_resolve_in_progress; // Token: 0x0400176F RID: 5999 [ThreadStatic] private static Hashtable assembly_resolve_in_progress_refonly; // Token: 0x04001770 RID: 6000 private Evidence _evidence; // Token: 0x04001771 RID: 6001 private PermissionSet _granted; // Token: 0x04001772 RID: 6002 private PrincipalPolicy _principalPolicy; // Token: 0x04001773 RID: 6003 [ThreadStatic] private static IPrincipal _principal; // Token: 0x04001774 RID: 6004 private static AppDomain default_domain; // Token: 0x04001775 RID: 6005 private AppDomainManager _domain_manager; // Token: 0x04001776 RID: 6006 private ActivationContext _activation; // Token: 0x04001777 RID: 6007 private ApplicationIdentity _applicationIdentity; } }