2 // System/AppDomainSetup.cs
5 // Dietmar Maurer (dietmar@ximian.com)
7 // (C) 2001 Ximian, Inc. http://www.ximian.com
12 using System.Runtime.CompilerServices;
13 using System.Runtime.InteropServices;
19 [ClassInterface(ClassInterfaceType.None)]
20 public sealed class AppDomainSetup : IAppDomainSetup {
21 string application_base;
22 string application_name;
24 string configuration_file;
27 string private_bin_path;
28 string private_bin_path_probe;
29 string shadow_copy_directories;
30 string shadow_copy_files;
31 bool publisher_policy;
32 private bool path_changed;
33 private LoaderOptimization loader_optimization;
34 bool disallow_binding_redirects;
35 bool disallow_code_downloads;
37 [MethodImplAttribute(MethodImplOptions.InternalCall)]
38 private static extern AppDomainSetup InitAppDomainSetup (AppDomainSetup setup);
40 public AppDomainSetup ()
42 InitAppDomainSetup (this);
46 static string GetAppBase (string appBase)
48 int len = appBase.Length;
49 if (len >= 8 && appBase.ToLower ().StartsWith ("file://")) {
50 appBase = appBase.Substring (7);
51 if (Path.DirectorySeparatorChar != '/')
52 appBase = appBase.Replace ('/', Path.DirectorySeparatorChar);
54 } else if (appBase.IndexOf (':') == -1) {
55 appBase = Path.GetFullPath (appBase);
61 public string ApplicationBase {
64 return GetAppBase (application_base);
68 application_base = value;
72 public string ApplicationName {
75 return application_name;
79 application_name = value;
83 public string CachePath {
94 public string ConfigurationFile {
97 return configuration_file;
101 configuration_file = value;
105 public bool DisallowPublisherPolicy {
107 return publisher_policy;
111 publisher_policy = value;
115 public string DynamicBase {
122 dynamic_base = value;
126 public string LicenseFile {
133 license_file = value;
137 [MonoTODO("--share-code")]
138 public LoaderOptimization LoaderOptimization
141 return loader_optimization;
145 loader_optimization = value;
149 public string PrivateBinPath {
152 return private_bin_path;
156 private_bin_path = value;
161 public string PrivateBinPathProbe {
164 return private_bin_path_probe;
168 private_bin_path_probe = value;
173 public string ShadowCopyDirectories {
176 return shadow_copy_directories;
180 shadow_copy_directories = value;
184 public string ShadowCopyFiles {
187 return shadow_copy_files;
191 shadow_copy_files = value;
196 public bool DisallowBindingRedirects {
198 return disallow_binding_redirects;
202 disallow_binding_redirects = value;
206 public bool DisallowCodeDownload {
208 return disallow_code_downloads;
212 disallow_code_downloads = value;