9 types derived from Assembly
Aspire.Dashboard.Tests (1)
Microsoft.AspNetCore.Mvc.Core.Test (1)
Microsoft.AspNetCore.Mvc.Razor.Test (1)
Microsoft.Extensions.FileProviders.Embedded.Tests (1)
System.Private.CoreLib (2)
System.Reflection.Context (1)
System.Reflection.MetadataLoadContext (1)
System.Xaml.Tests (1)
2378 references to Assembly
AnalyzerRunner (6)
aspire (1)
Aspire.Confluent.Kafka.Tests (1)
Aspire.Dashboard (1)
Aspire.Dashboard.Tests (2)
Aspire.Hosting (15)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Testing (15)
Aspire.Hosting.Testing.Tests (2)
Aspire.Hosting.Tests (1)
Aspire.Playground.Tests (2)
Aspire.RuntimeIdentifier.Tool (1)
BuildActionTelemetryTable (6)
CodeStyleConfigFileGenerator (4)
ControllersFromServicesWebSite (1)
DemoConsole (6)
dotnet-dev-certs (2)
dotnet-getdocument (2)
dotnet-openapi (3)
dotnet-sql-cache (2)
dotnet-svcutil.xmlserializer (30)
dotnet-svcutil.xmlserializer.IntegrationTests (2)
dotnet-svcutil-lib (53)
dotnet-user-jwts (2)
dotnet-user-secrets (2)
GenerateDocumentationAndConfigFiles (12)
GenerateRulesMissingDocumentation (2)
GetDocument.Insider (16)
IdeCoreBenchmarks (2)
illink (22)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (13)
69/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?)"/></item>
70/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool)"/></item>
71/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool, bool)"/></item>
292/// <item><see cref="System.Reflection.Assembly.CreateInstance(string)"/></item>
293/// <item><see cref="System.Reflection.Assembly.CreateInstance(string, bool)"/></item>
294/// <item><see cref="System.Reflection.Assembly.CreateInstance(string, bool, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo, object[])"/></item>
299/// <see cref="System.Reflection.Assembly.Location"/>
303/// <see cref="System.Reflection.Assembly.GetFile(string)"/>
307/// <see cref="System.Reflection.Assembly.GetFiles()"/>
308/// <see cref="System.Reflection.Assembly.GetFiles(bool)"/>
ILLink.RoslynAnalyzer (13)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (13)
69/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?)"/></item>
70/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool)"/></item>
71/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool, bool)"/></item>
292/// <item><see cref="System.Reflection.Assembly.CreateInstance(string)"/></item>
293/// <item><see cref="System.Reflection.Assembly.CreateInstance(string, bool)"/></item>
294/// <item><see cref="System.Reflection.Assembly.CreateInstance(string, bool, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo, object[])"/></item>
299/// <see cref="System.Reflection.Assembly.Location"/>
303/// <see cref="System.Reflection.Assembly.GetFile(string)"/>
307/// <see cref="System.Reflection.Assembly.GetFiles()"/>
308/// <see cref="System.Reflection.Assembly.GetFiles(bool)"/>
ILLink.Tasks (1)
LocalizationWebsite (2)
Metrics (2)
Metrics.Legacy (2)
Microsoft.Analyzers.Extra.Tests (60)
Microsoft.Analyzers.Local.Tests (28)
ApiLifecycle\ApiLifecycleAnalyzerTest.cs (16)
80public static IEnumerable<System.Reflection.Assembly> References => new[]
82Assembly.GetAssembly(typeof(ObsoleteAttribute))!,
83Assembly.GetAssembly(typeof(EditorBrowsableAttribute))!,
84Assembly.GetAssembly(typeof(Debugger))!,
85Assembly.GetAssembly(typeof(IReadOnlyList<>))!,
86Assembly.GetAssembly(typeof(ArgumentOutOfRangeException))!,
87Assembly.GetAssembly(typeof(IServiceProvider))!,
88Assembly.GetAssembly(typeof(RequiredAttribute))!,
89Assembly.GetAssembly(typeof(OptionsBuilder<>))!,
90Assembly.GetAssembly(typeof(IConfigurationSection))!,
91Assembly.GetAssembly(typeof(HttpRequestMessage))!,
92Assembly.GetAssembly(typeof(IDistributedCache))!,
93Assembly.GetAssembly(typeof(Microsoft.Extensions.ObjectPool.ObjectPool))!,
94Assembly.GetAssembly(typeof(IBufferWriter<>))!,
95Assembly.GetAssembly(typeof(ITagCollector))!,
96Assembly.GetAssembly(typeof(Microsoft.Extensions.Logging.ILogger))!,
Microsoft.Arcade.Common (1)
Microsoft.AspNetCore (4)
Microsoft.AspNetCore.Analyzer.Testing (5)
Microsoft.AspNetCore.App.Analyzers (2)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.AspNetCore.Components (13)
Microsoft.AspNetCore.Components.Endpoints (11)
Microsoft.AspNetCore.Components.Server (8)
Microsoft.AspNetCore.Components.Tests (6)
Microsoft.AspNetCore.Components.WebAssembly (21)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Components.WebView (2)
Microsoft.AspNetCore.Components.WebView.Maui (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
Microsoft.AspNetCore.Components.WebView.Wpf (3)
Microsoft.AspNetCore.Hosting (13)
Microsoft.AspNetCore.Http.Extensions (2)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (2)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
Microsoft.AspNetCore.Identity.Test (2)
Microsoft.AspNetCore.Identity.UI (5)
Microsoft.AspNetCore.InternalTesting (11)
Microsoft.AspNetCore.InternalTesting.Tests (8)
Microsoft.AspNetCore.Mvc (3)
Microsoft.AspNetCore.Mvc.Core (44)
Microsoft.AspNetCore.Mvc.Core.Test (11)
Microsoft.AspNetCore.Mvc.FunctionalTests (20)
Infrastructure\ResourceFile.cs (10)
24public static void UpdateOrVerify(Assembly assembly, string outputFile, string expectedContent, string responseContent, string token = null)
49/// <param name="assembly">The <see cref="Assembly"/> containing <paramref name="resourceName"/>.</param>
68public static Stream GetResourceStream(Assembly assembly, string resourceName, bool sourceFile)
113/// <param name="assembly">The <see cref="Assembly"/> containing <paramref name="resourceName"/>.</param>
134public static async Task<string> ReadResourceAsync(Assembly assembly, string resourceName, bool sourceFile)
154/// <param name="assembly">The <see cref="Assembly"/> containing <paramref name="resourceName"/>.</param>
174public static string ReadResource(Assembly assembly, string resourceName, bool sourceFile)
195/// <param name="assembly">The <see cref="Assembly"/> containing <paramref name="resourceName"/>.</param>
207private static void UpdateFile(Assembly assembly, string resourceName, string previousContent, string content)
234private static bool Exists(Assembly assembly, string fullName)
Microsoft.AspNetCore.Mvc.Localization (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.Razor (10)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (7)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (6)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Microsoft.AspNetCore.Mvc.Test (5)
Microsoft.AspNetCore.Mvc.Testing (21)
Microsoft.AspNetCore.OpenApi (2)
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (8)
SnapshotTestHelper.cs (8)
145var assembly = AssemblyLoadContext.Default.LoadFromStream(output, pdb);
190var targetAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => assembly.GetName().Name == "Microsoft.AspNetCore.OpenApi");
250public static Func<string[], TWebHost> ResolveWebHostFactory<TWebHost>(Assembly assembly)
255public static Func<string[], TWebHostBuilder> ResolveWebHostBuilderFactory<TWebHostBuilder>(Assembly assembly)
260public static Func<string[], THostBuilder> ResolveHostBuilderFactory<THostBuilder>(Assembly assembly)
271public static Func<string[], object> ResolveHostFactory(Assembly assembly,
285private static Func<string[], T> ResolveFactory<T>(Assembly assembly, string name)
312public static Func<string[], IServiceProvider> ResolveServiceProviderFactory(Assembly assembly, TimeSpan waitTimeout = default)
Microsoft.AspNetCore.Razor.Runtime (8)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.IntegrationTesting (4)
Microsoft.AspNetCore.Shared.Tests (2)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
Microsoft.AspNetCore.SignalR.Core (2)
Microsoft.AspNetCore.TestHost (9)
Microsoft.AspNetCore.Tests (1)
Microsoft.Build.Framework (8)
Microsoft.Build.Tasks.CodeAnalysis (4)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (4)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (7)
Microsoft.CodeAnalysis (38)
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (7)
73public bool IsHostAssembly(Assembly assembly)
81private partial Assembly Load(AssemblyName assemblyName, string resolvedPath)
186protected override Assembly? Load(AssemblyName assemblyName)
190var assembly = resolver.Resolve(_loader, assemblyName, this, Directory);
232public Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory)
250public Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory)
270public Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory)
Microsoft.CodeAnalysis.Analyzers (8)
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
Microsoft.CodeAnalysis.BannedApiAnalyzers (8)
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
Microsoft.CodeAnalysis.Collections.Package (2)
Microsoft.CodeAnalysis.Compiler.Test.Resources (1)
Microsoft.CodeAnalysis.Contracts.Package (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (11)
CommandLineTests.cs (10)
73var runtimeConfigPath = Path.ChangeExtension(Assembly.GetExecutingAssembly().Location, "runtimeconfig.json");
293"/analyzer:" + Assembly.GetExecutingAssembly().Location,
2925var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/preferreduilang:en", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.cs" });
2961var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/preferreduilang:en", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.cs", "/ruleset:" + ruleSetFile.Path });
2997"/a:" + Assembly.GetExecutingAssembly().Location, "a.cs",
3008"/a:" + Assembly.GetExecutingAssembly().Location, "a.cs",
3516"/a:" + Assembly.GetExecutingAssembly().Location, "a.cs",
3527"/a:" + Assembly.GetExecutingAssembly().Location, "a.cs",
10570args = args.Append("/a:" + Assembly.GetExecutingAssembly().Location);
15043"/analyzer:" + Assembly.GetExecutingAssembly().Location,
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (1)
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.Debugging.Package (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (30)
Microsoft.CodeAnalysis.Extensions.Package (2)
Microsoft.CodeAnalysis.ExternalAccess.Extensions (3)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (6)
RazorAnalyzerAssemblyResolver.cs (6)
32public Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory) =>
35public static Assembly? ResolveRazorAssembly(AssemblyName assemblyName, string rootDirectory) =>
45internal static Assembly? ResolveCore(AssemblyLoadContext compilerLoadContext, AssemblyName assemblyName, string directory)
61static Assembly? LoadAssemblyByFileName(AssemblyLoadContext compilerLoadContext, string fileName, string directory)
73static Assembly? LoadAssembly(AssemblyLoadContext compilerLoadContext, AssemblyName assemblyName, string directory)
75var assembly = compilerLoadContext.Assemblies.FirstOrDefault(a => a.GetName().Name == assemblyName.Name);
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (6)
Microsoft.CodeAnalysis.Features (9)
Microsoft.CodeAnalysis.InteractiveHost (2)
Microsoft.CodeAnalysis.LanguageServer (15)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (3)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (8)
Microsoft.CodeAnalysis.PooledObjects.Package (2)
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests (6)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (4)
Microsoft.CodeAnalysis.Scripting (34)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (17)
45private readonly Dictionary<Assembly, LoadedAssembly> _assembliesLoadedFromLocation;
73private readonly struct LoadedAssemblyInfo(Assembly assembly, AssemblyIdentity identity, string? location)
75public readonly Assembly Assembly = assembly;
89_assembliesLoadedFromLocation = new Dictionary<Assembly, LoadedAssembly>();
101internal Assembly LoadAssemblyFromStream(Stream peStream, Stream pdbStream)
103Assembly assembly = _runtimeAssemblyLoader.LoadFromStream(peStream, pdbStream);
181public void RegisterDependency(Assembly dependency)
194private void RegisterLoadedAssemblySimpleNameNoLock(Assembly assembly, string? location)
222internal Assembly? ResolveAssembly(string assemblyDisplayName, Assembly? requestingAssembly)
246internal Assembly? ResolveAssembly(AssemblyIdentity identity, string? loadDirectory)
251Assembly? assembly;
342private Assembly? TryGetAssemblyLoadedFromPath(AssemblyIdentity identity, string directory)
380private Assembly? GetOrLoadKnownAssembly(AssemblyIdentity identity)
382Assembly? assembly = null;
450private static Assembly? FindHighestVersionOrFirstMatchingIdentity(AssemblyIdentity identity, IEnumerable<LoadedAssemblyInfo> infos)
452Assembly? candidate = null;
Microsoft.CodeAnalysis.Scripting.UnitTests (10)
Microsoft.CodeAnalysis.Test.Utilities (16)
Microsoft.CodeAnalysis.Threading.Package (2)
Microsoft.CodeAnalysis.UnitTests (77)
AnalyzerAssemblyLoaderTests.cs (57)
288Assembly alpha = loader.LoadFromPath(testFixture.Alpha);
307Assembly alpha = loader.LoadFromPath(testFixture.Alpha);
312Assembly beta = loader.LoadFromPath(testFixture.Beta);
369Assembly beta = loader.LoadFromPath(testFixture.Beta);
396private static void VerifyAssemblies(AnalyzerAssemblyLoader loader, IEnumerable<Assembly> assemblies, params (string simpleName, string version, string path)[] expected) =>
399private static void VerifyAssemblies(AnalyzerAssemblyLoader loader, IEnumerable<Assembly> assemblies, int? expectedCopyCount, params (string simpleName, string version, string path)[] expected)
466private static void VerifyAssemblies(AnalyzerAssemblyLoader loader, IEnumerable<Assembly> assemblies, int? copyCount, params string[] assemblyPaths)
486IEnumerable<Assembly> loadedAssemblies;
548Assembly gamma = loader.LoadFromPath(testFixture.Gamma);
579Assembly gamma = loader.LoadFromPath(gammaFile);
694Assembly gamma = loader.LoadFromPath(gammaFile);
733Assembly gamma = loader.LoadFromPath(gammaFile);
794Assembly gamma = loader.LoadFromPath(testFixture.Gamma);
798Assembly epsilon = loader.LoadFromPath(testFixture.Epsilon);
850Assembly epsilon = loader.LoadFromPath(testFixture.Epsilon);
909Assembly epsilon = loader.LoadFromPath(testFixture.Epsilon);
940Assembly delta2 = loader.LoadFromPath(testFixture.Delta2);
941Assembly delta2B = loader.LoadFromPath(testFixture.Delta2B);
989Assembly epsilon = loader.LoadFromPath(epsilonPath);
1046Assembly epsilon = loader.LoadFromPath(epsilonFile);
1080Assembly gamma = loader1.LoadFromPath(testFixture.Gamma);
1084Assembly epsilon = loader2.LoadFromPath(testFixture.Epsilon);
1140Assembly gamma = loader.LoadFromPath(testFixture.Gamma);
1144Assembly epsilon = loader.LoadFromPath(testFixture.Epsilon);
1237var assembly = loader.LoadFromPath(assemblyFilePath);
1271var assembly = loader.LoadFromPath(assemblyFilePath);
1319var gamma = loader.LoadFromPath(testFixture.GammaReferencingPublicSigned);
1323var epsilon = loader.LoadFromPath(testFixture.EpsilonReferencingPublicSigned);
1349var delta1Assembly = loader.LoadFromPath(testFixture.DeltaPublicSigned1);
1353var delta2Assembly = loader.LoadFromPath(testFixture.DeltaPublicSigned2);
1378Assembly analyzerAssembly = loader.LoadFromPath(testFixture.AnalyzerReferencesSystemCollectionsImmutable1);
1405Assembly analyzerAssembly = loader.LoadFromPath(testFixture.AnalyzerReferencesSystemCollectionsImmutable2);
1418var assembly = typeof(ImmutableArray<int>).Assembly;
1427var copiedAssembly = loader.LoadFromPath(destFile);
1442Assembly analyzerAssembly = loader.LoadFromPath(testFixture.AnalyzerWithNativeDependency);
1485Assembly? delta = loader.LoadFromPath(deltaCopy);
1525Assembly gamma = loader.LoadFromPath(gammaFile);
1552var expected = loader.LoadFromPath(path);
1557var actual = loader.LoadFromPath(path);
1576var expected = loader.LoadFromPath(path);
1586var actual = loader.LoadFromPath(path);
1612var assembly = loader.LoadFromPath(analyzerPath);
1635var assembly = loader.LoadFromPath(analyzerPath);
1672Assembly analyzerAssembly = loader.LoadFromPath(testFixture.AnalyzerReferencesSystemCollectionsImmutable1);
1694Assembly gamma = loader.LoadFromPath(testFixture.Gamma);
1716Assembly delta = loader.LoadFromPath(testFixture.Delta1);
1733Assembly alpha = loader.LoadFromPath(testFixture.Alpha);
1737Assembly delta = loader.LoadFromPath(testFixture.Delta1);
1754Assembly delta = loader.LoadFromPath(testFixture.Delta1);
1769var assembly = typeof(AnalyzerAssemblyLoaderTests).Assembly;
1775var assembly = (Assembly)state;
1777Assembly loaded = loader.LoadFromPath(assembly.Location);
1797Assembly loaded = loader.LoadFromPath(testFixture.Delta1);
1845private class TestAnalyzerAssemblyResolver(Func<AnalyzerAssemblyLoader, AssemblyName, AssemblyLoadContext, string, Assembly?> resolveFunc) : IAnalyzerAssemblyResolver
1847private readonly Func<AnalyzerAssemblyLoader, AssemblyName, AssemblyLoadContext, string, Assembly?> _resolveFunc = resolveFunc;
1851public Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory)
Microsoft.CodeAnalysis.Workspaces (35)
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (7)
73public bool IsHostAssembly(Assembly assembly)
81private partial Assembly Load(AssemblyName assemblyName, string resolvedPath)
186protected override Assembly? Load(AssemblyName assemblyName)
190var assembly = resolver.Resolve(_loader, assemblyName, this, Directory);
232public Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory)
250public Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory)
270public Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory)
Microsoft.CodeAnalysis.Workspaces.Desktop (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (4)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (24)
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
Microsoft.CodeAnalysis.XunitHook (1)
Microsoft.CommonLanguageServerProtocol.Framework.Example (2)
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
Microsoft.CSharp (13)
Microsoft.Data.Analysis.Tests (1)
Microsoft.DotNet.Arcade.Sdk.Tests (4)
Microsoft.DotNet.Baselines.Tasks (1)
Microsoft.DotNet.Build.Tasks.Workloads (1)
Microsoft.DotNet.GenFacades (6)
Microsoft.DotNet.NuGetRepack.Tests (1)
Microsoft.DotNet.RemoteExecutor (5)
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Microsoft.Extensions.ApiDescription.Client.Tests (1)
Microsoft.Extensions.Configuration.UserSecrets (3)
Microsoft.Extensions.DependencyModel (10)
Microsoft.Extensions.FileProviders.Embedded (18)
Microsoft.Extensions.Hosting (3)
Microsoft.Extensions.Localization (21)
Microsoft.Extensions.Localization.Abstractions (1)
Microsoft.Extensions.Localization.Tests (5)
Microsoft.Extensions.Logging.Abstractions (2)
Microsoft.Extensions.Validation.GeneratorTests (9)
ValidationsGeneratorTestBase.cs (9)
90var targetAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => assembly.GetName().Name == outputAssemblyName);
157var assembly = AssemblyLoadContext.Default.LoadFromStream(output, pdb);
197var targetAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => assembly.GetName().Name == targetAssemblyName);
250public static Func<string[], TWebHost> ResolveWebHostFactory<TWebHost>(Assembly assembly)
255public static Func<string[], TWebHostBuilder> ResolveWebHostBuilderFactory<TWebHostBuilder>(Assembly assembly)
260public static Func<string[], THostBuilder> ResolveHostBuilderFactory<THostBuilder>(Assembly assembly)
271public static Func<string[], object> ResolveHostFactory(Assembly assembly,
285private static Func<string[], T> ResolveFactory<T>(Assembly assembly, string name)
312public static Func<string[], IServiceProvider> ResolveServiceProviderFactory(Assembly assembly, TimeSpan waitTimeout = default)
Microsoft.Gen.ComplianceReports.Unit.Tests (15)
test\Generators\Shared\RoslynTestUtils.cs (12)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true)
53IEnumerable<Assembly>? references,
58var corelib = Assembly.GetAssembly(typeof(object))!.Location;
71foreach (var r in references)
246IEnumerable<Assembly>? references,
260IEnumerable<Assembly>? references,
290IEnumerable<Assembly>? references,
303IEnumerable<Assembly>? references,
357IEnumerable<Assembly>? references,
380IEnumerable<Assembly>? references,
394IEnumerable<Assembly>? references,
437IEnumerable<Assembly>? references,
Microsoft.Gen.ContextualOptions.Unit.Tests (13)
test\Generators\Shared\RoslynTestUtils.cs (12)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true)
53IEnumerable<Assembly>? references,
58var corelib = Assembly.GetAssembly(typeof(object))!.Location;
71foreach (var r in references)
246IEnumerable<Assembly>? references,
260IEnumerable<Assembly>? references,
290IEnumerable<Assembly>? references,
303IEnumerable<Assembly>? references,
357IEnumerable<Assembly>? references,
380IEnumerable<Assembly>? references,
394IEnumerable<Assembly>? references,
437IEnumerable<Assembly>? references,
Microsoft.Gen.Logging.Unit.Tests (44)
test\Generators\Shared\RoslynTestUtils.cs (12)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true)
53IEnumerable<Assembly>? references,
58var corelib = Assembly.GetAssembly(typeof(object))!.Location;
71foreach (var r in references)
246IEnumerable<Assembly>? references,
260IEnumerable<Assembly>? references,
290IEnumerable<Assembly>? references,
303IEnumerable<Assembly>? references,
357IEnumerable<Assembly>? references,
380IEnumerable<Assembly>? references,
394IEnumerable<Assembly>? references,
437IEnumerable<Assembly>? references,
Microsoft.Gen.MetadataExtractor.Unit.Tests (20)
Microsoft.Gen.Metrics.Unit.Tests (22)
test\Generators\Shared\RoslynTestUtils.cs (12)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true)
53IEnumerable<Assembly>? references,
58var corelib = Assembly.GetAssembly(typeof(object))!.Location;
71foreach (var r in references)
246IEnumerable<Assembly>? references,
260IEnumerable<Assembly>? references,
290IEnumerable<Assembly>? references,
303IEnumerable<Assembly>? references,
357IEnumerable<Assembly>? references,
380IEnumerable<Assembly>? references,
394IEnumerable<Assembly>? references,
437IEnumerable<Assembly>? references,
Microsoft.Gen.MetricsReports.Unit.Tests (17)
test\Generators\Shared\RoslynTestUtils.cs (12)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true)
53IEnumerable<Assembly>? references,
58var corelib = Assembly.GetAssembly(typeof(object))!.Location;
71foreach (var r in references)
246IEnumerable<Assembly>? references,
260IEnumerable<Assembly>? references,
290IEnumerable<Assembly>? references,
303IEnumerable<Assembly>? references,
357IEnumerable<Assembly>? references,
380IEnumerable<Assembly>? references,
394IEnumerable<Assembly>? references,
437IEnumerable<Assembly>? references,
Microsoft.Interop.SourceGeneration (1)
Microsoft.JSInterop (6)
Microsoft.JSInterop.WebAssembly (1)
Microsoft.Maui (11)
Microsoft.Maui.Controls (36)
ResourceDictionary.cs (8)
28 internal static Action<ResourceDictionary, Uri, string, Assembly, System.Xml.IXmlLineInfo> s_setAndLoadSource;
57 public void SetAndLoadSource(Uri value, string resourcePath, Assembly assembly, global::System.Xml.IXmlLineInfo lineInfo)
419 internal static Uri GetUriWithExplicitAssembly(string value, Assembly defaultAssembly)
421 (value, var assembly) = SplitUriAndAssembly(value, defaultAssembly);
425 internal static ValueTuple<string, Assembly> SplitUriAndAssembly(string value, Assembly defaultAssembly)
430 return (parts[0], Assembly.Load(parts[1]));
436 internal static Uri CombineUriAndAssembly(string value, Assembly assembly)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Controls.Compatibility (7)
Microsoft.Maui.Controls.Xaml (23)
ResourceDictionaryHelpers.cs (4)
20 public static void LoadFromSource(ResourceDictionary rd, Uri source, string resourcePath, Assembly assembly, IXmlLineInfo lineInfo)
29 (value, var assembly) = ResourceDictionary.RDSourceTypeConverter.SplitUriAndAssembly(value, rootType.Assembly);
39 internal static void SetAndLoadSource(ResourceDictionary rd, Uri value, string resourcePath, Assembly assembly, IXmlLineInfo lineInfo)
49 static ResourceDictionary CreateFromResource(string resourcePath, Assembly assembly, IXmlLineInfo lineInfo)
XamlLoader.cs (6)
58 public static void Load(object view, string xaml, Assembly rootAssembly) => Load(view, xaml, rootAssembly, false);
60 public static void Load(object view, string xaml, Assembly rootAssembly, bool useDesignProperties)
226 var assembly = type.Assembly;
262 var assembly = type.Assembly;
317 static bool ResourceMatchesFilename(Assembly assembly, string resource, string filename)
340 static string ReadResourceAsXaml(Type type, Assembly assembly, string likelyTargetName, bool validate = false)
Microsoft.ML.AutoML (2)
Microsoft.ML.Benchmarks.Tests (1)
Microsoft.ML.CodeAnalyzer.Tests (2)
Microsoft.ML.Core (14)
Microsoft.ML.CpuMath.UnitTests (1)
Microsoft.ML.Data (2)
Microsoft.ML.GenAI.Core (2)
Microsoft.ML.OnnxConverter (2)
Microsoft.ML.Predictor.Tests (1)
Microsoft.ML.Samples (1)
Microsoft.ML.Samples.GPU (1)
Microsoft.ML.Tokenizers.Tests (1)
Microsoft.ML.TorchSharp (1)
Microsoft.ML.Transforms (6)
Microsoft.VisualBasic.Core (3)
Microsoft.VisualBasic.Tests (13)
Microsoft.VisualStudio.LanguageServices (10)
mscorlib (1)
Mvc.Api.Analyzers.Test (1)
netstandard (1)
PortableTask (1)
PresentationBuildTasks (53)
PresentationCore (30)
PresentationFramework (120)
Replay (2)
Roslyn.Compilers.Extension (1)
Roslyn.Diagnostics.Analyzers (8)
Roslyn.VisualStudio.DiagnosticsWindow (2)
Roslyn.VisualStudio.Next.UnitTests (16)
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (10)
245Func<Assembly, string, CancellationToken, ImmutableArray<IExtensionMessageHandlerWrapper<Solution>>> createWorkspaceMessageHandlersCallback,
246Func<Assembly, string, CancellationToken, ImmutableArray<IExtensionMessageHandlerWrapper<Document>>> createDocumentMessageHandlersCallback)
262assemblyLoader.Setup(loader => loader.LoadFromPath("TempPath")).Returns((Assembly?)null!);
634assemblyLoader.Setup(loader => loader.LoadFromPath(It.IsAny<string>())).Returns((Assembly?)null!);
750Func<string, Assembly>? loadFromPath = null,
753public Assembly LoadFromPath(string assemblyFilePath) => loadFromPath!(assemblyFilePath);
776public Func<Assembly, string, CancellationToken, ImmutableArray<IExtensionMessageHandlerWrapper<Solution>>>? CreateWorkspaceMessageHandlersCallback { get; set; }
777public Func<Assembly, string, CancellationToken, ImmutableArray<IExtensionMessageHandlerWrapper<Document>>>? CreateDocumentMessageHandlersCallback { get; set; }
779public ImmutableArray<IExtensionMessageHandlerWrapper<Solution>> CreateWorkspaceMessageHandlers(Assembly assembly, string extensionIdentifier, CancellationToken cancellationToken)
782public ImmutableArray<IExtensionMessageHandlerWrapper<Document>> CreateDocumentMessageHandlers(Assembly assembly, string extensionIdentifier, CancellationToken cancellationToken)
SemanticSearch.BuildTask (2)
SignalR.Client.FunctionalTestApp (3)
SignalRSamples (1)
System.CodeDom (3)
System.ComponentModel.Composition (23)
System.ComponentModel.Composition.Registration (2)
System.ComponentModel.TypeConverter (14)
System.Composition.TypedParts (4)
System.Configuration.ConfigurationManager (6)
System.Data.Odbc (2)
System.Diagnostics.StackTrace (5)
System\Diagnostics\StackTraceSymbols.cs (5)
15private readonly ConditionalWeakTable<Assembly, MetadataReaderProvider?> _metadataCache;
22_metadataCache = new ConditionalWeakTable<Assembly, MetadataReaderProvider?>();
30foreach ((Assembly _, MetadataReaderProvider? provider) in _metadataCache)
53internal void GetSourceLineInfo(Assembly assembly, string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout,
117private MetadataReader? TryGetReader(Assembly assembly, string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout, IntPtr inMemoryPdbAddress, int inMemoryPdbSize)
System.Diagnostics.TraceSource (2)
System.DirectoryServices.Protocols (1)
System.Drawing.Common (1)
System.IO.IsolatedStorage (2)
System.Private.CoreLib (192)
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (24)
19private static readonly Dictionary<string, Assembly> s_loadfile = new Dictionary<string, Assembly>();
154public virtual Assembly GetSatelliteAssembly(CultureInfo culture) { throw NotImplemented.ByDesign; }
155public virtual Assembly GetSatelliteAssembly(CultureInfo culture, Version? version) { throw NotImplemented.ByDesign; }
184public static bool operator ==(Assembly? left, Assembly? right)
202public static bool operator !=(Assembly? left, Assembly? right) => !(left == right);
206public static Assembly? GetAssembly(Type type)
228public static void SetEntryAssembly(Assembly? assembly)
242public static Assembly? GetEntryAssembly()
245return s_overriddenEntryAssembly as Assembly;
251public static Assembly Load(byte[] rawAssembly) => Load(rawAssembly, rawSymbolStore: null);
257public static Assembly Load(byte[] rawAssembly, byte[]? rawSymbolStore)
272public static Assembly LoadFile(string path)
283Assembly? result;
305private static Assembly? LoadFromResolveHandler(object? sender, ResolveEventArgs args)
307Assembly? requestingAssembly = args.RequestingAssembly;
375public static Assembly LoadFrom(string assemblyFile)
408public static Assembly LoadFrom(string assemblyFile, byte[]? hashValue, AssemblyHashAlgorithm hashAlgorithm)
414public static Assembly UnsafeLoadFrom(string assemblyFile) => LoadFrom(assemblyFile);
423public static Assembly ReflectionOnlyLoad(byte[] rawAssembly) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); }
426public static Assembly ReflectionOnlyLoad(string assemblyString) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); }
429public static Assembly ReflectionOnlyLoadFrom(string assemblyFile) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); }
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (7)
23Assembly assembly,
84public static IntPtr Load(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
119public static bool TryLoad(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, out IntPtr handle)
187private static ConditionalWeakTable<Assembly, DllImportResolver>? s_nativeDllResolveMap;
201public static void SetDllImportResolver(Assembly assembly, DllImportResolver resolver)
212new ConditionalWeakTable<Assembly, DllImportResolver>(), null);
231internal static IntPtr LoadLibraryCallbackStub(string libraryName, Assembly assembly,
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (25)
54private event Func<Assembly, string, IntPtr>? _resolvingUnmanagedDll;
56private event Func<AssemblyLoadContext, AssemblyName, Assembly>? _resolving;
167public IEnumerable<Assembly> Assemblies
171foreach (Assembly a in GetLoadedAssemblies())
189public event Func<Assembly, string, IntPtr>? ResolvingUnmanagedDll
210public event Func<AssemblyLoadContext, AssemblyName, Assembly?>? Resolving
314protected virtual Assembly? Load(AssemblyName assemblyName)
321public Assembly LoadFromAssemblyName(AssemblyName assemblyName)
334public Assembly LoadFromAssemblyPath(string assemblyPath)
352public Assembly LoadFromNativeImagePath(string nativeImagePath, string? assemblyPath)
375public Assembly LoadFromStream(Stream assembly)
381public Assembly LoadFromStream(Stream assembly, Stream? assemblySymbols)
507/// * <see cref="Assembly.Load" />
508/// * <see cref="Assembly.GetType" />
560public static ContextualReflectionScope EnterContextualReflection(Assembly? activating)
616private Assembly? GetFirstResolvedAssemblyFromResolvingEvent(AssemblyName assemblyName)
619foreach (Func<AssemblyLoadContext, AssemblyName, Assembly> handler in Delegate.EnumerateInvocationList(_resolving))
621Assembly? resolvedAssembly = handler(this, assemblyName);
642private static RuntimeAssembly ValidateAssemblyNameWithSimpleName(Assembly assembly, string? requestedSimpleName)
667Assembly? assembly = Load(assemblyName);
677Assembly? assembly = GetFirstResolvedAssemblyFromResolvingEvent(assemblyName);
706internal static void InvokeAssemblyLoadEvent(Assembly assembly)
722Assembly? asm = handler(AppDomain.CurrentDomain, args);
792internal IntPtr GetResolvedUnmanagedDll(Assembly assembly, string unmanagedDllName)
795foreach (Func<Assembly, string, IntPtr> handler in Delegate.EnumerateInvocationList(_resolvingUnmanagedDll))
src\System\Attribute.CoreCLR.cs (8)
697public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType)
702public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType, bool inherit)
713public static Attribute[] GetCustomAttributes(Assembly element)
718public static Attribute[] GetCustomAttributes(Assembly element, bool inherit)
725public static bool IsDefined(Assembly element, Type attributeType)
730public static bool IsDefined(Assembly element, Type attributeType, bool inherit)
743public static Attribute? GetCustomAttribute(Assembly element, Type attributeType)
748public static Attribute? GetCustomAttribute(Assembly element, Type attributeType, bool inherit)
src\System\Reflection\TypeNameResolver.CoreCLR.cs (12)
18private Func<AssemblyName, Assembly?>? _assemblyResolver;
19private Func<Assembly?, string, bool, Type?>? _typeResolver;
26private Assembly? _requestingAssembly;
27private Assembly? _topLevelAssembly;
34Assembly requestingAssembly,
45Func<AssemblyName, Assembly?>? assemblyResolver,
46Func<Assembly?, string, bool, Type?>? typeResolver,
47Assembly? requestingAssembly,
85Assembly topLevelAssembly)
174private Assembly? ResolveAssembly(AssemblyName assemblyName)
176Assembly? assembly;
203Assembly? assembly;
src\System\Type.CoreCLR.cs (12)
19return TypeNameResolver.GetType(typeName, Assembly.GetExecutingAssembly(ref stackMark),
28return TypeNameResolver.GetType(typeName, Assembly.GetExecutingAssembly(ref stackMark),
37return TypeNameResolver.GetType(typeName, Assembly.GetExecutingAssembly(ref stackMark));
44Func<AssemblyName, Assembly?>? assemblyResolver,
45Func<Assembly?, string, bool, Type?>? typeResolver)
49((assemblyResolver != null) && (typeResolver != null)) ? null : Assembly.GetExecutingAssembly(ref stackMark));
56Func<AssemblyName, Assembly?>? assemblyResolver,
57Func<Assembly?, string, bool, Type?>? typeResolver,
62((assemblyResolver != null) && (typeResolver != null)) ? null : Assembly.GetExecutingAssembly(ref stackMark),
70Func<AssemblyName, Assembly?>? assemblyResolver,
71Func<Assembly?, string, bool, Type?>? typeResolver,
77((assemblyResolver != null) && (typeResolver != null)) ? null : Assembly.GetExecutingAssembly(ref stackMark),
System.Private.DataContractSerialization (7)
System.Private.Windows.Core (15)
System.Private.Windows.Core.TestUtilities (1)
System.Private.Windows.GdiPlus (1)
System.Private.Xml (37)
System\Xml\Serialization\Compilation.cs (21)
22private readonly Assembly? _assembly;
42internal TempAssembly(XmlMapping[] xmlMappings, Assembly assembly, XmlSerializerImplementation? contract)
138internal static Assembly? LoadGeneratedAssembly(Type type, string? defaultNamespace, out XmlSerializerImplementation? contract)
140Assembly? serializer = null;
159serializer = Assembly.Load(name);
197serializer = Assembly.Load(serializerName); // LoadWithPartialName just does this in .Net Core; changing the obsolete call.
202serializer = Assembly.LoadFrom(serializerName);
227private static Assembly? LoadAssemblyByPath(Type type, string assemblyName)
229Assembly? assembly = null;
239if ((string.IsNullOrEmpty(path) || !File.Exists(path)) && !string.IsNullOrEmpty(Assembly.GetEntryAssembly()?.Location))
241path = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, $"{assemblyName}.dll");
251assembly = Assembly.LoadFile(path);
265private static bool IsSerializerVersionMatch(Assembly serializer, Type type, string? defaultNamespace)
301internal static bool GenerateSerializerToStream(XmlMapping[] xmlMappings, Type?[] types, string? defaultNamespace, Assembly? assembly, Hashtable assemblies, Stream stream)
318Assembly a = t.Assembly;
438internal static Assembly GenerateRefEmitAssembly(XmlMapping[] xmlMappings, Type?[] types)
441Assembly? mainAssembly = mainType?.Assembly;
540internal static Type GetTypeFromAssembly(Assembly assembly, string typeName)
589internal static void VerifyLoadContext(Type? t, Assembly? assembly)
692private readonly ConditionalWeakTable<Assembly, Dictionary<TempAssemblyCacheKey, TempAssembly>> _collectibleCaches = new ConditionalWeakTable<Assembly, Dictionary<TempAssemblyCacheKey, TempAssembly>>();
System.Reflection (1)
System.Reflection.Context (23)
System.Reflection.Emit (11)
System.Reflection.MetadataLoadContext (22)
System.Reflection.TypeExtensions (3)
System.Resources.Extensions (11)
System.Runtime (1)
System.Runtime.InteropServices (1)
System.Runtime.Serialization.Formatters (4)
System.Runtime.Serialization.Schema (3)
System.Security.Permissions (4)
System.ServiceModel.NetNamedPipe.Tests (1)
System.ServiceModel.Primitives (1)
System.ServiceModel.Primitives.Tests (1)
System.Text.Json (3)
System.Windows.Extensions (1)
System.Windows.Forms (17)
System.Windows.Forms.Design (24)
System.Windows.Forms.Design.Tests (9)
System.Windows.Forms.IntegrationTests.Common (2)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.PrivateSourceGenerators.Tests (2)
System.Windows.Forms.Tests (14)
System.Xaml (98)
System\Xaml\MS\Impl\XmlNsInfo.cs (14)
26internal Assembly Assembly { get { return (Assembly)_assembly.Target; } }
117internal XmlNsInfo(Assembly assembly, bool fullyQualifyAssemblyName)
157Assembly assembly = Assembly;
194private void LoadNsDefHelper(IList<XmlNsDefinition> result, string xmlns, string clrns, Assembly assembly)
209Assembly assembly = Assembly;
248Assembly assembly = Assembly;
279private void LoadInternalsVisibleToHelper(List<AssemblyName> result, string assemblyName, Assembly assembly)
306Assembly assembly = Assembly;
340private void LoadOldToNewNsHelper(Dictionary<string, string> result, string oldns, string newns, Assembly assembly)
359Assembly assembly = Assembly;
392private void LoadPrefixesHelper(Dictionary<string, string> result, string xmlns, string prefix, Assembly assembly)
409Assembly assembly = Assembly;
453public NamespaceComparer(XmlNsInfo nsInfo, Assembly assembly)
System\Xaml\XamlSchemaContext.cs (38)
34private readonly ReadOnlyCollection<Assembly> _referenceAssemblies;
49public XamlSchemaContext(IEnumerable<Assembly> referenceAssemblies)
52public XamlSchemaContext(IEnumerable<Assembly> referenceAssemblies, XamlSchemaContextSettings settings)
57List<Assembly> listOfAssemblies = new List<Assembly>(referenceAssemblies);
58_referenceAssemblies = new ReadOnlyCollection<Assembly>(listOfAssemblies);
426Assembly resultAssembly = null;
432Assembly curAssembly = nsInfo.Assembly;
698public IList<Assembly> ReferenceAssemblies
709private ConcurrentDictionary<Assembly, XmlNsInfo> _xmlnsInfo;
711private ConcurrentDictionary<Assembly, XmlNsInfo> _xmlnsInfoForUnreferencedAssemblies;
717private IList<Assembly> _unexaminedAssemblies;
726private ConcurrentDictionary<Assembly, XmlNsInfo> XmlnsInfo
731Interlocked.CompareExchange(ref _xmlnsInfo, CreateDictionary<Assembly, XmlNsInfo>(ReferenceEqualityComparer.Instance), null);
763private ConcurrentDictionary<Assembly, XmlNsInfo> XmlnsInfoForUnreferencedAssemblies
769Interlocked.CompareExchange(ref _xmlnsInfoForUnreferencedAssemblies, CreateDictionary<Assembly, XmlNsInfo>(ReferenceEqualityComparer.Instance), null);
776internal bool AreInternalsVisibleTo(Assembly fromAssembly, Assembly toAssembly)
832if (_unexaminedAssemblies is WeakReferenceList<Assembly>)
836Assembly assembly = _unexaminedAssemblies[i];
915internal string GetRootNamespace(Assembly asm)
969private XmlNsInfo GetXmlNsInfo(Assembly assembly)
997foreach (var asm in _referenceAssemblies)
1035private ReadOnlyCollection<string> GetXmlNsMappings(Assembly assembly, string clrNs)
1065Assembly[] currentAssemblies = AppDomain.CurrentDomain.GetAssemblies();
1066_unexaminedAssemblies = new WeakReferenceList<Assembly>(currentAssemblies.Length);
1068foreach (Assembly assembly in currentAssemblies)
1086_unexaminedAssemblies = new List<Assembly>(ReferenceAssemblies);
1114IList<Assembly> unexaminedAssembliesCopy;
1118_unexaminedAssemblies = new WeakReferenceList<Assembly>(0);
1126var assembly = unexaminedAssembliesCopy[i];
1247protected internal virtual Assembly OnAssemblyResolve(string assemblyName)
1264private Assembly ResolveReferenceAssembly(string assemblyName)
1322private Assembly ResolveAssembly(string assemblyName)
1329Assembly result = SafeSecurityHelper.GetLoadedAssembly(parsedAsmName);
1344return Assembly.Load(assemblyName);
1360return Assembly.Load(shortName);
1366return Assembly.LoadWithPartialName(assemblyName);
System.Xaml.Tests (22)
System\Xaml\XamlSchemaContextTests.cs (17)
53yield return new object?[] { Array.Empty<Assembly>() };
54yield return new object?[] { new Assembly?[] { typeof(XamlSchemaContextSettings).Assembly, typeof(int).Assembly, null } };
59public void Ctor_ReferencedAssemblies(IEnumerable<Assembly> referenceAssemblies)
80}, new Assembly?[] { typeof(XamlSchemaContextSettings).Assembly, typeof(int).Assembly, null }, true, true
82yield return new object?[] { null, Array.Empty<Assembly>(), false, false };
87public void Ctor_XamlSchemaContextSettings_ReferenceAssemblies(XamlSchemaContextSettings settings, IEnumerable<Assembly> referenceAssemblies, bool expectdSupportMarkupExtensionsWithDuplicateArity, bool expectedFullyQualifyAssemblyNamesInClrNamespaces)
177var context = new XamlSchemaContext(new Assembly[] { assembly1, assembly2 });
259var context = new XamlSchemaContext(new Assembly[] { assemblyWithPrefix });
266var context = new XamlSchemaContext(new Assembly?[] { null });
329var context = new XamlSchemaContext(new Assembly[] { assembly });
343var context = new XamlSchemaContext(new Assembly[] { assembly });
357var context = new XamlSchemaContext(new Assembly[] { assembly });
371var context = new XamlSchemaContext(new Assembly[] { assembly });
385var context = new XamlSchemaContext(new Assembly[] { assembly });
443static string Name(Assembly assembly) => new AssemblyName(assembly.FullName!).Name!;
933var context = new XamlSchemaContext(new Assembly[] { typeof(int).Assembly });
941var context = new XamlSchemaContext(new Assembly?[] { null });
TaskUsageLogger (2)
Templates.Blazor.Tests (3)
Templates.Blazor.WebAssembly.Auth.Tests (4)
Templates.Blazor.WebAssembly.Tests (4)
Templates.Mvc.Tests (4)
Templates.Tests (4)
Test.Utilities (2)
Text.Analyzers (8)
UIAutomationClient (7)
VBCSCompiler (3)
VBCSCompiler.UnitTests (2)
WindowsBase.Tests (3)
WsFedSample (1)
xunit.assert (2)
xunit.console (24)
common\AssemblyResolution\DependencyContextAssemblyCache.cs (11)
22static readonly Tuple<string, Assembly> ManagedAssemblyNotFound = new Tuple<string, Assembly>(null, null);
32readonly ConcurrentDictionary<string, Assembly> managedAssemblyCache;
64managedAssemblyCache = new ConcurrentDictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase);
158public Assembly LoadManagedDll(string assemblyName, Func<string, Assembly> managedAssemblyLoader)
160if (!managedAssemblyCache.TryGetValue(assemblyName, out var result))
208Tuple<string, Assembly> ResolveManagedAssembly(string assemblyName, Func<string, Assembly> managedAssemblyLoader)
219var assembly = managedAssemblyLoader(resolvedAssemblyPath);
243var assembly = managedAssemblyLoader(resolvedAssemblyPath);