using System;
using System.Collections;
using System.Configuration.Assemblies;
using System.Globalization;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Policy;
namespace System.Reflection
{
/// Represents an assembly, which is a reusable, versionable, and self-describing building block of a common language runtime application.
// Token: 0x0200021F RID: 543
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_Assembly))]
[ComVisible(true)]
[Serializable]
public class Assembly : ICustomAttributeProvider, _Assembly
{
// Token: 0x06001CF5 RID: 7413 RVA: 0x0006D4B4 File Offset: 0x0006B6B4
internal Assembly()
{
this.resolve_event_holder = new Assembly.ResolveEventHolder();
}
/// Occurs when the common language runtime class loader cannot resolve a reference to an internal module of an assembly through normal means.
// Token: 0x14000004 RID: 4
// (add) Token: 0x06001CF6 RID: 7414 RVA: 0x0006D4C8 File Offset: 0x0006B6C8
// (remove) Token: 0x06001CF7 RID: 7415 RVA: 0x0006D4D8 File Offset: 0x0006B6D8
public event ModuleResolveEventHandler ModuleResolve
{
add
{
this.resolve_event_holder.ModuleResolve += value;
}
remove
{
this.resolve_event_holder.ModuleResolve -= value;
}
}
// Token: 0x06001CF8 RID: 7416
[MethodImpl(MethodImplOptions.InternalCall)]
private extern string get_code_base(bool escaped);
// Token: 0x06001CF9 RID: 7417
[MethodImpl(MethodImplOptions.InternalCall)]
private extern string get_fullname();
// Token: 0x06001CFA RID: 7418
[MethodImpl(MethodImplOptions.InternalCall)]
private extern string get_location();
// Token: 0x06001CFB RID: 7419
[MethodImpl(MethodImplOptions.InternalCall)]
private extern string InternalImageRuntimeVersion();
// Token: 0x06001CFC RID: 7420 RVA: 0x0006D4E8 File Offset: 0x0006B6E8
private string GetCodeBase(bool escaped)
{
return this.get_code_base(escaped);
}
/// Gets the location of the assembly as specified originally, for example, in an object.
/// The location of the assembly as specified originally.
///
///
///
// Token: 0x17000532 RID: 1330
// (get) Token: 0x06001CFD RID: 7421 RVA: 0x0006D500 File Offset: 0x0006B700
public virtual string CodeBase
{
get
{
return this.GetCodeBase(false);
}
}
/// Gets the URI, including escape characters, that represents the codebase.
/// A URI with escape characters.
///
///
///
// Token: 0x17000533 RID: 1331
// (get) Token: 0x06001CFE RID: 7422 RVA: 0x0006D50C File Offset: 0x0006B70C
public virtual string EscapedCodeBase
{
get
{
return this.GetCodeBase(true);
}
}
/// Gets the display name of the assembly.
/// The display name of the assembly.
// Token: 0x17000534 RID: 1332
// (get) Token: 0x06001CFF RID: 7423 RVA: 0x0006D518 File Offset: 0x0006B718
public virtual string FullName
{
get
{
return this.ToString();
}
}
/// Gets the entry point of this assembly.
/// A object that represents the entry point of this assembly. If no entry point is found (for example, the assembly is a DLL), null is returned.
// Token: 0x17000535 RID: 1333
// (get) Token: 0x06001D00 RID: 7424
public virtual extern MethodInfo EntryPoint
{
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
/// Gets the evidence for this assembly.
/// An Evidence object for this assembly.
///
///
///
///
// Token: 0x17000536 RID: 1334
// (get) Token: 0x06001D01 RID: 7425 RVA: 0x0006D520 File Offset: 0x0006B720
public virtual Evidence Evidence
{
get
{
return this.UnprotectedGetEvidence();
}
}
// Token: 0x06001D02 RID: 7426 RVA: 0x0006D528 File Offset: 0x0006B728
internal Evidence UnprotectedGetEvidence()
{
if (this._evidence == null)
{
lock (this)
{
this._evidence = Evidence.GetDefaultHostEvidence(this);
}
}
return this._evidence;
}
// Token: 0x06001D03 RID: 7427
[MethodImpl(MethodImplOptions.InternalCall)]
private extern bool get_global_assembly_cache();
/// Gets a value indicating whether the assembly was loaded from the global assembly cache.
/// true if the assembly was loaded from the global assembly cache; otherwise, false.
// Token: 0x17000537 RID: 1335
// (get) Token: 0x06001D04 RID: 7428 RVA: 0x0006D584 File Offset: 0x0006B784
public bool GlobalAssemblyCache
{
get
{
return this.get_global_assembly_cache();
}
}
// Token: 0x17000538 RID: 1336
// (set) Token: 0x06001D05 RID: 7429 RVA: 0x0006D58C File Offset: 0x0006B78C
internal bool FromByteArray
{
set
{
this.fromByteArray = value;
}
}
/// Gets the path or UNC location of the loaded file that contains the manifest.
/// The location of the loaded file that contains the manifest. If the loaded file was shadow-copied, the location is that of the file after being shadow-copied. If the assembly is loaded from a byte array, such as when using the method overload, the value returned is an empty string ("").
/// The current assembly is a dynamic assembly, represented by an object.
///
///
///
// Token: 0x17000539 RID: 1337
// (get) Token: 0x06001D06 RID: 7430 RVA: 0x0006D598 File Offset: 0x0006B798
public virtual string Location
{
get
{
if (this.fromByteArray)
{
return string.Empty;
}
return this.get_location();
}
}
/// Gets a string representing the version of the common language runtime (CLR) saved in the file containing the manifest.
/// A string representing the CLR version folder name. This is not a full path.
// Token: 0x1700053A RID: 1338
// (get) Token: 0x06001D07 RID: 7431 RVA: 0x0006D5C0 File Offset: 0x0006B7C0
[ComVisible(false)]
public virtual string ImageRuntimeVersion
{
get
{
return this.InternalImageRuntimeVersion();
}
}
/// Gets serialization information with all of the data needed to reinstantiate this assembly.
/// The object to be populated with serialization information.
/// The destination context of the serialization.
///
/// is null.
///
///
///
// Token: 0x06001D08 RID: 7432 RVA: 0x0006D5C8 File Offset: 0x0006B7C8
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null)
{
throw new ArgumentNullException("info");
}
UnitySerializationHolder.GetAssemblyData(this, info, context);
}
/// Indicates whether or not a specified attribute has been applied to the assembly.
/// true if the attribute has been applied to the assembly; otherwise, false.
/// The of the attribute to be checked for this assembly.
/// This argument is ignored for objects of this type.
///
/// is null.
///
/// uses an invalid type.
// Token: 0x06001D09 RID: 7433 RVA: 0x0006D5E4 File Offset: 0x0006B7E4
public virtual bool IsDefined(Type attributeType, bool inherit)
{
return MonoCustomAttrs.IsDefined(this, attributeType, inherit);
}
/// Gets all the custom attributes for this assembly.
/// An array of type Object containing the custom attributes for this assembly.
/// This argument is ignored for objects of type .
// Token: 0x06001D0A RID: 7434 RVA: 0x0006D5F0 File Offset: 0x0006B7F0
public virtual object[] GetCustomAttributes(bool inherit)
{
return MonoCustomAttrs.GetCustomAttributes(this, inherit);
}
/// Gets the custom attributes for this assembly as specified by type.
/// An array of type Object containing the custom attributes for this assembly as specified by .
/// The for which the custom attributes are to be returned.
/// This argument is ignored for objects of type .
///
/// is null.
///
/// is not a runtime type.
// Token: 0x06001D0B RID: 7435 RVA: 0x0006D5FC File Offset: 0x0006B7FC
public virtual object[] GetCustomAttributes(Type attributeType, bool inherit)
{
return MonoCustomAttrs.GetCustomAttributes(this, attributeType, inherit);
}
// Token: 0x06001D0C RID: 7436
[MethodImpl(MethodImplOptions.InternalCall)]
private extern object GetFilesInternal(string name, bool getResourceModules);
/// Gets the files in the file table of an assembly manifest.
/// An array of objects.
/// A file that was found could not be loaded.
/// A file was not found.
/// A file was not a valid assembly.
///
///
///
// Token: 0x06001D0D RID: 7437 RVA: 0x0006D608 File Offset: 0x0006B808
public virtual FileStream[] GetFiles()
{
return this.GetFiles(false);
}
/// Gets the files in the file table of an assembly manifest, specifying whether to include resource modules.
/// An array of objects.
/// true to include resource modules; otherwise, false.
/// A file that was found could not be loaded.
/// A file was not found.
/// A file was not a valid assembly.
///
///
///
// Token: 0x06001D0E RID: 7438 RVA: 0x0006D614 File Offset: 0x0006B814
public virtual FileStream[] GetFiles(bool getResourceModules)
{
string[] array = (string[])this.GetFilesInternal(null, getResourceModules);
if (array == null)
{
return new FileStream[0];
}
string location = this.Location;
FileStream[] array2;
if (location != string.Empty)
{
array2 = new FileStream[array.Length + 1];
array2[0] = new FileStream(location, FileMode.Open, FileAccess.Read);
for (int i = 0; i < array.Length; i++)
{
array2[i + 1] = new FileStream(array[i], FileMode.Open, FileAccess.Read);
}
}
else
{
array2 = new FileStream[array.Length];
for (int j = 0; j < array.Length; j++)
{
array2[j] = new FileStream(array[j], FileMode.Open, FileAccess.Read);
}
}
return array2;
}
/// Gets a for the specified file in the file table of the manifest of this assembly.
/// A for the specified file, or null if the file is not found.
/// The name of the specified file. Do not include the path to the file.
/// A file that was found could not be loaded.
/// The parameter is null.
/// The parameter is an empty string ("").
///
/// was not found.
///
/// is not a valid assembly.
///
///
///
// Token: 0x06001D0F RID: 7439 RVA: 0x0006D6C4 File Offset: 0x0006B8C4
public virtual FileStream GetFile(string name)
{
if (name == null)
{
throw new ArgumentNullException(null, "Name cannot be null.");
}
if (name.Length == 0)
{
throw new ArgumentException("Empty name is not valid");
}
string text = (string)this.GetFilesInternal(name, true);
if (text != null)
{
return new FileStream(text, FileMode.Open, FileAccess.Read);
}
return null;
}
// Token: 0x06001D10 RID: 7440
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern IntPtr GetManifestResourceInternal(string name, out int size, out Module module);
/// Loads the specified manifest resource from this assembly.
/// A representing the manifest resource; null if no resources were specified during compilation, or if the resource is not visible to the caller.
/// The case-sensitive name of the manifest resource being requested.
/// The parameter is null.
/// The parameter is an empty string ("").
/// A file that was found could not be loaded.
///
/// was not found.
///
/// is not a valid assembly.
// Token: 0x06001D11 RID: 7441 RVA: 0x0006D718 File Offset: 0x0006B918
public unsafe virtual Stream GetManifestResourceStream(string name)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
if (name.Length == 0)
{
throw new ArgumentException("String cannot have zero length.", "name");
}
ManifestResourceInfo manifestResourceInfo = this.GetManifestResourceInfo(name);
if (manifestResourceInfo == null)
{
return null;
}
if (manifestResourceInfo.ReferencedAssembly != null)
{
return manifestResourceInfo.ReferencedAssembly.GetManifestResourceStream(name);
}
if (manifestResourceInfo.FileName != null && manifestResourceInfo.ResourceLocation == (ResourceLocation)0)
{
if (this.fromByteArray)
{
throw new FileNotFoundException(manifestResourceInfo.FileName);
}
string directoryName = Path.GetDirectoryName(this.Location);
string text = Path.Combine(directoryName, manifestResourceInfo.FileName);
return new FileStream(text, FileMode.Open, FileAccess.Read);
}
else
{
int num;
Module module;
IntPtr manifestResourceInternal = this.GetManifestResourceInternal(name, out num, out module);
if (manifestResourceInternal == (IntPtr)0)
{
return null;
}
UnmanagedMemoryStream unmanagedMemoryStream = new UnmanagedMemoryStream((byte*)(void*)manifestResourceInternal, (long)num);
unmanagedMemoryStream.Closed += new Assembly.ResourceCloseHandler(module).OnClose;
return unmanagedMemoryStream;
}
}
/// Loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly.
/// A representing the manifest resource; null if no resources were specified during compilation or if the resource is not visible to the caller.
/// The type whose namespace is used to scope the manifest resource name.
/// The case-sensitive name of the manifest resource being requested.
/// The parameter is null.
/// The parameter is an empty string ("").
/// A file that was found could not be loaded.
///
/// was not found.
///
/// is not a valid assembly.
// Token: 0x06001D12 RID: 7442 RVA: 0x0006D814 File Offset: 0x0006BA14
public virtual Stream GetManifestResourceStream(Type type, string name)
{
string text;
if (type != null)
{
text = type.Namespace;
}
else
{
if (name == null)
{
throw new ArgumentNullException("type");
}
text = null;
}
if (text == null || text.Length == 0)
{
return this.GetManifestResourceStream(name);
}
return this.GetManifestResourceStream(text + "." + name);
}
// Token: 0x06001D13 RID: 7443
[MethodImpl(MethodImplOptions.InternalCall)]
internal virtual extern Type[] GetTypes(bool exportedOnly);
/// Gets the types defined in this assembly.
/// An array of type containing objects for all the types defined in this assembly.
/// The assembly contains one or more types that cannot be loaded. The array returned by the property of this exception contains a object for each type that was loaded and null for each type that could not be loaded, while the property contains an exception for each type that could not be loaded.
// Token: 0x06001D14 RID: 7444 RVA: 0x0006D874 File Offset: 0x0006BA74
public virtual Type[] GetTypes()
{
return this.GetTypes(false);
}
/// Gets the public types defined in this assembly that are visible outside the assembly.
/// An array of Type objects that represent the types defined in this assembly that are visible outside the assembly.
// Token: 0x06001D15 RID: 7445 RVA: 0x0006D880 File Offset: 0x0006BA80
public virtual Type[] GetExportedTypes()
{
return this.GetTypes(true);
}
/// Gets the object with the specified name in the assembly instance and optionally throws an exception if the type is not found.
/// A object that represents the specified class.
/// The full name of the type.
/// true to throw an exception if the type is not found; false to return null.
///
/// is invalid.-or- The length of exceeds 1024 characters.
///
/// is null.
///
/// is true, and the type cannot be found.
///
/// requires a dependent assembly that could not be found.
///
/// requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded.
///
/// requires a dependent assembly, but the file is not a valid assembly. -or- requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
// Token: 0x06001D16 RID: 7446 RVA: 0x0006D88C File Offset: 0x0006BA8C
public virtual Type GetType(string name, bool throwOnError)
{
return this.GetType(name, throwOnError, false);
}
/// Gets the object with the specified name in the assembly instance.
/// A object that represents the specified class, or null if the class is not found.
/// The full name of the type.
///
/// is invalid.
///
/// is null.
///
/// requires a dependent assembly that could not be found.
///
/// requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded.
///
/// requires a dependent assembly, but the file is not a valid assembly. -or- requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
// Token: 0x06001D17 RID: 7447 RVA: 0x0006D898 File Offset: 0x0006BA98
public virtual Type GetType(string name)
{
return this.GetType(name, false, false);
}
// Token: 0x06001D18 RID: 7448
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern Type InternalGetType(Module module, string name, bool throwOnError, bool ignoreCase);
/// Gets the object with the specified name in the assembly instance, with the options of ignoring the case, and of throwing an exception if the type is not found.
/// A object that represents the specified class.
/// The full name of the type.
/// true to throw an exception if the type is not found; false to return null.
/// true to ignore the case of the type name; otherwise, false.
///
/// is invalid.-or- The length of exceeds 1024 characters.
///
/// is null.
///
/// is true, and the type cannot be found.
///
/// requires a dependent assembly that could not be found.
///
/// requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded.
///
/// requires a dependent assembly, but the file is not a valid assembly. -or- requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
// Token: 0x06001D19 RID: 7449 RVA: 0x0006D8A4 File Offset: 0x0006BAA4
public Type GetType(string name, bool throwOnError, bool ignoreCase)
{
if (name == null)
{
throw new ArgumentNullException(name);
}
if (name.Length == 0)
{
throw new ArgumentException("name", "Name cannot be empty");
}
return this.InternalGetType(null, name, throwOnError, ignoreCase);
}
// Token: 0x06001D1A RID: 7450
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void InternalGetAssemblyName(string assemblyFile, AssemblyName aname);
// Token: 0x06001D1B RID: 7451
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void FillName(Assembly ass, AssemblyName aname);
/// Gets an for this assembly, setting the codebase as specified by .
/// An for this assembly.
/// true to set the to the location of the assembly after it was shadow copied; false to set to the original location.
///
///
///
// Token: 0x06001D1C RID: 7452 RVA: 0x0006D8E4 File Offset: 0x0006BAE4
[MonoTODO("copiedName == true is not supported")]
public virtual AssemblyName GetName(bool copiedName)
{
if (SecurityManager.SecurityEnabled)
{
this.GetCodeBase(true);
}
return this.UnprotectedGetName();
}
/// Gets an for this assembly.
/// An for this assembly.
///
///
///
// Token: 0x06001D1D RID: 7453 RVA: 0x0006D900 File Offset: 0x0006BB00
public virtual AssemblyName GetName()
{
return this.GetName(false);
}
// Token: 0x06001D1E RID: 7454 RVA: 0x0006D90C File Offset: 0x0006BB0C
internal virtual AssemblyName UnprotectedGetName()
{
AssemblyName assemblyName = new AssemblyName();
Assembly.FillName(this, assemblyName);
return assemblyName;
}
/// Returns the full name of the assembly, also known as the display name.
/// The full name of the assembly, or the class name if the full name of the assembly cannot be determined.
// Token: 0x06001D1F RID: 7455 RVA: 0x0006D928 File Offset: 0x0006BB28
public override string ToString()
{
if (this.assemblyName != null)
{
return this.assemblyName;
}
this.assemblyName = this.get_fullname();
return this.assemblyName;
}
/// Creates the name of a type qualified by the display name of its assembly.
/// A String that is the full name of the type qualified by the display name of the assembly.
/// The display name of an assembly.
/// The full name of a type.
// Token: 0x06001D20 RID: 7456 RVA: 0x0006D95C File Offset: 0x0006BB5C
public static string CreateQualifiedName(string assemblyName, string typeName)
{
return typeName + ", " + assemblyName;
}
/// Gets the currently loaded assembly in which the specified class is defined.
/// The assembly in which the specified class is defined.
/// A object representing a class in the assembly that will be returned.
///
/// is null.
// Token: 0x06001D21 RID: 7457 RVA: 0x0006D96C File Offset: 0x0006BB6C
public static Assembly GetAssembly(Type type)
{
if (type != null)
{
return type.Assembly;
}
throw new ArgumentNullException("type");
}
/// Gets the process executable in the default application domain. In other application domains, this is the first executable that was executed by .
/// The Assembly that is the process executable in the default application domain, or the first executable that was executed by . Can return null when called from unmanaged code.
///
///
///
// Token: 0x06001D22 RID: 7458
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern Assembly GetEntryAssembly();
/// Gets the satellite assembly for the specified culture.
/// The specified satellite assembly.
/// The specified culture.
///
/// is null.
/// The assembly cannot be found.
/// The satellite assembly with a matching file name was found, but the CultureInfo did not match the one specified.
/// The satellite assembly is not a valid assembly.
// Token: 0x06001D23 RID: 7459 RVA: 0x0006D988 File Offset: 0x0006BB88
public Assembly GetSatelliteAssembly(CultureInfo culture)
{
return this.GetSatelliteAssembly(culture, null, true);
}
/// Gets the specified version of the satellite assembly for the specified culture.
/// The specified satellite assembly.
/// The specified culture.
/// The version of the satellite assembly.
///
/// is null.
/// The satellite assembly with a matching file name was found, but the CultureInfo or the version did not match the one specified.
/// The assembly cannot be found.
/// The satellite assembly is not a valid assembly.
// Token: 0x06001D24 RID: 7460 RVA: 0x0006D994 File Offset: 0x0006BB94
public Assembly GetSatelliteAssembly(CultureInfo culture, Version version)
{
return this.GetSatelliteAssembly(culture, version, true);
}
// Token: 0x06001D25 RID: 7461 RVA: 0x0006D9A0 File Offset: 0x0006BBA0
internal Assembly GetSatelliteAssemblyNoThrow(CultureInfo culture, Version version)
{
return this.GetSatelliteAssembly(culture, version, false);
}
// Token: 0x06001D26 RID: 7462 RVA: 0x0006D9AC File Offset: 0x0006BBAC
private Assembly GetSatelliteAssembly(CultureInfo culture, Version version, bool throwOnError)
{
if (culture == null)
{
throw new ArgumentException("culture");
}
AssemblyName name = this.GetName(true);
if (version != null)
{
name.Version = version;
}
name.CultureInfo = culture;
name.Name += ".resources";
try
{
Assembly assembly = AppDomain.CurrentDomain.LoadSatellite(name, false);
if (assembly != null)
{
return assembly;
}
}
catch (FileNotFoundException)
{
}
string directoryName = Path.GetDirectoryName(this.Location);
string text = Path.Combine(directoryName, Path.Combine(culture.Name, name.Name + ".dll"));
if (!throwOnError && !File.Exists(text))
{
return null;
}
return Assembly.LoadFrom(text);
}
// Token: 0x06001D27 RID: 7463
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern Assembly LoadFrom(string assemblyFile, bool refonly);
/// Loads an assembly given its file name or path.
/// The loaded assembly.
/// The name or path of the file that contains the manifest of the assembly.
///
/// is null.
///
/// is not found, or the module you are trying to load does not specify a filename extension.
/// A file that was found could not be loaded.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
/// A codebase that does not start with "file://" was specified without the required .
/// The parameter is an empty string ("").
/// The assembly name is longer than MAX_PATH characters.
///
///
///
// Token: 0x06001D28 RID: 7464 RVA: 0x0006DA90 File Offset: 0x0006BC90
public static Assembly LoadFrom(string assemblyFile)
{
return Assembly.LoadFrom(assemblyFile, false);
}
/// Loads an assembly given its file name or path and supplying security evidence.
/// The loaded assembly.
/// The name or path of the file that contains the manifest of the assembly.
/// Evidence for loading the assembly.
///
/// is null.
///
/// is not found, or the module you are trying to load does not specify a filename extension.
/// A file that was found could not be loaded.-or-The is not ambiguous and is determined to be invalid.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
/// A codebase that does not start with "file://" was specified without the required .
/// The parameter is an empty string ("").
/// The assembly name is longer than MAX_PATH characters.
///
///
///
// Token: 0x06001D29 RID: 7465 RVA: 0x0006DA9C File Offset: 0x0006BC9C
public static Assembly LoadFrom(string assemblyFile, Evidence securityEvidence)
{
return Assembly.LoadFrom(assemblyFile, false);
}
/// Loads an assembly given its file name or path, security evidence hash value, and hash algorithm.
/// The loaded assembly.
/// The name or path of the file that contains the manifest of the assembly.
/// Evidence for loading the assembly.
/// The value of the computed hash code.
/// The hash algorithm used for hashing files and for generating the strong name.
///
/// is null.
///
/// is not found, or the module you are trying to load does not specify a filename extension.
/// A file that was found could not be loaded.-or-The is not ambiguous and is determined to be invalid.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
/// A codebase that does not start with "file://" was specified without the required .
/// The parameter is an empty string ("").
/// The assembly name is longer than MAX_PATH characters.
///
///
///
// Token: 0x06001D2A RID: 7466 RVA: 0x0006DAB4 File Offset: 0x0006BCB4
[MonoTODO("This overload is not currently implemented")]
public static Assembly LoadFrom(string assemblyFile, Evidence securityEvidence, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
{
if (assemblyFile == null)
{
throw new ArgumentNullException("assemblyFile");
}
if (assemblyFile == string.Empty)
{
throw new ArgumentException("Name can't be the empty string", "assemblyFile");
}
throw new NotImplementedException();
}
/// Loads an assembly given its path, loading the assembly into the domain of the caller using the supplied evidence.
/// The loaded assembly.
/// The path of the assembly file.
/// Evidence for loading the assembly.
/// The parameter is null.
/// The parameter is an empty string ("") or does not exist.
/// A file that was found could not be loaded.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
///
///
///
// Token: 0x06001D2B RID: 7467 RVA: 0x0006DAF8 File Offset: 0x0006BCF8
public static Assembly LoadFile(string path, Evidence securityEvidence)
{
if (path == null)
{
throw new ArgumentNullException("path");
}
if (path == string.Empty)
{
throw new ArgumentException("Path can't be empty", "path");
}
return Assembly.LoadFrom(path, securityEvidence);
}
/// Loads the contents of an assembly file on the specified path.
/// The loaded assembly.
/// The path of the file to load.
/// The parameter is null.
/// A file that was found could not be loaded.
/// The parameter is an empty string ("") or does not exist.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
///
///
///
// Token: 0x06001D2C RID: 7468 RVA: 0x0006DB40 File Offset: 0x0006BD40
public static Assembly LoadFile(string path)
{
return Assembly.LoadFile(path, null);
}
/// Loads an assembly given the long form of its name.
/// The loaded assembly.
/// The long form of the assembly name.
///
/// is null.
///
/// is a zero-length string.
///
/// is not found.
/// A file that was found could not be loaded.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
///
///
// Token: 0x06001D2D RID: 7469 RVA: 0x0006DB4C File Offset: 0x0006BD4C
public static Assembly Load(string assemblyString)
{
return AppDomain.CurrentDomain.Load(assemblyString);
}
/// Loads an assembly given its display name, loading the assembly into the domain of the caller using the supplied evidence.
/// The loaded assembly.
/// The display name of the assembly.
/// Evidence for loading the assembly.
///
/// is null.
///
/// is not found.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
/// A file that was found could not be loaded.-or-An assembly or module was loaded twice with two different evidences.
///
///
///
// Token: 0x06001D2E RID: 7470 RVA: 0x0006DB5C File Offset: 0x0006BD5C
public static Assembly Load(string assemblyString, Evidence assemblySecurity)
{
return AppDomain.CurrentDomain.Load(assemblyString, assemblySecurity);
}
/// Loads an assembly given its .
/// The loaded assembly.
/// The object that describes the assembly to be loaded.
///
/// is null.
///
/// is not found.
/// A file that was found could not be loaded.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
///
///
// Token: 0x06001D2F RID: 7471 RVA: 0x0006DB6C File Offset: 0x0006BD6C
public static Assembly Load(AssemblyName assemblyRef)
{
return AppDomain.CurrentDomain.Load(assemblyRef);
}
/// Loads an assembly given its . The assembly is loaded into the domain of the caller using the supplied evidence.
/// The loaded assembly.
/// The object that describes the assembly to be loaded.
/// Evidence for loading the assembly.
///
/// is null.
///
/// is not found.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
/// An assembly or module was loaded twice with two different evidences.
///
///
///
// Token: 0x06001D30 RID: 7472 RVA: 0x0006DB7C File Offset: 0x0006BD7C
public static Assembly Load(AssemblyName assemblyRef, Evidence assemblySecurity)
{
return AppDomain.CurrentDomain.Load(assemblyRef, assemblySecurity);
}
/// Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly. The assembly is loaded into the domain of the caller.
/// The loaded assembly.
/// An array of type byte that is a COFF-based image containing an emitted assembly.
///
/// is null.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
///
///
// Token: 0x06001D31 RID: 7473 RVA: 0x0006DB8C File Offset: 0x0006BD8C
public static Assembly Load(byte[] rawAssembly)
{
return AppDomain.CurrentDomain.Load(rawAssembly);
}
/// Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly.
/// The loaded assembly.
/// An array of type byte that is a COFF-based image containing an emitted assembly.
/// An array of type byte containing the raw bytes representing the symbols for the assembly.
///
/// is null.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
///
///
// Token: 0x06001D32 RID: 7474 RVA: 0x0006DB9C File Offset: 0x0006BD9C
public static Assembly Load(byte[] rawAssembly, byte[] rawSymbolStore)
{
return AppDomain.CurrentDomain.Load(rawAssembly, rawSymbolStore);
}
/// Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly.
/// The loaded assembly.
/// An array of type byte that is a COFF-based image containing an emitted assembly.
/// An array of type byte containing the raw bytes representing the symbols for the assembly.
/// Evidence for loading the assembly.
///
/// is null.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
/// An assembly or module was loaded twice with two different evidences.
///
///
///
// Token: 0x06001D33 RID: 7475 RVA: 0x0006DBAC File Offset: 0x0006BDAC
public static Assembly Load(byte[] rawAssembly, byte[] rawSymbolStore, Evidence securityEvidence)
{
return AppDomain.CurrentDomain.Load(rawAssembly, rawSymbolStore, securityEvidence);
}
/// Loads the assembly from a common object file format (COFF)-based image containing an emitted assembly. The assembly is loaded into the reflection-only context of the caller's application domain.
/// An object that represents the loaded assembly.
/// An array of type byte that is a COFF-based image containing an emitted assembly.
///
/// is null.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
/// cannot be loaded.
///
///
///
// Token: 0x06001D34 RID: 7476 RVA: 0x0006DBBC File Offset: 0x0006BDBC
public static Assembly ReflectionOnlyLoad(byte[] rawAssembly)
{
return AppDomain.CurrentDomain.Load(rawAssembly, null, null, true);
}
/// Loads an assembly into the reflection-only context, given its display name.
/// An object that represents the loaded assembly.
/// The display name of the assembly, as returned by the property.
///
/// is null.
///
/// is an empty string ("").
///
/// is not found.
///
/// is found, but cannot be loaded.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
///
///
// Token: 0x06001D35 RID: 7477 RVA: 0x0006DBCC File Offset: 0x0006BDCC
public static Assembly ReflectionOnlyLoad(string assemblyString)
{
return AppDomain.CurrentDomain.Load(assemblyString, null, true);
}
/// Loads an assembly into the reflection-only context, given its path.
/// An object that represents the loaded assembly.
/// The path of the file that contains the manifest of the assembly.
///
/// is null.
///
/// is not found, or the module you are trying to load does not specify a file name extension.
///
/// is found, but could not be loaded.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
/// A codebase that does not start with "file://" was specified without the required .
/// The assembly name is longer than MAX_PATH characters.
///
/// is an empty string ("").
///
///
///
// Token: 0x06001D36 RID: 7478 RVA: 0x0006DBDC File Offset: 0x0006BDDC
public static Assembly ReflectionOnlyLoadFrom(string assemblyFile)
{
if (assemblyFile == null)
{
throw new ArgumentNullException("assemblyFile");
}
return Assembly.LoadFrom(assemblyFile, true);
}
/// Loads an assembly from the application directory or from the global assembly cache using a partial name.
/// The loaded assembly. If is not found, this method returns null.
/// The display name of the assembly.
/// The parameter is null.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
///
///
///
// Token: 0x06001D37 RID: 7479 RVA: 0x0006DBF8 File Offset: 0x0006BDF8
[Obsolete("")]
public static Assembly LoadWithPartialName(string partialName)
{
return Assembly.LoadWithPartialName(partialName, null);
}
/// Loads the module, internal to this assembly, with a common object file format (COFF)-based image containing an emitted module, or a resource file.
/// The loaded Module.
/// Name of the module. Must correspond to a file name in this assembly's manifest.
/// A byte array that is a COFF-based image containing an emitted module, or a resource.
///
/// or is null.
///
/// does not match a file entry in this assembly's manifest.
///
/// is not a valid module.
/// A file that was found could not be loaded.
///
///
///
///
///
// Token: 0x06001D38 RID: 7480 RVA: 0x0006DC04 File Offset: 0x0006BE04
[MonoTODO("Not implemented")]
public Module LoadModule(string moduleName, byte[] rawModule)
{
throw new NotImplementedException();
}
/// Loads the module, internal to this assembly, with a common object file format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded.
/// The loaded module.
/// Name of the module. Must correspond to a file name in this assembly's manifest.
/// A byte array that is a COFF-based image containing an emitted module, or a resource.
/// A byte array containing the raw bytes representing the symbols for the module. Must be null if this is a resource file.
///
/// or is null.
///
/// does not match a file entry in this assembly's manifest.
///
/// is not a valid module.
/// A file that was found could not be loaded.
///
///
///
///
///
// Token: 0x06001D39 RID: 7481 RVA: 0x0006DC0C File Offset: 0x0006BE0C
[MonoTODO("Not implemented")]
public Module LoadModule(string moduleName, byte[] rawModule, byte[] rawSymbolStore)
{
throw new NotImplementedException();
}
// Token: 0x06001D3A RID: 7482
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern Assembly load_with_partial_name(string name, Evidence e);
/// Loads an assembly from the application directory or from the global assembly cache using a partial name. The assembly is loaded into the domain of the caller using the supplied evidence.
/// The loaded assembly. If is not found, this method returns null.
/// The display name of the assembly.
///
/// for loading the assembly.
/// An assembly or module was loaded twice with two different sets of evidence.
/// The parameter is null.
///
/// is not a valid assembly. -or-Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
///
///
///
///
// Token: 0x06001D3B RID: 7483 RVA: 0x0006DC14 File Offset: 0x0006BE14
[Obsolete("")]
public static Assembly LoadWithPartialName(string partialName, Evidence securityEvidence)
{
return Assembly.LoadWithPartialName(partialName, securityEvidence, true);
}
// Token: 0x06001D3C RID: 7484 RVA: 0x0006DC20 File Offset: 0x0006BE20
internal static Assembly LoadWithPartialName(string partialName, Evidence securityEvidence, bool oldBehavior)
{
if (!oldBehavior)
{
throw new NotImplementedException();
}
if (partialName == null)
{
throw new NullReferenceException();
}
return Assembly.load_with_partial_name(partialName, securityEvidence);
}
/// Locates the specified type from this assembly and creates an instance of it using the system activator, using case-sensitive search.
/// An instance of representing the type, with culture, arguments, binder, and activation attributes set to null, and set to Public or Instance, or null if is not found.
/// The of the type to locate.
///
/// is an empty string ("") or a string beginning with a null character.-or-The current assembly was loaded into the reflection-only context.
///
/// is null.
/// No matching constructor was found.
///
/// requires a dependent assembly that could not be found.
///
/// requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded.
///
/// requires a dependent assembly, but the file is not a valid assembly. -or- requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
///
///
///
// Token: 0x06001D3D RID: 7485 RVA: 0x0006DC44 File Offset: 0x0006BE44
public object CreateInstance(string typeName)
{
return this.CreateInstance(typeName, false);
}
/// Locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search.
/// An instance of representing the type, with culture, arguments, binder, and activation attributes set to null, and set to Public or Instance, or null if is not found.
/// The of the type to locate.
/// true to ignore the case of the type name; otherwise, false.
///
/// is an empty string ("") or a string beginning with a null character. -or-The current assembly was loaded into the reflection-only context.
/// No matching constructor was found.
///
/// is null.
///
/// requires a dependent assembly that could not be found.
///
/// requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded.
///
/// requires a dependent assembly, but the file is not a valid assembly. -or- requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
///
///
///
// Token: 0x06001D3E RID: 7486 RVA: 0x0006DC50 File Offset: 0x0006BE50
public object CreateInstance(string typeName, bool ignoreCase)
{
Type type = this.GetType(typeName, false, ignoreCase);
if (type == null)
{
return null;
}
object obj;
try
{
obj = Activator.CreateInstance(type);
}
catch (InvalidOperationException)
{
throw new ArgumentException("It is illegal to invoke a method on a Type loaded via ReflectionOnly methods.");
}
return obj;
}
/// Locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search and having the specified culture, arguments, and binding and activation attributes.
/// An instance of Object representing the type and matching the specified criteria, or null if is not found.
/// The of the type to locate.
/// true to ignore the case of the type name; otherwise, false.
/// A bitmask that affects the way in which the search is conducted. The value is a combination of bit flags from .
/// An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If is null, the default binder is used.
/// An array of type Object containing the arguments to be passed to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to be invoked. If the default constructor is desired, must be an empty array or null.
/// An instance of CultureInfo used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used. (This is necessary to convert a String that represents 1000 to a Double value, for example, since 1000 is represented differently by different cultures.)
/// An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object.
///
/// is an empty string ("") or a string beginning with a null character. -or-The current assembly was loaded into the reflection-only context.
///
/// is null.
/// No matching constructor was found.
/// A non-empty activation attributes array is passed to a type that does not inherit from .
///
/// requires a dependent assembly that could not be found.
///
/// requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded.
///
/// requires a dependent assembly, but the file is not a valid assembly. -or- requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
///
///
///
// Token: 0x06001D3F RID: 7487 RVA: 0x0006DCB0 File Offset: 0x0006BEB0
public object CreateInstance(string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes)
{
Type type = this.GetType(typeName, false, ignoreCase);
if (type == null)
{
return null;
}
object obj;
try
{
obj = Activator.CreateInstance(type, bindingAttr, binder, args, culture, activationAttributes);
}
catch (InvalidOperationException)
{
throw new ArgumentException("It is illegal to invoke a method on a Type loaded via ReflectionOnly methods.");
}
return obj;
}
/// Gets all the loaded modules that are part of this assembly.
/// An array of modules.
// Token: 0x06001D40 RID: 7488 RVA: 0x0006DD18 File Offset: 0x0006BF18
public Module[] GetLoadedModules()
{
return this.GetLoadedModules(false);
}
/// Gets all the loaded modules that are part of this assembly, specifying whether to include resource modules.
/// An array of modules.
/// true to include resource modules; otherwise, false.
// Token: 0x06001D41 RID: 7489 RVA: 0x0006DD24 File Offset: 0x0006BF24
public Module[] GetLoadedModules(bool getResourceModules)
{
return this.GetModules(getResourceModules);
}
/// Gets all the modules that are part of this assembly.
/// An array of modules.
/// The module to be loaded does not specify a file name extension.
// Token: 0x06001D42 RID: 7490 RVA: 0x0006DD30 File Offset: 0x0006BF30
public Module[] GetModules()
{
return this.GetModules(false);
}
/// Gets the specified module in this assembly.
/// The module being requested, or null if the module is not found.
/// The name of the module being requested.
/// The parameter is null.
/// The parameter is an empty string ("").
/// A file that was found could not be loaded.
///
/// was not found.
///
/// is not a valid assembly.
// Token: 0x06001D43 RID: 7491 RVA: 0x0006DD3C File Offset: 0x0006BF3C
public Module GetModule(string name)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
if (name.Length == 0)
{
throw new ArgumentException("Name can't be empty");
}
Module[] modules = this.GetModules(true);
foreach (Module module in modules)
{
if (module.ScopeName == name)
{
return module;
}
}
return null;
}
// Token: 0x06001D44 RID: 7492
[MethodImpl(MethodImplOptions.InternalCall)]
internal virtual extern Module[] GetModulesInternal();
/// Gets all the modules that are part of this assembly, specifying whether to include resource modules.
/// An array of modules.
/// true to include resource modules; otherwise, false.
// Token: 0x06001D45 RID: 7493 RVA: 0x0006DDA8 File Offset: 0x0006BFA8
public Module[] GetModules(bool getResourceModules)
{
Module[] modulesInternal = this.GetModulesInternal();
if (!getResourceModules)
{
ArrayList arrayList = new ArrayList(modulesInternal.Length);
foreach (Module module in modulesInternal)
{
if (!module.IsResource())
{
arrayList.Add(module);
}
}
return (Module[])arrayList.ToArray(typeof(Module));
}
return modulesInternal;
}
// Token: 0x06001D46 RID: 7494
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern string[] GetNamespaces();
/// Returns the names of all the resources in this assembly.
/// An array of type String containing the names of all the resources.
// Token: 0x06001D47 RID: 7495
[MethodImpl(MethodImplOptions.InternalCall)]
public virtual extern string[] GetManifestResourceNames();
/// Gets the assembly that contains the code that is currently executing.
/// A representing the assembly that contains the code that is currently executing.
// Token: 0x06001D48 RID: 7496
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern Assembly GetExecutingAssembly();
/// Returns the of the method that invoked the currently executing method.
/// The Assembly object of the method that invoked the currently executing method.
// Token: 0x06001D49 RID: 7497
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern Assembly GetCallingAssembly();
/// Gets the objects for all the assemblies referenced by this assembly.
/// An array of type containing all the assemblies referenced by this assembly.
// Token: 0x06001D4A RID: 7498
[MethodImpl(MethodImplOptions.InternalCall)]
public extern AssemblyName[] GetReferencedAssemblies();
// Token: 0x06001D4B RID: 7499
[MethodImpl(MethodImplOptions.InternalCall)]
private extern bool GetManifestResourceInfoInternal(string name, ManifestResourceInfo info);
/// Returns information about how the given resource has been persisted.
///
/// populated with information about the resource's topology, or null if the resource is not found.
/// The case-sensitive name of the resource.
///
/// is null.
/// The parameter is an empty string ("").
// Token: 0x06001D4C RID: 7500 RVA: 0x0006DE14 File Offset: 0x0006C014
public virtual ManifestResourceInfo GetManifestResourceInfo(string resourceName)
{
if (resourceName == null)
{
throw new ArgumentNullException("resourceName");
}
if (resourceName.Length == 0)
{
throw new ArgumentException("String cannot have zero length.");
}
ManifestResourceInfo manifestResourceInfo = new ManifestResourceInfo();
bool manifestResourceInfoInternal = this.GetManifestResourceInfoInternal(resourceName, manifestResourceInfo);
if (manifestResourceInfoInternal)
{
return manifestResourceInfo;
}
return null;
}
// Token: 0x06001D4D RID: 7501
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern int MonoDebugger_GetMethodToken(MethodBase method);
/// Gets the host context with which the assembly was loaded.
/// An value that indicates the host context with which the assembly was loaded, if any.
// Token: 0x1700053B RID: 1339
// (get) Token: 0x06001D4E RID: 7502 RVA: 0x0006DE60 File Offset: 0x0006C060
[MonoTODO("Always returns zero")]
[ComVisible(false)]
public long HostContext
{
get
{
return 0L;
}
}
/// Gets the module that contains the manifest for the current assembly.
/// A object representing the module that contains the manifest for the assembly.
// Token: 0x1700053C RID: 1340
// (get) Token: 0x06001D4F RID: 7503 RVA: 0x0006DE64 File Offset: 0x0006C064
[ComVisible(false)]
public Module ManifestModule
{
get
{
return this.GetManifestModule();
}
}
// Token: 0x06001D50 RID: 7504 RVA: 0x0006DE6C File Offset: 0x0006C06C
internal virtual Module GetManifestModule()
{
return this.GetManifestModuleInternal();
}
// Token: 0x06001D51 RID: 7505
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern Module GetManifestModuleInternal();
/// Gets a value indicating whether this assembly was loaded into the reflection-only context.
/// true if the assembly was loaded into the reflection-only context, rather than the execution context; otherwise, false.
// Token: 0x1700053D RID: 1341
// (get) Token: 0x06001D52 RID: 7506
[ComVisible(false)]
public virtual extern bool ReflectionOnly
{
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x06001D53 RID: 7507 RVA: 0x0006DE74 File Offset: 0x0006C074
internal void Resolve()
{
lock (this)
{
this.LoadAssemblyPermissions();
Evidence evidence = new Evidence(this.UnprotectedGetEvidence());
evidence.AddHost(new PermissionRequestEvidence(this._minimum, this._optional, this._refuse));
this._granted = SecurityManager.ResolvePolicy(evidence, this._minimum, this._optional, this._refuse, out this._denied);
}
}
// Token: 0x1700053E RID: 1342
// (get) Token: 0x06001D54 RID: 7508 RVA: 0x0006DF04 File Offset: 0x0006C104
internal PermissionSet GrantedPermissionSet
{
get
{
if (this._granted == null)
{
if (SecurityManager.ResolvingPolicyLevel != null)
{
if (SecurityManager.ResolvingPolicyLevel.IsFullTrustAssembly(this))
{
return DefaultPolicies.FullTrust;
}
return null;
}
else
{
this.Resolve();
}
}
return this._granted;
}
}
// Token: 0x1700053F RID: 1343
// (get) Token: 0x06001D55 RID: 7509 RVA: 0x0006DF4C File Offset: 0x0006C14C
internal PermissionSet DeniedPermissionSet
{
get
{
if (this._granted == null)
{
if (SecurityManager.ResolvingPolicyLevel != null)
{
if (SecurityManager.ResolvingPolicyLevel.IsFullTrustAssembly(this))
{
return null;
}
return DefaultPolicies.FullTrust;
}
else
{
this.Resolve();
}
}
return this._denied;
}
}
// Token: 0x06001D56 RID: 7510
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool LoadPermissions(Assembly a, ref IntPtr minimum, ref int minLength, ref IntPtr optional, ref int optLength, ref IntPtr refused, ref int refLength);
// Token: 0x06001D57 RID: 7511 RVA: 0x0006DF94 File Offset: 0x0006C194
private void LoadAssemblyPermissions()
{
IntPtr zero = IntPtr.Zero;
IntPtr zero2 = IntPtr.Zero;
IntPtr zero3 = IntPtr.Zero;
int num = 0;
int num2 = 0;
int num3 = 0;
if (Assembly.LoadPermissions(this, ref zero, ref num, ref zero2, ref num2, ref zero3, ref num3))
{
if (num > 0)
{
byte[] array = new byte[num];
Marshal.Copy(zero, array, 0, num);
this._minimum = SecurityManager.Decode(array);
}
if (num2 > 0)
{
byte[] array2 = new byte[num2];
Marshal.Copy(zero2, array2, 0, num2);
this._optional = SecurityManager.Decode(array2);
}
if (num3 > 0)
{
byte[] array3 = new byte[num3];
Marshal.Copy(zero3, array3, 0, num3);
this._refuse = SecurityManager.Decode(array3);
}
}
}
/// Returns the type of the current instance.
/// A object representing the type.
// Token: 0x06001D58 RID: 7512 RVA: 0x0006E04C File Offset: 0x0006C24C
virtual Type System.Runtime.InteropServices._Assembly.GetType()
{
return base.GetType();
}
// Token: 0x040009D3 RID: 2515
private IntPtr _mono_assembly;
// Token: 0x040009D4 RID: 2516
private Assembly.ResolveEventHolder resolve_event_holder;
// Token: 0x040009D5 RID: 2517
private Evidence _evidence;
// Token: 0x040009D6 RID: 2518
internal PermissionSet _minimum;
// Token: 0x040009D7 RID: 2519
internal PermissionSet _optional;
// Token: 0x040009D8 RID: 2520
internal PermissionSet _refuse;
// Token: 0x040009D9 RID: 2521
private PermissionSet _granted;
// Token: 0x040009DA RID: 2522
private PermissionSet _denied;
// Token: 0x040009DB RID: 2523
private bool fromByteArray;
// Token: 0x040009DC RID: 2524
private string assemblyName;
// Token: 0x02000220 RID: 544
internal class ResolveEventHolder
{
// Token: 0x14000005 RID: 5
// (add) Token: 0x06001D5A RID: 7514 RVA: 0x0006E05C File Offset: 0x0006C25C
// (remove) Token: 0x06001D5B RID: 7515 RVA: 0x0006E078 File Offset: 0x0006C278
public event ModuleResolveEventHandler ModuleResolve;
}
// Token: 0x02000221 RID: 545
private class ResourceCloseHandler
{
// Token: 0x06001D5C RID: 7516 RVA: 0x0006E094 File Offset: 0x0006C294
public ResourceCloseHandler(Module module)
{
this.module = module;
}
// Token: 0x06001D5D RID: 7517 RVA: 0x0006E0A4 File Offset: 0x0006C2A4
public void OnClose(object sender, EventArgs e)
{
this.module = null;
}
// Token: 0x040009DE RID: 2526
private Module module;
}
}
}