680 references to AppDomain
mscorlib (253)
parent\parent\parent\parent\InternalApis\NDP_Common\inc\PinnableBufferCache.cs (1)
550if (!Environment.HasShutdownStarted && !AppDomain.CurrentDomain.IsFinalizingForUnload())
system\__comobject.cs (1)
51if (AppDomain.IsAppXModel())
system\activator.cs (13)
315if (securityInfo != null && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 381if (securityInfo != null && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 433Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled || securityInfo == null); 465public static ObjectHandle CreateInstance (AppDomain domain, string assemblyName, string typeName) { 474public static ObjectHandle CreateInstance (AppDomain domain, 489if (securityAttributes != null && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 499public static ObjectHandle CreateInstance(AppDomain domain, 534public static ObjectHandle CreateInstanceFrom (AppDomain domain, string assemblyFile, string typeName) { 545public static ObjectHandle CreateInstanceFrom (AppDomain domain, 560if (securityAttributes != null && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 572public static ObjectHandle CreateInstanceFrom(AppDomain domain, 601AppDomainManager domainManager = AppDomain.CurrentDomain.DomainManager; 610AppDomainManager domainManager = AppDomain.CurrentDomain.DomainManager;
system\AppContext\AppContext.cs (4)
51return (string) AppDomain.CurrentDomain.GetData("APP_CONTEXT_BASE_DIRECTORY") ?? AppDomain.CurrentDomain.BaseDirectory; 60return AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName; 69return AppDomain.CurrentDomain.GetData(name);
system\AppContext\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
system\appdomain.cs (27)
1037HostSecurityManager securityManager = AppDomain.CurrentDomain.HostSecurityManager; 1127ObjectHandle oh = Activator.CreateInstance(AppDomain.CurrentDomain.ActivationContext); 1144AppDomainManager domainManager = AppDomain.CurrentDomain.DomainManager; 2103public static AppDomain CurrentDomain 2106Contract.Ensures(Contract.Result<AppDomain>() != null); 2580public static void Unload(AppDomain domain) 2587Int32 domainID = AppDomain.GetIdForUnload(domain); 2590AppDomain.nUnload(domainID); 2737public static AppDomain CreateDomain(String friendlyName, 2747public static AppDomain CreateDomain(String friendlyName, 2777public static AppDomain CreateDomain(String friendlyName) 3269internal static Int32 GetIdForUnload(AppDomain domain) 3292static internal extern AppDomain GetDefaultDomain(); 3396public static AppDomain CreateDomain(String friendlyName, 3412internal static AppDomain InternalCreateDomain(String friendlyName, 3421AppDomain.CheckCreateDomainSupported(); 3426info.TargetFrameworkName = AppDomain.CurrentDomain.GetTargetFrameworkName(); 3428AppDomainManager domainManager = AppDomain.CurrentDomain.DomainManager; 3447securityInfo == null ? AppDomain.CurrentDomain.InternalEvidence : null, 3448AppDomain.CurrentDomain.GetSecurityDescriptor()); 3457public static AppDomain CreateDomain (string friendlyName, 3482public static AppDomain CreateDomain(String friendlyName, 3536AppDomain defaultDomain = GetDefaultDomain(); 3747AppDomain ad = AppDomain.CurrentDomain; 4235internal static extern AppDomain nCreateDomain(String friendlyName, 4720private static AppDomain InternalCreateDomain(String imageLocation)
system\appdomainmanager.cs (11)
51public virtual AppDomain CreateDomain (string friendlyName, 59protected static AppDomain CreateDomainHelper (string friendlyName, 71AppDomain.CheckDomainCreationEvidence(appDomainInfo, securityInfo); 84AppDomain.CurrentDomain.GetAppDomainManagerType(out inheritedDomainManagerAssembly, 97appDomainInfo.TargetFrameworkName = AppDomain.CurrentDomain.GetTargetFrameworkName(); 99return AppDomain.nCreateDomain(friendlyName, 102securityInfo == null ? AppDomain.CurrentDomain.InternalEvidence : null, 103AppDomain.CurrentDomain.GetSecurityDescriptor()); 167AppDomain domain = AppDomain.CurrentDomain; 186return AppDomain.CurrentDomain.DomainManager;
system\AppDomainSetup.cs (2)
439string pathRoot = AppDomain.NormalizePath(appBase, fullCheck: false); 484path = AppDomain.NormalizePath(path, fullCheck: true);
system\applicationactivator.cs (10)
29private AppDomain m_domain; 45internal ManifestRunner (AppDomain domain, ActivationContext activationContext) { 134if (CmsUtils.CompareIdentities(AppDomain.CurrentDomain.ActivationContext, activationContext)) { 135ManifestRunner runner = new ManifestRunner(AppDomain.CurrentDomain, activationContext); 142AppDomainSetup currentDomainSetup = AppDomain.CurrentDomain.SetupInformation; 158Evidence activatorEvidence = AppDomain.CurrentDomain.Evidence; 165HostSecurityManager securityManager = AppDomain.CurrentDomain.HostSecurityManager; 172ObjRef or = AppDomain.nCreateInstance(adSetup.ActivationArguments.ApplicationIdentity.FullName, 175appEvidence == null ? AppDomain.CurrentDomain.InternalEvidence : null, 176AppDomain.CurrentDomain.GetSecurityDescriptor());
system\bcldebug.cs (9)
122if (AppDomain.CurrentDomain.IsUnloadingForcedFinalize()) 136if (AppDomain.CurrentDomain.IsUnloadingForcedFinalize()) 165if (AppDomain.CurrentDomain.IsUnloadingForcedFinalize()) 212if (AppDomain.CurrentDomain.IsUnloadingForcedFinalize()) 225if (AppDomain.CurrentDomain.IsUnloadingForcedFinalize()) 242if (AppDomain.CurrentDomain.IsUnloadingForcedFinalize()) 353if (AppDomain.CurrentDomain.IsUnloadingForcedFinalize()) 377if (AppDomain.CurrentDomain.IsUnloadingForcedFinalize()) 425if (AppDomain.CurrentDomain.IsUnloadingForcedFinalize())
system\compatibilityswitches.cs (1)
46bool? result = AppDomain.CurrentDomain.IsCompatibilitySwitchSet(compatibilitySwitch);
system\diagnostics\eventing\eventsource.cs (3)
638return new Guid(unchecked((uint)AppDomain.GetCurrentThreadId()), 4416AppDomain.CurrentDomain.ProcessExit += DisposeOnShutdown; 4417AppDomain.CurrentDomain.DomainUnload += DisposeOnShutdown;
system\environment.cs (8)
455if (AppDomain.IsAppXModel() && !AppDomain.IsAppXDesignMode()) { 621if (AppDomain.IsAppXModel() && !AppDomain.IsAppXDesignMode()) { 760if (AppDomain.IsAppXModel() && !AppDomain.IsAppXDesignMode()) { 907if (AppDomain.IsAppXModel() && !AppDomain.IsAppXDesignMode()) {
system\exception.cs (1)
674if (AppDomain.IsAppXModel())
system\globalization\cultureinfo.cs (4)
269if (AppDomain.IsAppXNGen) 304if (AppDomain.IsAppXNGen) 749if (AppDomain.IsAppXModel()) { 847if (AppDomain.IsAppXModel()) {
system\io\isolatedstorage\isolatedstorage.cs (3)
563AppDomain domain; 617AppDomain domain; 641ActivationContext activationContext = AppDomain.CurrentDomain.ActivationContext;
system\io\isolatedstorage\isolatedstoragefile.cs (1)
1628ActivationContext activationContext = AppDomain.CurrentDomain.ActivationContext;
system\reflection\assembly.cs (22)
413AppDomain.CheckLoadByteArraySupported(); 435AppDomain.CheckReflectionOnlyLoadSupported(); 465AppDomain.CheckLoadByteArraySupported(); 490AppDomain.CheckLoadByteArraySupported(); 520AppDomain.CheckLoadByteArraySupported(); 551AppDomain.CheckLoadByteArraySupported(); 553if (securityEvidence != null && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 585AppDomain.CheckLoadFileSupported(); 604AppDomain.CheckLoadFileSupported(); 606if (securityEvidence != null && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 662AppDomainManager domainManager = AppDomain.CurrentDomain.DomainManager; 1702if (securityEvidence != null && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 1766AppDomain.CheckReflectionOnlyLoadSupported(); 1816AppDomain.CheckLoadFromSupported(); 1831if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 1976if(IsFrameworkAssembly(an) || !AppDomain.IsAppXModel()) 1986if (AppDomain.IsAppXModel()) 2014if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 2022AppDomain.CheckLoadWithPartialNameSupported(stackMark); 2040if(IsFrameworkAssembly(an) || !AppDomain.IsAppXModel()) 2925bool bIsAppXDevMode = AppDomain.IsAppXDesignMode(); 2964if (!AppDomain.IsAppXModel())
system\reflection\ConstructorInfo.cs (2)
205return !AppDomain.ProfileAPICheck || !IsNonW8PFrameworkAPI(); 255if (AppDomain.ProfileAPICheck && IsNonW8PFrameworkAPI())
system\reflection\emit\assemblybuilder.cs (5)
296internal AssemblyBuilder(AppDomain domain, 446if (AppDomain.ProfileAPICheck) 529private static extern Assembly nCreateDynamicAssembly(AppDomain domain, 560if (evidence != null && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 569return new AssemblyBuilder(AppDomain.CurrentDomain,
system\reflection\emit\dynamicilgenerator.cs (2)
762!AppDomain.CurrentDomain.IsFinalizingForUnload()) 789!AppDomain.CurrentDomain.IsFinalizingForUnload())
system\reflection\emit\dynamicmethod.cs (2)
334AppDomain.PublishAnonymouslyHostedDynamicMethodsAssembly(assembly.GetNativeHandle()); 427if (AppDomain.ProfileAPICheck)
system\reflection\emit\typebuilder.cs (1)
747AppDomain.CheckDefinePInvokeSupported();
system\reflection\fieldinfo.cs (1)
475if (AppDomain.ProfileAPICheck && IsNonW8PFrameworkAPI())
system\reflection\loaderallocator.cs (1)
54!AppDomain.CurrentDomain.IsFinalizingForUnload())
system\reflection\methodinfo.cs (2)
180return !AppDomain.ProfileAPICheck || !IsNonW8PFrameworkAPI(); 237if (AppDomain.ProfileAPICheck && IsNonW8PFrameworkAPI())
system\resources\resourcemanager.cs (11)
287Contract.Assert(!AppDomain.IsAppXModel() || AppDomain.IsAppXDesignMode()); 320Contract.Assert(!AppDomain.IsAppXModel() || AppDomain.IsAppXDesignMode()); 396Contract.Assert(!AppDomain.IsAppXModel() || AppDomain.IsAppXDesignMode()); 993Contract.Assert(AppDomain.IsAppXModel()); 1112if (AppDomain.IsAppXModel() && !AppDomain.IsAppXNGen) 1134if (AppDomain.IsAppXDesignMode()) 1519String fileName = AppDomain.CurrentDomain.FusionStore.ConfigurationFileInternal;
system\rttype.cs (1)
2701if (AppDomain.ProfileAPICheck && IsNonW8PFrameworkAPI())
system\runtime\designerservices\windowsruntimedesignercontext.cs (5)
72if (!AppDomain.CurrentDomain.IsDefaultAppDomain()) 76if (!AppDomain.IsAppXModel()) 82if (designModeRequired && !AppDomain.IsAppXDesignMode()) 106if (!AppDomain.CurrentDomain.IsDefaultAppDomain()) 127if (!AppDomain.CurrentDomain.IsDefaultAppDomain())
system\runtime\interopservices\gchandlecookietable.cs (2)
166byte ADID = (byte)(AppDomain.CurrentDomain.Id % 0xFF); 192byte ADID = (byte)(AppDomain.CurrentDomain.Id % 0xFF);
system\runtime\interopservices\marshal.cs (3)
2548System.AppDomain ad, 2574System.AppDomain ad, 2594System.AppDomain ad)
system\runtime\interopservices\typelibconverter.cs (3)
137AppDomain currentDomain = Thread.GetDomain(); 233AppDomain currentDomain = Thread.GetDomain(); 599string asmName = AppDomain.CurrentDomain.ApplyPolicy(args.Name);
system\runtime\interopservices\windowsruntime\custompropertyimpl.cs (1)
128Contract.Assert(AppDomain.CurrentDomain.PermissionSet.IsUnrestricted());
system\runtime\interopservices\windowsruntime\windowsruntimemarshal.cs (4)
1145if (!AppDomain.IsAppXModel()) 1241AppDomain hostDomain = AppDomain.CreateDomain(Environment.GetResourceString("WinRTHostDomainName", appBase), null, hostDomainSetup); 1252AppDomain.Unload(hostDomain);
system\runtime\interopservices\windowsruntime\windowsruntimemetadata.cs (3)
77internal static RuntimeAssembly[] OnReflectionOnlyNamespaceResolveEvent(AppDomain appDomain, RuntimeAssembly assembly, string namespaceName) 97retAssemblies[retIndex] = AppDomain.GetRuntimeAssembly(asm); 112internal static string[] OnDesignerNamespaceResolveEvent(AppDomain appDomain, string namespaceName)
system\runtime\remoting\channelservices.cs (2)
163AppDomain.CurrentDomain.DomainUnload += new EventHandler(UnloadHandler); 679if (srvId.ServerType == typeof(System.AppDomain))
system\runtime\remoting\context.cs (2)
66private AppDomain _appDomain; // AppDomain property of the context 185internal virtual AppDomain AppDomain
system\runtime\remoting\messagesmuggler.cs (1)
90objRef.SetDomainID(AppDomain.CurrentDomain.GetId());
system\runtime\remoting\objref.cs (2)
948if (AppDomain.IsDomainIdValid(xadData.DomainID)) 1022if (o is AppDomain){
system\runtime\remoting\remotingservices.cs (4)
613if (!(Obj is AppDomain)) 1821AppDomain proxy = null; 1826proxy = (AppDomain)Unmarshal(objRef); 1847objref.SetDomainID(AppDomain.CurrentDomain.GetId());
system\runtime\serialization\objectclonehelper.cs (1)
75objRef.SetDomainID(AppDomain.CurrentDomain.GetId());
system\runtime\versioning\binarycompatibility.cs (1)
492String targetFrameworkName = AppDomain.CurrentDomain.GetTargetFrameworkName();
system\runtime\versioning\resourceattributes.cs (1)
145safeName.Append(AppDomain.CurrentDomain.Id);
system\security\codeaccesssecurityengine.cs (9)
644if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 707ApplicationTrust domainTrust = AppDomain.CurrentDomain.SetupInformation.ApplicationTrust; 716if (CompatibilitySwitches.IsNetFx40LegacySecurityPolicy || AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 733Contract.Assert(!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled); // This API does not do CAS policy resolution 766HostSecurityManager securityManager = AppDomain.CurrentDomain.HostSecurityManager; 788if (AppDomain.CurrentDomain.IsHomogenous) 799PermissionSet homogenousGrantSet = AppDomain.CurrentDomain.ApplicationTrust.DefaultGrantSet.PermissionSet; 813else if (AppDomain.CurrentDomain.IsHomogenous) 815grantSet = AppDomain.CurrentDomain.GetHomogenousGrantSet(evidence);
system\security\framesecuritydescriptor.cs (1)
155BCLDebug.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled, "Deny is only valid in legacy CAS mode");
system\security\hostsecuritymanager.cs (7)
66if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 131if (AppDomain.CurrentDomain.ApplicationTrust != null && 132CmsUtils.CompareIdentities(AppDomain.CurrentDomain.ApplicationTrust.ApplicationIdentity, activationArgs.ApplicationIdentity, ApplicationVersionMatch.MatchExactVersion)) 134appTrust = AppDomain.CurrentDomain.ApplicationTrust; 175else if (AppDomain.CurrentDomain.IsHomogenous) 177return AppDomain.CurrentDomain.GetHomogenousGrantSet(evidence); 179else if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled)
system\security\permissionset.cs (1)
2370AppDomain.CurrentDomain.SetAppDomainPolicy( level );
system\security\policy\appdomainevidencefactory.cs (6)
19private AppDomain m_targetDomain; 22internal AppDomainEvidenceFactory(AppDomain target) 25Contract.Assert(target == AppDomain.CurrentDomain, "AppDomainEvidenceFactory should not be used across domains."); 56BCLDebug.Assert(m_targetDomain == AppDomain.CurrentDomain, "AppDomainEvidenceFactory should not be used across domains."); 88AppDomain defaultDomain = AppDomain.GetDefaultDomain();
system\security\policy\applicationsecuritymanager.cs (1)
44AppDomainManager domainManager = AppDomain.CurrentDomain.DomainManager;
system\security\policy\assemblyevidencefactory.cs (2)
131Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled); 230HostSecurityManager securityManager = AppDomain.CurrentDomain.HostSecurityManager;
system\security\policy\evidence.cs (10)
257if (AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 529if (AppDomain.CurrentDomain.DomainManager != null) 531HostSecurityManager hsm = AppDomain.CurrentDomain.DomainManager.HostSecurityManager; 536AppDomain targetDomain = m_target.Target as AppDomain; 1311AppDomain targetDomain = m_target.Target as AppDomain; 1317hostEvidence = AppDomain.CurrentDomain.HostSecurityManager.GenerateAppDomainEvidence(type); 1321hostEvidence = AppDomain.CurrentDomain.HostSecurityManager.GenerateAssemblyEvidence(type, targetAssembly); 1330string hostType = AppDomain.CurrentDomain.HostSecurityManager.GetType().FullName;
system\security\policymanager.cs (3)
82BCLDebug.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled, "We're about to apply policy in a policy disabled app"); 91Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled); 108bool legacyIgnoreSystemPolicy = (AppDomain.CurrentDomain.GetData("IgnoreSystemPolicy") != null);
system\security\securitymanager.cs (13)
171if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 245if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 261if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 273if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 290if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 354if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 371if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 383if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 396if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled) 414Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled); 437Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled); 502BCLDebug.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled, "Evaluating assembly level declarative security without legacy CAS policy enabled"); 513BCLDebug.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled, "Evaluating assembly level declarative security without legacy CAS policy enabled");
system\security\securityruntime.cs (1)
181if (!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled)
system\threading\overlapped.cs (1)
186Contract.Assert(m_AppDomainId == 0 || m_AppDomainId == AppDomain.CurrentDomain.Id, "OverlappedData is not in the current domain");
system\threading\synchronizationcontext.cs (1)
289if (!AppDomain.IsAppXModel())
system\threading\Tasks\AsyncCausalityTracer.cs (1)
291return (((ulong)AppDomain.CurrentDomain.Id) << 32) + taskId;
system\threading\Tasks\TaskExceptionHolder.cs (2)
85AppDomain.CurrentDomain.DomainUnload += s_adUnloadEventHandler; 104!Environment.HasShutdownStarted && !AppDomain.CurrentDomain.IsFinalizingForUnload() && !s_domainUnloadStarted)
system\threading\thread.cs (7)
1150if(AppDomain.IsAppXModel()) { 1269if(AppDomain.IsAppXModel()) { 1461private static extern AppDomain GetDomainInternal(); 1465private static extern AppDomain GetFastDomainInternal(); 1468public static AppDomain GetDomain() 1470Contract.Ensures(Contract.Result<AppDomain>() != null); 1473AppDomain ad;
system\threading\threadpool.cs (1)
925if (!(Environment.HasShutdownStarted || AppDomain.CurrentDomain.IsFinalizingForUnload()))
system\threading\timer.cs (1)
767if (Environment.HasShutdownStarted || AppDomain.CurrentDomain.IsFinalizingForUnload())
PresentationBuildTasks (11)
BuildTasks\Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (2)
1238AppDomain appDomain = null; 1299AppDomain.Unload(appDomain);
BuildTasks\Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs (2)
654AppDomain appDomain = null; 721AppDomain.Unload(appDomain);
BuildTasks\MS\Internal\Tasks\TaskHelper.cs (3)
368internal static CompilerWrapper CreateCompilerWrapper(bool fInSeparateDomain, ref AppDomain appDomain) 379appDomain = AppDomain.CreateDomain("markupCompilationAppDomain", null, AppDomain.CurrentDomain.SetupInformation);
Framework\System\Windows\Markup\XamlTypeMapper.cs (2)
449AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += _areh; 457AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve -= _areh;
Shared\System\Windows\Markup\ReflectionHelper.cs (2)
544Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); 598Assembly[] assemblies = AppDomain.CurrentDomain.ReflectionOnlyGetAssemblies();
PresentationCore (13)
Core\CSharp\MS\Internal\AppModel\SiteOfOriginContainer.cs (3)
62siteOfOrigin = BaseUriHelper.FixFileUri(new Uri(System.AppDomain.CurrentDomain.BaseDirectory)); 296AppDomain currentDomain = AppDomain.CurrentDomain;
Core\CSharp\System\Windows\Media\MediaPlayerState.cs (3)
117AppDomain.CurrentDomain.ProcessExit -= _helper.ProcessExitHandler; 936AppDomain.CurrentDomain.ProcessExit += _helper.ProcessExitHandler; 975Uri appBase = SecurityHelper.GetBaseDirectory(AppDomain.CurrentDomain);
Shared\MS\Internal\AppDomainShutdownMonitor.cs (2)
29AppDomain.CurrentDomain.DomainUnload += OnShutdown; 30AppDomain.CurrentDomain.ProcessExit += OnShutdown;
Shared\MS\Internal\SafeSecurityHelper.cs (1)
184Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
Shared\MS\Internal\SecurityHelper.cs (4)
375PermissionSet permissionSetAppDomain = AppDomain.CurrentDomain.PermissionSet; 403return psToCheck.IsSubsetOf(AppDomain.CurrentDomain.PermissionSet); 410internal static Uri GetBaseDirectory(AppDomain domain) 557PermissionSet permissionSetAppDomain = AppDomain.CurrentDomain.PermissionSet;
PresentationFramework (27)
parent\InternalApis\Clr\inc\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
src\Framework\MS\Internal\AppModel\ApplicationProxyInternal.cs (2)
212if (!AppDomain.CurrentDomain.IsDefaultAppDomain()) 240Invariant.Assert(AppDomain.CurrentDomain.FriendlyName == "XamlViewer");
src\Framework\MS\Internal\AppModel\PresentationAppDomainManager.cs (13)
205if (AppDomain.CurrentDomain.SetupInformation.ActivationArguments != null && 206AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData.Length > index) 208if (AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[index] == true.ToString()) 226if (AppDomain.CurrentDomain.SetupInformation.ActivationArguments != null && 227AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData.Length > index) 229if (!string.IsNullOrEmpty(AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[index])) 231uri = new UriBuilder(AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[index]).Uri; 281if (AppDomain.CurrentDomain.ActivationContext != null && 282AppDomain.CurrentDomain.ActivationContext.Identity.ToString().Equals(actCtx.Identity.ToString())) 298return new ObjectHandle(AppDomain.CurrentDomain); 347AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(_assemblyFilter.FilterCallback); 378internal static AppDomain NewAppDomain 423private static AppDomain _newAppDomain;
src\Framework\MS\Internal\AppModel\ResourceContainer.cs (1)
230AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(OnAssemblyLoadEventHandler);
src\Framework\MS\Internal\AppModel\XappLauncher.cs (2)
348AppDomain newDomain = (AppDomain)oh.Unwrap();
src\Framework\System\Windows\Documents\WinRTSpellerInterop.cs (2)
111WeakEventManager<AppDomain, UnhandledExceptionEventArgs> 112.AddHandler(AppDomain.CurrentDomain, "UnhandledException", ProcessUnhandledException);
src\Framework\System\Windows\Interop\DocobjHost.cs (5)
1016AppDomain appDomain = AppDomain.CreateDomain(domainName, null, domainSetup, grantSet, null); 1169AppDomain.CurrentDomain.UnhandledException += this.ProcessUnhandledException; 1378AppDomain newDomain = oh.Unwrap() as AppDomain;
src\Framework\System\Windows\Markup\XmlnsCache.cs (1)
200Assembly[] asmList = AppDomain.CurrentDomain.GetAssemblies();
SMDiagnostics (1)
System\ServiceModel\Diagnostics\LegacyDiagnosticTrace.cs (1)
205values["AppDomain.FriendlyName"] = AppDomain.CurrentDomain.FriendlyName;
SMSvcHost (4)
System\ServiceModel\Activation\Diagnostics\ListenerPerfCounters.cs (3)
54AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ListenerPerfCounters.ExitOrUnloadEventHandler); 55AppDomain.CurrentDomain.DomainUnload += new EventHandler(ListenerPerfCounters.ExitOrUnloadEventHandler); 56AppDomain.CurrentDomain.ProcessExit += new EventHandler(ListenerPerfCounters.ExitOrUnloadEventHandler);
System\ServiceModel\Activation\SMSvcHost.cs (1)
94AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
System (45)
compmod\microsoft\win32\SystemEvents.cs (5)
390Convert.ToString(AppDomain.CurrentDomain.GetHashCode(), 16), 753AppDomain.CurrentDomain.ProcessExit += new EventHandler(SystemEvents.Shutdown); 754AppDomain.CurrentDomain.DomainUnload += new EventHandler(SystemEvents.Shutdown); 1287if (checkFinalization && AppDomain.CurrentDomain.IsFinalizingForUnload()) { 1640if (!checkFinalization || !AppDomain.CurrentDomain.IsFinalizingForUnload()) {
compmod\system\componentmodel\design\DesigntimeLicenseContext.cs (3)
93string rawFile = (string)AppDomain.CurrentDomain.SetupInformation.LicenseFile; 101codeBase = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; 121foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
net\System\Net\_AutoWebProxyScriptWrapper.cs (15)
488private AppDomain scriptDomain; 493private static volatile AppDomain s_ExcessAppDomain; 504AppDomain.CurrentDomain.DomainUnload += new EventHandler(OnDomainUnload); 606AppDomain excessAppDomain = s_ExcessAppDomain; 622s_ExcessAppDomain = AppDomain.CreateDomain(c_appDomainName, null, s_AppDomainInfo, permissionSet, null); 697AppDomain domain = context as AppDomain; 708AppDomain.Unload(domain); 724AppDomain appDomain; 737appDomain = (AppDomain) s_AppDomains[index]; 752AppDomain.Unload(appDomain); 782foreach (AppDomain domain in s_AppDomains.Values) 786AppDomain.Unload(domain); 791AppDomain excessAppDomain = s_ExcessAppDomain; 796AppDomain.Unload(excessAppDomain);
net\System\Net\_NetworkingPerfCounters.cs (4)
210AppDomain.CurrentDomain.DomainUnload += new EventHandler(UnloadEventHandler); 211AppDomain.CurrentDomain.ProcessExit += new EventHandler(ExitEventHandler); 212AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionEventHandler); 358string friendlyName = ReplaceInvalidChars(AppDomain.CurrentDomain.FriendlyName);
net\System\Net\_TimerThread.cs (1)
185AppDomain.CurrentDomain.DomainUnload += new EventHandler(OnDomainUnload);
net\System\Net\Configuration\UriSection.cs (2)
161appConfigFilePath = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; 246string appVPath = AppDomain.CurrentDomain.GetData(".appVPath") as string;
net\System\Net\Internal.cs (1)
90return Environment.HasShutdownStarted || AppDomain.CurrentDomain.IsFinalizingForUnload();
net\System\Net\Logging.cs (2)
214AppDomain currentDomain = AppDomain.CurrentDomain;
net\System\Net\NetworkInformation\TeredoHelper.cs (1)
53AppDomain.CurrentDomain.DomainUnload += new EventHandler(OnAppDomainUnload);
net\System\Net\WebSockets\ClientWebSocket.cs (1)
540if (AppDomain.CurrentDomain.IsFullyTrusted)
parent\parent\parent\InternalApis\Clr\inc\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
parent\parent\parent\InternalApis\NDP_Common\inc\PinnableBufferCache.cs (1)
550if (!Environment.HasShutdownStarted && !AppDomain.CurrentDomain.IsFinalizingForUnload())
regex\system\text\regularexpressions\Regex.cs (2)
390AppDomain ad = AppDomain.CurrentDomain;
regex\system\text\regularexpressions\RegexCompiler.cs (1)
3097_assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(an, AssemblyBuilderAccess.RunAndSave, assemblyAttributes);
sys\system\configuration\ApplicationSettingsBase.cs (3)
673ActivationContext actCtx = AppDomain.CurrentDomain.ActivationContext; 675if (IsClickOnceDeployed(AppDomain.CurrentDomain)) { 689internal static bool IsClickOnceDeployed(AppDomain appDomain) {
sys\system\configuration\LocalFileSettingsProvider.cs (1)
425bool roamingSupported = !ApplicationSettingsBase.IsClickOnceDeployed(AppDomain.CurrentDomain);
sys\system\configuration\SettingsPropertyValue.cs (1)
92return AppDomain.CurrentDomain.GetData(".appDomain") != null;
System.Activities (4)
Microsoft\VisualBasic\Activities\XamlIntegration\VisualBasicExpressionConverter.cs (2)
240AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoaded; 242Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
System\Activities\Debugger\StateManager.cs (1)
701assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run, null, true, new CustomAttributeBuilder[] { transparent });
System\Activities\Expressions\AssemblyReference.cs (1)
169Assembly[] currentAssemblies = AppDomain.CurrentDomain.GetAssemblies();
System.Activities.Core.Presentation (2)
System\Activities\Core\Presentation\RegisterMetadataDelayedWorker.cs (2)
39AppDomain.CurrentDomain.AssemblyLoad += this.onAssemblyLoadedEventHandler; 54foreach (Assembly loadedAssembly in AppDomain.CurrentDomain.GetAssemblies())
System.Activities.Presentation (6)
System.Activities.Presentation\System\Activities\Presentation\View\AssemblyContextControlItem.cs (2)
69foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) 86return AppDomain.CurrentDomain.GetAssemblies().Where<Assembly>(assembly => !assembly.IsDynamic);
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (2)
1472object data = AppDomain.CurrentDomain.GetData(dataObjectKey); 1478AppDomain.CurrentDomain.SetData(dataObjectKey, null);
System.Activities.Presentation\System\Activities\Presentation\View\ImportDesigner.xaml.cs (2)
114AppDomain.CurrentDomain.AssemblyLoad -= this.proxy.OnAssemblyLoad; 719AppDomain.CurrentDomain.AssemblyLoad += this.proxy.OnAssemblyLoad;
System.AddIn (57)
System\Addin\Hosting\ActivationWorker.cs (3)
50AppDomain.CurrentDomain.AssemblyResolve -= _assemblyResolver; 126AppDomain.CurrentDomain.AssemblyResolve += _assemblyResolver; 150foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System\Addin\Hosting\AddInActivator.cs (14)
78return AppDomain.CurrentDomain.PermissionSet; 111private static AppDomain CreateDomain(AddInToken token, PermissionSet permissionSet, String appDomainName) 118AppDomain domain = AppDomain.CreateDomain(appDomainName, 119AppDomain.CurrentDomain.Evidence, setup, permissionSet, 156AppDomain domain = null; 179internal static T Activate<T>(AddInToken token, AppDomain target) 304private static T ActivateInAppDomain<T>(AddInToken pipeline, AppDomain domain, AddInControllerImpl controller, bool weOwn) 309bool usingHostAppDomain = domain == AppDomain.CurrentDomain; 402AppDomain.CurrentDomain.AssemblyResolve += assemblyResolver; 421AppDomain.CurrentDomain.AssemblyResolve -= assemblyResolver; 533AppDomain.CurrentDomain.AssemblyResolve += assemblyResolver; 549AppDomain.CurrentDomain.AssemblyResolve -= assemblyResolver; 586foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) {
System\Addin\Hosting\AddInController.cs (1)
72public AppDomain AppDomain {
System\Addin\Hosting\AddInControllerImpl.cs (1)
342internal AppDomain AppDomain {
System\Addin\Hosting\AddInEnvironment.cs (6)
28private AppDomain _appDomain; 33public AddInEnvironment(AppDomain appDomain) 39if (appDomain != AppDomain.CurrentDomain && !Utils.HasFullTrust()) { 49internal AddInEnvironment(AppDomain appDomain, bool skipDomainCheck) 70internal AppDomain AppDomain 94AppDomain.Unload(AppDomain);
System\Addin\Hosting\AddInServer.cs (6)
54AppDomain domain; 60domain = AppDomain.CreateDomain(token.Name, 61AppDomain.CurrentDomain.Evidence, setup, permissionSet, 141AppDomain.CurrentDomain.SetData(ContractHandle.s_appDomainOwner, contract); 175AppDomain.Unload(AppDomain.CurrentDomain);
System\Addin\Hosting\AddInStore.cs (4)
1134return AppDomain.CurrentDomain.BaseDirectory; 1151AppDomain domain = null; 1194private static AppDomain CreateWorkerDomain(string appBase) 1196return AppDomain.CreateDomain("Add-In Model Discovery worker AD", null, appBase, null, false);
System\Addin\Hosting\AddInToken.cs (2)
277public T Activate<T>(AppDomain target) 279if (target != AppDomain.CurrentDomain && !Utils.HasFullTrust())
System\Addin\Hosting\InspectionWorker.cs (3)
172return Assembly.ReflectionOnlyLoad(AppDomain.CurrentDomain.ApplyPolicy(assemblyRef)); 203AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += assemblyResolver; 328AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve -= assemblyResolver;
System\Addin\Hosting\Utils.cs (3)
207foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) { 273internal static void UnloadAppDomain(AppDomain domain) 275AppDomain.Unload(domain);
System\Addin\MiniReflection\MiniAssembly.cs (5)
219return AppDomain.CurrentDomain.ApplyPolicy(_reflectionAssembly.FullName); 224_fullName = AppDomain.CurrentDomain.ApplyPolicy(assemblyInfo.ToString()); 260nameA = AppDomain.CurrentDomain.ApplyPolicy(assemblyA._reflectionAssembly.FullName); 265nameA = AppDomain.CurrentDomain.ApplyPolicy(assemblyInfoA.ToString()); 269nameRefB = AppDomain.CurrentDomain.ApplyPolicy(assemblyInfoB.ToString());
System\Addin\Pipeline\ContractBase.cs (7)
130IContract owner = ContractHandle.AppDomainOwner(AppDomain.CurrentDomain); 162IContract owner = ContractHandle.AppDomainOwner(AppDomain.CurrentDomain); 214AppDomain.Unload(AppDomain.CurrentDomain); 228AppDomain.Unload(AppDomain.CurrentDomain); 236Trace.WriteLine(String.Format(System.Globalization.CultureInfo.CurrentCulture, Res.FailedToUnloadAppDomain, AppDomain.CurrentDomain.FriendlyName, ex.Message));
System\Addin\Pipeline\ContractHandle.cs (2)
86public static bool ContractOwnsAppDomain(IContract contract, AppDomain domain) 97public static IContract AppDomainOwner(AppDomain domain)
System.ComponentModel.DataAnnotations (4)
DataAnnotations\EmailAddressAttribute.cs (1)
62if (AppDomain.CurrentDomain.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") == null) {
DataAnnotations\PhoneAttribute.cs (1)
77if (AppDomain.CurrentDomain.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") == null) {
DataAnnotations\UrlAttribute.cs (1)
55if (AppDomain.CurrentDomain.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") == null) {
parent\parent\parent\parent\parent\parent\InternalApis\Clr\inc\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
System.Configuration (11)
System\Configuration\BaseConfigurationRecord.cs (2)
280if (AppDomain.CurrentDomain.IsHomogenous) 283_restrictedPermissions = AppDomain.CurrentDomain.PermissionSet;
System\Configuration\ClientConfigPaths.cs (9)
79AppDomain domain = AppDomain.CurrentDomain; 163if (this.IsClickOnceDeployed(AppDomain.CurrentDomain)) { 164string dataPath = AppDomain.CurrentDomain.GetData(ClickOnceDataDirectory) as string; 182string validAppDomainName = Validate(AppDomain.CurrentDomain.FriendlyName, true); 185string hashSuffix = GetTypeAndHashSuffix(AppDomain.CurrentDomain, applicationUriLower); 343private string GetTypeAndHashSuffix(AppDomain appDomain, string exePath) { 367private static object GetEvidenceInfo(AppDomain appDomain, string exePath, out string typeName) { 425private bool IsClickOnceDeployed(AppDomain appDomain) {
System.Core (3)
Microsoft\Scripting\Actions\CallSiteBinder.cs (1)
146if (!AppDomain.CurrentDomain.IsHomogenous) {
Microsoft\Scripting\Compiler\AssemblyGen.cs (1)
95_myAssembly = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.Run, attributes);
System\Diagnostics\EventSchemaTraceListener.cs (1)
89 this.fileName = Path.Combine(Path.GetDirectoryName(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile), this.fileName);
System.Data (21)
cdf\src\NetFx40\Tools\Microsoft.Tools.Common\Microsoft\VisualStudio\Activities\WorkflowDesignerExtensionManager.cs (2)
171AppDomain.CurrentDomain.AssemblyResolve += this.ExtensionAssemblyResolver; 189AppDomain.CurrentDomain.AssemblyResolve -= this.ExtensionAssemblyResolver;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\AssemblyContextControlItem.cs (2)
69foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) 86return AppDomain.CurrentDomain.GetAssemblies().Where<Assembly>(assembly => !assembly.IsDynamic);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (2)
1472object data = AppDomain.CurrentDomain.GetData(dataObjectKey); 1478AppDomain.CurrentDomain.SetData(dataObjectKey, null);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ImportDesigner.xaml.cs (2)
114AppDomain.CurrentDomain.AssemblyLoad -= this.proxy.OnAssemblyLoad; 719AppDomain.CurrentDomain.AssemblyLoad += this.proxy.OnAssemblyLoad;
fx\src\bid\inc\cs\bidPrivateBase.cs (2)
859string name = AppDomain.CurrentDomain.FriendlyName; 861name = "AppDomain.H" + AppDomain.CurrentDomain.GetHashCode();
fx\src\data\System\Data\Common\DbConnectionOptions.cs (2)
392object rootFolderObject = AppDomain.CurrentDomain.GetData("DataDirectory"); 398rootFolderPath = AppDomain.CurrentDomain.BaseDirectory;
fx\src\data\System\Data\ProviderBase\DbConnectionPoolCounters.cs (5)
169AppDomain.CurrentDomain.DomainUnload += new EventHandler(this.UnloadEventHandler); 170AppDomain.CurrentDomain.ProcessExit += new EventHandler(this.ExitEventHandler); 171AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(this.ExceptionEventHandler); 236AppDomain appDomain = AppDomain.CurrentDomain;
fx\src\data\System\Data\SqlClient\LocalDBAPI.cs (1)
268object partialTrustFlagValue = AppDomain.CurrentDomain.GetData(const_partialTrustFlagKey);
fx\src\data\System\Data\SqlClient\SqlConnection.cs (1)
1930uint tid = (uint)AppDomain.GetCurrentThreadId(); // Sql Debugging doesn't need fiber support;
fx\src\data\System\Data\SqlClient\SqlDependencyUtils.cs (1)
107AppDomain.CurrentDomain.DomainUnload += new EventHandler(this.UnloadEventHandler);
fx\src\data\System\Data\SqlClient\TdsParserStaticMethods.cs (1)
123return AppDomain.GetCurrentThreadId(); // don't need this to be support fibres;
System.Data.Entity (6)
System\Data\Common\EntityUtil.cs (1)
2083string fxname = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
System\Data\EntityClient\DbConnectionOptions.cs (2)
110object rootFolderObject = AppDomain.CurrentDomain.GetData("DataDirectory"); 118rootFolderPath = AppDomain.CurrentDomain.BaseDirectory;
System\Data\Metadata\DefaultAssemblyResolver.cs (1)
87Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
System\Data\Objects\Internal\EntityProxyFactory.cs (2)
85AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, s_ProxyAssemblyBuilderAccess, attributeBuilders); 441AppDomain.CurrentDomain.AssemblyResolve += resolveHandler;
System.Data.Linq (1)
Mapping\MappedMetaModel.cs (1)
334foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) {
System.Data.Services.Client (1)
System\Data\Services\Client\ClientType.cs (1)
491foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System.Data.SqlXml (3)
System\Xml\Xsl\IlGen\XmlILModule.cs (2)
59asmBldr = AppDomain.CurrentDomain.DefineDynamicAssembly(asmName, AssemblyBuilderAccess.Run); 131asmBldr = AppDomain.CurrentDomain.DefineDynamicAssembly(
System\Xml\Xsl\QIL\QilXmlReader.cs (1)
348foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
System.Drawing (11)
commonui\System\Drawing\Advanced\Gdiplus.cs (6)
139Debug.WriteLineIf(GdiPlusInitialization.TraceVerbose, "Initialize GDI+ [" + AppDomain.CurrentDomain.FriendlyName + "]"); 156AppDomain currentDomain = AppDomain.CurrentDomain; 174Debug.WriteLineIf(GdiPlusInitialization.TraceVerbose, "Shutdown GDI+ [" + AppDomain.CurrentDomain.FriendlyName + "]"); 205AppDomain currentDomain = AppDomain.CurrentDomain;
commonui\System\Drawing\BufferedGraphicsManager.cs (2)
41AppDomain.CurrentDomain.ProcessExit += new EventHandler(BufferedGraphicsManager.OnShutdown); 42AppDomain.CurrentDomain.DomainUnload += new EventHandler(BufferedGraphicsManager.OnShutdown);
commonui\System\Drawing\Graphics.cs (2)
4580AppDomain.CurrentDomain.DomainUnload += new EventHandler(OnDomainUnload); 4582AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnDomainUnload);
parent\parent\parent\InternalApis\Clr\inc\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
System.IdentityModel (1)
parent\parent\parent\parent\parent\InternalApis\Clr\inc\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
System.IO.Compression.FileSystem (1)
parent\parent\parent\InternalApis\Clr\inc\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
System.IO.Log (1)
System\IO\Log\OverlappedAsyncResult.cs (1)
58!AppDomain.CurrentDomain.IsFinalizingForUnload())
System.Management (2)
Instrumentation\EventSource.cs (2)
207AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProcessExit); 208AppDomain.CurrentDomain.DomainUnload += new EventHandler(ProcessExit);
System.Net (2)
net\Logging.cs (2)
32AppDomain currentDomain = AppDomain.CurrentDomain;
System.Runtime.Caching (3)
System\Caching\MemoryCache.cs (2)
183AppDomain appDomain = Thread.GetDomain(); 415AppDomain appDomain = Thread.GetDomain();
System\Caching\PerfCounters.cs (1)
52appId = AppDomain.CurrentDomain.FriendlyName;
System.ServiceModel (20)
parent\parent\parent\parent\parent\InternalApis\Clr\inc\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
System\ServiceModel\Activation\AspNetEnvironment.cs (2)
88return AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; 360foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
System\ServiceModel\Administration\AppDomainInfo.cs (2)
25AppDomainInfo(AppDomain appDomain) 106singleton = new AppDomainInfo(AppDomain.CurrentDomain);
System\ServiceModel\Administration\WbemProvider.cs (3)
40AppDomain.CurrentDomain.DomainUnload += new EventHandler(ExitOrUnloadEventHandler); 41AppDomain.CurrentDomain.ProcessExit += new EventHandler(ExitOrUnloadEventHandler); 42AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExitOrUnloadEventHandler);
System\ServiceModel\Channels\HttpChannelHelpers.cs (1)
3421Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
System\ServiceModel\Channels\MsmqQueue.cs (1)
780&& ! AppDomain.CurrentDomain.IsFinalizingForUnload())
System\ServiceModel\Channels\OverlappedContext.cs (1)
79if (this.nativeOverlapped != null && !AppDomain.CurrentDomain.IsFinalizingForUnload() && !Environment.HasShutdownStarted)
System\ServiceModel\Channels\SharedConnectionListener.cs (3)
1519if (AppDomain.CurrentDomain.IsDefaultAppDomain()) 1534AppDomain defaultDomain = (AppDomain)defaultDomainAsObject;
System\ServiceModel\Channels\TcpChannelListener.cs (1)
185static Random randomPortGenerator = new Random(AppDomain.CurrentDomain.GetHashCode() | Environment.TickCount);
System\ServiceModel\ComIntegration\ComPlusInstanceContextInitializer.cs (2)
29AppDomain currentDomain = AppDomain.CurrentDomain;
System\ServiceModel\Diagnostics\MessageLogger.cs (3)
735AppDomain.CurrentDomain.DomainUnload += new EventHandler(ExitOrUnloadEventHandler); 736AppDomain.CurrentDomain.ProcessExit += new EventHandler(ExitOrUnloadEventHandler); 737AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExitOrUnloadEventHandler);
System.ServiceModel.Activation (6)
System\ServiceModel\Activation\ServiceHostFactory.cs (1)
84Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
System\ServiceModel\Activities\Activation\WorkflowServiceHostFactory.cs (1)
378foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System\ServiceModel\ServiceHostingEnvironment.cs (4)
290TD.WebHostRequestStart(eventTraceActivity, AppDomain.CurrentDomain.FriendlyName, requestUrl, relatedId); 509AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; 1324Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); 1866Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
System.ServiceModel.Activities (1)
System\ServiceModel\Activities\WorkflowControlEndpoint.cs (1)
95appDomainId = AppDomain.CurrentDomain.Id;
System.ServiceModel.Channels (2)
System\ServiceModel\Channels\UdpOutputChannel.cs (1)
55this.randomNumberGenerator = new SynchronizedRandom(AppDomain.CurrentDomain.GetHashCode() | Environment.TickCount);
System\ServiceModel\Channels\UdpUtility.cs (1)
165Random randomNumberGenerator = new Random(AppDomain.CurrentDomain.GetHashCode() | Environment.TickCount);
System.ServiceModel.Internals (8)
System\Runtime\Diagnostics\DiagnosticTraceBase.cs (3)
26protected static string AppDomainFriendlyName = AppDomain.CurrentDomain.FriendlyName; 301AppDomain currentDomain = AppDomain.CurrentDomain;
System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (1)
619TraceCore.AppDomainUnload(this, AppDomain.CurrentDomain.FriendlyName,
System\Runtime\IOThreadScheduler.cs (1)
389if (!Environment.HasShutdownStarted && !AppDomain.CurrentDomain.IsFinalizingForUnload())
System\Runtime\PartialTrustHelpers.cs (3)
113return AppDomain.CurrentDomain.IsHomogenous && 114permissions.IsSubsetOf(AppDomain.CurrentDomain.PermissionSet); 135inFullTrust = AppDomain.CurrentDomain.IsFullyTrusted;
System.Transactions (4)
System\Transactions\Trace\DiagnosticTrace.cs (4)
208DiagnosticTrace.AppDomainFriendlyName = AppDomain.CurrentDomain.FriendlyName; 245AppDomain currentDomain = AppDomain.CurrentDomain; 597values["AppDomain.FriendlyName"] = AppDomain.CurrentDomain.FriendlyName;
System.Web (54)
AspNetEventSource.cs (2)
37if (AppDomain.CurrentDomain.IsHomogenous && AppDomain.CurrentDomain.IsFullyTrusted) {
Compilation\BuildManager.cs (1)
395AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(this.ResolveAssembly);
Compilation\BuildManagerHost.cs (1)
72AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(this.ResolveAssembly);
Compilation\BuildResultCache.cs (1)
79AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(OnAssemblyLoad);
DataAccess\SqlConnectionHelper.cs (2)
102string dataDir = AppDomain.CurrentDomain.GetData(s_strDataDir) as string; 119AppDomain.CurrentDomain.SetData(s_strDataDir, dataDir, new FileIOPermission(FileIOPermissionAccess.PathDiscovery, dataDir));
FileChangesMonitor.cs (1)
485bool fNeedToSendFileActionDispose = !AppDomain.CurrentDomain.IsFinalizingForUnload();
Hosting\ApplicationManager.cs (16)
105AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(OnUnhandledException); 125RecordFatalException(AppDomain.CurrentDomain, e); 128internal static void RecordFatalException(AppDomain appDomain, Exception e) { 149AppDomain appDomain = sender as AppDomain; 157if (AppDomain.CurrentDomain.IsDefaultAppDomain() && appManager.FatalExceptionRecorded) { 401public AppDomain GetAppDomain(string appId) { 417public AppDomain GetAppDomain(IApplicationHost appHost) { 425internal AppDomain GetDefaultAppDomain() { 426return AppDomain.CurrentDomain; 908AppDomain appDomain = null; 945AppDomain.CurrentDomain.SetData(_configBuildersIgnoreLoadFailuresSwitch, true); 1199appDomain = AppDomain.CreateDomain(domainId, 1208appDomain = AppDomain.CreateDomain(domainId, 1307AppDomain.Unload(appDomain); 1691Evidence evidence = AppDomain.CurrentDomain.Evidence; // CurrentDomain.Evidence returns a clone so we can modify it if we need
Hosting\BackgroundWorkScheduler.cs (3)
18private readonly Action<AppDomain, Exception> _logCallback; 21internal BackgroundWorkScheduler(Action<BackgroundWorkScheduler> unregisterCallback, Action<AppDomain, Exception> logCallback, Action workItemCompleteCallback = null) { 51_logCallback(AppDomain.CurrentDomain, ex); // method shouldn't throw
Hosting\HostingEnvironment.cs (5)
1443return (AppDomain.CurrentDomain.GetData(".devEnvironment") as bool?) == true; 1460if (AppDomain.CurrentDomain.IsDefaultAppDomain()) { 1481_cacheProviderSettings = AppDomain.CurrentDomain.GetData(".defaultObjectCacheProvider") as NameValueCollection; 1975internal AppDomain HostedAppDomain { 1977return AppDomain.CurrentDomain;
Hosting\IIS7WorkerRequest.cs (1)
2243AppDomain.CurrentDomain.Id,
Hosting\IPipelineRuntime.cs (1)
447if (requestingAppDomainId != AppDomain.CurrentDomain.Id) {
Hosting\ProcessHost.cs (5)
52[Out, MarshalAs(UnmanagedType.Interface)] out AppDomain newlyCreatedAppDomain); 57[In, MarshalAs(UnmanagedType.Interface)] AppDomain newlyCreatedAppDomain); 1190IObjectHandle IProcessHostLite.GetCustomLoader(string appId, string appConfigPath, out IProcessHostSupportFunctions supportFunctions, out AppDomain newlyCreatedAppDomain) { 1230void IProcessHostLite.ReportCustomLoaderError(string appId, int hr, AppDomain newlyCreatedAppDomain) { 1240AppDomain.Unload(newlyCreatedAppDomain);
HttpRuntime.cs (6)
350AppDomain.CurrentDomain.SetData("DataDirectory", dataDirectory, 871AppDomain appDomain = Thread.GetDomain(); 1000AppDomain appDomain = Thread.GetDomain(); 1892AppDomain.Unload(Thread.GetDomain()); 3076AppDomain d = Thread.GetDomain(); 3231AppDomain.CurrentDomain.SetAppDomainPolicy(policyLevel);
Management\AppDomainResourcePerfCounters.cs (5)
28if (AppDomain.MonitoringIsEnabled) { 80_TotalCPUTime = AppDomain.CurrentDomain.MonitoringTotalProcessorTime; 90!AppDomain.MonitoringIsEnabled || // Monitoring APIs will throw NotSupportedException if not-enabled 111long memInKB = (AppDomain.CurrentDomain.MonitoringSurvivedMemorySize / 1024); // Mem used in KB 118TimeSpan newTotalCPUTime = AppDomain.CurrentDomain.MonitoringTotalProcessorTime;
Util\AppVerifier.cs (1)
117Misc.WriteUnhandledExceptionToEventLog(AppDomain.CurrentDomain, ex); // method won't throw
Util\BinaryCompatibility.cs (1)
23Current = new BinaryCompatibility(AppDomain.CurrentDomain.GetData(TargetFrameworkKey) as FrameworkName);
Util\Misc.cs (1)
40internal static void WriteUnhandledExceptionToEventLog(AppDomain appDomain, Exception exception) {
Util\RegexUtil.cs (1)
56timeoutSetInAppDomain = AppDomain.CurrentDomain.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") != null;
System.Web.ApplicationServices (4)
Hosting\CustomLoaderHelper.cs (4)
30internal static IObjectHandle GetCustomLoader(ICustomLoaderHelperFunctions helperFunctions, string appConfigMetabasePath, string configFilePath, string customLoaderPhysicalPath, out AppDomain newlyCreatedAppDomain) { 65AppDomain newAppDomainForCustomLoader = AppDomain.CreateDomain("aspnet-custom-loader-" + Guid.NewGuid(), null, setup); 83AppDomain.Unload(newAppDomainForCustomLoader);
System.Web.Entity.Design (3)
System\Data\WebControls\Design\EntityDataSourceDesignerHelper.cs (3)
1027originalDataDirectory = AppDomain.CurrentDomain.GetData(s_dataDirectoryNoPipes) as string; 1028AppDomain.CurrentDomain.SetData(s_dataDirectoryNoPipes, GetDataDirectory()); 1075AppDomain.CurrentDomain.SetData(s_dataDirectoryNoPipes, originalDataDirectory);
System.Web.Extensions (1)
UI\WebControls\Dynamic.cs (1)
271AssemblyBuilder assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.Run, assemblyAttributes);
System.Web.Services (8)
System\Web\Services\Diagnostics\TraceUtility.cs (2)
75AppDomain currentDomain = AppDomain.CurrentDomain;
System\Web\Services\PartialTrustHelpers.cs (1)
30isInPartialTrustOutsideAspNet = !(AppDomain.CurrentDomain.IsFullyTrusted || HostingEnvironment.IsHosted);
System\Web\Services\Protocols\RemoteDebugger.cs (2)
91AppDomain.CurrentDomain.DomainUnload += new EventHandler(OnAppDomainUnload); 92AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnProcessExit);
System\Web\Services\Protocols\SoapServerMethod.cs (1)
255if (AppDomain.CurrentDomain.IsHomogenous) {
System\Web\Services\Protocols\SoapServerProtocol.cs (1)
116if (AppDomain.CurrentDomain.IsHomogenous) {
System\Web\Services\Protocols\XmlReturnReader.cs (1)
51if (AppDomain.CurrentDomain.IsHomogenous)
System.Windows.Forms (23)
parent\parent\parent\InternalApis\Clr\inc\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
winforms\Managed\System\WinForms\Application.cs (6)
240string data = AppDomain.CurrentDomain.GetData(CLICKONCE_APPS_DATADIRECTORY) as string; 406string data = AppDomain.CurrentDomain.GetData(CLICKONCE_APPS_DATADIRECTORY) as string; 698string data = AppDomain.CurrentDomain.GetData(CLICKONCE_APPS_DATADIRECTORY) as string; 1427string launchUrl = AppDomain.CurrentDomain.GetData("APP_LAUNCH_URL") as string; 2513AppDomain.CurrentDomain.DomainUnload += new EventHandler(OnDomainUnload); 2514AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnDomainUnload);
winforms\Managed\System\WinForms\AxHost.cs (2)
3810if (!AppDomain.CurrentDomain.IsFinalizingForUnload()) { 3899if (!AppDomain.CurrentDomain.IsFinalizingForUnload()) {
winforms\Managed\System\WinForms\ComponentManagerBroker.cs (5)
201AppDomain domain = domainObj as AppDomain; 205domain = AppDomain.CurrentDomain; 218if (domain == AppDomain.CurrentDomain) { 237private static ComponentManagerBroker GetRemotedComponentManagerBroker(AppDomain domain) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (1)
50AppDomain currentDomain = Thread.GetDomain();
winforms\Managed\System\WinForms\Control.cs (1)
4421AppDomain.CurrentDomain.IsFinalizingForUnload()) {
winforms\Managed\System\WinForms\Form.cs (1)
4267foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
winforms\Managed\System\WinForms\Help.cs (1)
370file = new Uri(new Uri(AppDomain.CurrentDomain.SetupInformation.ApplicationBase),
winforms\Managed\System\WinForms\NativeWindow.cs (4)
114AppDomain.CurrentDomain.ProcessExit += shutdownHandler; 115AppDomain.CurrentDomain.DomainUnload += shutdownHandler; 183if (!AppDomain.CurrentDomain.IsFinalizingForUnload() && exitCode == NativeMethods.STATUS_PENDING) { 1559String appDomain = Convert.ToString(AppDomain.CurrentDomain.GetHashCode(), 16);
winforms\Managed\System\WinForms\ThreadExceptionDialog.cs (1)
191foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
System.Workflow.Activities (3)
Rules\Design\Dialogs\RuleConditionDialog.cs (1)
58foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
Rules\Design\Dialogs\RuleSetDialog.cs (1)
62foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
Rules\RuleValidation.cs (1)
829Assembly[] loaded = AppDomain.CurrentDomain.GetAssemblies();
System.Workflow.ComponentModel (5)
AuthoringOM\Compiler\XomlCompiler.cs (5)
490AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation; 492AppDomain compilerDomain = AppDomain.CreateDomain("CompilerDomain", null, setup); 558AppDomain.Unload(compilerDomain); 706AppDomain.CurrentDomain.AssemblyResolve += resolver.ResolveEventHandler;
System.Workflow.Runtime (7)
DebugEngine\DebugController.cs (7)
281AppDomain.CurrentDomain.ProcessExit += OnDomainUnload; 282AppDomain.CurrentDomain.DomainUnload += OnDomainUnload; 371AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoad; 532AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; 533foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) 641AppDomain.CurrentDomain.ProcessExit -= OnDomainUnload; 642AppDomain.CurrentDomain.DomainUnload -= OnDomainUnload;
System.WorkflowServices (2)
System\ServiceModel\Activation\WorkflowServiceHostFactory.cs (1)
191foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System\ServiceModel\Activities\Description\WorkflowRuntimeEndpoint.cs (1)
26AppDomain.CurrentDomain.Id));
System.Xml (5)
parent\parent\parent\parent\InternalApis\Clr\inc\AppContextDefaultValues.cs (1)
39string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
System\Xml\Serialization\CodeGenerator.cs (1)
1731static internal AssemblyBuilder CreateAssemblyBuilder(AppDomain appDomain, string name) {
System\Xml\Serialization\Compilation.cs (1)
423AssemblyBuilder assemblyBuilder = CodeGenerator.CreateAssemblyBuilder(AppDomain.CurrentDomain, assemblyName);
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (2)
32AppDomain.CurrentDomain.AssemblyResolve += assemblyResolver; 39AppDomain.CurrentDomain.AssemblyResolve -= assemblyResolver;
WindowsBase (11)
Base\MS\Internal\AssemblyHelper.cs (2)
71AppDomain domain = AppDomain.CurrentDomain;
Base\MS\Internal\ShutDownListener.cs (4)
82AppDomain.CurrentDomain.DomainUnload += new EventHandler(HandleShutDown); 87AppDomain.CurrentDomain.ProcessExit += new EventHandler(HandleShutDown); 119AppDomain.CurrentDomain.DomainUnload -= new EventHandler(HandleShutDown); 124AppDomain.CurrentDomain.ProcessExit -= new EventHandler(HandleShutDown);
Shared\MS\Internal\SafeSecurityHelper.cs (1)
184Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
Shared\MS\Win32\HwndWrapper.cs (4)
113if(null != AppDomain.CurrentDomain.FriendlyName && 128 <= AppDomain.CurrentDomain.FriendlyName.Length) 114appName = AppDomain.CurrentDomain.FriendlyName.Substring(0, 128); 116appName = AppDomain.CurrentDomain.FriendlyName;
XamlBuildTask (19)
Microsoft\Build\Tasks\Xaml\CompilationPass2Task.cs (2)
143AppDomain appDomain = null; 190AppDomain.Unload(appDomain);
Microsoft\Build\Tasks\Xaml\CompilationPass2TaskInternal.cs (3)
219AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += new ResolveEventHandler(XamlBuildTaskServices.ReflectionOnlyAssemblyResolve); 323AppDomain.CurrentDomain.AssemblyResolve += resolveAssemblyHelper.ResolveLocalProjectReferences; 363AppDomain.CurrentDomain.AssemblyResolve -= resolveAssemblyHelper.ResolveLocalProjectReferences;
Microsoft\Build\Tasks\Xaml\PartialClassGenerationTask.cs (9)
131private static AppDomain inProcessAppDomain; 178AppDomain appDomain = null; 203AppDomain.Unload(inProcessAppDomain); 221AppDomain appDomain = null; 242AppDomain.Unload(appDomain); 247bool ExecuteInternal(AppDomain appDomain) 264AppDomain CreateNewAppDomain() 273AppDomain GetInProcessAppDomain(out bool newAppDomain) 284AppDomain.Unload(inProcessAppDomain);
Microsoft\Build\Tasks\Xaml\PartialClassGenerationTaskInternal.cs (1)
293AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += new ResolveEventHandler(XamlBuildTaskServices.ReflectionOnlyAssemblyResolve);
Microsoft\Build\Tasks\Xaml\XamlBuildTaskServices.cs (4)
184foreach (var asm in AppDomain.CurrentDomain.ReflectionOnlyGetAssemblies()) 204public static AppDomain CreateAppDomain(string friendlyName, string buildTaskPath) 225return AppDomain.CreateDomain( 227AppDomain.CurrentDomain.Evidence,