Files
Dec2017-Script-Dump/mscorlib/System/AppDomain.cs
T
2026-06-04 11:42:34 +02:00

2353 lines
147 KiB
C#

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
{
/// <summary>Represents an application domain, which is an isolated environment where applications execute. This class cannot be inherited.</summary>
/// <filterpriority>1</filterpriority>
// 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()
{
}
/// <summary>Occurs when an assembly is loaded.</summary>
/// <filterpriority>2</filterpriority>
// 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;
/// <summary>Occurs when the resolution of an assembly fails.</summary>
/// <filterpriority>2</filterpriority>
// 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;
/// <summary>Occurs when an <see cref="T:System.AppDomain" /> is about to be unloaded.</summary>
/// <filterpriority>2</filterpriority>
// 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;
/// <summary>Occurs when the default application domain's parent process exits.</summary>
/// <filterpriority>2</filterpriority>
// 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;
/// <summary>Occurs when the resolution of a resource fails because the resource is not a valid linked or embedded resource in the assembly.</summary>
/// <filterpriority>2</filterpriority>
// 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;
/// <summary>Occurs when the resolution of a type fails.</summary>
/// <filterpriority>2</filterpriority>
// 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;
/// <summary>Occurs when an exception is not caught.</summary>
/// <filterpriority>2</filterpriority>
// 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;
/// <summary>Occurs when the resolution of an assembly fails in the reflection-only context.</summary>
// 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();
}
}
/// <summary>Gets the application domain configuration information for this instance.</summary>
/// <returns>The application domain initialization information.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
// 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);
}
}
/// <summary>Gets the base directory that the assembly resolver uses to probe for assemblies.</summary>
/// <returns>The base directory that the assembly resolver uses to probe for assemblies.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// 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;
}
}
/// <summary>Gets the path under the base directory where the assembly resolver should probe for private assemblies.</summary>
/// <returns>The path under the base directory where the assembly resolver should probe for private assemblies.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// 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;
}
}
/// <summary>Gets the directory that the assembly resolver uses to probe for dynamically created assemblies.</summary>
/// <returns>The directory that the assembly resolver uses to probe for dynamically created assemblies.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// 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;
}
}
/// <summary>Gets an indication whether the application domain is configured to shadow copy files.</summary>
/// <returns>true if the application domain is configured to shadow copy files; otherwise, false.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
// 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();
/// <summary>Gets the friendly name of this application domain.</summary>
/// <returns>The friendly name of this application domain.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B27 RID: 2855
// (get) Token: 0x06003A50 RID: 14928 RVA: 0x000C7DB8 File Offset: 0x000C5FB8
public string FriendlyName
{
get
{
return this.getFriendlyName();
}
}
/// <summary>Gets the <see cref="T:System.Security.Policy.Evidence" /> associated with this application domain that is used as input to the security policy.</summary>
/// <returns>Gets the <see cref="T:System.Security.Policy.Evidence" /> associated with this application domain that is used as input to the security policy.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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();
/// <summary>Gets the current application domain for the current <see cref="T:System.Threading.Thread" />.</summary>
/// <returns>The current application domain.</returns>
/// <filterpriority>1</filterpriority>
// 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;
}
}
/// <summary>Appends the specified directory name to the private path list.</summary>
/// <param name="path">The name of the directory to be appended to the private path. </param>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlAppDomain" />
/// </PermissionSet>
// 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;
}
/// <summary>Resets the path that specifies the location of private assemblies to the empty string ("").</summary>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlAppDomain" />
/// </PermissionSet>
// 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;
}
/// <summary>Resets the list of directories containing shadow copied assemblies to the empty string ("").</summary>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlAppDomain" />
/// </PermissionSet>
// Token: 0x06003A5A RID: 14938 RVA: 0x000C7FB8 File Offset: 0x000C61B8
[Obsolete("Use AppDomainSetup.ShadowCopyDirectories")]
public void ClearShadowCopyPath()
{
this.SetupInformationNoCopy.ShadowCopyDirectories = string.Empty;
}
/// <summary>Creates a new instance of the specified type defined in the specified assembly.</summary>
/// <returns>An object that is a wrapper for the new instance specified by <paramref name="typeName" />. The return value needs to be unwrapped to access the real object.</returns>
/// <param name="assemblyName">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> or <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences.</exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyName" /> was not found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have permission to call this constructor. </exception>
/// <exception cref="T:System.MissingMethodException">No matching public constructor was found. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typename" /> was not found in <paramref name="assemblyName" />. </exception>
/// <exception cref="T:System.NullReferenceException">This instance is null.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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);
}
/// <summary>Creates a new instance of the specified type defined in the specified assembly. A parameter specifies an array of activation attributes.</summary>
/// <returns>An object that is a wrapper for the new instance specified by <paramref name="typeName" />. The return value needs to be unwrapped to access the real object.</returns>
/// <param name="assemblyName">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <param name="activationAttributes">An array of one or more attributes that can participate in activation. Typically, an array that contains a single <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> object. The <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> specifies the URL that is required to activate a remote object. </param>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> or <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences.</exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyName" /> was not found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have permission to call this constructor. </exception>
/// <exception cref="T:System.MissingMethodException">No matching public constructor was found. </exception>
/// <exception cref="T:System.NotSupportedException">The caller cannot provide activation attributes for an object that does not inherit from <see cref="T:System.MarshalByRefObject" />. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typename" /> was not found in <paramref name="assemblyName" />. </exception>
/// <exception cref="T:System.NullReferenceException">This instance is null.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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);
}
/// <summary>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.</summary>
/// <returns>An object that is a wrapper for the new instance specified by <paramref name="typeName" />. The return value needs to be unwrapped to access the real object.</returns>
/// <param name="assemblyName">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <param name="ignoreCase">A Boolean value specifying whether to perform a case-sensitive search or not. </param>
/// <param name="bindingAttr">A combination of zero or more bit flags that affect the search for the <paramref name="typeName" /> constructor. If <paramref name="bindingAttr" /> is zero, a case-sensitive search for public constructors is conducted. </param>
/// <param name="binder">An object that enables the binding, coercion of argument types, invocation of members, and retrieval of <see cref="T:System.Reflection.MemberInfo" /> objects using reflection. If <paramref name="binder" /> is null, the default binder is used. </param>
/// <param name="args">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, <paramref name="args" /> must be an empty array or null. </param>
/// <param name="culture">Culture-specific information that governs the coercion of <paramref name="args" /> to the formal types declared for the <paramref name="typeName" /> constructor. If <paramref name="culture" /> is null, the <see cref="T:System.Globalization.CultureInfo" /> for the current thread is used. </param>
/// <param name="activationAttributes">An array of one or more attributes that can participate in activation. Typically, an array that contains a single <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> object. The <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> specifies the URL that is required to activate a remote object. </param>
/// <param name="securityAttributes">Information used to authorize creation of <paramref name="typeName" />. </param>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> or <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences.</exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyName" /> was not found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have permission to call this constructor. </exception>
/// <exception cref="T:System.MissingMethodException">No matching constructor was found. </exception>
/// <exception cref="T:System.NotSupportedException">The caller cannot provide activation attributes for an object that does not inherit from <see cref="T:System.MarshalByRefObject" />. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typename" /> was not found in <paramref name="assemblyName" />. </exception>
/// <exception cref="T:System.NullReferenceException">This instance is null.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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);
}
/// <summary>Creates a new instance of the specified type. Parameters specify the assembly where the type is defined, and the name of the type.</summary>
/// <returns>An instance of the object specified by <paramref name="typeName" />.</returns>
/// <param name="assemblyName">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> or <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.MissingMethodException">No matching public constructor was found. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typename" /> was not found in <paramref name="assemblyName" />. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyName" /> was not found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have permission to call this constructor. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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();
}
/// <summary>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.</summary>
/// <returns>An instance of the object specified by <paramref name="typeName" />.</returns>
/// <param name="assemblyName">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <param name="activationAttributes">An array of one or more attributes that can participate in activation. Typically, an array that contains a single <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> object. The <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> specifies the URL that is required to activate a remote object. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> or <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.MissingMethodException">No matching public constructor was found. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typename" /> was not found in <paramref name="assemblyName" />. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyName" /> was not found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have permission to call this constructor. </exception>
/// <exception cref="T:System.NotSupportedException">The caller cannot provide activation attributes for an object that does not inherit from <see cref="T:System.MarshalByRefObject" />. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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();
}
/// <summary>Creates a new instance of the specified type. Parameters specify the name of the type, and how it is found and created.</summary>
/// <returns>An instance of the object specified by <paramref name="typeName" />.</returns>
/// <param name="assemblyName">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <param name="ignoreCase">A Boolean value specifying whether to perform a case-sensitive search or not. </param>
/// <param name="bindingAttr">A combination of zero or more bit flags that affect the search for the <paramref name="typeName" /> constructor. If <paramref name="bindingAttr" /> is zero, a case-sensitive search for public constructors is conducted. </param>
/// <param name="binder">An object that enables the binding, coercion of argument types, invocation of members, and retrieval of <see cref="T:System.Reflection.MemberInfo" /> objects using reflection. If <paramref name="binder" /> is null, the default binder is used. </param>
/// <param name="args">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, <paramref name="args" /> must be an empty array or null. </param>
/// <param name="culture">A culture-specific object used to govern the coercion of types. If <paramref name="culture" /> is null, the CultureInfo for the current thread is used. </param>
/// <param name="activationAttributes">An array of one or more attributes that can participate in activation. Typically, an array that contains a single <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> object. The <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> specifies the URL that is required to activate a remote object. </param>
/// <param name="securityAttributes">Information used to authorize creation of <paramref name="typeName" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> or <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.MissingMethodException">No matching constructor was found. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typename" /> was not found in <paramref name="assemblyName" />. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyName" /> was not found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have permission to call this constructor. </exception>
/// <exception cref="T:System.NotSupportedException">The caller cannot provide activation attributes for an object that does not inherit from <see cref="T:System.MarshalByRefObject" />. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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();
}
/// <summary>Creates a new instance of the specified type defined in the specified assembly file.</summary>
/// <returns>An object that is a wrapper for the new instance, or null if <paramref name="typeName" /> is not found. The return value needs to be unwrapped to access the real object.</returns>
/// <param name="assemblyFile">The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the <see cref="M:System.Reflection.Assembly.LoadFrom(System.String)" /> method.</param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyFile" /> is null.-or- <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyFile" /> was not found. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typeName" /> was not found in <paramref name="assemblyFile" />. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.MissingMethodException">No parameterless public constructor was found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have sufficient permission to call this constructor. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyFile" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyFile" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <exception cref="T:System.NullReferenceException">This instance is null.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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);
}
/// <summary>Creates a new instance of the specified type defined in the specified assembly file.</summary>
/// <returns>An object that is a wrapper for the new instance, or null if <paramref name="typeName" /> is not found. The return value needs to be unwrapped to access the real object.</returns>
/// <param name="assemblyFile">The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the <see cref="M:System.Reflection.Assembly.LoadFrom(System.String)" /> method. </param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <param name="activationAttributes">An array of one or more attributes that can participate in activation. Typically, an array that contains a single <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> object. The <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> specifies the URL that is required to activate a remote object. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyFile" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyFile" /> was not found. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typeName" /> was not found in <paramref name="assemblyFile" />. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have sufficient permission to call this constructor. </exception>
/// <exception cref="T:System.MissingMethodException">No matching public constructor was found. </exception>
/// <exception cref="T:System.NotSupportedException">The caller cannot provide activation attributes for an object that does not inherit from <see cref="T:System.MarshalByRefObject" />. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyFile" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyFile" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <exception cref="T:System.NullReferenceException">This instance is null.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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);
}
/// <summary>Creates a new instance of the specified type defined in the specified assembly file.</summary>
/// <returns>An object that is a wrapper for the new instance, or null if <paramref name="typeName" /> is not found. The return value needs to be unwrapped to access the real object.</returns>
/// <param name="assemblyFile">The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the <see cref="M:System.Reflection.Assembly.LoadFrom(System.String)" /> method.</param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <param name="ignoreCase">A Boolean value specifying whether to perform a case-sensitive search or not. </param>
/// <param name="bindingAttr">A combination of zero or more bit flags that affect the search for the <paramref name="typeName" /> constructor. If <paramref name="bindingAttr" /> is zero, a case-sensitive search for public constructors is conducted. </param>
/// <param name="binder">An object that enables the binding, coercion of argument types, invocation of members, and retrieval of <see cref="T:System.Reflection.MemberInfo" /> objects through reflection. If <paramref name="binder" /> is null, the default binder is used. </param>
/// <param name="args">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, <paramref name="args" /> must be an empty array or null. </param>
/// <param name="culture">Culture-specific information that governs the coercion of <paramref name="args" /> to the formal types declared for the <paramref name="typeName" /> constructor. If <paramref name="culture" /> is null, the <see cref="T:System.Globalization.CultureInfo" /> for the current thread is used. </param>
/// <param name="activationAttributes">An array of one or more attributes that can participate in activation. Typically, an array that contains a single <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> object. The <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> specifies the URL that is required to activate a remote object. </param>
/// <param name="securityAttributes">Information used to authorize creation of <paramref name="typeName" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyFile" /> is null.-or- <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.NotSupportedException">The caller cannot provide activation attributes for an object that does not inherit from <see cref="T:System.MarshalByRefObject" />. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyFile" /> was not found.</exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typeName" /> was not found in <paramref name="assemblyFile" />. </exception>
/// <exception cref="T:System.MissingMethodException">No parameterless public constructor was found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have sufficient permission to call this constructor. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyFile" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyFile" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <exception cref="T:System.NullReferenceException">This instance is null.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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);
}
/// <summary>Creates a new instance of the specified type defined in the specified assembly file.</summary>
/// <returns>The requested object, or null if <paramref name="typeName" /> is not found.</returns>
/// <param name="assemblyName">The file name and path of the assembly that defines the requested type. </param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> is null.-or- <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyName" /> was not found. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typeName" /> was not found in <paramref name="assemblyName" />. </exception>
/// <exception cref="T:System.MissingMethodException">No parameterless public constructor was found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have sufficient permission to call this constructor. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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();
}
/// <summary>Creates a new instance of the specified type defined in the specified assembly file.</summary>
/// <returns>The requested object, or null if <paramref name="typeName" /> is not found.</returns>
/// <param name="assemblyName">The file name and path of the assembly that defines the requested type. </param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly (see the <see cref="P:System.Type.FullName" /> property). </param>
/// <param name="activationAttributes">An array of one or more attributes that can participate in activation. Typically, an array that contains a single <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> object. The <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> specifies the URL that is required to activate a remote object. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> is null.-or- <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.NotSupportedException">The caller cannot provide activation attributes for an object that does not inherit from <see cref="T:System.MarshalByRefObject" />. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyName" /> was not found. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typeName" /> was not found in <paramref name="assemblyName" />. </exception>
/// <exception cref="T:System.MissingMethodException">No parameterless public constructor was found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have sufficient permission to call this constructor. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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();
}
/// <summary>Creates a new instance of the specified type defined in the specified assembly file.</summary>
/// <returns>The requested object, or null if <paramref name="typeName" /> is not found.</returns>
/// <param name="assemblyName">The file name and path of the assembly that defines the requested type. </param>
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the <see cref="P:System.Type.FullName" /> property. </param>
/// <param name="ignoreCase">A Boolean value specifying whether to perform a case-sensitive search or not. </param>
/// <param name="bindingAttr">A combination of zero or more bit flags that affect the search for the <paramref name="typeName" /> constructor. If <paramref name="bindingAttr" /> is zero, a case-sensitive search for public constructors is conducted. </param>
/// <param name="binder">An object that enables the binding, coercion of argument types, invocation of members, and retrieval of <see cref="T:System.Reflection.MemberInfo" /> objects through reflection. If <paramref name="binder" /> is null, the default binder is used. </param>
/// <param name="args">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, <paramref name="args" /> must be an empty array or null. </param>
/// <param name="culture">Culture-specific information that governs the coercion of <paramref name="args" /> to the formal types declared for the <paramref name="typeName" /> constructor. If <paramref name="culture" /> is null, the <see cref="T:System.Globalization.CultureInfo" /> for the current thread is used. </param>
/// <param name="activationAttributes">An array of one or more attributes that can participate in activation. Typically, an array that contains a single <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> object. The <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> specifies the URL that is required to activate a remote object. </param>
/// <param name="securityAttributes">Information used to authorize creation of <paramref name="typeName" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> is null.-or- <paramref name="typeName" /> is null. </exception>
/// <exception cref="T:System.NotSupportedException">The caller cannot provide activation attributes for an object that does not inherit from <see cref="T:System.MarshalByRefObject" />. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyName" /> was not found. </exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="typeName" /> was not found in <paramref name="assemblyName" />. </exception>
/// <exception cref="T:System.MissingMethodException">No parameterless public constructor was found. </exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have sufficient permission to call this constructor. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// 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();
}
/// <summary>Defines a dynamic assembly with the specified name and access mode.</summary>
/// <returns>Represents the dynamic assembly created.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The access mode for the dynamic assembly. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> begins with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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);
}
/// <summary>Defines a dynamic assembly using the specified name, access mode, and evidence.</summary>
/// <returns>Represents the dynamic assembly created.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The mode in which the dynamic assembly will be accessed. </param>
/// <param name="evidence">The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> begins with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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);
}
/// <summary>Defines a dynamic assembly using the specified name, access mode, and storage directory.</summary>
/// <returns>Represents the dynamic assembly created.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The mode in which the dynamic assembly will be accessed. </param>
/// <param name="dir">The name of the directory where the assembly will be saved. If <paramref name="dir" /> is null, the directory defaults to the current directory. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> begins with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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);
}
/// <summary>Defines a dynamic assembly using the specified name, access mode, storage directory, and evidence.</summary>
/// <returns>Represents the dynamic assembly created.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The mode in which the dynamic assembly will be accessed. </param>
/// <param name="dir">The name of the directory where the assembly will be saved. If <paramref name="dir" /> is null, the directory defaults to the current directory. </param>
/// <param name="evidence">The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> begins with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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);
}
/// <summary>Defines a dynamic assembly using the specified name, access mode, and permission requests.</summary>
/// <returns>Represents the dynamic assembly created.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The mode in which the dynamic assembly will be accessed. </param>
/// <param name="requiredPermissions">The required permissions request. </param>
/// <param name="optionalPermissions">The optional permissions request. </param>
/// <param name="refusedPermissions">The refused permissions request. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> begins with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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);
}
/// <summary>Defines a dynamic assembly using the specified name, access mode, evidence, and permission requests.</summary>
/// <returns>Represents the dynamic assembly created.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The mode in which the dynamic assembly will be accessed. </param>
/// <param name="evidence">The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. </param>
/// <param name="requiredPermissions">The required permissions request. </param>
/// <param name="optionalPermissions">The optional permissions request. </param>
/// <param name="refusedPermissions">The refused permissions request. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> begins with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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);
}
/// <summary>Defines a dynamic assembly using the specified name, access mode, storage directory, and permission requests.</summary>
/// <returns>Represents the dynamic assembly created.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The mode in which the dynamic assembly will be accessed. </param>
/// <param name="dir">The name of the directory where the assembly will be saved. If <paramref name="dir" /> is null, the directory defaults to the current directory. </param>
/// <param name="requiredPermissions">The required permissions request. </param>
/// <param name="optionalPermissions">The optional permissions request. </param>
/// <param name="refusedPermissions">The refused permissions request. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> begins with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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);
}
/// <summary>Defines a dynamic assembly using the specified name, access mode, storage directory, evidence, and permission requests.</summary>
/// <returns>Represents the dynamic assembly created.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The mode in which the dynamic assembly will be accessed. </param>
/// <param name="dir">The name of the directory where the assembly will be saved. If <paramref name="dir" /> is null, the directory defaults to the current directory. </param>
/// <param name="evidence">The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. </param>
/// <param name="requiredPermissions">The required permissions request. </param>
/// <param name="optionalPermissions">The optional permissions request. </param>
/// <param name="refusedPermissions">The refused permissions request. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> begins with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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);
}
/// <summary>Defines a dynamic assembly using the specified name, access mode, storage directory, evidence, permission requests, and synchronization option.</summary>
/// <returns>Represents the dynamic assembly created.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The mode in which the dynamic assembly will be accessed. </param>
/// <param name="dir">The name of the directory where the dynamic assembly will be saved. If <paramref name="dir" /> is null, the directory defaults to the current directory. </param>
/// <param name="evidence">The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. </param>
/// <param name="requiredPermissions">The required permissions request. </param>
/// <param name="optionalPermissions">The optional permissions request. </param>
/// <param name="refusedPermissions">The refused permissions request. </param>
/// <param name="isSynchronized">true to synchronize the creation of modules, types, and members in the dynamic assembly; otherwise, false. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> begins with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// 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;
}
/// <summary>Defines a dynamic assembly with the specified name, access mode, storage directory, evidence, permission requests, synchronization option, and custom attributes.</summary>
/// <returns>An <see cref="T:System.Reflection.Emit.AssemblyBuilder" /> object that represents the new dynamic assembly.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The mode in which the dynamic assembly will be accessed. </param>
/// <param name="dir">The name of the directory where the dynamic assembly will be saved. If <paramref name="dir" /> is null, the current directory is used. </param>
/// <param name="evidence">The evidence that is supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. </param>
/// <param name="requiredPermissions">The required permissions request. </param>
/// <param name="optionalPermissions">The optional permissions request. </param>
/// <param name="refusedPermissions">The refused permissions request. </param>
/// <param name="isSynchronized">true to synchronize the creation of modules, types, and members in the dynamic assembly; otherwise, false. </param>
/// <param name="assemblyAttributes">An enumerable list of attributes to be applied to the assembly, or null if there are no attributes.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> starts with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
// 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<CustomAttributeBuilder> 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;
}
/// <summary>Defines a dynamic assembly with the specified name, access mode, and custom attributes.</summary>
/// <returns>An <see cref="T:System.Reflection.Emit.AssemblyBuilder" /> object that represents the new dynamic assembly.</returns>
/// <param name="name">The unique identity of the dynamic assembly. </param>
/// <param name="access">The access mode for the dynamic assembly. </param>
/// <param name="assemblyAttributes">An enumerable list of attributes to be applied to the assembly, or null if there are no attributes.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">The Name property of <paramref name="name" /> is null.-or- The Name property of <paramref name="name" /> starts with white space, or contains a forward or backward slash. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
// Token: 0x06003A71 RID: 14961 RVA: 0x000C8368 File Offset: 0x000C6568
public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, IEnumerable<CustomAttributeBuilder> 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);
}
/// <summary>Executes the code in another application domain that is identified by the specified delegate.</summary>
/// <param name="callBackDelegate">A delegate that specifies a method to call. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="callBackDelegate" /> is null.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x06003A73 RID: 14963 RVA: 0x000C8390 File Offset: 0x000C6590
public void DoCallBack(CrossAppDomainDelegate callBackDelegate)
{
if (callBackDelegate != null)
{
callBackDelegate();
}
}
/// <summary>Executes the assembly contained in the specified file.</summary>
/// <returns>The value returned by the entry point of the assembly.</returns>
/// <param name="assemblyFile">The name of the file that contains the assembly to execute. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyFile" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyFile" /> is not found. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyFile" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyFile" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <exception cref="T:System.MissingMethodException">The specified assembly has no entry point.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x06003A74 RID: 14964 RVA: 0x000C83A0 File Offset: 0x000C65A0
public int ExecuteAssembly(string assemblyFile)
{
return this.ExecuteAssembly(assemblyFile, null, null);
}
/// <summary>Executes the assembly contained in the specified file, using the specified evidence.</summary>
/// <returns>The value returned by the entry point of the assembly.</returns>
/// <param name="assemblyFile">The name of the file that contains the assembly to execute. </param>
/// <param name="assemblySecurity">Evidence for loading the assembly. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyFile" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyFile" /> is not found. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyFile" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyFile" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <exception cref="T:System.MissingMethodException">The specified assembly has no entry point.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x06003A75 RID: 14965 RVA: 0x000C83AC File Offset: 0x000C65AC
public int ExecuteAssembly(string assemblyFile, Evidence assemblySecurity)
{
return this.ExecuteAssembly(assemblyFile, assemblySecurity, null);
}
/// <summary>Executes the assembly contained in the specified file, using the specified evidence and arguments.</summary>
/// <returns>The value returned by the entry point of the assembly.</returns>
/// <param name="assemblyFile">The name of the file that contains the assembly to execute. </param>
/// <param name="assemblySecurity">The supplied evidence for the assembly. </param>
/// <param name="args">The arguments to the entry point of the assembly. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyFile" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyFile" /> is not found. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyFile" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyFile" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <exception cref="T:System.MissingMethodException">The specified assembly has no entry point.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// 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);
}
/// <summary>Executes the assembly contained in the specified file, using the specified evidence and arguments.</summary>
/// <returns>The value returned by the entry point of the assembly.</returns>
/// <param name="assemblyFile">The name of the file that contains the assembly to execute. </param>
/// <param name="assemblySecurity">The supplied evidence for the assembly. </param>
/// <param name="args">The arguments to the entry point of the assembly. </param>
/// <param name="hashValue">Represents the value of the computed hash code. </param>
/// <param name="hashAlgorithm">Represents the hash algorithm used by the assembly manifest. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyFile" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyFile" /> is not found. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyFile" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyFile" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <exception cref="T:System.MissingMethodException">The specified assembly has no entry point.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// 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);
/// <summary>Gets the assemblies that have been loaded into the execution context of this application domain.</summary>
/// <returns>An array of assemblies in this application domain.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x06003A7B RID: 14971 RVA: 0x000C8438 File Offset: 0x000C6638
public Assembly[] GetAssemblies()
{
return this.GetAssemblies(false);
}
/// <summary>Gets the value stored in the current application domain for the specified name.</summary>
/// <returns>The value of the <paramref name="name" /> property, or null if the property does not exist.</returns>
/// <param name="name">The name of a predefined application domain property, or the name of an application domain property you have defined.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06003A7C RID: 14972
[MethodImpl(MethodImplOptions.InternalCall)]
public extern object GetData(string name);
/// <summary>Gets the type of the current instance.</summary>
/// <returns>A <see cref="T:System.Type" />.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x06003A7D RID: 14973 RVA: 0x000C8444 File Offset: 0x000C6644
public new Type GetType()
{
return base.GetType();
}
/// <summary>Gives the <see cref="T:System.AppDomain" /> an infinite lifetime by preventing a lease from being created.</summary>
/// <returns>Always null.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
// 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);
/// <summary>Loads an <see cref="T:System.Reflection.Assembly" /> given its <see cref="T:System.Reflection.AssemblyName" />.</summary>
/// <returns>The loaded assembly.</returns>
/// <param name="assemblyRef">An object that describes the assembly to load. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyRef" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyRef" /> is not found. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyRef" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyRef" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// 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;
}
/// <summary>Loads an <see cref="T:System.Reflection.Assembly" /> given its <see cref="T:System.Reflection.AssemblyName" />.</summary>
/// <returns>The loaded assembly.</returns>
/// <param name="assemblyRef">An object that describes the assembly to load. </param>
/// <param name="assemblySecurity">Evidence for loading the assembly. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyRef" /> is null</exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyRef" /> is not found. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyRef" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyRef" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// 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;
}
}
/// <summary>Loads an <see cref="T:System.Reflection.Assembly" /> given its display name.</summary>
/// <returns>The loaded assembly.</returns>
/// <param name="assemblyString">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyString" /> is null</exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyString" /> is not found. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyString" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyString" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x06003A83 RID: 14979 RVA: 0x000C8698 File Offset: 0x000C6898
public Assembly Load(string assemblyString)
{
return this.Load(assemblyString, null, false);
}
/// <summary>Loads an <see cref="T:System.Reflection.Assembly" /> given its display name.</summary>
/// <returns>The loaded assembly.</returns>
/// <param name="assemblyString">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <param name="assemblySecurity">Evidence for loading the assembly. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyString" /> is null</exception>
/// <exception cref="T:System.IO.FileNotFoundException">
/// <paramref name="assemblyString" /> is not found. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="assemblyString" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyString" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// 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;
}
/// <summary>Loads the <see cref="T:System.Reflection.Assembly" /> with a common object file format (COFF) based image containing an emitted <see cref="T:System.Reflection.Assembly" />.</summary>
/// <returns>The loaded assembly.</returns>
/// <param name="rawAssembly">An array of type byte that is a COFF-based image containing an emitted assembly. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rawAssembly" /> is null. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="rawAssembly" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="rawAssembly" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x06003A86 RID: 14982 RVA: 0x000C8700 File Offset: 0x000C6900
public Assembly Load(byte[] rawAssembly)
{
return this.Load(rawAssembly, null, null);
}
/// <summary>Loads the <see cref="T:System.Reflection.Assembly" /> with a common object file format (COFF) based image containing an emitted <see cref="T:System.Reflection.Assembly" />. The raw bytes representing the symbols for the <see cref="T:System.Reflection.Assembly" /> are also loaded.</summary>
/// <returns>The loaded assembly.</returns>
/// <param name="rawAssembly">An array of type byte that is a COFF-based image containing an emitted assembly. </param>
/// <param name="rawSymbolStore">An array of type byte containing the raw bytes representing the symbols for the assembly. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rawAssembly" /> is null. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="rawAssembly" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="rawAssembly" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// 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);
/// <summary>Loads the <see cref="T:System.Reflection.Assembly" /> with a common object file format (COFF) based image containing an emitted <see cref="T:System.Reflection.Assembly" />. The raw bytes representing the symbols for the <see cref="T:System.Reflection.Assembly" /> are also loaded.</summary>
/// <returns>The loaded assembly.</returns>
/// <param name="rawAssembly">An array of type byte that is a COFF-based image containing an emitted assembly. </param>
/// <param name="rawSymbolStore">An array of type byte containing the raw bytes representing the symbols for the assembly. </param>
/// <param name="securityEvidence">Evidence for loading the assembly. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rawAssembly" /> is null. </exception>
/// <exception cref="T:System.BadImageFormatException">
/// <paramref name="rawAssembly" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="rawAssembly" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">An assembly or module was loaded twice with two different evidences. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// 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;
}
/// <summary>Establishes the security policy level for this application domain.</summary>
/// <param name="domainPolicy">The security policy level. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="domainPolicy" /> is null. </exception>
/// <exception cref="T:System.Security.Policy.PolicyException">The security policy level has already been set. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence, ControlDomainPolicy" />
/// </PermissionSet>
// 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;
}
/// <summary>Establishes the specified directory path as the location where assemblies are shadow copied.</summary>
/// <param name="path">The fully qualified path to the shadow copy location. </param>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlAppDomain" />
/// </PermissionSet>
// Token: 0x06003A8C RID: 14988 RVA: 0x000C87BC File Offset: 0x000C69BC
[Obsolete("Use AppDomainSetup.SetCachePath")]
public void SetCachePath(string path)
{
this.SetupInformationNoCopy.CachePath = path;
}
/// <summary>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.</summary>
/// <param name="policy">One of the <see cref="T:System.Security.Principal.PrincipalPolicy" /> values that specifies the type of the principal object to attach to threads. </param>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlPrincipal" />
/// </PermissionSet>
// 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;
}
/// <summary>Turns on shadow copying.</summary>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlAppDomain" />
/// </PermissionSet>
// Token: 0x06003A8E RID: 14990 RVA: 0x000C87EC File Offset: 0x000C69EC
[Obsolete("Use AppDomainSetup.ShadowCopyFiles")]
public void SetShadowCopyFiles()
{
this.SetupInformationNoCopy.ShadowCopyFiles = "true";
}
/// <summary>Establishes the specified directory path as the location of assemblies to be shadow copied.</summary>
/// <param name="path">A list of directory names, where each name is separated by a semicolon. </param>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlAppDomain" />
/// </PermissionSet>
// Token: 0x06003A8F RID: 14991 RVA: 0x000C8800 File Offset: 0x000C6A00
[Obsolete("Use AppDomainSetup.ShadowCopyDirectories")]
public void SetShadowCopyPath(string path)
{
this.SetupInformationNoCopy.ShadowCopyDirectories = path;
}
/// <summary>Sets the default principal object to be attached to threads if they attempt to bind to a principal while executing in this application domain.</summary>
/// <param name="principal">The principal object to attach to threads. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="principal" /> is null. </exception>
/// <exception cref="T:System.Security.Policy.PolicyException">The thread principal has already been set. </exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlPrincipal" />
/// </PermissionSet>
// 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;
}
/// <summary>Creates a new application domain with the specified name.</summary>
/// <returns>The newly created application domain.</returns>
/// <param name="friendlyName">The friendly name of the domain. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="friendlyName" /> is null. </exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence, ControlAppDomain" />
/// </PermissionSet>
// Token: 0x06003A9D RID: 15005 RVA: 0x000C898C File Offset: 0x000C6B8C
public static AppDomain CreateDomain(string friendlyName)
{
return AppDomain.CreateDomain(friendlyName, null, null);
}
/// <summary>Creates a new application domain with the given name using the supplied evidence.</summary>
/// <returns>The newly created application domain.</returns>
/// <param name="friendlyName">The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see <see cref="P:System.AppDomain.FriendlyName" />. </param>
/// <param name="securityInfo">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.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="friendlyName" /> is null. </exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence, ControlAppDomain" />
/// </PermissionSet>
// 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);
/// <summary>Creates a new application domain using the specified name, evidence, and application domain setup information.</summary>
/// <returns>The newly created application domain.</returns>
/// <param name="friendlyName">The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see <see cref="P:System.AppDomain.FriendlyName" />. </param>
/// <param name="securityInfo">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.</param>
/// <param name="info">An object that contains application domain initialization information. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="friendlyName" /> is null. </exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence, ControlAppDomain" />
/// </PermissionSet>
// 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;
}
/// <summary>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.</summary>
/// <returns>The newly created application domain.</returns>
/// <param name="friendlyName">The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see <see cref="P:System.AppDomain.FriendlyName" />. </param>
/// <param name="securityInfo">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.</param>
/// <param name="appBasePath">The base directory that the assembly resolver uses to probe for assemblies. For more information, see <see cref="P:System.AppDomain.BaseDirectory" />. </param>
/// <param name="appRelativeSearchPath">The path relative to the base directory where the assembly resolver should probe for private assemblies. For more information, see <see cref="P:System.AppDomain.RelativeSearchPath" />. </param>
/// <param name="shadowCopyFiles">If true, a shadow copy of an assembly is loaded into this application domain. For more information, see <see cref="P:System.AppDomain.ShadowCopyFiles" /> and Shadow Copying Assemblies.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="friendlyName" /> is null. </exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence, ControlAppDomain" />
/// </PermissionSet>
// 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);
/// <summary>Indicates whether this application domain is unloading, and the objects it contains are being finalized by the common language runtime.</summary>
/// <returns>true if this application domain is unloading and the common language runtime has started invoking finalizers; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
// 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();
}
/// <summary>Unloads the specified application domain.</summary>
/// <param name="domain">An application domain to unload. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="domain" /> is null. </exception>
/// <exception cref="T:System.CannotUnloadAppDomainException">
/// <paramref name="domain" /> could not be unloaded. </exception>
/// <exception cref="T:System.Exception">An error occurred during the unload process.</exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlAppDomain" />
/// </PermissionSet>
// 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());
}
/// <summary>Assigns the specified value to the specified application domain property.</summary>
/// <param name="name">The name of a user-defined application domain property to create or change. </param>
/// <param name="data">The value of the property. </param>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlAppDomain" />
/// </PermissionSet>
// Token: 0x06003AA8 RID: 15016
[MethodImpl(MethodImplOptions.InternalCall)]
public extern void SetData(string name, object data);
/// <summary>Assigns the specified value to the specified application domain property, with a specified permission to demand of the caller when the property is retrieved.</summary>
/// <param name="name">The name of a user-defined application domain property to create or change. </param>
/// <param name="data">The value of the property. </param>
/// <param name="permission">The permission to demand of the caller when the property is retrieved.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null.</exception>
/// <exception cref="T:System.InvalidOperationException">
/// <paramref name="name" /> specifies a system-defined property string and <paramref name="permission" /> is not null.</exception>
// Token: 0x06003AA9 RID: 15017 RVA: 0x000C8B3C File Offset: 0x000C6D3C
[MonoTODO]
public void SetData(string name, object data, IPermission permission)
{
throw new NotImplementedException();
}
/// <summary>Gets the current thread identifier.</summary>
/// <returns>A 32-bit signed integer that is the identifier of the current thread.</returns>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// 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;
}
/// <summary>Obtains a string representation that includes the friendly name of the application domain and any context policies.</summary>
/// <returns>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." </returns>
/// <exception cref="T:System.AppDomainUnloadedException">The application domain represented by the current <see cref="T:System.AppDomain" /> has been unloaded.</exception>
/// <filterpriority>2</filterpriority>
// 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;
}
}
/// <summary>Gets the domain manager that was provided by the host when the application domain was initialized.</summary>
/// <returns>An <see cref="T:System.AppDomainManager" /> object that represents the domain manager provided by the host when the application domain was initialized, or null if no domain manager was provided.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlDomainPolicy" />
/// </PermissionSet>
// Token: 0x17000B2D RID: 2861
// (get) Token: 0x06003AB2 RID: 15026 RVA: 0x000C8E6C File Offset: 0x000C706C
public AppDomainManager DomainManager
{
get
{
return this._domain_manager;
}
}
/// <summary>Gets the activation context for the current application domain.</summary>
/// <returns>An <see cref="T:System.ActivationContext" /> object that represents the activation context for the current application domain, or null if the domain has no activation context.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000B2E RID: 2862
// (get) Token: 0x06003AB3 RID: 15027 RVA: 0x000C8E74 File Offset: 0x000C7074
public ActivationContext ActivationContext
{
get
{
return this._activation;
}
}
/// <summary>Gets the identity of the application in the application domain.</summary>
/// <returns>An <see cref="T:System.ApplicationIdentity" /> object identifying the application in the application domain.</returns>
// Token: 0x17000B2F RID: 2863
// (get) Token: 0x06003AB4 RID: 15028 RVA: 0x000C8E7C File Offset: 0x000C707C
public ApplicationIdentity ApplicationIdentity
{
get
{
return this._applicationIdentity;
}
}
/// <summary>Gets an integer that uniquely identifies the application domain within the process. </summary>
/// <returns>An integer that identifies the application domain.</returns>
/// <filterpriority>2</filterpriority>
// 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();
}
}
/// <summary>Returns the assembly display name after policy has been applied.</summary>
/// <returns>A string containing the assembly display name after policy has been applied.</returns>
/// <param name="assemblyName">The assembly display name, in the form provided by the <see cref="P:System.Reflection.Assembly.FullName" /> property.</param>
/// <filterpriority>1</filterpriority>
// 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;
}
/// <summary>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.</summary>
/// <returns>The newly created application domain.</returns>
/// <param name="friendlyName">The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see <see cref="P:System.AppDomain.FriendlyName" />. </param>
/// <param name="securityInfo">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.</param>
/// <param name="appBasePath">The base directory that the assembly resolver uses to probe for assemblies. For more information, see <see cref="P:System.AppDomain.BaseDirectory" />. </param>
/// <param name="appRelativeSearchPath">The path relative to the base directory where the assembly resolver should probe for private assemblies. For more information, see <see cref="P:System.AppDomain.RelativeSearchPath" />. </param>
/// <param name="shadowCopyFiles">true to load a shadow copy of an assembly into the application domain. For more information, see <see cref="P:System.AppDomain.ShadowCopyFiles" /> and Shadow Copying Assemblies.</param>
/// <param name="adInit">An <see cref="T:System.AppDomainInitializer" /> delegate that represents a callback method to invoke when the new <see cref="T:System.AppDomain" /> object is initialized.</param>
/// <param name="adInitArgs">An array of string arguments to be passed to the callback represented by <paramref name="adInit" />, when the new <see cref="T:System.AppDomain" /> object is initialized.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="friendlyName" /> is null. </exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence, ControlAppDomain" />
/// </PermissionSet>
// 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);
}
/// <summary>Executes an assembly given its display name.</summary>
/// <returns>The value returned by the entry point of the assembly.</returns>
/// <param name="assemblyName">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">The assembly specified by <paramref name="assemblyName" /> is not found. </exception>
/// <exception cref="T:System.BadImageFormatException">The assembly specified by <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.IO.FileLoadException">The assembly specified by <paramref name="assemblyName" /> was found, but could not be loaded.</exception>
/// <exception cref="T:System.MissingMethodException">The specified assembly has no entry point.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x06003AB8 RID: 15032 RVA: 0x000C8EF4 File Offset: 0x000C70F4
public int ExecuteAssemblyByName(string assemblyName)
{
return this.ExecuteAssemblyByName(assemblyName, null, null);
}
/// <summary>Executes an assembly given its display name, using the specified evidence.</summary>
/// <returns>The value returned by the entry point of the assembly.</returns>
/// <param name="assemblyName">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <param name="assemblySecurity">Evidence for loading the assembly. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">The assembly specified by <paramref name="assemblyName" /> is not found. </exception>
/// <exception cref="T:System.IO.FileLoadException">The assembly specified by <paramref name="assemblyName" /> was found, but could not be loaded.</exception>
/// <exception cref="T:System.BadImageFormatException">The assembly specified by <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.MissingMethodException">The specified assembly has no entry point.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x06003AB9 RID: 15033 RVA: 0x000C8F00 File Offset: 0x000C7100
public int ExecuteAssemblyByName(string assemblyName, Evidence assemblySecurity)
{
return this.ExecuteAssemblyByName(assemblyName, assemblySecurity, null);
}
/// <summary>Executes the assembly given its display name, using the specified evidence and arguments.</summary>
/// <returns>The value returned by the entry point of the assembly.</returns>
/// <param name="assemblyName">The display name of the assembly. See <see cref="P:System.Reflection.Assembly.FullName" />.</param>
/// <param name="assemblySecurity">Evidence for loading the assembly. </param>
/// <param name="args">Command-line arguments to pass when starting the process. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assemblyName" /> is null. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">The assembly specified by <paramref name="assemblyName" /> is not found. </exception>
/// <exception cref="T:System.IO.FileLoadException">The assembly specified by <paramref name="assemblyName" /> was found, but could not be loaded.</exception>
/// <exception cref="T:System.BadImageFormatException">The assembly specified by <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.MissingMethodException">The specified assembly has no entry point.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// 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);
}
/// <summary>Executes the assembly given an <see cref="T:System.Reflection.AssemblyName" />, using the specified evidence and arguments.</summary>
/// <returns>The value returned by the entry point of the assembly.</returns>
/// <param name="assemblyName">An <see cref="T:System.Reflection.AssemblyName" /> object representing the name of the assembly. </param>
/// <param name="assemblySecurity">Evidence for loading the assembly. </param>
/// <param name="args">Command-line arguments to pass when starting the process. </param>
/// <exception cref="T:System.IO.FileNotFoundException">The assembly specified by <paramref name="assemblyName" /> is not found. </exception>
/// <exception cref="T:System.IO.FileLoadException">The assembly specified by <paramref name="assemblyName" /> was found, but could not be loaded.</exception>
/// <exception cref="T:System.BadImageFormatException">The assembly specified by <paramref name="assemblyName" /> is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and <paramref name="assemblyName" /> was compiled with a later version.</exception>
/// <exception cref="T:System.AppDomainUnloadedException">The operation is attempted on an unloaded application domain. </exception>
/// <exception cref="T:System.MissingMethodException">The specified assembly has no entry point.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// 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);
}
/// <summary>Returns a value that indicates whether the application domain is the default application domain for the process.</summary>
/// <returns>true if the current <see cref="T:System.AppDomain" /> object represents the default application domain for the process; otherwise, false.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x06003ABC RID: 15036 RVA: 0x000C8F4C File Offset: 0x000C714C
public bool IsDefaultAppDomain()
{
return object.ReferenceEquals(this, AppDomain.DefaultDomain);
}
/// <summary>Returns the assemblies that have been loaded into the reflection-only context of the application domain.</summary>
/// <returns>An array of <see cref="T:System.Reflection.Assembly" /> objects that represent the assemblies loaded into the reflection-only context of the application domain.</returns>
/// <exception cref="T:System.AppDomainUnloadedException">An operation is attempted on an unloaded application domain. </exception>
/// <filterpriority>2</filterpriority>
// 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;
}
}