The Labs \ Source Viewer \ SSCLI \ System \ _AppDomain

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Interface:  IAppDomain
  18. **
  19. **
  20. ** Purpose: Properties and methods exposed to COM
  21. **
  22. **
  23. ===========================================================*/
  24. namespace System
  25. {
  26.     using System.Reflection;
  27.     using System.Runtime.CompilerServices;
  28.     using SecurityManager = System.Security.SecurityManager;
  29.     using System.Security.Permissions;
  30.     using IEvidenceFactory = System.Security.IEvidenceFactory;
  31.     using System.Security.Principal;
  32.     using System.Security.Policy;
  33.     using System.Security;
  34.     using System.Security.Util;
  35.     using System.Collections;
  36.     using System.Text;
  37.     using System.Configuration.Assemblies;
  38.     using System.Threading;
  39.     using System.Runtime.InteropServices;
  40.     using System.Runtime.Remoting;
  41.     using System.Runtime.Remoting.Contexts;
  42.     using System.Reflection.Emit;
  43.     using System.Runtime.Remoting.Activation;
  44.     using System.Runtime.Remoting.Messaging;
  45.     using CultureInfo = System.Globalization.CultureInfo;
  46.     using System.IO;
  47.     using System.Runtime.Serialization.Formatters.Binary;
  48.    
  49.     [GuidAttribute("05F696DC-2B29-3663-AD8B-C4389CF2A713")]
  50.     [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
  51.     [CLSCompliant(false)]
  52.     [System.Runtime.InteropServices.ComVisible(true)]
  53.     public interface _AppDomain
  54.     {
  55.         void GetTypeInfoCount(out uint pcTInfo);
  56.        
  57.         void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo);
  58.        
  59.         void GetIDsOfNames(        [In()]
  60. ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId);
  61.        
  62.         void Invoke(uint dispIdMember,         [In()]
  63. ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr);
  64.        
  65.         string ToString();
  66.        
  67.         bool Equals(object other);
  68.        
  69.         int GetHashCode();
  70.        
  71.         Type GetType();
  72.        
  73.         [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  74.         object InitializeLifetimeService();
  75.        
  76.         [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  77.         object GetLifetimeService();
  78.        
  79.         Evidence Evidence {
  80.             get;
  81.         }
  82.        
  83.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  84.         event EventHandler DomainUnload;
  85.        
  86.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  87.         event AssemblyLoadEventHandler AssemblyLoad;
  88.        
  89.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  90.         event EventHandler ProcessExit;
  91.        
  92.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  93.         event ResolveEventHandler TypeResolve;
  94.        
  95.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  96.         event ResolveEventHandler ResourceResolve;
  97.        
  98.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  99.         event ResolveEventHandler AssemblyResolve;
  100.        
  101.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  102.         event UnhandledExceptionEventHandler UnhandledException;
  103.        
  104.         AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access);
  105.        
  106.         AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir);
  107.        
  108.         AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, Evidence evidence);
  109.        
  110.         AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions);
  111.        
  112.         AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence);
  113.        
  114.         AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions);
  115.        
  116.         AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions);
  117.        
  118.         AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions);
  119.        
  120.         AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, bool isSynchronized);
  121.        
  122.         ObjectHandle CreateInstance(string assemblyName, string typeName);
  123.        
  124.        
  125.         ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName);
  126.        
  127.        
  128.         ObjectHandle CreateInstance(string assemblyName, string typeName, object[] activationAttributes);
  129.        
  130.         ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, object[] activationAttributes);
  131.        
  132.         ObjectHandle CreateInstance(string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityAttributes);
  133.        
  134.         ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityAttributes);
  135.        
  136.         Assembly Load(AssemblyName assemblyRef);
  137.        
  138.         Assembly Load(string assemblyString);
  139.        
  140.         Assembly Load(byte[] rawAssembly);
  141.        
  142.         Assembly Load(byte[] rawAssembly, byte[] rawSymbolStore);
  143.        
  144.         Assembly Load(byte[] rawAssembly, byte[] rawSymbolStore, Evidence securityEvidence);
  145.        
  146.         Assembly Load(AssemblyName assemblyRef, Evidence assemblySecurity);
  147.        
  148.         Assembly Load(string assemblyString, Evidence assemblySecurity);
  149.        
  150.         int ExecuteAssembly(string assemblyFile, Evidence assemblySecurity);
  151.        
  152.         int ExecuteAssembly(string assemblyFile);
  153.        
  154.         int ExecuteAssembly(string assemblyFile, Evidence assemblySecurity, string[] args);
  155.        
  156.         string FriendlyName {
  157.             get;
  158.         }
  159.        
  160.         string BaseDirectory {
  161.             get;
  162.         }
  163.        
  164.         string RelativeSearchPath {
  165.             get;
  166.         }
  167.        
  168.         bool ShadowCopyFiles {
  169.             get;
  170.         }
  171.        
  172.         Assembly[] GetAssemblies();
  173.        
  174.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  175.         void AppendPrivatePath(string path);
  176.        
  177.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  178.         void ClearPrivatePath();
  179.        
  180.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  181.         void SetShadowCopyPath(string s);
  182.        
  183.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  184.         void ClearShadowCopyPath();
  185.        
  186.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  187.         void SetCachePath(string s);
  188.        
  189.         [method: SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
  190.         void SetData(string name, object data);
  191.        
  192.         object GetData(string name);
  193.        
  194.         [SecurityPermission(SecurityAction.LinkDemand, ControlDomainPolicy = true)]
  195.         void SetAppDomainPolicy(PolicyLevel domainPolicy);
  196.        
  197.         void SetThreadPrincipal(IPrincipal principal);
  198.        
  199.         void SetPrincipalPolicy(PrincipalPolicy policy);
  200.        
  201.         void DoCallBack(CrossAppDomainDelegate theDelegate);
  202.        
  203.         string DynamicDirectory {
  204.             get;
  205.         }
  206.     }
  207. }

Developer Fusion