130 references to CurrentDomain
aspire (3)
Backchannel\ExtensionBackchannel.cs (1)
87AppDomain.CurrentDomain.ProcessExit += (_, _) =>
ConsoleCancellationManager.cs (2)
157AppDomain.CurrentDomain.ProcessExit += OnProcessExit; 371AppDomain.CurrentDomain.ProcessExit -= OnProcessExit;
aspire-managed (1)
Program.cs (1)
99Console.Error.WriteLine($"Usage: {AppDomain.CurrentDomain.FriendlyName} <dashboard|server|nuget|terminalhost> [args...]");
Aspire.Cli.Tests (1)
tests\Shared\TestProcesses.cs (1)
59AppDomain.CurrentDomain.ProcessExit += static (_, _) =>
Aspire.Hosting.RemoteHost (3)
Ats\ReferenceExpressionRef.cs (1)
397foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
AtsCapabilityScanner.cs (1)
3901foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
CodeGeneration\CodeGenerationDiagnostic.cs (1)
266var aspireHostingAssembly = AppDomain.CurrentDomain
Aspire.Hosting.RemoteHost.Tests (1)
CodeGenerationDiagnosticBuilderTests.cs (1)
121var aspireHosting = AppDomain.CurrentDomain.GetAssemblies()
Aspire.Hosting.Tests (1)
tests\Shared\TestProcesses.cs (1)
59AppDomain.CurrentDomain.ProcessExit += static (_, _) =>
csc (1)
src\roslyn\src\Compilers\Shared\BuildClient.cs (1)
81AppDomain.CurrentDomain.BaseDirectory;
dotnet-aot (1)
parent\dotnet\Telemetry\TelemetryClient.cs (1)
295AppDomain.CurrentDomain.ProcessExit += (_, _) =>
dotnet-Microsoft.XmlSerializer.Generator (1)
Sgen.cs (1)
44AppDomain.CurrentDomain.AssemblyResolve += SgenAssemblyResolver;
dotnet-svcutil.xmlserializer (2)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
512AppDomain.CurrentDomain.TypeResolve += new ResolveEventHandler(typeResolver.ResolveType); 513AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(typeResolver.ResolveAssembly);
GetDocument.Insider (1)
Commands\GetDocumentCommandWorker.cs (1)
208foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
ILCompiler.ReadyToRun (2)
parent\parent\Common\JitInterface\CorInfoImpl.cs (2)
97AppDomain.CurrentDomain.ProcessExit += (_, _) => JitProcessShutdownWork(s_jit); 98AppDomain.CurrentDomain.UnhandledException += (_, _) => JitProcessShutdownWork(s_jit);
ILCompiler.RyuJit (2)
parent\parent\Common\JitInterface\CorInfoImpl.cs (2)
97AppDomain.CurrentDomain.ProcessExit += (_, _) => JitProcessShutdownWork(s_jit); 98AppDomain.CurrentDomain.UnhandledException += (_, _) => JitProcessShutdownWork(s_jit);
Microsoft.AspNetCore.Components (1)
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (1)
47return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
Microsoft.AspNetCore.Components.Endpoints (1)
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
23return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
Microsoft.AspNetCore.Components.Server (2)
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
23return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (1)
47return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
Microsoft.AspNetCore.Components.Testing (1)
Infrastructure\TestReadinessHostingStartup.cs (1)
94foreach (var asm in AppDomain.CurrentDomain.GetAssemblies())
Microsoft.AspNetCore.Components.WebAssembly (2)
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
23return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (1)
47return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
530return new[] { Assembly.Load(AppDomain.CurrentDomain.FriendlyName) };
Microsoft.AspNetCore.Server.HttpSys (1)
NativeInterop\SafeNativeOverlapped.cs (1)
15|| AppDomain.CurrentDomain.IsFinalizingForUnload();
Microsoft.AspNetCore.Server.IIS (1)
StartupHook.cs (1)
44AppDomain.CurrentDomain.UnhandledException += (sender, eventArgs) =>
Microsoft.Build (1)
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (1)
124var tracker = new AssemblyLoadsTracker(loggingContext, loggingService, context, initiatorType, appDomain ?? AppDomain.CurrentDomain);
Microsoft.Build.Framework (3)
FileUtilities_TempFiles.cs (1)
36AppDomain.CurrentDomain.ProcessExit += (_, _) =>
FileUtilities.cs (1)
152cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
Utilities\TaskFactoryUtilities.cs (1)
202AppDomain.CurrentDomain.AssemblyResolve += resolver;
Microsoft.Build.Tasks.Core (2)
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (2)
141AppDomain.CurrentDomain.AssemblyResolve -= handlerAddedToAppDomain; 649AppDomain.CurrentDomain.AssemblyResolve += handlerAddedToAppDomain;
Microsoft.Data.Analysis.Tests (1)
parent\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
31AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
Microsoft.DotNet.Cli.Utils (2)
ProcessReaper.cs (2)
153AppDomain.CurrentDomain.ProcessExit += HandleProcessExit; 158AppDomain.CurrentDomain.ProcessExit -= HandleProcessExit;
Microsoft.DotNet.HotReload.WebAssembly.Browser (5)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (4)
53AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; 58AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoad; 143foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) 225var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => TryGetModuleId(assembly) is Guid moduleId && moduleId == update.ModuleId);
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (1)
152var sortedAssemblies = TopologicalSort(AppDomain.CurrentDomain.GetAssemblies());
Microsoft.Extensions.DependencyModel (3)
DependencyContextPaths.cs (2)
35object? deps = AppDomain.CurrentDomain.GetData(DepsFilesProperty); 36object? fxDeps = AppDomain.CurrentDomain.GetData(FxDepsFileProperty);
EnvironmentWrapper.cs (1)
17public object? GetAppContextData(string name) => AppDomain.CurrentDomain.GetData(name);
Microsoft.Extensions.DotNetDeltaApplier (5)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (4)
53AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; 58AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoad; 143foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) 225var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => TryGetModuleId(assembly) is Guid moduleId && moduleId == update.ModuleId);
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (1)
152var sortedAssemblies = TopologicalSort(AppDomain.CurrentDomain.GetAssemblies());
Microsoft.JSInterop (1)
Infrastructure\DotNetDispatcher.cs (1)
499foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
Microsoft.Maui (1)
HotReload\HotReloadHelper.cs (1)
164 var assemblies = AppDomain.CurrentDomain.GetAssemblies();
Microsoft.Maui.Controls (3)
DependencyService.cs (1)
119 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
Registrar.cs (1)
433 AppDomain.CurrentDomain.GetAssemblies(),
Visuals\VisualTypeConverter.cs (1)
53 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
Microsoft.Maui.Controls.Xaml (1)
XamlParser.cs (1)
338 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
Microsoft.ML.Core (3)
ComponentModel\AssemblyLoadingUtils.cs (3)
97foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) 279AppDomain.CurrentDomain.AssemblyLoad += CurrentDomainAssemblyLoad; 284AppDomain.CurrentDomain.AssemblyLoad -= CurrentDomainAssemblyLoad;
Microsoft.ML.DnnImageFeaturizer.AlexNet (1)
AlexNetExtension.cs (1)
28return AlexNet(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.DnnImageFeaturizer.ResNet101 (1)
ResNet101Extension.cs (1)
28return ResNet101(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.DnnImageFeaturizer.ResNet18 (1)
ResNet18Extension.cs (1)
28return ResNet18(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.DnnImageFeaturizer.ResNet50 (1)
ResNet50Extension.cs (1)
28return ResNet50(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.TestFramework (1)
BaseTestClass.cs (1)
31AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
Microsoft.NET.Sdk.Razor.Tasks (1)
parent\Tool\PipeName.cs (1)
26toolDirectory = AppDomain.CurrentDomain.BaseDirectory;
Microsoft.VisualBasic.Forms (3)
Microsoft\VisualBasic\ApplicationServices\AssemblyInfo.vb (1)
107For Each assembly As Assembly In AppDomain.CurrentDomain.GetAssemblies()
Microsoft\VisualBasic\Logging\Log.vb (2)
39AddHandler AppDomain.CurrentDomain.ProcessExit, AddressOf CloseOnProcessExit 114RemoveHandler AppDomain.CurrentDomain.ProcessExit, AddressOf CloseOnProcessExit
Microsoft.Win32.SystemEvents (3)
Microsoft\Win32\SystemEvents.cs (3)
662s_className = $".NET-BroadcastEventWindow.{AppDomain.CurrentDomain.GetHashCode():x}.0"; 993if (checkFinalization && AppDomain.CurrentDomain.IsFinalizingForUnload()) 1269if (!checkFinalization || !AppDomain.CurrentDomain.IsFinalizingForUnload())
Mono.Cecil (1)
Mono.Cecil\BaseAssemblyResolver.cs (1)
194 paths = (string) AppDomain.CurrentDomain.GetData ("TRUSTED_PLATFORM_ASSEMBLIES");
MSBuild (1)
XMake.cs (1)
875AppDomain.CurrentDomain.UnhandledException += DebugUtils.UnhandledExceptionHandler;
PresentationCore (8)
ModuleInitializer.cs (1)
27AppDomain.CurrentDomain.ProcessExit += static (object sender, EventArgs e) =>
MS\Internal\AppModel\SiteOfOriginContainer.cs (1)
42Uri siteOfOrigin = BaseUriHelper.FixFileUri(new Uri(System.AppDomain.CurrentDomain.BaseDirectory));
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\AppDomainShutdownMonitor.cs (2)
28AppDomain.CurrentDomain.DomainUnload += OnShutdown; 29AppDomain.CurrentDomain.ProcessExit += OnShutdown;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
102Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
System\Windows\Media\MediaPlayerState.cs (3)
85AppDomain.CurrentDomain.ProcessExit -= _helper.ProcessExitHandler; 799AppDomain.CurrentDomain.ProcessExit += _helper.ProcessExitHandler; 826Uri appBase = SecurityHelper.GetBaseDirectory(AppDomain.CurrentDomain);
PresentationFramework (3)
MS\Internal\AppModel\ResourceContainer.cs (1)
152AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(OnAssemblyLoadEventHandler);
System\Windows\Documents\WinRTSpellerInterop.cs (1)
81.AddHandler(AppDomain.CurrentDomain, "UnhandledException", ProcessUnhandledException);
System\Windows\Markup\XmlnsCache.cs (1)
182Assembly[] asmList = AppDomain.CurrentDomain.GetAssemblies();
rzc (1)
PipeName.cs (1)
26toolDirectory = AppDomain.CurrentDomain.BaseDirectory;
System.CommandLine (2)
Invocation\ProcessTerminationHandler.cs (2)
46AppDomain.CurrentDomain.ProcessExit += OnProcessExit; 61AppDomain.CurrentDomain.ProcessExit -= OnProcessExit;
System.ComponentModel.Composition (4)
System\ComponentModel\Composition\Hosting\ApplicationCatalog.cs (4)
74var location = AppDomain.CurrentDomain.BaseDirectory; 84string? relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath; 174$"{GetType().Name} (Path=\"{AppDomain.CurrentDomain.BaseDirectory}\") (PrivateProbingPath=\"{AppDomain.CurrentDomain.RelativeSearchPath}\")"; // NOLOC
System.ComponentModel.TypeConverter (2)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (1)
71foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
System\ComponentModel\ReflectionCachesUpdateHandler.cs (1)
31foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System.Configuration.ConfigurationManager (6)
System\Configuration\ClientConfigPaths.cs (5)
67ApplicationUri = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, exeAssembly.ManifestModule.Name); 87string externalConfigPath = AppDomain.CurrentDomain.GetData("APP_CONFIG_FILE") as string; 102externalConfigPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, externalConfigPath); 139string namePrefix = Validate(AppDomain.CurrentDomain.FriendlyName, limitSize: true); 263else if (Uri.TryCreate(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, assembly.ManifestModule.Name), UriKind.Absolute, out Uri codeBase))
System\Configuration\ClientConfigurationHost.cs (1)
48string directory = AppDomain.CurrentDomain.BaseDirectory;
System.Console (1)
System\ConsolePal.Unix.cs (1)
900AppDomain.CurrentDomain.UnhandledException += (_, _) => { Interop.Sys.UninitializeTerminal(); };
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
245Type[]? appDomainAllowedTypes = (Type[]?)AppDomain.CurrentDomain.GetData(AppDomainDataSetDefaultAllowedTypesKey);
System.Data.Odbc (2)
Common\System\Data\Common\DbConnectionOptions.cs (2)
270object? rootFolderObject = AppDomain.CurrentDomain.GetData("DataDirectory"); 278rootFolderPath = AppDomain.CurrentDomain.BaseDirectory;
System.Data.OleDb (6)
DbConnectionOptions.cs (2)
344object? rootFolderObject = AppDomain.CurrentDomain.GetData("DataDirectory"); 352rootFolderPath = AppDomain.CurrentDomain.BaseDirectory;
System\Data\ProviderBase\DbConnectionPoolCounters.cs (4)
163AppDomain.CurrentDomain.DomainUnload += new EventHandler(this.UnloadEventHandler); 164AppDomain.CurrentDomain.ProcessExit += new EventHandler(this.ExitEventHandler); 165AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(this.ExceptionEventHandler); 232AppDomain appDomain = AppDomain.CurrentDomain;
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Metrics\RuntimeMetrics.cs (2)
124() => (long)AppDomain.CurrentDomain.GetAssemblies().Length, 133AppDomain.CurrentDomain.FirstChanceException += (source, e) =>
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpHandler.cs (1)
52private static readonly TimeSpan s_cleanCachedCertificateTimeout = TimeSpan.FromMilliseconds((int?)AppDomain.CurrentDomain.GetData("System.Net.Http.WinHttpCertificateCachingCleanupTimerInterval") ?? 60_000);
System.Private.CoreLib (3)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (1)
66safeName.Append(AppDomain.CurrentDomain.Id);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (2)
343CurrentPrincipal = (principal = AppDomain.CurrentDomain.GetThreadPrincipal()); 557public static AppDomain GetDomain() => AppDomain.CurrentDomain;
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\RuntimeEnvironment.cs (1)
24runtimeDirectory = AppDomain.CurrentDomain.BaseDirectory;
System.Windows.Forms (6)
System\Windows\Forms\Application.cs (1)
402string s_systemTrackerWindow = $".NET-BroadcastEventWindow.{AppDomain.CurrentDomain.GetHashCode():x}.0";
System\Windows\Forms\Control.cs (1)
3769|| AppDomain.CurrentDomain.IsFinalizingForUnload())
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
179foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System\Windows\Forms\NativeWindow.cs (2)
62AppDomain.CurrentDomain.ProcessExit += OnShutdown; 115if (!AppDomain.CurrentDomain.IsFinalizingForUnload() && (NTSTATUS)exitCode == NTSTATUS.STATUS_PENDING)
System\Windows\Forms\NativeWindow.WindowClass.cs (1)
31private static readonly string s_currentAppDomainHash = Convert.ToString(AppDomain.CurrentDomain.GetHashCode(), 16);
System.Xaml (4)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
102Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
System\Xaml\XamlSchemaContext.cs (3)
1065Assembly[] currentAssemblies = AppDomain.CurrentDomain.GetAssemblies(); 1401AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; 1406AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoad;
vbc (1)
src\roslyn\src\Compilers\Shared\BuildClient.cs (1)
81AppDomain.CurrentDomain.BaseDirectory;
VBCSCompiler (1)
src\roslyn\src\Compilers\Shared\BuildClient.cs (1)
81AppDomain.CurrentDomain.BaseDirectory;