This commit is contained in:
niko
2026-06-04 11:42:34 +02:00
parent f39ba70a9f
commit e720b98cd1
7488 changed files with 2493818 additions and 0 deletions
+602
View File
@@ -0,0 +1,602 @@
using System;
using System.IO;
using System.Runtime.Hosting;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Policy;
namespace System
{
/// <summary>Represents assembly binding information that can be added to an instance of <see cref="T:System.AppDomain" />.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x02000632 RID: 1586
[ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[Serializable]
public sealed class AppDomainSetup
{
/// <summary>Initializes a new instance of the <see cref="T:System.AppDomainSetup" /> class.</summary>
// Token: 0x06003AC9 RID: 15049 RVA: 0x000C9020 File Offset: 0x000C7220
public AppDomainSetup()
{
}
// Token: 0x06003ACA RID: 15050 RVA: 0x000C9028 File Offset: 0x000C7228
internal AppDomainSetup(AppDomainSetup setup)
{
this.application_base = setup.application_base;
this.application_name = setup.application_name;
this.cache_path = setup.cache_path;
this.configuration_file = setup.configuration_file;
this.dynamic_base = setup.dynamic_base;
this.license_file = setup.license_file;
this.private_bin_path = setup.private_bin_path;
this.private_bin_path_probe = setup.private_bin_path_probe;
this.shadow_copy_directories = setup.shadow_copy_directories;
this.shadow_copy_files = setup.shadow_copy_files;
this.publisher_policy = setup.publisher_policy;
this.path_changed = setup.path_changed;
this.loader_optimization = setup.loader_optimization;
this.disallow_binding_redirects = setup.disallow_binding_redirects;
this.disallow_code_downloads = setup.disallow_code_downloads;
this._activationArguments = setup._activationArguments;
this.domain_initializer = setup.domain_initializer;
this.domain_initializer_args = setup.domain_initializer_args;
this.application_trust_xml = setup.application_trust_xml;
this.disallow_appbase_probe = setup.disallow_appbase_probe;
this.configuration_bytes = setup.configuration_bytes;
}
/// <summary>Initializes a new instance of the <see cref="T:System.AppDomainSetup" /> class with the specified activation arguments required for manifest-based activation of an application domain.</summary>
/// <param name="activationArguments">An <see cref="T:System.Runtime.Hosting.ActivationArguments" /> object that specifies information required for the manifest-based activation of a new application domain.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="activationArguments" /> is null.</exception>
// Token: 0x06003ACB RID: 15051 RVA: 0x000C9138 File Offset: 0x000C7338
public AppDomainSetup(ActivationArguments activationArguments)
{
this._activationArguments = activationArguments;
}
/// <summary>Initializes a new instance of the <see cref="T:System.AppDomainSetup" /> class with the specified activation context to use for manifest-based activation of an application domain.</summary>
/// <param name="activationContext">An <see cref="T:System.ActivationContext" /> object that specifies the activation context to be used for an application domain.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="activationContext" /> is null.</exception>
// Token: 0x06003ACC RID: 15052 RVA: 0x000C9148 File Offset: 0x000C7348
public AppDomainSetup(ActivationContext activationContext)
{
this._activationArguments = new ActivationArguments(activationContext);
}
// Token: 0x06003ACD RID: 15053 RVA: 0x000C915C File Offset: 0x000C735C
private static string GetAppBase(string appBase)
{
if (appBase == null)
{
return null;
}
int length = appBase.Length;
if (length >= 8 && appBase.ToLower().StartsWith("file://"))
{
appBase = appBase.Substring(7);
if (Path.DirectorySeparatorChar != '/')
{
appBase = appBase.Replace('/', Path.DirectorySeparatorChar);
}
if (Environment.IsRunningOnWindows)
{
appBase = "//" + appBase;
}
}
else
{
appBase = Path.GetFullPath(appBase);
}
return appBase;
}
/// <summary>Gets or sets the name of the directory containing the application.</summary>
/// <returns>A <see cref="T:System.String" /> containing the name of the application base directory.</returns>
/// <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: 0x17000B36 RID: 2870
// (get) Token: 0x06003ACE RID: 15054 RVA: 0x000C91E0 File Offset: 0x000C73E0
// (set) Token: 0x06003ACF RID: 15055 RVA: 0x000C91F0 File Offset: 0x000C73F0
public string ApplicationBase
{
get
{
return AppDomainSetup.GetAppBase(this.application_base);
}
set
{
this.application_base = value;
}
}
/// <summary>Gets or sets the name of the application.</summary>
/// <returns>A <see cref="T:System.String" /> that is the name of the application.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B37 RID: 2871
// (get) Token: 0x06003AD0 RID: 15056 RVA: 0x000C91FC File Offset: 0x000C73FC
// (set) Token: 0x06003AD1 RID: 15057 RVA: 0x000C9204 File Offset: 0x000C7404
public string ApplicationName
{
get
{
return this.application_name;
}
set
{
this.application_name = value;
}
}
/// <summary>Gets or sets the name of an area specific to the application where files are shadow copied. </summary>
/// <returns>A <see cref="T:System.String" /> that is the fully qualified name of the directory path and file name where files are shadow copied.</returns>
/// <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: 0x17000B38 RID: 2872
// (get) Token: 0x06003AD2 RID: 15058 RVA: 0x000C9210 File Offset: 0x000C7410
// (set) Token: 0x06003AD3 RID: 15059 RVA: 0x000C9218 File Offset: 0x000C7418
public string CachePath
{
get
{
return this.cache_path;
}
set
{
this.cache_path = value;
}
}
/// <summary>Gets or sets the name of the configuration file for an application domain.</summary>
/// <returns>A <see cref="T:System.String" /> that specifies the name of the configuration file.</returns>
/// <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: 0x17000B39 RID: 2873
// (get) Token: 0x06003AD4 RID: 15060 RVA: 0x000C9224 File Offset: 0x000C7424
// (set) Token: 0x06003AD5 RID: 15061 RVA: 0x000C927C File Offset: 0x000C747C
public string ConfigurationFile
{
get
{
if (this.configuration_file == null)
{
return null;
}
if (Path.IsPathRooted(this.configuration_file))
{
return this.configuration_file;
}
if (this.ApplicationBase == null)
{
throw new MemberAccessException("The ApplicationBase must be set before retrieving this property.");
}
return Path.Combine(this.ApplicationBase, this.configuration_file);
}
set
{
this.configuration_file = value;
}
}
/// <summary>Gets or sets a value indicating whether the publisher policy section of the configuration file is applied to an application domain.</summary>
/// <returns>true if the publisherPolicy section of the configuration file for an application domain is ignored; otherwise, the declared publisher policy is honored.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B3A RID: 2874
// (get) Token: 0x06003AD6 RID: 15062 RVA: 0x000C9288 File Offset: 0x000C7488
// (set) Token: 0x06003AD7 RID: 15063 RVA: 0x000C9290 File Offset: 0x000C7490
public bool DisallowPublisherPolicy
{
get
{
return this.publisher_policy;
}
set
{
this.publisher_policy = value;
}
}
/// <summary>Gets or sets the base directory where the directory for dynamically generated files is located.</summary>
/// <returns>The directory where the <see cref="P:System.AppDomain.DynamicDirectory" /> is located.Note:The return value of this property is different from the value assigned. See the Remarks section.</returns>
/// <exception cref="T:System.MemberAccessException">This property cannot be set because the application name on the application domain is null.</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: 0x17000B3B RID: 2875
// (get) Token: 0x06003AD8 RID: 15064 RVA: 0x000C929C File Offset: 0x000C749C
// (set) Token: 0x06003AD9 RID: 15065 RVA: 0x000C92F4 File Offset: 0x000C74F4
public string DynamicBase
{
get
{
if (this.dynamic_base == null)
{
return null;
}
if (Path.IsPathRooted(this.dynamic_base))
{
return this.dynamic_base;
}
if (this.ApplicationBase == null)
{
throw new MemberAccessException("The ApplicationBase must be set before retrieving this property.");
}
return Path.Combine(this.ApplicationBase, this.dynamic_base);
}
set
{
if (this.application_name == null)
{
throw new MemberAccessException("ApplicationName must be set before the DynamicBase can be set.");
}
this.dynamic_base = Path.Combine(value, ((uint)this.application_name.GetHashCode()).ToString("x"));
}
}
/// <summary>Gets or sets the location of the license file associated with this domain.</summary>
/// <returns>A <see cref="T:System.String" /> that specifies the name of the license file.</returns>
/// <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: 0x17000B3C RID: 2876
// (get) Token: 0x06003ADA RID: 15066 RVA: 0x000C933C File Offset: 0x000C753C
// (set) Token: 0x06003ADB RID: 15067 RVA: 0x000C9344 File Offset: 0x000C7544
public string LicenseFile
{
get
{
return this.license_file;
}
set
{
this.license_file = value;
}
}
/// <summary>Specifies the optimization policy used to load an executable.</summary>
/// <returns>A <see cref="T:System.LoaderOptimization" /> enumerated constant used with the <see cref="T:System.LoaderOptimizationAttribute" />.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B3D RID: 2877
// (get) Token: 0x06003ADC RID: 15068 RVA: 0x000C9350 File Offset: 0x000C7550
// (set) Token: 0x06003ADD RID: 15069 RVA: 0x000C9358 File Offset: 0x000C7558
[MonoLimitation("In Mono this is controlled by the --share-code flag")]
public LoaderOptimization LoaderOptimization
{
get
{
return this.loader_optimization;
}
set
{
this.loader_optimization = value;
}
}
/// <summary>Gets or sets the list of directories under the application base directory that are probed for private assemblies.</summary>
/// <returns>A <see cref="T:System.String" /> containing a list of directory names, where the names are separated by semicolons.</returns>
/// <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: 0x17000B3E RID: 2878
// (get) Token: 0x06003ADE RID: 15070 RVA: 0x000C9364 File Offset: 0x000C7564
// (set) Token: 0x06003ADF RID: 15071 RVA: 0x000C936C File Offset: 0x000C756C
public string PrivateBinPath
{
get
{
return this.private_bin_path;
}
set
{
this.private_bin_path = value;
this.path_changed = true;
}
}
/// <summary>Gets or sets a string value that includes or excludes <see cref="P:System.AppDomainSetup.ApplicationBase" /> from the search path for the application, and searches only <see cref="P:System.AppDomainSetup.PrivateBinPath" />.</summary>
/// <returns>A null reference (Nothing in Visual Basic) to include the application base path when searching for assemblies; any non-null string value to exclude the path. The default value is null.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B3F RID: 2879
// (get) Token: 0x06003AE0 RID: 15072 RVA: 0x000C937C File Offset: 0x000C757C
// (set) Token: 0x06003AE1 RID: 15073 RVA: 0x000C9384 File Offset: 0x000C7584
public string PrivateBinPathProbe
{
get
{
return this.private_bin_path_probe;
}
set
{
this.private_bin_path_probe = value;
this.path_changed = true;
}
}
/// <summary>Gets or sets the names of the directories containing assemblies to be shadow copied.</summary>
/// <returns>A <see cref="T:System.String" /> containing a list of directory names, where each name is separated by a semicolon.</returns>
/// <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: 0x17000B40 RID: 2880
// (get) Token: 0x06003AE2 RID: 15074 RVA: 0x000C9394 File Offset: 0x000C7594
// (set) Token: 0x06003AE3 RID: 15075 RVA: 0x000C939C File Offset: 0x000C759C
public string ShadowCopyDirectories
{
get
{
return this.shadow_copy_directories;
}
set
{
this.shadow_copy_directories = value;
}
}
/// <summary>Gets or sets a string that indicates whether shadow copying is turned on or off.</summary>
/// <returns>A <see cref="T:System.String" /> containing the string value "true" to indicate that shadow copying is turned on; or "false" to indicate that shadow copying is turned off.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B41 RID: 2881
// (get) Token: 0x06003AE4 RID: 15076 RVA: 0x000C93A8 File Offset: 0x000C75A8
// (set) Token: 0x06003AE5 RID: 15077 RVA: 0x000C93B0 File Offset: 0x000C75B0
public string ShadowCopyFiles
{
get
{
return this.shadow_copy_files;
}
set
{
this.shadow_copy_files = value;
}
}
/// <summary>Gets or sets a value indicating if an application domain allows assembly binding redirection.</summary>
/// <returns>true if redirection of assemblies is disallowed; otherwise it is allowed.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B42 RID: 2882
// (get) Token: 0x06003AE6 RID: 15078 RVA: 0x000C93BC File Offset: 0x000C75BC
// (set) Token: 0x06003AE7 RID: 15079 RVA: 0x000C93C4 File Offset: 0x000C75C4
public bool DisallowBindingRedirects
{
get
{
return this.disallow_binding_redirects;
}
set
{
this.disallow_binding_redirects = value;
}
}
/// <summary>Gets or sets a value indicating whether HTTP download of assemblies is allowed for an application domain.</summary>
/// <returns>true if HTTP download of assemblies is to be disallowed; otherwise, it is allowed.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B43 RID: 2883
// (get) Token: 0x06003AE8 RID: 15080 RVA: 0x000C93D0 File Offset: 0x000C75D0
// (set) Token: 0x06003AE9 RID: 15081 RVA: 0x000C93D8 File Offset: 0x000C75D8
public bool DisallowCodeDownload
{
get
{
return this.disallow_code_downloads;
}
set
{
this.disallow_code_downloads = value;
}
}
/// <summary>Gets or sets data about the activation of an application domain.</summary>
/// <returns>An <see cref="T:System.Runtime.Hosting.ActivationArguments" /> object containing data about the activation of an application domain.</returns>
/// <exception cref="T:System.InvalidOperationException">The property is set to an <see cref="T:System.Runtime.Hosting.ActivationArguments" /> object whose application identity does not match the application identity of the <see cref="T:System.Security.Policy.ApplicationTrust" /> object returned by the <see cref="P:System.AppDomainSetup.ApplicationTrust" /> property. No exception is thrown if the <see cref="P:System.AppDomainSetup.ApplicationTrust" /> property is null.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x17000B44 RID: 2884
// (get) Token: 0x06003AEA RID: 15082 RVA: 0x000C93E4 File Offset: 0x000C75E4
// (set) Token: 0x06003AEB RID: 15083 RVA: 0x000C93EC File Offset: 0x000C75EC
public ActivationArguments ActivationArguments
{
get
{
return this._activationArguments;
}
set
{
this._activationArguments = value;
}
}
/// <summary>Gets or sets the <see cref="T:System.AppDomainInitializer" /> delegate, which represents a callback method that is invoked when the application domain is initialized.</summary>
/// <returns>An <see cref="T:System.AppDomainInitializer" /> delegate that represents a callback method that is invoked when the application domain is initialized.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B45 RID: 2885
// (get) Token: 0x06003AEC RID: 15084 RVA: 0x000C93F8 File Offset: 0x000C75F8
// (set) Token: 0x06003AED RID: 15085 RVA: 0x000C9400 File Offset: 0x000C7600
[MonoLimitation("it needs to be invoked within the created domain")]
public AppDomainInitializer AppDomainInitializer
{
get
{
return this.domain_initializer;
}
set
{
this.domain_initializer = value;
}
}
/// <summary>Gets or sets the arguments passed to the callback method represented by the <see cref="T:System.AppDomainInitializer" /> delegate. The callback method is invoked when the application domain is initialized.</summary>
/// <returns>An array of strings that is passed to the callback method represented by the <see cref="T:System.AppDomainInitializer" /> delegate, when the callback method is invoked during <see cref="T:System.AppDomain" /> initialization.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B46 RID: 2886
// (get) Token: 0x06003AEE RID: 15086 RVA: 0x000C940C File Offset: 0x000C760C
// (set) Token: 0x06003AEF RID: 15087 RVA: 0x000C9414 File Offset: 0x000C7614
[MonoLimitation("it needs to be used to invoke the initializer within the created domain")]
public string[] AppDomainInitializerArguments
{
get
{
return this.domain_initializer_args;
}
set
{
this.domain_initializer_args = value;
}
}
/// <summary>Gets or sets an object containing security and trust information.</summary>
/// <returns>An <see cref="T:System.Security.Policy.ApplicationTrust" /> object representing security and trust information. </returns>
/// <exception cref="T:System.InvalidOperationException">The property is set to an <see cref="T:System.Security.Policy.ApplicationTrust" /> object whose application identity does not match the application identity of the <see cref="T:System.Runtime.Hosting.ActivationArguments" /> object returned by the <see cref="P:System.AppDomainSetup.ActivationArguments" /> property. No exception is thrown if the <see cref="P:System.AppDomainSetup.ActivationArguments" /> property is null.</exception>
/// <exception cref="T:System.ArgumentNullException">The property is set to null.</exception>
// Token: 0x17000B47 RID: 2887
// (get) Token: 0x06003AF0 RID: 15088 RVA: 0x000C9420 File Offset: 0x000C7620
// (set) Token: 0x06003AF1 RID: 15089 RVA: 0x000C944C File Offset: 0x000C764C
[MonoNotSupported("This property exists but not considered.")]
public ApplicationTrust ApplicationTrust
{
get
{
if (this.application_trust_xml == null)
{
return null;
}
if (this.application_trust == null)
{
this.application_trust = new ApplicationTrust();
}
return this.application_trust;
}
set
{
this.application_trust = value;
if (value != null)
{
this.application_trust_xml = value.ToXml();
this.application_trust.FromXml(this.application_trust_xml);
}
else
{
this.application_trust_xml = null;
}
}
}
/// <summary>Specifies whether the application base path and private binary path are probed when searching for assemblies to load.</summary>
/// <returns>true if probing is not allowed; otherwise false. The default is false.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000B48 RID: 2888
// (get) Token: 0x06003AF2 RID: 15090 RVA: 0x000C9490 File Offset: 0x000C7690
// (set) Token: 0x06003AF3 RID: 15091 RVA: 0x000C9498 File Offset: 0x000C7698
[MonoNotSupported("This property exists but not considered.")]
public bool DisallowApplicationBaseProbing
{
get
{
return this.disallow_appbase_probe;
}
set
{
this.disallow_appbase_probe = value;
}
}
/// <summary>Gets the XML configuration information set by the <see cref="M:System.AppDomainSetup.SetConfigurationBytes(System.Byte[])" /> method, which overrides the application's XML configuration information.</summary>
/// <returns>A <see cref="T:System.Byte" /> array containing the XML configuration information that was set by the <see cref="M:System.AppDomainSetup.SetConfigurationBytes(System.Byte[])" /> method, or null if the <see cref="M:System.AppDomainSetup.SetConfigurationBytes(System.Byte[])" /> method has not been called.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x06003AF4 RID: 15092 RVA: 0x000C94A4 File Offset: 0x000C76A4
[MonoNotSupported("This method exists but not considered.")]
public byte[] GetConfigurationBytes()
{
return (this.configuration_bytes == null) ? null : (this.configuration_bytes.Clone() as byte[]);
}
/// <summary>Provides XML configuration information for the application domain, overriding the application's XML configuration information.</summary>
/// <param name="value">A <see cref="T:System.Byte" /> array containing the XML configuration information to be used for the application domain.</param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003AF5 RID: 15093 RVA: 0x000C94C8 File Offset: 0x000C76C8
[MonoNotSupported("This method exists but not considered.")]
public void SetConfigurationBytes(byte[] value)
{
this.configuration_bytes = value;
}
// Token: 0x04001782 RID: 6018
private string application_base;
// Token: 0x04001783 RID: 6019
private string application_name;
// Token: 0x04001784 RID: 6020
private string cache_path;
// Token: 0x04001785 RID: 6021
private string configuration_file;
// Token: 0x04001786 RID: 6022
private string dynamic_base;
// Token: 0x04001787 RID: 6023
private string license_file;
// Token: 0x04001788 RID: 6024
private string private_bin_path;
// Token: 0x04001789 RID: 6025
private string private_bin_path_probe;
// Token: 0x0400178A RID: 6026
private string shadow_copy_directories;
// Token: 0x0400178B RID: 6027
private string shadow_copy_files;
// Token: 0x0400178C RID: 6028
private bool publisher_policy;
// Token: 0x0400178D RID: 6029
private bool path_changed;
// Token: 0x0400178E RID: 6030
private LoaderOptimization loader_optimization;
// Token: 0x0400178F RID: 6031
private bool disallow_binding_redirects;
// Token: 0x04001790 RID: 6032
private bool disallow_code_downloads;
// Token: 0x04001791 RID: 6033
private ActivationArguments _activationArguments;
// Token: 0x04001792 RID: 6034
private AppDomainInitializer domain_initializer;
// Token: 0x04001793 RID: 6035
[NonSerialized]
private ApplicationTrust application_trust;
// Token: 0x04001794 RID: 6036
private string[] domain_initializer_args;
// Token: 0x04001795 RID: 6037
private SecurityElement application_trust_xml;
// Token: 0x04001796 RID: 6038
private bool disallow_appbase_probe;
// Token: 0x04001797 RID: 6039
private byte[] configuration_bytes;
}
}