6 types derived from Assembly
Aspire.Dashboard.Tests (1)
AssemblyExtensionsTests.cs (1)
75internal sealed class TestingAssembly : Assembly
System.Private.CoreLib (3)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\AssemblyBuilder.cs (1)
11public abstract partial class AssemblyBuilder : Assembly
System\Reflection\Emit\AssemblyBuilder.cs (1)
10public partial class AssemblyBuilder : Assembly
System\Reflection\RuntimeAssembly.cs (1)
11public abstract class RuntimeAssembly : Assembly
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingAssembly.cs (1)
13internal class DelegatingAssembly : Assembly
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\General\TypeExtensions.net.cs (1)
16internal abstract class LeveledAssembly : Assembly
2144 references to Assembly
aspire (5)
Packaging\PackagingService.cs (2)
128var assembly = Assembly.GetExecutingAssembly();
src\Shared\Mcp\McpIconHelper.cs (1)
22public static List<Icon> GetAspireIcons(Assembly assembly, string resourceNamespace)
src\Shared\PackageUpdateHelpers.cs (1)
51var assembly = typeof(PackageUpdateHelpers).Assembly;
Templating\CliTemplateFactory.cs (1)
168var assembly = typeof(CliTemplateFactory).Assembly;
Aspire.Cli.Tests (3)
Commands\McpIconHelperTests.cs (2)
15var assembly = typeof(McpStartCommand).Assembly; 64var assembly = typeof(McpStartCommand).Assembly;
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Confluent.Kafka.Tests (1)
ReflectionHelpers.cs (1)
11public static readonly Assembly ComponentAssembly = typeof(AspireKafkaConsumerExtensions).Assembly;
Aspire.Dashboard (2)
Extensions\AssemblyExtensions.cs (1)
10public static string? GetDisplayVersion(this Assembly assembly)
src\Shared\Mcp\McpIconHelper.cs (1)
22public static List<Icon> GetAspireIcons(Assembly assembly, string resourceNamespace)
Aspire.Dashboard.Tests (4)
Integration\Playwright\Infrastructure\DashboardServerFixture.cs (2)
42var currentAssemblyName = Assembly.GetExecutingAssembly().GetName().Name!; 43var currentAssemblyDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!;
Mcp\McpIconHelperTests.cs (2)
16var assembly = typeof(McpExtensions).Assembly; 65var assembly = typeof(McpExtensions).Assembly;
Aspire.Hosting (15)
Dashboard\DashboardEventHandlers.cs (2)
96var entryAssembly = Assembly.GetEntryAssembly();
Dcp\DcpDependencyCheck.cs (1)
182private static string GetCurrentPackageVersion(Assembly assembly)
DistributedApplicationBuilder.cs (3)
90public Assembly? AppHostAssembly => _options.Assembly; 781internal static string? ResolveUserSecretsId(Assembly? appHostAssembly, IConfiguration configuration) 792internal static void AddConfiguredUserSecrets(IConfigurationManager configuration, Assembly? appHostAssembly, string? configuredUserSecretsId, bool isDevelopment)
DistributedApplicationOptions.cs (6)
13private readonly Lazy<Assembly?> _assembly; 65internal Assembly? Assembly => _assembly.Value; 214private Assembly? ResolveAssembly() 217var appHostAssembly = Assembly.GetEntryAssembly(); 223appHostAssembly = Assembly.Load(AssemblyName);
IDistributedApplicationBuilder.cs (1)
73public Assembly? AppHostAssembly { get; }
src\Shared\PackageUpdateHelpers.cs (1)
51var assembly = typeof(PackageUpdateHelpers).Assembly;
UserSecrets\UserSecretsManagerFactory.cs (1)
74public IUserSecretsManager GetOrCreate(Assembly? assembly)
Aspire.Hosting.Azure.Kusto.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
674public Assembly? AppHostAssembly => throw new NotImplementedException();
Aspire.Hosting.Azure.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.CodeGeneration.Go (2)
AtsGoCodeGenerator.cs (2)
50var assembly = Assembly.GetExecutingAssembly();
Aspire.Hosting.CodeGeneration.Go.Tests (9)
AtsGoCodeGeneratorTests.cs (8)
265var testAssembly = LoadTestAssembly(); 274var testAssembly = LoadTestAssembly(); 281private static Assembly LoadTestAssembly() 289var hostingAssembly = typeof(DistributedApplication).Assembly; 312private static (Assembly testAssembly, Assembly hostingAssembly) LoadBothAssemblies() 314var testAssembly = typeof(TestRedisResource).Assembly; 315var hostingAssembly = typeof(DistributedApplication).Assembly;
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.CodeGeneration.Java (2)
AtsJavaCodeGenerator.cs (2)
49var assembly = Assembly.GetExecutingAssembly();
Aspire.Hosting.CodeGeneration.Java.Tests (9)
AtsJavaCodeGeneratorTests.cs (8)
264var testAssembly = LoadTestAssembly(); 273var testAssembly = LoadTestAssembly(); 280private static Assembly LoadTestAssembly() 288var hostingAssembly = typeof(DistributedApplication).Assembly; 311private static (Assembly testAssembly, Assembly hostingAssembly) LoadBothAssemblies() 313var testAssembly = typeof(TestRedisResource).Assembly; 314var hostingAssembly = typeof(DistributedApplication).Assembly;
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.CodeGeneration.Python (2)
AtsPythonCodeGenerator.cs (2)
48var assembly = Assembly.GetExecutingAssembly();
Aspire.Hosting.CodeGeneration.Python.Tests (9)
AtsPythonCodeGeneratorTests.cs (8)
269var testAssembly = LoadTestAssembly(); 278var testAssembly = LoadTestAssembly(); 285private static Assembly LoadTestAssembly() 293var hostingAssembly = typeof(DistributedApplication).Assembly; 316private static (Assembly testAssembly, Assembly hostingAssembly) LoadBothAssemblies() 318var testAssembly = typeof(TestRedisResource).Assembly; 319var hostingAssembly = typeof(DistributedApplication).Assembly;
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.CodeGeneration.Rust (2)
AtsRustCodeGenerator.cs (2)
61var assembly = Assembly.GetExecutingAssembly();
Aspire.Hosting.CodeGeneration.Rust.Tests (9)
AtsRustCodeGeneratorTests.cs (8)
267var testAssembly = LoadTestAssembly(); 276var testAssembly = LoadTestAssembly(); 283private static Assembly LoadTestAssembly() 291var hostingAssembly = typeof(DistributedApplication).Assembly; 314private static (Assembly testAssembly, Assembly hostingAssembly) LoadBothAssemblies() 316var testAssembly = typeof(TestRedisResource).Assembly; 317var hostingAssembly = typeof(DistributedApplication).Assembly;
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.CodeGeneration.TypeScript (2)
AtsTypeScriptCodeGenerator.cs (2)
351var assembly = Assembly.GetExecutingAssembly();
Aspire.Hosting.CodeGeneration.TypeScript.Tests (16)
AtsTypeScriptCodeGeneratorTests.cs (15)
25var assembly = typeof(AtsTypeScriptCodeGenerator).Assembly; 830var testAssembly = LoadTestAssembly(); 839var testAssembly = LoadTestAssembly(); 846private static Assembly LoadTestAssembly() 854var hostingAssembly = typeof(DistributedApplication).Assembly; 861var hostingAssembly = typeof(DistributedApplication).Assembly; 884private static (Assembly testAssembly, Assembly hostingAssembly) LoadBothAssemblies() 886var testAssembly = typeof(TestRedisResource).Assembly; 887var hostingAssembly = typeof(DistributedApplication).Assembly; 1284var testAssembly = LoadTestAssembly(); 1410var hostingAssembly = typeof(DistributedApplication).Assembly; 1411var jsAssembly = typeof(Aspire.Hosting.JavaScript.JavaScriptAppResource).Assembly; 1441var hostingAssembly = typeof(DistributedApplication).Assembly; 1442var jsAssembly = typeof(Aspire.Hosting.JavaScript.JavaScriptAppResource).Assembly;
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.Containers.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
774var assembly = typeof(DevTunnelResource).Assembly;
Aspire.Hosting.Docker.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.Foundry.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.Kubernetes.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.Maui.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.Python.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.RemoteHost (27)
AssemblyLoader.cs (7)
16private readonly Lazy<IReadOnlyList<Assembly>> _assemblies; 33_assemblies = new Lazy<IReadOnlyList<Assembly>>( 37public IReadOnlyList<Assembly> GetAssemblies() => _assemblies.Value; 107private static List<Assembly> LoadAssemblies( 115var assemblies = new List<Assembly>(); 121var assembly = LoadAssembly(loadContext, name); 136private static Assembly LoadAssembly(IntegrationLoadContext loadContext, string name)
Ats\CapabilityDispatcher.cs (2)
75IReadOnlyList<Assembly> assemblies) 88private void ScanAssemblies(IEnumerable<Assembly> assemblies)
Ats\ReferenceExpressionRef.cs (1)
397foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
AtsCapabilityScanner.cs (10)
117IEnumerable<Assembly> assemblies) 119var assemblyList = assemblies as IReadOnlyCollection<Assembly> ?? [.. assemblies]; 135foreach (var assembly in assemblyList) 230Assembly assembly) 258Assembly assembly, 908Assembly assembly) 2657private static AssemblyExportedTypeCache CreateAssemblyExportedTypeCache(IEnumerable<Assembly> assemblies) 2661foreach (var assembly in assemblies) 2679public static XDocument? LoadXmlDocumentation(Assembly assembly) 2750foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
AtsContextFactory.cs (1)
28private static AtsContext Create(IReadOnlyList<Assembly> assemblies, ILogger logger)
CodeGeneration\CodeGeneratorResolver.cs (2)
42IReadOnlyList<Assembly> assemblies) 46foreach (var assembly in assemblies)
IntegrationLoadContext.cs (2)
29protected override Assembly? Load(AssemblyName assemblyName) 81var defaultAsm = Default.LoadFromAssemblyName(assemblyName);
Language\LanguageSupportResolver.cs (2)
51IReadOnlyList<Assembly> assemblies) 55foreach (var assembly in assemblies)
Aspire.Hosting.RemoteHost.Tests (20)
AtsCapabilityScannerTests.cs (11)
208var hostingAssembly = typeof(DistributedApplication).Assembly; 222var hostingAssembly = typeof(DistributedApplication).Assembly; 262var hostingAssembly = typeof(DistributedApplication).Assembly; 309var testAssembly = typeof(AtsCapabilityScannerTests).Assembly; 310var hostingAssembly = typeof(DistributedApplication).Assembly; 337var capabilityAssembly = CreateAssemblyLevelExportCapabilityAssembly(typeof(AssemblyLevelExportedTestType)); 338var exportAssembly = CreateAssemblyLevelExportAssembly(typeof(AssemblyLevelExportedTestType)); 357var yarpAssembly = typeof(global::Aspire.Hosting.Yarp.YarpResource).Assembly; 427private static Assembly CreateAssemblyLevelExportCapabilityAssembly(Type parameterType) 453private static Assembly CreateAssemblyLevelExportAssembly(Type exportedType) 590var assembly = typeof(DistributedApplication).Assembly;
AttributeDataReaderTests.cs (6)
146var compatibleAssembly = CreateCompatibleAssembly(); 147var hostingAssembly = typeof(DistributedApplication).Assembly; 161var testAssembly = typeof(AttributeDataReaderTests).Assembly; 162var hostingAssembly = typeof(DistributedApplication).Assembly; 258private static Assembly CreateCompatibleAssembly() 284var compatibleAssembly = CreateCompatibleAssembly();
CapabilityDispatcherTests.cs (1)
1422private static CapabilityDispatcher CreateDispatcher(params System.Reflection.Assembly[] assemblies)
IntegrationLoadContextTests.cs (2)
19var sharedAssembly = alc.LoadFromAssemblyName(new AssemblyName("Aspire.TypeSystem")); 32var assembly = alc.LoadFromAssemblyName(new AssemblyName("Aspire.Hosting"));
Aspire.Hosting.Testing (15)
DistributedApplicationEntryPointInvoker.cs (1)
19Assembly assembly,
DistributedApplicationFactory.cs (4)
181Assembly entryPointAssembly) 240Assembly entryPointAssembly, 257Assembly entryPointAssembly) 327private static string? ResolveProjectPath(Assembly? assembly)
DistributedApplicationTestingBuilder.cs (10)
156Assembly appHostAssembly) 235public Assembly? AppHostAssembly => innerBuilder.AppHostAssembly; 327Assembly? appHostAssembly = null) 336Assembly? appHostAssembly = null) 340Assembly appAssembly; 361static Assembly FindApplicationAssembly() 368var asm = stackFrame.GetMethod()?.DeclaringType?.Assembly; 378static string? GetDcpCliPath(Assembly? assembly) 389public Assembly? AppHostAssembly => _innerBuilder.AppHostAssembly; 475new Assembly? AppHostAssembly => ((IDistributedApplicationBuilder)this).AppHostAssembly;
Aspire.Hosting.Testing.Tests (2)
TestingBuilderTests.cs (2)
57var appHostAssembly = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, testProjectAssemblyPath));
Aspire.Hosting.Tests (2)
DcpVisibilityTests.cs (1)
12var hostingAssembly = typeof(DistributedApplication).Assembly;
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Hosting.Yarp.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
29? Path.GetDirectoryName(Assembly.GetExecutingAssembly()!.Location) ?? string.Empty
Aspire.Playground.Tests (2)
Infrastructure\DistributedApplicationExtensions.cs (2)
239var projectAssembly = Assembly.LoadFrom(projectAssemblyPath);
Aspire.RuntimeIdentifier.Tool (1)
Program.cs (1)
17RootCommand rootCommand = new("Aspire.RuntimeIdentifier.Tool v" + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion)
Aspire.TypeSystem (1)
AttributeDataReader.cs (1)
43public static IEnumerable<AspireExportData> GetAspireExportDataAll(Assembly assembly)
CodeStyleConfigFileGenerator (4)
Program.cs (2)
297public Assembly LoadFromPath(string fullPath) => Assembly.LoadFrom(fullPath);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
crossgen2 (1)
src\runtime\src\coreclr\tools\Common\InstructionSetHelpers.cs (1)
108nint libHandle = NativeLibrary.Load(jitInterfaceLibrary, System.Reflection.Assembly.GetExecutingAssembly(), DllImportSearchPath.AssemblyDirectory);
dotnet-dev-certs (2)
src\aspnetcore\src\Tools\Shared\CommandLine\CommandLineApplicationExtensions.cs (2)
40public static void VersionOptionFromAssemblyAttributes(this CommandLineApplication app, Assembly assembly) 43private static string GetInformationalVersion(Assembly assembly)
dotnet-format (14)
Analyzers\AnalyzerFinderHelpers.cs (2)
13public static ImmutableArray<CodeFixProvider> LoadFixers(IEnumerable<Assembly> assemblies, string language) 43private static IEnumerable<Type> GetConcreteTypes(Assembly assembly)
Analyzers\AnalyzerReferenceInformationProvider.cs (6)
14private static readonly Dictionary<string, Assembly> s_pathsToAssemblies = new(StringComparer.OrdinalIgnoreCase); 15private static readonly Dictionary<string, Assembly> s_namesToAssemblies = new(StringComparer.OrdinalIgnoreCase); 33.OfType<Assembly>() 40private static Assembly? TryLoadAssemblyFrom(Workspace workspace, string? path, AnalyzerReference analyzerReference) 50if (s_pathsToAssemblies.TryGetValue(path, out var cachedAssembly)) 57Assembly analyzerAssembly;
Analyzers\CodeStyleInformationProvider.cs (1)
14private static readonly string s_executingPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty;
Analyzers\Extensions.cs (2)
14private static Assembly MicrosoftCodeAnalysisFeaturesAssembly { get; } 20MicrosoftCodeAnalysisFeaturesAssembly = Assembly.Load(new AssemblyName("Microsoft.CodeAnalysis.Features"));
Commands\FormatCommandCommon.cs (1)
348return Assembly.GetExecutingAssembly()
Reflection\RemoveUnnecessaryImportsHelper.cs (2)
10private static readonly Assembly? s_microsoftCodeAnalysisFeaturesAssembly = Assembly.Load(new AssemblyName("Microsoft.CodeAnalysis.Features"));
dotnet-Microsoft.XmlSerializer.Generator (6)
Sgen.cs (6)
225Assembly assembly = LoadAssembly(assemblyName); 476private static Assembly LoadAssembly(string assemblyName) 478Assembly assembly; 480assembly = Assembly.LoadFile(path); 603private static Assembly SgenAssemblyResolver(object source, ResolveEventArgs e) 647return Assembly.LoadFrom(reference);
dotnet-suggest (1)
SuggestionShellScriptHandler.cs (1)
31var assemblyLocation = Assembly.GetAssembly(typeof(SuggestionShellScriptHandler)).Location;
dotnet-svcutil.xmlserializer (30)
Microsoft\Tools\ServiceModel\SvcUtil\ExportModule.cs (2)
36internal ContractLoader(IEnumerable<Assembly> assemblies, IsTypeExcludedDelegate isTypeExcluded) 39foreach (Assembly assembly in assemblies)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (7)
21private List<Assembly> _assemblies; 25internal List<Assembly> Assemblies 30_assemblies = new List<Assembly>(); 132Assembly assembly; 215static public Assembly LoadAssembly(string path) 219return Assembly.LoadFrom(path); 231static public Type[] LoadTypes(Assembly assembly)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (7)
33private List<Assembly> _referencedAssemblies; 45internal List<Assembly> ReferencedAssemblies { get { return _referencedAssemblies; } } 334_parent._referencedAssemblies = new List<Assembly>(referenceArgs.Count); 343foreach (Assembly assembly in _parent._referencedAssemblies) 358Assembly assembly; 394private void AddReferencedTypesFromAssembly(Assembly assembly, Dictionary<string, Type> foundCollectionTypes) 408Assembly mscorlib = typeof(int).Assembly;
Microsoft\Tools\ServiceModel\SvcUtil\Tool.cs (1)
18internal static Assembly SMAssembly;
Microsoft\Tools\ServiceModel\SvcUtil\TypeResolver.cs (8)
13private Assembly _assembly; 21public Assembly ResolveType(object sender, ResolveEventArgs args) 31public Assembly ResolveAssembly(object sender, ResolveEventArgs args) 40Assembly refAssembly = FindAssembly(assemblyName); 47internal Assembly Assembly 59private Assembly FindAssembly(AssemblyName assemblyName) 61Assembly match = null; 62foreach (Assembly refAssembly in _toolOptions.ReferencedAssemblies)
Microsoft\Tools\ServiceModel\SvcUtil\XmlSerializerGenerator.cs (5)
31internal void GenerateCode(List<Assembly> assemblies) 39foreach (Assembly assembly in assemblies) 45private void GenerateCode(Assembly assembly) 117private List<Type> CollectXmlSerializerTypes(Assembly assembly, List<XmlMapping> mappings) 121ExportModule.ContractLoader contractLoader = new ExportModule.ContractLoader(new Assembly[] { assembly }, _isTypeExcluded);
dotnet-svcutil.xmlserializer.IntegrationTests (2)
SvcutilTests.cs (2)
23string testassemblypath = Assembly.GetExecutingAssembly().Location; 27Tool.Main(new string[] { Assembly.GetExecutingAssembly().Location, $"--out:{outputFile}", $"--smreference:{smassemblypath}", $"--quiet"});
dotnet-svcutil-lib (54)
CommandProcessorOptions.cs (8)
43public List<Assembly> ReferencedAssemblies { get; private set; } 106this.ReferencedAssemblies = new List<Assembly>(); 828foreach (Assembly assembly in this.ReferencedAssemblies) 849Assembly assembly = null; 858assembly = Assembly.LoadFrom(assemblyFile.FullName); 890private void AddReferencedTypesFromAssembly(Assembly assembly, Dictionary<string, Type> foundCollectionTypes, Dictionary<string, Type> excludedTypes) 925Assembly stdLib = type.GetTypeInfo().Assembly; 975foreach (Assembly assembly in this.ReferencedAssemblies)
FrameworkFork\Microsoft.CodeDom\Compiler\CompilerResults.cs (3)
28private Assembly _compiledAssembly; 68public Assembly CompiledAssembly 76_compiledAssembly = Assembly.Load(assemName);
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (1)
3947results.CompiledAssembly = Assembly.Load(new AssemblyName(options.OutputAssembly));
FrameworkFork\Microsoft.CodeDom\Microsoft\VBCodeProvider.cs (1)
3302results.CompiledAssembly = Assembly.Load(new AssemblyName(options.OutputAssembly));
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeExporter.cs (2)
108Assembly a = typeof(CodeExporter).GetTypeInfo().Assembly; 132private static string GetProductVersion(Assembly assembly)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Compilation.cs (7)
25private Assembly _assembly; 53internal TempAssembly(XmlMapping[] xmlMappings, Assembly assembly, XmlSerializerImplementation contract) 96internal static Assembly LoadGeneratedAssembly(Type type, string defaultNamespace, out XmlSerializerImplementation contract) 105private static MethodInfo GetMethodFromType(Type type, string methodName, Assembly assembly) 119internal static Type GetTypeFromAssembly(Assembly assembly, string typeName) 234internal Assembly GetReferencedAssembly(string name) 236return _assemblies != null && name != null ? (Assembly)_assemblies[name] : null;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (1)
209protected static Assembly ResolveDynamicAssembly(string assemblyFullName)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (9)
112protected static Assembly ResolveDynamicAssembly(string assemblyFullName) 3724Assembly assembly = info.Assembly; 3768internal static void Add(Assembly a) 3777Assembly oldAssembly = s_nameToAssemblyMap[a.FullName] as Assembly; 3795internal static Assembly Get(string fullName) 3797return s_nameToAssemblyMap != null ? (Assembly)s_nameToAssemblyMap[fullName] : null; 3799internal static string GetName(Assembly a) 3985_writer.Write("static " + typeof(Assembly).FullName + " " + assemblyVariable + " = " + "ResolveDynamicAssembly(");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializer.cs (2)
226Assembly assembly = TempAssembly.LoadGeneratedAssembly(type, defaultNamespace, out contract); 543Assembly assembly = type == null ? null : TempAssembly.LoadGeneratedAssembly(type, null, out contract);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializerFactory.cs (1)
103Assembly assembly = TempAssembly.LoadGeneratedAssembly(type, defaultNamespace, out contract);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (1)
125private void AddReferencedAssembly(Assembly assembly)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (1)
2307internal static bool IsAssemblyFriendOfSerialization(Assembly assembly)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs (4)
93Assembly assembly; 137private Type ResolveDataContractTypeInSharedTypeMode(string assemblyName, string typeName, out Assembly assembly) 142private DataContract ResolveDataContractInSharedTypeMode(string assemblyName, string typeName, out Assembly assembly, out Type type) 163Assembly assembly;
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (1)
14public static Assembly Assembly(this Type type)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceContractGenerator.cs (1)
57internal void AddReferencedAssembly(Assembly assembly)
Metadata\ServiceDescriptor.cs (4)
105string toolPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 106Assembly assembly = Assembly.LoadFrom($"{toolPath}/{tfn}/Microsoft.Svcutil.NamedPipeMetadataImporter.dll"); 260Assembly smAssembly = wsdlImporterType.GetTypeInfo().Assembly;
Shared\ProjectPropertyResolver.cs (4)
49Assembly msbuildAssembly = await LoadMSBuildAssembliesAsync(sdkPath, logger, cancellationToken).ConfigureAwait(false); 171private async Task<Assembly> LoadMSBuildAssembliesAsync(string sdkPath, ILogger logger, CancellationToken cancellationToken) 174Assembly msbuildAssembly = null; 182var assembly = AssemblyLoadContext.Default.LoadFromAssemblyPath(assemblyPath);
TypeLoader.cs (3)
18static public Assembly LoadAssembly(string path) 29return Assembly.Load(new AssemblyName(path)); 38static public Type[] LoadTypes(Assembly assembly, Verbosity verbosity)
dotnet-user-jwts (2)
src\aspnetcore\src\Tools\Shared\CommandLine\CommandLineApplicationExtensions.cs (2)
40public static void VersionOptionFromAssemblyAttributes(this CommandLineApplication app, Assembly assembly) 43private static string GetInformationalVersion(Assembly assembly)
dotnet-user-secrets (2)
src\aspnetcore\src\Tools\Shared\CommandLine\CommandLineApplicationExtensions.cs (2)
40public static void VersionOptionFromAssemblyAttributes(this CommandLineApplication app, Assembly assembly) 43private static string GetInformationalVersion(Assembly assembly)
dotnet-watch (1)
Program.cs (1)
382var loadedAssembly = context.LoadFromAssemblyPath(Path.Combine(roslynPath, assembly.Name + ".dll"));
GenerateDocumentationAndConfigFiles (12)
CodeFixerExtensions.cs (1)
35Assembly analyzerAssembly = analyzerFileReference.GetAssembly();
Program.cs (3)
883_ = Assembly.LoadFrom(assemblyPath); 1950public Assembly LoadFromPath(string fullPath) 1952return Assembly.LoadFrom(fullPath);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (6)
16public static ImmutableArray<Assembly> LoadNearbyAssemblies(ImmutableArray<string> assemblyNames) 18var assemblies = new List<Assembly>(assemblyNames.Length); 22var assembly = TryLoadNearbyAssembly(assemblyName); 32private static Assembly? TryLoadNearbyAssembly(string assemblySimpleName) 48return Assembly.Load(assemblyName); 70var assembly = TryLoadNearbyAssembly(assemblySimpleName);
ilc (1)
src\runtime\src\coreclr\tools\Common\InstructionSetHelpers.cs (1)
108nint libHandle = NativeLibrary.Load(jitInterfaceLibrary, System.Reflection.Assembly.GetExecutingAssembly(), DllImportSearchPath.AssemblyDirectory);
ILCompiler.Compiler (17)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ElfObjectWriter.cs (1)
612commentSectionWriter.WriteUtf8String($".NET: ilc {Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion}");
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (16)
73/// <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> 74/// <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> 75/// <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> 300/// <item><see cref="System.Reflection.Assembly.CreateInstance(string)"/></item> 301/// <item><see cref="System.Reflection.Assembly.CreateInstance(string, bool)"/></item> 302/// <item><see cref="System.Reflection.Assembly.CreateInstance(string, bool, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo, object[])"/></item> 308/// <item><see cref="System.Reflection.Assembly.GetType(string)"/></item> 309/// <item><see cref="System.Reflection.Assembly.GetType(string, bool)"/></item> 310/// <item><see cref="System.Reflection.Assembly.GetType(string, bool, bool)"/></item> 315/// <see cref="System.Reflection.Assembly.Location"/> 319/// <see cref="System.Reflection.Assembly.GetFile(string)"/> 323/// <see cref="System.Reflection.Assembly.GetFiles()"/> 324/// <see cref="System.Reflection.Assembly.GetFiles(bool)"/>
ILCompiler.ReadyToRun (2)
Compiler\DependencyAnalysis\ReadyToRun\CompilerIdentifierNode.cs (1)
28return Assembly
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ElfObjectWriter.cs (1)
612commentSectionWriter.WriteUtf8String($".NET: ilc {Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion}");
illink (25)
ILLink.RoslynAnalyzer (16)
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (16)
73/// <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> 74/// <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> 75/// <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> 300/// <item><see cref="System.Reflection.Assembly.CreateInstance(string)"/></item> 301/// <item><see cref="System.Reflection.Assembly.CreateInstance(string, bool)"/></item> 302/// <item><see cref="System.Reflection.Assembly.CreateInstance(string, bool, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo, object[])"/></item> 308/// <item><see cref="System.Reflection.Assembly.GetType(string)"/></item> 309/// <item><see cref="System.Reflection.Assembly.GetType(string, bool)"/></item> 310/// <item><see cref="System.Reflection.Assembly.GetType(string, bool, bool)"/></item> 315/// <see cref="System.Reflection.Assembly.Location"/> 319/// <see cref="System.Reflection.Assembly.GetFile(string)"/> 323/// <see cref="System.Reflection.Assembly.GetFiles()"/> 324/// <see cref="System.Reflection.Assembly.GetFiles(bool)"/>
ILLink.Tasks (1)
LinkTask.cs (1)
273var taskDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Microsoft.Analyzers.Extra.Tests (60)
AsyncMethodWithoutCancellationTests.cs (1)
163new[] { Assembly.GetAssembly(typeof(HttpContext))! },
CallAnalysis\ArraysTests.cs (3)
121Assembly.GetAssembly(typeof(SortedDictionary<,>))!, 122Assembly.GetAssembly(typeof(ImmutableDictionary<,>))!, 123Assembly.GetAssembly(typeof(FrozenDictionary<,>))!,
CallAnalysis\LegacyCollectionTests.cs (3)
43Assembly.GetAssembly(typeof(System.Collections.ArrayList))!, 44Assembly.GetAssembly(typeof(System.Collections.Queue))!, 45Assembly.GetAssembly(typeof(System.Collections.Specialized.HybridDictionary))!
CallAnalysis\LegacyLoggingTests.cs (22)
74new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 167new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 230new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 291new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 365new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 441new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 524new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 612new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 682new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 755new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 816.CreateTestProject(new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! })
CallAnalysis\LegacyLoggingTests.Extra.cs (15)
94new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 172new[] { Assembly.GetAssembly(typeof(ILogger))! }, 235new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 298new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 359new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 435new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 686new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! }, 748new[] { Assembly.GetAssembly(typeof(ILogger))!, Assembly.GetAssembly(typeof(LoggerMessageAttribute))! },
CallAnalysis\StaticTimeTests.cs (5)
15private static readonly Assembly[] _staticTimeReferences = new[] 17Assembly.GetAssembly(typeof(Thread))!, 18Assembly.GetAssembly(typeof(Task))!, 19Assembly.GetAssembly(typeof(TimeSpan))!, 20Assembly.GetAssembly(typeof(DateTime))!,
Resources\RoslynTestUtils.cs (8)
30public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true, 35var corelib = Assembly.GetAssembly(typeof(object))!.Location; 48foreach (var r in references) 176IEnumerable<Assembly>? references, 205IEnumerable<Assembly>? references, 236IEnumerable<Assembly>? references, 289IEnumerable<Assembly>? references, 407IEnumerable<Assembly>? references,
UsingToStringInLoggersTests.cs (3)
16public static IEnumerable<Assembly> References => new[] 18Assembly.GetAssembly(typeof(LoggerMessageAttribute))!, 19Assembly.GetAssembly(typeof(IEnrichmentTagCollector))!,
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))!,
CallAnalysis\UseThrowsTests.cs (2)
19private static readonly Assembly[] _references = new[] 21Assembly.GetAssembly(typeof(Throw))!,
InternalReferencedInPublicDocAnalyzerTests.cs (2)
26public static IEnumerable<Assembly> References => new Assembly[]
Resources\RoslynTestUtils.cs (8)
30public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true, 35var corelib = Assembly.GetAssembly(typeof(object))!.Location; 48foreach (var r in references) 176IEnumerable<Assembly>? references, 205IEnumerable<Assembly>? references, 236IEnumerable<Assembly>? references, 290IEnumerable<Assembly>? references, 408IEnumerable<Assembly>? references,
Microsoft.Arcade.Common (1)
ZipArchiveManager.cs (1)
62Assembly assembly = typeof(TAssembly).Assembly;
Microsoft.AspNetCore (4)
WebApplicationBuilder.cs (2)
284var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
WebHost.cs (2)
185var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\RoutePatternBraceMatcher.cs (1)
111public static Assembly ExternalAccessAssembly => typeof(IAspNetCoreEmbeddedLanguageBraceMatcher).Assembly;
RouteEmbeddedLanguage\RoutePatternClassifier.cs (1)
159public static Assembly ExternalAccessAssembly => typeof(IAspNetCoreEmbeddedLanguageClassifier).Assembly;
Microsoft.AspNetCore.Components (13)
Routing\RouteKey.cs (5)
10public readonly Assembly? AppAssembly; 11public readonly HashSet<Assembly>? AdditionalAssemblies; 13public RouteKey(Assembly appAssembly, IEnumerable<Assembly> additionalAssemblies) 16AdditionalAssemblies = additionalAssemblies is null ? null : new HashSet<Assembly>(additionalAssemblies);
Routing\Router.cs (2)
62public Assembly AppAssembly { get; set; } 68[Parameter] public IEnumerable<Assembly> AdditionalAssemblies { get; set; }
Routing\RouteTableFactory.cs (2)
60foreach (var assembly in routeKey.AdditionalAssemblies) 72static void GetRouteableComponents(List<Type> routeableComponents, Assembly assembly)
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (4)
52private static Type? ResolveType(Key key, Assembly[] assemblies) 54Assembly? assembly = null; 57var current = assemblies[i]; 77assembly = Assembly.Load(key.Assembly);
Microsoft.AspNetCore.Components.Endpoints (16)
Builder\RazorComponentEndpointDataSourceFactory.cs (1)
24var assembly = typeof(TRootComponent).Assembly;
Builder\RazorComponentsEndpointConventionBuilderExtensions.cs (3)
19/// <param name="assemblies">The <see cref="Assembly"/> instances to add.</param> 26params Assembly[] assemblies) 31foreach (var assembly in assemblies)
Discovery\ComponentApplicationBuilder.cs (5)
45/// <param name="assembly">The <see cref="Assembly"/> to scan for pages.</param> 47public ComponentApplicationBuilder AddAssembly(Assembly assembly) 58/// <param name="assembly">The <see cref="Assembly"/> to remove.</param> 60public ComponentApplicationBuilder RemoveAssembly(Assembly assembly) 126var assembly = typeof(TComponent).Assembly;
Discovery\DefaultRazorComponentApplication.cs (1)
37var assembly = typeof(TComponent).Assembly;
Discovery\IRazorComponentApplication.cs (2)
13static ComponentApplicationBuilder GetBuilderForAssembly(ComponentApplicationBuilder builder, Assembly assembly) 20static (IReadOnlyList<PageComponentBuilder>, IReadOnlyList<ComponentBuilder>) CreatePageRouteCollection(string name, Assembly assembly)
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (4)
28private static Type? ResolveType(Key key, Assembly[] assemblies) 30Assembly? assembly = null; 33var current = assemblies[i]; 53assembly = Assembly.Load(key.Assembly);
Microsoft.AspNetCore.Components.Server (8)
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (4)
28private static Type? ResolveType(Key key, Assembly[] assemblies) 30Assembly? assembly = null; 33var current = assemblies[i]; 53assembly = Assembly.Load(key.Assembly);
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (4)
52private static Type? ResolveType(Key key, Assembly[] assemblies) 54Assembly? assembly = null; 57var current = assemblies[i]; 77assembly = Assembly.Load(key.Assembly);
Microsoft.AspNetCore.Components.WebView.Maui (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
24 private static string ApplicationAssemblyName { get; } = Assembly.GetEntryAssembly()?.GetName().Name
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
BlazorWebView.cs (1)
176 var entryAssemblyLocation = Assembly.GetEntryAssembly()?.Location;
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
24 private static string ApplicationAssemblyName { get; } = Assembly.GetEntryAssembly()?.GetName().Name
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
409 if (Assembly.GetEntryAssembly() is { } mainAssembly)
Microsoft.AspNetCore.Components.WebView.Wpf (3)
BlazorWebView.cs (1)
259 var entryAssemblyLocation = Assembly.GetEntryAssembly()?.Location;
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
24 private static string ApplicationAssemblyName { get; } = Assembly.GetEntryAssembly()?.GetName().Name
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
409 if (Assembly.GetEntryAssembly() is { } mainAssembly)
Microsoft.AspNetCore.Hosting (13)
GenericHost\GenericWebHostBuilder.cs (3)
130var processed = new HashSet<Assembly>(); 139var assembly = Assembly.Load(new AssemblyName(assemblyName));
Internal\StartupLoader.cs (2)
250var assembly = Assembly.Load(new AssemblyName(startupAssemblyName));
Internal\WebHostOptions.cs (1)
20ApplicationName = environment?.ApplicationName ?? GetConfig(WebHostDefaults.ApplicationKey) ?? Assembly.GetEntryAssembly()?.GetName().Name ?? string.Empty;
src\aspnetcore\src\Shared\ErrorPage\ErrorPageModelBuilder.cs (2)
24var systemRuntimeAssembly = typeof(System.ComponentModel.DefaultValueAttribute).Assembly; 27var currentAssembly = typeof(ErrorPage).Assembly;
StaticWebAssets\StaticWebAssetsLoader.cs (2)
75var assembly = Assembly.Load(environment.ApplicationName);
WebHostBuilder.cs (3)
227var processed = new HashSet<Assembly>(); 234var assembly = Assembly.Load(new AssemblyName(assemblyName));
Microsoft.AspNetCore.Http.Extensions (2)
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
30private static Assembly _fsharpCoreAssembly; 208var assembly = possibleFSharpType.Assembly;
Microsoft.AspNetCore.Mvc (3)
MvcServiceCollectionExtensions.cs (3)
325var mvcTagHelpersAssembly = typeof(InputTagHelper).Assembly; 331var mvcRazorAssembly = typeof(UrlResolutionTagHelper).Assembly; 341public FrameworkAssemblyPart(Assembly assembly)
Microsoft.AspNetCore.Mvc.Core (44)
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (1)
124var controllerAssembly = controller.ControllerType.Assembly;
ApplicationModels\ApiConventionApplicationModelConvention.cs (1)
66var controllerAssembly = controller.ControllerType.Assembly;
ApplicationParts\ApplicationPartFactory.cs (5)
11/// from an <see cref="Assembly"/>. 23/// <param name="assembly">The <see cref="Assembly"/>.</param> 24public abstract IEnumerable<ApplicationPart> GetApplicationParts(Assembly assembly); 33/// <param name="assembly">The <see cref="Assembly"/>.</param> 35public static ApplicationPartFactory GetApplicationPartFactory(Assembly assembly)
ApplicationParts\ApplicationPartManager.cs (9)
55var seenAssemblies = new HashSet<Assembly>(); 57foreach (var assembly in assemblies) 75private static IEnumerable<Assembly> GetApplicationPartAssemblies(string entryAssemblyName) 77var entryAssembly = Assembly.Load(new AssemblyName(entryAssemblyName)); 82.Select(name => Assembly.Load(name.AssemblyName)) 92private static IEnumerable<Assembly> GetAssemblyClosure(Assembly assembly) 99foreach (var relatedAssembly in relatedAssemblies)
ApplicationParts\AssemblyPart.cs (4)
9/// An <see cref="ApplicationPart"/> backed by an <see cref="System.Reflection.Assembly"/>. 16/// <param name="assembly">The backing <see cref="System.Reflection.Assembly"/>.</param> 17public AssemblyPart(Assembly assembly) 25public Assembly Assembly { get; }
ApplicationParts\DefaultApplicationPartFactory.cs (3)
24/// <param name="assembly">The <see cref="Assembly"/>.</param> 26public static IEnumerable<ApplicationPart> GetDefaultApplicationParts(Assembly assembly) 34public override IEnumerable<ApplicationPart> GetApplicationParts(Assembly assembly)
ApplicationParts\NullApplicationPartFactory.cs (1)
18public override IEnumerable<ApplicationPart> GetApplicationParts(Assembly assembly)
ApplicationParts\RelatedAssemblyAttribute.cs (13)
34/// Gets <see cref="Assembly"/> instances specified by <see cref="RelatedAssemblyAttribute"/>. 38/// <returns>Related <see cref="Assembly"/> instances.</returns> 39public static IReadOnlyList<Assembly> GetRelatedAssemblies(Assembly assembly, bool throwOnError) 47internal static IReadOnlyList<Assembly> GetRelatedAssemblies( 48Assembly assembly, 59return Array.Empty<Assembly>(); 65return Array.Empty<Assembly>(); 76return Array.Empty<Assembly>(); 79var relatedAssemblies = new List<Assembly>(); 89Assembly relatedAssembly; 126public virtual Assembly LoadFromAssemblyName(AssemblyName assemblyName) 129public virtual Assembly LoadFromAssemblyPath(string assemblyPath)
DependencyInjection\MvcCoreMvcBuilderExtensions.cs (2)
77/// <param name="assembly">The <see cref="Assembly"/> of the <see cref="ApplicationPart"/>.</param> 79public static IMvcBuilder AddApplicationPart(this IMvcBuilder builder, Assembly assembly)
DependencyInjection\MvcCoreMvcCoreBuilderExtensions.cs (2)
159/// <param name="assembly">The <see cref="Assembly"/> of the <see cref="ApplicationPart"/>.</param> 161public static IMvcCoreBuilder AddApplicationPart(this IMvcCoreBuilder builder, Assembly assembly)
Infrastructure\MvcCoreMvcOptionsSetup.cs (1)
128modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Assembly)));
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
30private static Assembly _fsharpCoreAssembly; 208var assembly = possibleFSharpType.Assembly;
Microsoft.AspNetCore.Mvc.Localization (1)
IHtmlLocalizerFactory.cs (1)
12/// Creates an <see cref="IHtmlLocalizer"/> using the <see cref="System.Reflection.Assembly"/> and
Microsoft.AspNetCore.Mvc.Razor (10)
ApplicationParts\CompiledRazorAssemblyApplicationPartFactory.cs (3)
19/// <param name="assembly">The <see cref="Assembly"/>.</param> 21public static IEnumerable<ApplicationPart> GetDefaultApplicationParts(Assembly assembly) 29public override IEnumerable<ApplicationPart> GetApplicationParts(Assembly assembly) => GetDefaultApplicationParts(assembly);
ApplicationParts\CompiledRazorAssemblyPart.cs (4)
17/// <param name="assembly">The <see cref="System.Reflection.Assembly"/></param> 18public CompiledRazorAssemblyPart(Assembly assembly) 24/// Gets the <see cref="System.Reflection.Assembly"/>. 26public Assembly Assembly { get; }
ApplicationParts\ConsolidatedAssemblyApplicationPartFactory.cs (3)
12/// Combines the results of <see cref="DefaultApplicationPartFactory.GetApplicationParts(Assembly)"/> and 13/// <see cref="CompiledRazorAssemblyApplicationPartFactory.GetApplicationParts(Assembly)"/>. This part factory 20public override IEnumerable<ApplicationPart> GetApplicationParts(Assembly assembly)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
JavaScriptResources.cs (1)
15private static readonly Assembly ResourcesAssembly = typeof(JavaScriptResources).Assembly;
Microsoft.AspNetCore.Razor.Runtime (8)
Hosting\RazorCompiledItemLoader.cs (8)
10/// <see cref="Assembly"/> using reflection. 15/// <see cref="RazorCompiledItem"/> objects from an <see cref="Assembly"/>. The default implementations of methods 20/// additional configuration or data outside of the <see cref="Assembly"/> being loaded. 30/// Loads a list of <see cref="RazorCompiledItem"/> objects from the provided <see cref="Assembly"/>. 34public virtual IReadOnlyList<RazorCompiledItem> LoadItems(Assembly assembly) 61/// <see cref="Assembly"/>. 63/// <param name="assembly">The <see cref="Assembly"/> to search.</param> 65protected IEnumerable<RazorCompiledItemAttribute> LoadAttributes(Assembly assembly)
Microsoft.AspNetCore.SignalR.Core (2)
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
30private static Assembly _fsharpCoreAssembly; 208var assembly = possibleFSharpType.Assembly;
Microsoft.Build (25)
BackEnd\Components\Logging\LoggingService.cs (1)
1043Assembly engineAssembly = typeof(LoggingService).GetTypeInfo().Assembly;
BackEnd\Components\ProjectCache\ProjectCacheService.cs (3)
429Assembly assembly = LoadAssembly(pluginAssemblyPath); 442Assembly LoadAssembly(string resolverPath) 451IEnumerable<Type> GetTypes<T>(Assembly assembly)
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (1)
88initiatorType?.Assembly == Assembly.GetExecutingAssembly()
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (3)
223protected virtual IEnumerable<Type> GetResolverTypes(Assembly assembly) 231protected virtual Assembly LoadResolverAssembly(string resolverPath) 298Assembly assembly;
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
967Assembly taskExecutionHostAssembly = typeof(TaskExecutionHost).GetTypeInfo().Assembly; 973Assembly taskExecutionHostAssembly = typeof(TaskExecutionHost).GetTypeInfo().Assembly;
BuildCheck\Acquisition\BuildCheckAcquisitionModule.cs (1)
36Assembly? assembly = null;
Evaluation\Expander.cs (2)
4436Assembly candidateAssembly = null; 4439candidateAssembly = Assembly.Load(new AssemblyName(candidateAssemblyName));
src\msbuild\src\Shared\TaskEngineAssemblyResolver.cs (3)
60_eventHandler = new Func<AssemblyLoadContext, AssemblyName, Assembly>(ResolveAssembly); 100private Assembly ResolveAssembly(AssemblyLoadContext assemblyLoadContext, AssemblyName assemblyName) 159private Func<AssemblyLoadContext, AssemblyName, Assembly> _eventHandler = null;
src\msbuild\src\Shared\TypeLoader.cs (6)
75string msbuildDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 217private static Assembly LoadAssembly(AssemblyLoadInfo assemblyLoadInfo) 223return Assembly.Load(assemblyLoadInfo.AssemblyName); 398private Assembly _loadedAssembly; 538Assembly loadedAssembly = context.LoadFromAssemblyPath(_assemblyLoadInfo.AssemblyFile); 594private void SetArchitectureAndRuntime(Assembly assembly)
Utilities\NuGetFrameworkWrapper.cs (3)
56Assembly NuGetAssembly; 60NuGetAssembly = Assembly.Load(assemblyName); 64NuGetAssembly = Assembly.LoadFile(assemblyFilePath);
Microsoft.Build.Framework (39)
AssemblyUtilities.cs (7)
32private static Lazy<Assembly> s_entryAssembly = new Lazy<Assembly>(() => GetEntryAssembly()); 33public static Assembly EntryAssembly => s_entryAssembly.Value; 35public static string GetAssemblyLocation(Assembly assembly) 118s_assemblylocationProperty = typeof(Assembly).GetProperty("Location", typeof(string)); 125private static Assembly GetEntryAssembly() 127return System.Reflection.Assembly.GetEntryAssembly();
BackEnd\Handshake.cs (1)
124var fileVersion = new Version(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion!);
BuildEnvironmentHelper.cs (2)
393var frameworkAssembly = typeof(Framework.ITask).Assembly; 434var entryAssembly = AssemblyUtilities.EntryAssembly;
Loader\CoreCLRAssemblyLoader.cs (16)
24private readonly Dictionary<string, Assembly> _pathsToAssemblies = new Dictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase); 25private readonly Dictionary<string, Assembly> _namesToAssemblies = new Dictionary<string, Assembly>(); 46public Assembly LoadFromPath(string fullPath) 70private Assembly LoadUsingLegacyDefaultContext(string fullPath) 80Assembly assembly; 90private Assembly LoadUsingPluginContext(string fullPath) 94Assembly assembly; 113private Assembly TryGetWellKnownAssembly(AssemblyLoadContext context, AssemblyName assemblyName) 124string[] searchPaths = [Assembly.GetExecutingAssembly().Location]; 128private Assembly TryResolveAssembly(AssemblyLoadContext context, AssemblyName assemblyName) 132Assembly assembly = TryGetWellKnownAssembly(context, assemblyName); 148private Assembly TryResolveAssemblyFromPaths(AssemblyLoadContext context, AssemblyName assemblyName, IEnumerable<string> searchPaths) 187private Assembly LoadAndCache(AssemblyLoadContext context, string fullPath) 189var assembly = context.LoadFromAssemblyPath(fullPath);
Loader\LoadedType.cs (2)
32Assembly loadedAssembly, 229internal Assembly LoadedAssembly { get; private set; }
Loader\MSBuildLoadContext.cs (1)
50protected override Assembly? Load(AssemblyName assemblyName)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
Utilities\TaskFactoryUtilities.cs (8)
42public CachedAssemblyEntry(Assembly assembly, string assemblyPath) 48public Assembly Assembly { get; } 158public static Assembly LoadTaskAssembly(string assemblyPath) 166Assembly assembly = Assembly.Load(FileSystems.Default.ReadFileAllBytes(assemblyPath)); 248private static Assembly? TryLoadAssembly(List<string> directories, AssemblyName assemblyName) 260return Assembly.Load(FileSystems.Default.ReadFileAllBytes(path)); 268return Assembly.Load(FileSystems.Default.ReadFileAllBytes(path));
Microsoft.Build.Tasks.CodeAnalysis (4)
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
241var buildTask = typeof(ManagedToolTask).Assembly;
src\roslyn\src\Compilers\Core\MSBuildTask\Utilities.cs (1)
166internal static string? TryGetAssemblyPath(Assembly assembly)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
Microsoft.Build.Tasks.Core (13)
BootstrapperUtil\BootstrapperBuilder.cs (2)
1989Assembly a = Assembly.GetExecutingAssembly();
GetSDKReferenceFiles.cs (1)
1094currentAssembly = Assembly.GetExecutingAssembly().Location;
ManifestUtil\ComImporter.cs (1)
22private readonly ResourceManager _resources = new ResourceManager("Microsoft.Build.Tasks.Core.Strings.ManifestUtilities", System.Reflection.Assembly.GetExecutingAssembly());
ManifestUtil\Util.cs (3)
111return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 201Assembly a = Assembly.GetExecutingAssembly();
ManifestUtil\XmlUtil.cs (2)
157Assembly a = Assembly.GetExecutingAssembly();
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (3)
189if (!TryCompileAssembly(taskFactoryLoggingHost, taskInfo, out Assembly assembly)) 690/// <param name="assembly">The <see cref="Assembly"/> if the source code be compiled and loaded, otherwise <code>null</code>.</param> 692private bool TryCompileAssembly(IBuildEngine buildEngine, RoslynCodeTaskFactoryTaskInfo taskInfo, out Assembly assembly)
System.Design.cs (1)
93public MainAssemblyFallbackResourceManager(string baseName, Assembly assembly) : base(baseName, assembly)
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)
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (6)
21/// Is this an <see cref="Assembly"/> that the loader considers to be part of the hosting 24bool IsHostAssembly(Assembly assembly); 107/// The implementation needs to load an <see cref="Assembly"/> with the specified <see cref="AssemblyName"/> from 111/// This method should return an <see cref="Assembly"/> instance or throw. 113private partial Assembly Load(AssemblyName assemblyName, string resolvedPath); 220public Assembly LoadFromPath(string originalPath)
DiagnosticAnalyzer\AnalyzerFileReference.cs (8)
44private Assembly? _lazyAssembly; 52/// <param name="assemblyLoader">Loader for obtaining the <see cref="Assembly"/> from the <paramref name="fullPath"/></param> 468Assembly analyzerAssembly; 516Assembly analyzerAssembly; 562bool CheckAssemblyReferencesNewerCompiler(Assembly analyzerAssembly) 579private ImmutableArray<TExtension> GetLanguageSpecificAnalyzers(Assembly analyzerAssembly, ImmutableSortedDictionary<string, ImmutableHashSet<string>> analyzerTypeNameMap, string language, ref bool reportedError) 589private ImmutableArray<TExtension> GetAnalyzersForTypeNames(Assembly analyzerAssembly, ImmutableHashSet<string> analyzerTypeNames, ref bool reportedError) 674public Assembly GetAssembly()
DiagnosticAnalyzer\IAnalyzerAssemblyLoader.cs (3)
32/// corresponding <see cref="Assembly"/> object. 36/// <see cref="Assembly"/> instance. 40Assembly LoadFromPath(string fullPath);
DiagnosticAnalyzer\IAnalyzerAssemblyResolver.cs (4)
14/// <see cref="Assembly"/> instance. This is useful for hosts that need to load assemblies in a custom way like 20/// Resolve an <see cref="Assembly"/> for the given parameters. 35/// <returns>The <see cref="Assembly"/> resolved or null if it's not handled by this instance</returns> 36Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory);
MetadataReference\AssemblyIdentity.cs (1)
522public static AssemblyIdentity FromAssemblyDefinition(Assembly assembly)
MetadataReference\MetadataReference.cs (6)
299public static MetadataReference CreateFromAssembly(Assembly assembly) 304internal static MetadataImageReference CreateFromAssemblyInternal(Assembly assembly) 328Assembly assembly, 336Assembly assembly, 364Assembly assembly, 376internal static bool HasMetadata(Assembly assembly)
NativePdbWriter\PdbWriter.cs (1)
790var compilerAssembly = typeof(Compilation).Assembly;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
Microsoft.CodeAnalysis.Analyzers (8)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (6)
16public static ImmutableArray<Assembly> LoadNearbyAssemblies(ImmutableArray<string> assemblyNames) 18var assemblies = new List<Assembly>(assemblyNames.Length); 22var assembly = TryLoadNearbyAssembly(assemblyName); 32private static Assembly? TryLoadNearbyAssembly(string assemblySimpleName) 48return Assembly.Load(assemblyName); 70var assembly = TryLoadNearbyAssembly(assemblySimpleName);
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
Microsoft.CodeAnalysis.CodeStyle (3)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
48protected abstract (Assembly assembly, string typeName) GetCompilerDiagnosticAnalyzerInfo();
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
Microsoft.CodeAnalysis.CodeStyle.Fixes (8)
Host\Mef\CodeStyleHostLanguageServices.cs (2)
41private static IEnumerable<Type> GetTypesFromAssembly(Assembly assembly) 56private static ImmutableArray<Assembly> CreateAssemblies(string languageName)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (6)
16public static ImmutableArray<Assembly> LoadNearbyAssemblies(ImmutableArray<string> assemblyNames) 18var assemblies = new List<Assembly>(assemblyNames.Length); 22var assembly = TryLoadNearbyAssembly(assemblyName); 32private static Assembly? TryLoadNearbyAssembly(string assemblySimpleName) 48return Assembly.Load(assemblyName); 70var assembly = TryLoadNearbyAssembly(assemblySimpleName);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\CSharpRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
23protected override (Assembly assembly, string typeName) GetCompilerDiagnosticAnalyzerInfo()
Microsoft.CodeAnalysis.CSharp.Features (1)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\CSharpRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
23protected override (Assembly assembly, string typeName) GetCompilerDiagnosticAnalyzerInfo()
Microsoft.CodeAnalysis.Extensions.Package (2)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
Microsoft.CodeAnalysis.Features (9)
Common\AbstractProjectExtensionProvider.cs (1)
158var analyzerAssembly = analyzerFileReference.GetAssembly();
Extensions\ExtensionFolder.cs (1)
75var assembly = analyzerAssemblyLoader.LoadFromPath(assemblyFilePath);
Extensions\IExtensionAssemblyLoaderProvider.cs (2)
29Assembly LoadFromPath(string assemblyFilePath); 99public Assembly LoadFromPath(string assemblyFilePath)
Extensions\IExtensionMessageHandlerFactory.cs (4)
23/// <remarks>May be called multiple times for the same <see cref="Assembly"/> instance.</remarks> 25Assembly assembly, string extensionIdentifier, CancellationToken cancellationToken); 33/// <remarks>May be called multiple times for the same <see cref="Assembly"/> instance.</remarks> 35Assembly assembly, string extensionIdentifier, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
48protected abstract (Assembly assembly, string typeName) GetCompilerDiagnosticAnalyzerInfo();
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
Microsoft.CodeAnalysis.Scripting (34)
Hosting\AssemblyLoader\AssemblyAndLocation.cs (1)
9internal readonly record struct AssemblyAndLocation(Assembly Assembly, string Location, bool GlobalAssemblyCache)
Hosting\AssemblyLoader\AssemblyLoaderImpl.cs (1)
22public abstract Assembly LoadFromStream(Stream peStream, Stream pdbStream);
Hosting\AssemblyLoader\CoreAssemblyLoaderImpl.cs (3)
23public override Assembly LoadFromStream(Stream peStream, Stream pdbStream) 33var assembly = new LoadContext(Loader, Path.GetDirectoryName(path)).LoadFromAssemblyPath(path); 70protected override Assembly? Load(AssemblyName assemblyName) => null;
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;
Hosting\CommandLine\NotImplementedAnalyzerLoader.cs (1)
19public Assembly LoadFromPath(string fullPath)
Script.cs (2)
261var globalsAssembly = GlobalsType.GetTypeInfo().Assembly; 313Assembly assembly,
ScriptBuilder.cs (2)
157var assembly = _assemblyLoader.LoadAssemblyFromStream(peStream, pdbStreamOpt); 186internal static MethodInfo GetEntryPointRuntimeMethod(IMethodSymbol entryPoint, Assembly assembly)
ScriptOptions.cs (7)
250public ScriptOptions WithReferences(IEnumerable<Assembly> references) 258public ScriptOptions WithReferences(params Assembly[] references) 259=> WithReferences((IEnumerable<Assembly>)references); 266public ScriptOptions AddReferences(IEnumerable<Assembly> references) 269private MetadataImageReference CreateFromAssembly(Assembly assembly) => 277public ScriptOptions AddReferences(params Assembly[] references) 278=> AddReferences((IEnumerable<Assembly>)references);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\roslyn\src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessarySuppressions\VisualBasicRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.vb (1)
29Protected Overrides Function GetCompilerDiagnosticAnalyzerInfo() As (assembly As Assembly, typeName As String)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
src\roslyn\src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessarySuppressions\VisualBasicRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.vb (1)
29Protected Overrides Function GetCompilerDiagnosticAnalyzerInfo() As (assembly As Assembly, typeName As String)
Microsoft.CodeAnalysis.Workspaces (35)
Log\RoslynEventSource.cs (1)
112var assembly = typeof(RoslynEventSource).Assembly;
src\roslyn\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)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (6)
21/// Is this an <see cref="Assembly"/> that the loader considers to be part of the hosting 24bool IsHostAssembly(Assembly assembly); 107/// The implementation needs to load an <see cref="Assembly"/> with the specified <see cref="AssemblyName"/> from 111/// This method should return an <see cref="Assembly"/> instance or throw. 113private partial Assembly Load(AssemblyName assemblyName, string resolvedPath); 220public Assembly LoadFromPath(string originalPath)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\IAnalyzerAssemblyResolver.cs (4)
14/// <see cref="Assembly"/> instance. This is useful for hosts that need to load assemblies in a custom way like 20/// Resolve an <see cref="Assembly"/> for the given parameters. 35/// <returns>The <see cref="Assembly"/> resolved or null if it's not handled by this instance</returns> 36Assembly? Resolve(AnalyzerAssemblyLoader loader, AssemblyName assemblyName, AssemblyLoadContext directoryContext, string directory);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (6)
16public static ImmutableArray<Assembly> LoadNearbyAssemblies(ImmutableArray<string> assemblyNames) 18var assemblies = new List<Assembly>(assemblyNames.Length); 22var assembly = TryLoadNearbyAssembly(assemblyName); 32private static Assembly? TryLoadNearbyAssembly(string assemblySimpleName) 48return Assembly.Load(assemblyName); 70var assembly = TryLoadNearbyAssembly(assemblySimpleName);
Workspace\Host\Mef\MefHostServices.cs (7)
20internal delegate MefHostServices CreationHook(IEnumerable<Assembly> assemblies); 23/// This delegate allows test code to override the behavior of <see cref="Create(IEnumerable{Assembly})"/>. 38public static MefHostServices Create(IEnumerable<System.Reflection.Assembly> assemblies) 92public static ImmutableArray<Assembly> DefaultAssemblies 119internal static bool IsDefaultAssembly(Assembly assembly) 125private static ImmutableArray<Assembly> LoadDefaultAssemblies() 133/// Injects replacement behavior for the <see cref="Create(IEnumerable{Assembly})"/> method.
Workspace\IsolatedAnalyzerReferenceSet.Core.cs (1)
66/// cref="System.Reflection.Assembly"/>s within.
Workspace\Solution\SourceGeneratorIdentity.cs (1)
32var assembly = generatorType.Assembly;
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Host\Mef\MSBuildMefHostServices.cs (1)
22public static ImmutableArray<Assembly> DefaultAssemblies
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (2)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
Microsoft.CSharp (13)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\AggregateSymbol.cs (2)
21public Assembly AssociatedAssembly; 356public bool InternalsVisibleTo(Assembly assembly) => TypeManager.InternalsVisibleTo(AssociatedAssembly, assembly);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\Symbol.cs (3)
153private Assembly GetAssembly() 177private bool InternalsVisibleTo(Assembly assembly) 199Assembly assem = GetAssembly();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (8)
18private static readonly Dictionary<(Assembly, Assembly), bool> s_internalsVisibleToCache = 19new Dictionary<(Assembly, Assembly), bool>(); 776internal static bool InternalsVisibleTo(Assembly assemblyThatDefinesAttribute, Assembly assemblyToCheck) 779(Assembly, Assembly) key = (assemblyThatDefinesAttribute, assemblyToCheck);
Microsoft.Data.Analysis.Tests (1)
DataFrame.IOTests.cs (1)
1338Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "/";
Microsoft.DotNet.ApiCompat.Task (5)
src\sdk\src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\RoslynResolver.cs (5)
21_currentContext = AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()); 38private Assembly? Resolve(AssemblyLoadContext context, AssemblyName assemblyName) 43private Assembly? LoadRoslyn(AssemblyName name, Func<string, Assembly> loadFromPath) 50Assembly asm = loadFromPath(Path.Combine(_roslynAssembliesPath!, $"{name.Name}.dll"));
Microsoft.DotNet.Build.Tasks.Workloads (1)
EmbeddedTemplates.cs (1)
51using Stream rs = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName);
Microsoft.DotNet.GenFacades (6)
RoslynBuildTask.cs (6)
20AssemblyLoadContext currentContext = AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly())!; 34private Assembly ResolverForRoslyn(AssemblyLoadContext context, AssemblyName assemblyName) 39private Assembly LoadRoslyn(AssemblyName name, Func<string, Assembly> loadFromPath) 45Assembly asm = loadFromPath(Path.Combine(RoslynAssembliesPath!, $"{name.Name}.dll")); 54Assembly _ = name.Name == codeAnalysisName ?
Microsoft.DotNet.HotReload.WebAssembly.Browser (22)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (12)
27private delegate void ApplyUpdateDelegate(Assembly assembly, ReadOnlySpan<byte> metadataDelta, ReadOnlySpan<byte> ilDelta, ReadOnlySpan<byte> pdbDelta); 32private readonly ConcurrentDictionary<Assembly, Assembly> _appliedAssemblies = new(); 38private Func<AssemblyLoadContext, AssemblyName, Assembly?>? _assemblyResolvingHandlerToInstall; 39private Func<AssemblyLoadContext, AssemblyName, Assembly?>? _installedAssemblyResolvingHandler; 45Func<AssemblyLoadContext, AssemblyName, Assembly?>? assemblyResolvingHandler, 74var applyUpdateMethod = metadataUpdater.GetMethod(ApplyUpdateMethodName, BindingFlags.Public | BindingFlags.Static, binder: null, [typeof(Assembly), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>)], modifiers: null); 106var loadedAssembly = eventArgs.LoadedAssembly; 143foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) 225var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => TryGetModuleId(assembly) is Guid moduleId && moduleId == update.ModuleId); 253private void ApplyDeltas(Assembly assembly, IReadOnlyList<RuntimeManagedCodeUpdate> updates) 272private static Guid? TryGetModuleId(Assembly loadedAssembly)
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (10)
154foreach (var assembly in sortedAssemblies) 297private IList<CustomAttributeData> TryGetCustomAttributesData(Assembly assembly) 318internal static List<Assembly> TopologicalSort(Assembly[] assemblies) 320var sortedAssemblies = new List<Assembly>(assemblies.Length); 324foreach (var assembly in assemblies) 329static void Visit(Assembly[] assemblies, Assembly assembly, List<Assembly> sortedAssemblies, HashSet<string> visited) 359var dependency = Array.Find(assemblies, a =>
Microsoft.DotNet.NativeWrapper (2)
Interop.cs (2)
25System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly())!.ResolvingUnmanagedDll += HostFxrResolver; 64private static IntPtr HostFxrResolver(Assembly assembly, string libraryName)
Microsoft.Extensions.Configuration.UserSecrets (3)
UserSecretsConfigurationExtensions.cs (3)
84public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, Assembly assembly) 101public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, Assembly assembly, bool optional) 119public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, Assembly assembly, bool optional, bool reloadOnChange)
Microsoft.Extensions.DependencyModel (10)
DependencyContext.cs (3)
67var entryAssembly = Assembly.GetEntryAssembly(); 77public static DependencyContext? Load(Assembly assembly)
DependencyContextLoader.cs (7)
44private static bool IsEntryAssembly(Assembly assembly) 46return assembly.Equals(Assembly.GetEntryAssembly()); 49private static Stream? GetResourceStream(Assembly assembly, string name) 55public DependencyContext? Load(Assembly assembly) 103private DependencyContext? LoadAssemblyContext(Assembly assembly, IDependencyContextReader reader) 126private string? GetDepsJsonPath(Assembly assembly) 158private static string? GetNormalizedCodeBasePath(Assembly assembly)
Microsoft.Extensions.DotNetDeltaApplier (22)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (12)
27private delegate void ApplyUpdateDelegate(Assembly assembly, ReadOnlySpan<byte> metadataDelta, ReadOnlySpan<byte> ilDelta, ReadOnlySpan<byte> pdbDelta); 32private readonly ConcurrentDictionary<Assembly, Assembly> _appliedAssemblies = new(); 38private Func<AssemblyLoadContext, AssemblyName, Assembly?>? _assemblyResolvingHandlerToInstall; 39private Func<AssemblyLoadContext, AssemblyName, Assembly?>? _installedAssemblyResolvingHandler; 45Func<AssemblyLoadContext, AssemblyName, Assembly?>? assemblyResolvingHandler, 74var applyUpdateMethod = metadataUpdater.GetMethod(ApplyUpdateMethodName, BindingFlags.Public | BindingFlags.Static, binder: null, [typeof(Assembly), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>)], modifiers: null); 106var loadedAssembly = eventArgs.LoadedAssembly; 143foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) 225var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => TryGetModuleId(assembly) is Guid moduleId && moduleId == update.ModuleId); 253private void ApplyDeltas(Assembly assembly, IReadOnlyList<RuntimeManagedCodeUpdate> updates) 272private static Guid? TryGetModuleId(Assembly loadedAssembly)
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (10)
154foreach (var assembly in sortedAssemblies) 297private IList<CustomAttributeData> TryGetCustomAttributesData(Assembly assembly) 318internal static List<Assembly> TopologicalSort(Assembly[] assemblies) 320var sortedAssemblies = new List<Assembly>(assemblies.Length); 324foreach (var assembly in assemblies) 329static void Visit(Assembly[] assemblies, Assembly assembly, List<Assembly> sortedAssemblies, HashSet<string> visited) 359var dependency = Array.Find(assemblies, a =>
Microsoft.Extensions.FileProviders.Embedded (18)
EmbeddedFileProvider.cs (3)
27private readonly Assembly _assembly; 36public EmbeddedFileProvider(Assembly assembly) 49public EmbeddedFileProvider(Assembly assembly, string? baseNamespace)
EmbeddedResourceFileInfo.cs (2)
15private readonly Assembly _assembly; 28Assembly assembly,
Manifest\ManifestDirectoryInfo.cs (2)
18public ManifestDirectoryInfo(Assembly assembly, ManifestDirectory directory, DateTimeOffset lastModified) 28public Assembly Assembly { get; }
Manifest\ManifestFileInfo.cs (2)
15public ManifestFileInfo(Assembly assembly, ManifestFile file, DateTimeOffset lastModified) 25public Assembly Assembly { get; }
Manifest\ManifestParser.cs (2)
19public static EmbeddedFilesManifest Parse(Assembly assembly) 24public static EmbeddedFilesManifest Parse(Assembly assembly, string name)
ManifestEmbeddedFileProvider.cs (7)
27public ManifestEmbeddedFileProvider(Assembly assembly) 35public ManifestEmbeddedFileProvider(Assembly assembly, string root) 47public ManifestEmbeddedFileProvider(Assembly assembly, string root, DateTimeOffset lastModified) 60public ManifestEmbeddedFileProvider(Assembly assembly, string root, string manifestName, DateTimeOffset lastModified) 65internal ManifestEmbeddedFileProvider(Assembly assembly, EmbeddedFilesManifest manifest, DateTimeOffset lastModified) 78public Assembly Assembly { get; } 126private static DateTimeOffset ResolveLastModified(Assembly assembly)
Microsoft.Extensions.Hosting (3)
HostBuilder.cs (1)
239applicationName = Assembly.GetEntryAssembly()?.GetName().Name;
HostingHostBuilderExtensions.cs (2)
257var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
Microsoft.Extensions.Localization (21)
Internal\AssemblyWrapper.cs (2)
19public AssemblyWrapper(Assembly assembly) 26public Assembly Assembly { get; }
Internal\ResourceManagerStringProvider.cs (2)
22private readonly Assembly _assembly; 28Assembly assembly,
ResourceManagerStringLocalizer.cs (2)
34/// <param name="resourceAssembly">The <see cref="Assembly"/> that contains the strings as embedded resources.</param> 40Assembly resourceAssembly,
ResourceManagerStringLocalizerFactory.cs (15)
106var assembly = Assembly.Load(assemblyName); 117/// Creates a <see cref="ResourceManagerStringLocalizer"/> using the <see cref="Assembly"/> and 131var assembly = typeInfo.Assembly; 155var assembly = Assembly.Load(assemblyName); 168Assembly assembly, 192/// <summary>Gets a <see cref="ResourceLocationAttribute"/> from the provided <see cref="Assembly"/>.</summary> 194/// <returns>The <see cref="ResourceLocationAttribute"/> associated with the given <see cref="Assembly"/>.</returns> 196protected virtual ResourceLocationAttribute? GetResourceLocationAttribute(Assembly assembly) 201/// <summary>Gets a <see cref="RootNamespaceAttribute"/> from the provided <see cref="Assembly"/>.</summary> 203/// <returns>The <see cref="RootNamespaceAttribute"/> associated with the given <see cref="Assembly"/>.</returns> 205protected virtual RootNamespaceAttribute? GetRootNamespaceAttribute(Assembly assembly) 210private string? GetRootNamespace(Assembly assembly) 222private string GetResourcePath(Assembly assembly)
Microsoft.Extensions.Localization.Abstractions (1)
IStringLocalizerFactory.cs (1)
14/// Creates an <see cref="IStringLocalizer"/> using the <see cref="System.Reflection.Assembly"/> and
Microsoft.Extensions.Logging.Abstractions (2)
ProviderAliasAttribute.cs (2)
12/// <para>By default, filtering rules are defined using the logging provider type's <see cref="System.Reflection.Assembly.FullName"/> as configuration section name.</para> 14/// <para>The logging provider type's <see cref="System.Reflection.Assembly.FullName"/> can still be used as configuration section name when the <see cref="ProviderAliasAttribute"/> is specified for the provider, and its configuration section filtering rules have priority over the filtering rules specified for the alias.
Microsoft.Gen.BuildMetadata.Unit.Tests (13)
GeneratorTests.cs (1)
84var proj = RoslynTestUtils.CreateTestProject(Array.Empty<Assembly>());
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.ComplianceReports.Unit.Tests (15)
GeneratorTests.cs (3)
170Assembly.GetAssembly(typeof(ILogger))!, 171Assembly.GetAssembly(typeof(LoggerMessageAttribute))!, 172Assembly.GetAssembly(typeof(Extensions.Compliance.Classification.DataClassification))!,
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)
SyntaxContextReceiverTests.cs (1)
52var comp = await RoslynTestUtils.RunSyntaxContextReceiver(sut, Enumerable.Empty<Assembly>(), sources).ConfigureAwait(true);
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)
AttributeParserTests.cs (12)
237var loggerAssembly = Assembly.GetAssembly(typeof(ILogger)); 238var loggerMessageAssembly = Assembly.GetAssembly(typeof(LoggerMessageAttribute)); 239var enrichmentAssembly = Assembly.GetAssembly(typeof(IEnrichmentTagCollector)); 240var dataClassificationAssembly = Assembly.GetAssembly(typeof(DataClassification)); 241var simpleDataClassificationAssembly = Assembly.GetAssembly(typeof(PrivateDataAttribute)); 242var redactorProviderAssembly = Assembly.GetAssembly(typeof(IRedactorProvider));
CompilationHelper.cs (1)
25string corelib = Assembly.GetAssembly(typeof(object))!.Location;
EmitterTests.cs (8)
41Assembly.GetAssembly(typeof(ILogger))!, 42Assembly.GetAssembly(typeof(LoggerMessageAttribute))!, 43Assembly.GetAssembly(typeof(IEnrichmentTagCollector))!, 44Assembly.GetAssembly(typeof(DataClassification))!, 45Assembly.GetAssembly(typeof(IRedactorProvider))!, 46Assembly.GetAssembly(typeof(PrivateDataAttribute))!, 47Assembly.GetAssembly(typeof(BigInteger))!, 48Assembly.GetAssembly(typeof(ObjectToLog))!
ParserTests.cs (7)
717Assembly[]? refs = null; 722Assembly.GetAssembly(typeof(ILogger))!, 723Assembly.GetAssembly(typeof(LoggerMessageAttribute))!, 724Assembly.GetAssembly(typeof(IEnrichmentTagCollector))!, 725Assembly.GetAssembly(typeof(DataClassification))!, 726Assembly.GetAssembly(typeof(PrivateDataAttribute))!, 727Assembly.GetAssembly(typeof(BigInteger))!,
ParserTests.LogProperties.cs (4)
479Assembly.GetAssembly(typeof(ILogger))!, 480Assembly.GetAssembly(typeof(LogPropertiesAttribute))!, 481Assembly.GetAssembly(typeof(LoggerMessageAttribute))!, 482Assembly.GetAssembly(typeof(DateTime))!,
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)
GeneratorTests.cs (8)
205Assembly[] refs = 207Assembly.GetAssembly(typeof(Meter))!, 208Assembly.GetAssembly(typeof(CounterAttribute))!, 209Assembly.GetAssembly(typeof(HistogramAttribute))!, 210Assembly.GetAssembly(typeof(GaugeAttribute))!, 211Assembly.GetAssembly(typeof(ILogger))!, 212Assembly.GetAssembly(typeof(LoggerMessageAttribute))!, 213Assembly.GetAssembly(typeof(Extensions.Compliance.Classification.DataClassification))!,
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.Metrics.Unit.Tests (24)
EmitterTests.cs (7)
33Assembly.GetAssembly(typeof(Meter))!, 34Assembly.GetAssembly(typeof(CounterAttribute))!, 35Assembly.GetAssembly(typeof(HistogramAttribute))!, 36Assembly.GetAssembly(typeof(CounterAttribute<>))!, 37Assembly.GetAssembly(typeof(HistogramAttribute<>))!, 38Assembly.GetAssembly(typeof(GaugeAttribute))!, 39Assembly.GetAssembly(typeof(GaugeAttribute<>))!,
ParserTests.cs (5)
776Assembly[]? refs = null; 781Assembly.GetAssembly(typeof(Meter))!, 782Assembly.GetAssembly(typeof(CounterAttribute))!, 783Assembly.GetAssembly(typeof(HistogramAttribute))!, 784Assembly.GetAssembly(typeof(GaugeAttribute))!,
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)
GeneratorTests.cs (5)
151Assembly[] refs = 153Assembly.GetAssembly(typeof(Meter))!, 154Assembly.GetAssembly(typeof(CounterAttribute))!, 155Assembly.GetAssembly(typeof(HistogramAttribute))!, 156Assembly.GetAssembly(typeof(GaugeAttribute))!
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)
SignatureContext.cs (1)
60Assembly generatorInfoAssembly)
Microsoft.JSInterop (6)
Infrastructure\DotNetDispatcher.cs (5)
487private static Assembly GetRequiredLoadedAssembly(AssemblyKey assemblyKey) 498Assembly? assembly = null; 499foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) 525public AssemblyKey(Assembly assembly) 537public Assembly? Assembly { get; }
src\aspnetcore\src\Shared\JSInterop\JSCallResultTypeHelper.cs (1)
12private static readonly Assembly _currentAssembly = typeof(JSCallResultType).Assembly;
Microsoft.Maui (11)
Fonts\FontRegistrar.cs (3)
13 readonly Dictionary<string, (string Filename, string? Alias, Assembly Assembly)> _embeddedFonts = new(StringComparer.Ordinal); 33 public void Register(string filename, string? alias, Assembly assembly) 101 static Stream GetEmbeddedResourceStream((string Filename, string? Alias, Assembly Assembly) embeddedFont)
Fonts\IFontRegistrar.cs (1)
17 void Register(string filename, string? alias, Assembly assembly);
Hosting\Fonts\FontCollectionExtensions.cs (1)
38 public static IFontCollection AddEmbeddedResourceFont(this IFontCollection fontCollection, Assembly assembly, string filename, string? alias = null)
Hosting\Fonts\FontDescriptor.cs (2)
8 public FontDescriptor(string filename, string? alias, Assembly? assembly) 19 public Assembly? Assembly { get; }
Platform\ReflectionExtensions.cs (1)
10 internal static object[]? GetCustomAttributesSafe(this Assembly assembly, Type attrType)
VisualDiagnostics\BootstrapHelper.cs (3)
35 MethodInfo loadFrom = typeof(Assembly).GetMethod("LoadFrom", new Type[] { typeof(string) }); 43 Assembly assembly = (Assembly)loadFrom.Invoke(null, new object[] { assemblyPath });
Microsoft.Maui.Controls (36)
DependencyService.cs (4)
119 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); 129 public static void Register(Assembly[] assemblies) 135 foreach (Assembly assembly in assemblies) 150 internal static void Initialize(Assembly[] assemblies)
Device.cs (1)
21 public static Assembly DefaultRendererAssembly { get; set; }
ImageSource.cs (2)
81 public static ImageSource FromResource(string resource, Assembly sourceAssembly = null) 83 sourceAssembly = sourceAssembly ?? Assembly.GetCallingAssembly();
Registrar.cs (7)
320 public static IEnumerable<Assembly> ExtraAssemblies { get; set; } 362 var assembly = typeof(StylePropertyAttribute).Assembly; 376 internal static void RegisterEffects(Assembly[] assemblies) 378 foreach (Assembly assembly in assemblies) 442 Assembly[] assemblies, 443 Assembly defaultRendererAssembly, 470 foreach (Assembly assembly in assemblies)
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)
StyleSheets\StyleSheet.cs (2)
26 public static StyleSheet FromResource(string resourcePath, Assembly assembly, IXmlLineInfo lineInfo = null) 121 private static string GetResource(string resourcePath, Assembly assembly, object target, IXmlLineInfo lineInfo)
Visuals\VisualTypeConverter.cs (7)
53 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); 56 foreach (var assembly in assemblies) 60 foreach (var assembly in Internals.Registrar.ExtraAssemblies) 66 foreach (var assembly in assemblies) 70 foreach (var assembly in Internals.Registrar.ExtraAssemblies) 73 static void RegisterAllIVisualTypesInAssembly(Assembly assembly, Dictionary<string, IVisual> mappings) 98 static void RegisterFromAttributes(Assembly assembly, Dictionary<string, IVisual> mappings)
Xaml\XamlResourceIdAttribute.cs (5)
34 var assembly = type.Assembly; 45 var assembly = type.Assembly; 54 internal static string GetResourceIdForPath(Assembly assembly, string path) 65 internal static Type GetTypeForResourceId(Assembly assembly, string resourceId) 76 internal static Type GetTypeForPath(Assembly assembly, string path)
Microsoft.Maui.Controls.Build.Tasks (1)
XmlTypeExtensions.cs (1)
42 foreach (var assembly in requiredAssemblies)
Microsoft.Maui.Controls.Compatibility (7)
MauiHandlersCollectionExtensions.cs (4)
65 public static IMauiHandlersCollection AddCompatibilityRenderers(this IMauiHandlersCollection handlersCollection, params global::System.Reflection.Assembly[] assemblies) 90 public static IFontCollection AddCompatibilityFonts(this IFontCollection fontCollection, IFontRegistrar fontRegistrar, params global::System.Reflection.Assembly[] assemblies) 105 public static IImageSourceServiceCollection AddCompatibilityServices(this IImageSourceServiceCollection services, params global::System.Reflection.Assembly[] assemblies) 127 public static IEffectsBuilder AddCompatibilityEffects(this IEffectsBuilder effectsBuilder, params global::System.Reflection.Assembly[] assemblies)
src\Core\src\VisualDiagnostics\BootstrapHelper.cs (3)
35 MethodInfo loadFrom = typeof(Assembly).GetMethod("LoadFrom", new Type[] { typeof(string) }); 43 Assembly assembly = (Assembly)loadFrom.Invoke(null, new object[] { assemblyPath });
Microsoft.Maui.Controls.Xaml (23)
HydrationContext.cs (1)
20 public Assembly RootAssembly { get; internal set; }
MarkupExtensions\StyleSheetExtension.cs (1)
37 var assembly = rootObjectType.Assembly;
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)
ViewExtensions.cs (1)
52 internal static TXaml LoadFromXaml<TXaml>(this TXaml view, string xaml, Assembly rootAssembly)
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)
XamlParser.cs (6)
338 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); 341 foreach (var assembly in assemblies) 364 public static Type GetElementType(XmlType xmlType, IXmlLineInfo xmlInfo, Assembly currentAssembly, bool expandToExtension, 437 public static bool IsPublicOrVisibleInternal(this Type type, Assembly assembly) 448 public static bool IsVisibleInternal(this Assembly from, Assembly to) =>
XamlServiceProvider.cs (4)
189 readonly Assembly currentAssembly; 197 public XamlTypeResolver(IXmlNamespaceResolver namespaceResolver, Assembly currentAssembly) 203 Assembly currentAssembly) 248 internal delegate Type GetTypeFromXmlName(XmlType xmlType, IXmlLineInfo xmlInfo, Assembly currentAssembly, bool expandToExtension, out XamlParseException exception);
Microsoft.ML.AutoML (2)
Tuner\AutoZeroTuner.cs (2)
66var assembly = Assembly.GetExecutingAssembly();
Microsoft.ML.Benchmarks.Tests (1)
BenchmarksTest.cs (1)
38Assembly asm = typeof(StochasticDualCoordinateAscentClassifierBench).Assembly;
Microsoft.ML.CodeAnalyzer.Tests (2)
Helpers\TestUtils.cs (2)
19using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)) 29using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
Microsoft.ML.Core (14)
ComponentModel\AssemblyLoadingUtils.cs (7)
38var assem = LoadAssembly(env, path); 97foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) 209private static Assembly LoadAssembly(IHostEnvironment env, string path) 211Assembly assembly = null; 214assembly = Assembly.LoadFrom(path); 233private static bool CanContainComponents(Assembly assembly) 250private static void TryRegisterAssembly(ComponentCatalog catalog, Assembly assembly)
ComponentModel\ComponentCatalog.cs (4)
685public void RegisterAssembly(Assembly assembly, bool throwOnError = true) 1075private void LoadExtensions(Assembly assembly, bool throwOnError) 1111private static bool CanContainExtensions(Assembly assembly) 1122private static bool HasMLNetPublicKey(Assembly assembly)
Data\ModelLoading.cs (2)
288var assembly = Assembly.Load(ForwardedLoaderAssemblyName);
Data\Repository.cs (1)
428var assembly = typeof(RepositoryWriter).Assembly;
Microsoft.ML.CpuMath.UnitTests (1)
UnitTests.cs (1)
997options.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Microsoft.ML.Data (2)
MLContext.cs (2)
190var asm = Assembly.Load("Microsoft.ML.OneDal");
Microsoft.ML.GenAI.Core (2)
Utils.cs (2)
169var assembly = Assembly.GetCallingAssembly();
Microsoft.ML.OnnxConverter (2)
SaveOnnxCommand.cs (2)
325var assembly = System.Reflection.Assembly.GetExecutingAssembly();
Microsoft.ML.Predictor.Tests (1)
ResultProcessor\TestResultProcessor.cs (1)
44Stream resourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName);
Microsoft.ML.Samples (1)
Program.cs (1)
14foreach (var type in Assembly.GetExecutingAssembly().GetTypes())
Microsoft.ML.Samples.GPU (1)
Program.cs (1)
14var types = Assembly.GetExecutingAssembly().GetTypes();
Microsoft.ML.Tokenizers.Tests (1)
TiktokenTests.cs (1)
58using Stream compressedStream = Assembly.Load($"Microsoft.ML.Tokenizers.Data.Cl100kBase{assemblyName.Substring(assemblyName.IndexOf(','))}").GetManifestResourceStream("cl100k_base.tiktoken.deflate")!;
Microsoft.ML.TorchSharp (1)
Extensions\TokenizerExtensions.cs (1)
27Assembly assembly = typeof(TokenizerExtensions).Assembly;
Microsoft.ML.Transforms (6)
CustomMappingCatalog.cs (2)
29/// using <see cref="ComponentCatalog.RegisterAssembly(System.Reflection.Assembly, bool)"/>.</param> 63/// using <see cref="ComponentCatalog.RegisterAssembly(System.Reflection.Assembly, bool)"/>.</param>
LambdaTransform.cs (2)
66Assembly assembly = Assembly.Load(contractAssembly);
Text\StopWordsRemovingTransformer.cs (2)
343Assembly assembly = Assembly.GetExecutingAssembly();
Microsoft.NET.Sdk.Publish.Tasks (1)
MsDeploy\DynamicAssembly.cs (1)
51public Assembly? Assembly { get; set; }
Microsoft.Private.Windows.Core (4)
System\Assemblies.cs (4)
40private static Assembly? s_mscorlibFacadeAssembly; 41internal static Assembly MscorlibAssembly => s_mscorlibFacadeAssembly 42??= Assembly.Load(Mscorlib); 44internal static Assembly CorelibAssembly { get; } = typeof(string).Assembly;
Microsoft.TemplateEngine.Edge (12)
ReflectionLoadProbingPath.cs (6)
15private static readonly ConcurrentDictionary<string, Assembly?> LoadedAssemblies = new ConcurrentDictionary<string, Assembly?>(StringComparer.OrdinalIgnoreCase); 48private static Assembly? SelectBestMatch(AssemblyLoadContext loadContext, AssemblyName match, IEnumerable<FileInfo> candidates) 184Assembly result = loadContext.LoadFromAssemblyPath(attempt); 201private static Assembly? Resolving(AssemblyLoadContext assemblyLoadContext, AssemblyName assemblyName) 216Assembly? found = null;
Settings\Scanner.cs (6)
162foreach (KeyValuePair<string, Assembly> asm in LoadAllFromPath(out _, actualScanPath)) 268private IEnumerable<KeyValuePair<string, Assembly>> LoadAllFromPath( 274List<KeyValuePair<string, Assembly>> loaded = new List<KeyValuePair<string, Assembly>>(); 281Assembly? assembly = null; 299loaded.Add(new KeyValuePair<string, Assembly>(file, assembly));
Microsoft.TemplateEngine.IDE (1)
Bootstrapper.cs (1)
380public void Register(Assembly assembly)
Microsoft.TestPlatform.AdapterUtilities (5)
ManagedNameUtilities\ManagedNameHelper.Reflection.cs (5)
18public AssemblyNameCache(Assembly? assembly, string simpleName) 24public Assembly? Assembly { get; } 229var assembly = method.DeclaringType?.Assembly; 248/// An <see cref="Assembly" /> instance to search in. 269public static MethodBase GetMethod(Assembly assembly, string managedTypeName, string managedMethodName)
Microsoft.TestPlatform.CrossPlatEngine (4)
Client\TestLoggerManager.cs (1)
539Assembly assembly = _assemblyLoadContext.LoadAssemblyFromPath(codeBase);
DataCollection\InProcDataCollector.cs (3)
72var assembly = LoadInProcDataCollectorExtension(codeBase); 153private Assembly? LoadInProcDataCollectorExtension(string codeBase) 155Assembly? assembly = null;
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
WindowsHangDumper.cs (1)
144var dumpMinitoolPath = Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location)!, "dump", dumpMinitoolName);
Microsoft.TestPlatform.PlatformAbstractions (7)
Interfaces\Runtime\IAssemblyLoadContext.cs (1)
18Assembly LoadAssemblyFromPath(string assemblyPath);
Interfaces\Runtime\IAssemblyResolver.cs (1)
17public delegate Assembly? AssemblyResolveEventHandler(object? sender, AssemblyResolveEventArgs? args);
netcore\Runtime\PlatformAssemblyExtensions.cs (1)
20public static string GetAssemblyLocation(this Assembly assembly)
netcore\Runtime\PlatformAssemblyLoadContext.cs (1)
22public Assembly LoadAssemblyFromPath(string assemblyPath)
netcore\Runtime\PlatformAssemblyResolver.cs (2)
69/// The <see cref="Assembly"/>. 71private Assembly? AssemblyResolverEvent(object sender, object eventArgs)
netcore\System\ProcessHelper.cs (1)
21return Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!;
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
Hosting\DotnetTestHostManager.cs (1)
382var testHostNextToRunner = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, "testhost.dll");
Microsoft.TestPlatform.Utilities (1)
CodeCoverageDataAttachmentsHandler.cs (1)
35private static Assembly? s_codeCoverageAssembly;
Microsoft.VisualBasic.Core (3)
Microsoft\VisualBasic\CompilerServices\ProjectData.vb (3)
90Private m_CachedMSCoreLibAssembly As System.Reflection.Assembly = GetType(System.Int32).Assembly 92Friend Function GetAssemblyData(ByVal assem As System.Reflection.Assembly) As AssemblyData 181FileSystem.CloseAllFiles(System.Reflection.Assembly.GetCallingAssembly())
Microsoft.VisualBasic.Forms (9)
Microsoft\VisualBasic\ApplicationServices\AssemblyInfo.vb (7)
23Private ReadOnly _assembly As Assembly 44Public Sub New(currentAssembly As Assembly) 99''' A <see cref="ReadOnlyCollection(Of Assembly)"/> containing all the loaded assemblies. 104Public ReadOnly Property LoadedAssemblies() As ReadOnlyCollection(Of Assembly) 106Dim result As New Collection(Of Assembly) 107For Each assembly As Assembly In AppDomain.CurrentDomain.GetAssemblies() 110Return New ReadOnlyCollection(Of Assembly)(result)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (2)
982Friend Shared Function GetApplicationInstanceID(entry As Assembly) As String 1045Dim applicationInstanceID As String = GetApplicationInstanceID(Assembly.GetCallingAssembly)
Microsoft.VisualStudio.TestPlatform.Common (29)
ExtensionFramework\TestPluginCache.cs (4)
31private readonly Dictionary<string, Assembly?> _resolvedAssemblies = new(); 492private Assembly? CurrentDomainAssemblyResolve(object? sender, AssemblyResolveEventArgs? args) 498Assembly? assembly = null; 514assembly = Assembly.Load(assemblyName);
ExtensionFramework\TestPluginDiscoverer.cs (3)
95var assembly = Assembly.Load(new AssemblyName(assemblyName)); 127private static void GetTestExtensionsFromAssembly<TPluginInfo, TExtension>(Assembly assembly, Dictionary<string, TPluginInfo> pluginInfos, string filePath)
ExtensionFramework\VSExtensionManager.cs (10)
31private Assembly? _extensionManagerAssembly; 32private Assembly? _extensionManagerImplAssembly; 35private Assembly? _settingsManagerAssembly; 126private Assembly ExtensionManagerDefAssembly 130_extensionManagerAssembly ??= Assembly.Load(new AssemblyName(ExtensionManagerAssemblyName)); 138private Assembly? ExtensionManagerImplAssembly 145Assembly extensionMgrAssembly = ExtensionManagerDefAssembly; 148_extensionManagerImplAssembly = Assembly.Load(new AssemblyName(ExtensionManagerImplAssemblyName)); 176private Assembly SettingsManagerAssembly 180_settingsManagerAssembly ??= Assembly.Load(new AssemblyName(SettingsManagerAssemblyName));
Utilities\AssemblyResolver.cs (4)
28private readonly Dictionary<string, Assembly?> _resolvedAssemblies = new(); 81/// The <see cref="Assembly"/>. 83private Assembly? OnResolve(object? sender, AssemblyResolveEventArgs? args) 102if (_resolvedAssemblies.TryGetValue(args.Name, out var assembly))
Utilities\FakesUtilities.cs (3)
180var assembly = LoadTestPlatformAssembly(); 196private static Assembly? LoadTestPlatformAssembly() 200return Assembly.Load(new AssemblyName(FakesConfiguratorAssembly));
Utilities\MetadataReaderHelper.cs (4)
47public static Type[] DiscoverTestExtensionTypesV2Attribute(Assembly loadedAssembly, string assemblyFilePath) 50private static Type[] DiscoverTestExtensionTypesV2AttributeInternal(Assembly loadedAssembly, string assemblyFilePath) 55Assembly assemblyToAnalyze; 58assemblyToAnalyze = Assembly.LoadFile(assemblyFilePath);
Utilities\TypesToLoadUtilities.cs (1)
18internal static IEnumerable<Type> GetTypesToLoad(Assembly assembly)
Microsoft.VisualStudio.TestPlatform.ObjectModel (4)
Navigation\PortableSymbolReader.cs (3)
95Assembly asm; 98asm = Assembly.Load(new PlatformAssemblyLoadContext().GetAssemblyNameFromPath(binaryPath)); 103asm = Assembly.LoadFile(binaryPath);
Utilities\AssemblyHelper.cs (1)
325public static IEnumerable<Attribute> GetCustomAttributes(this Assembly assembly, string fullyQualifiedName)
Microsoft.Web.XmlTransform (6)
NamedTypeFactory.cs (6)
28internal void AddAssemblyRegistration(Assembly assembly, string nameSpace) { 88private Assembly assembly = null; 91public Registration(Assembly assembly, string nameSpace) { 108public Assembly Assembly { 118: base(Assembly.Load(assemblyName), nameSpace) { 125: base(Assembly.LoadFrom(path), nameSpace) {
Mono.Cecil (3)
Mono.Cecil.Cil\Symbols.cs (2)
1071 var assembly = SR.Assembly.Load (assembly_name);
Mono.Cecil\Import.cs (1)
311 protected AssemblyNameReference ImportScope (SR.Assembly assembly)
MSBuild (11)
src\msbuild\src\Shared\TaskEngineAssemblyResolver.cs (3)
60_eventHandler = new Func<AssemblyLoadContext, AssemblyName, Assembly>(ResolveAssembly); 100private Assembly ResolveAssembly(AssemblyLoadContext assemblyLoadContext, AssemblyName assemblyName) 159private Func<AssemblyLoadContext, AssemblyName, Assembly> _eventHandler = null;
src\msbuild\src\Shared\TypeLoader.cs (6)
75string msbuildDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 217private static Assembly LoadAssembly(AssemblyLoadInfo assemblyLoadInfo) 223return Assembly.Load(assemblyLoadInfo.AssemblyName); 398private Assembly _loadedAssembly; 538Assembly loadedAssembly = context.LoadFromAssemblyPath(_assemblyLoadInfo.AssemblyFile); 594private void SetArchitectureAndRuntime(Assembly assembly)
XMake.cs (2)
3676Assembly engineAssembly = typeof(ProjectCollection).GetTypeInfo().Assembly; 3735Assembly engineAssembly = typeof(ProjectCollection).GetTypeInfo().Assembly;
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
393[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.Assembly))]
netstandard (1)
netstandard.cs (1)
1360[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.Assembly))]
NuGet.Common (1)
ClientVersionUtility.cs (1)
26var assembly = typeof(ClientVersionUtility).Assembly;
NuGet.Packaging (1)
PackageCreation\Authoring\PackageBuilder.cs (1)
418var assembly = typeof(PackageBuilder).Assembly;
NuGet.Protocol (3)
Plugins\Logging\AssemblyLogMessage.cs (3)
22var assembly = typeof(PluginFactory).Assembly; 23var entryAssembly = Assembly.GetEntryAssembly();
PresentationBuildTasks (53)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (3)
383internal Assembly LocalAssembly 2422AssemblyName assemblyName = new AssemblyName(Assembly.GetExecutingAssembly().FullName); 3542private Assembly _localAssembly = null;
MS\Internal\Tasks\IncrementalCompileAnalyzer.cs (1)
83if (IsFileChanged(Assembly.GetExecutingAssembly().Location) ||
MS\Internal\Tasks\TaskHelper.cs (1)
47string acPath = Assembly.GetExecutingAssembly().Location;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlMapTable.cs (3)
983private Assembly GetAssemblyFromAssemblyInfo(BamlAssemblyInfoRecord assemblyInfoRecord) 1114internal void EnsureAssemblyRecord(Assembly asm) 1563Assembly ownerAsm = ownerType.Assembly;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (2)
4247internal Assembly Assembly 4260private Assembly _assembly;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\KnownTypes.cs (6)
4747private static Assembly _asmFramework; 4748private static Assembly _asmCore; 4749private static Assembly _asmBase; 4751public void Initialize(Assembly asmFramework, Assembly asmCore, Assembly asmBase)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\KnownTypesHelper.cs (3)
28internal static void InitializeKnownTypes(Assembly asmFramework, Assembly asmCore, Assembly asmBase)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (1)
856Assembly xamlAssembly = attributeType.Assembly;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (2)
3364Assembly asmPC = ReflectionHelper.GetAlreadyReflectionOnlyLoadedAssembly("PRESENTATIONCORE"); 6770Assembly asmXml = ReflectionHelper.GetAlreadyReflectionOnlyLoadedAssembly("SYSTEM.XML");
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (7)
2469private static bool IsFriendAssembly(Assembly assembly) 2607Assembly assembly ; 4113internal static Assembly AssemblyWB = null; 4114internal static Assembly AssemblyPC = null; 4115internal static Assembly AssemblyPF = null; 4328internal Assembly Assembly 4381private Assembly _assembly;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (7)
84List<Assembly> interestingAssemblies = new List<Assembly>(); 90Assembly assy; 121Assembly[] asmList = interestingAssemblies.ToArray(); 212private CustomAttributeData[] GetAttributes(Assembly asm, string fullClrName) 295private void LoadClrnsToAssemblyNameMappingCache(Assembly[] asmList) 365private void ProcessXmlnsCompatibleWithAttributes(Assembly[] asmList)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\ReflectionUtils.cs (5)
27internal static string GetFullAssemblyNameFromPartialName(Assembly assembly, string partialName) 31ArgumentNullException.ThrowIfNull(fullName, nameof(Assembly.FullName)); 42internal static ReadOnlySpan<char> GetAssemblyPartialName(Assembly assembly) 89/// Parses <see cref="Assembly.FullName"/> and retrieves "Version" and "PublicKeyToken" values from the original string. 95internal static void GetAssemblyVersionPlusToken(Assembly assembly, out ReadOnlySpan<char> assemblyVersion, out ReadOnlySpan<char> assemblyToken)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (12)
51private static Dictionary<string, Assembly> _cachedMetadataLoadContextAssemblies = null; 52private static Dictionary<string, Assembly> _cachedMetadataLoadContextAssembliesByNameNoExtension = null; 60_cachedMetadataLoadContextAssemblies = new Dictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase); 61_cachedMetadataLoadContextAssembliesByNameNoExtension = new Dictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase); 93Assembly a = null; 167Assembly reflectionAssembly = LoadAssembly(assemblyName, null); 387internal static Assembly LoadAssembly(string assemblyName, string assemblyPath) 482internal static bool IsFriendAssembly(Assembly sourceAssembly) 522internal static Assembly GetAlreadyReflectionOnlyLoadedAssembly(string assemblyNameLookup) 524Assembly assembly = null; 535private static Assembly ReflectionOnlyLoadAssembly(string assemblyName, string fullPathToAssembly) 537Assembly assembly = null;
PresentationCore (30)
ModuleInitializer.cs (2)
41Assembly assemblyApp = Assembly.GetEntryAssembly();
MS\Internal\FontCache\FontResourceCache.cs (4)
24private static void ConstructFontResourceCache(Assembly entryAssembly, Dictionary<string, List<string>> folderResourceMap) 61Assembly uriAssembly; 145private static Dictionary<Assembly, Dictionary<string, List<string>>> _assemblyCaches 146= new Dictionary<Assembly, Dictionary<string, List<string>>>(1);
MS\Internal\FontCache\FontSource.cs (2)
357Assembly fontResourceAssembly = Assembly.GetExecutingAssembly();
MS\Internal\Resources\ContentFileHelper.cs (1)
40internal static HashSet<string> GetContentFiles(Assembly asm)
MS\Internal\Resources\ResourceManagerWrapper.cs (3)
32internal ResourceManagerWrapper(Assembly assembly) 100internal Assembly Assembly 271private Assembly _assembly = null;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (3)
100internal static Assembly GetLoadedAssembly(AssemblyName assemblyName) 102Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); 127private static AssemblyName GetAssemblyName(Assembly assembly)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\PerfService.cs (1)
39Assembly asm = type.Assembly;
System\Windows\InterOp\HwndMouseInputProvider.cs (2)
1082Assembly presentationFramework = GetPresentationFrameworkFromHwndSource(_source); 1114private Assembly GetPresentationFrameworkFromHwndSource(HwndSource hwndSource)
System\Windows\InterOp\HwndSourceParameters.cs (1)
422if (ReflectionUtils.GetAssemblyPartialName(Assembly.GetEntryAssembly()).Equals("drthwndsource", StringComparison.CurrentCultureIgnoreCase))
System\Windows\Media\ColorContext.cs (2)
105_colorProfileResources, Assembly.GetAssembly(typeof(ColorContext)) 517ResourceManager resourceManager = new ResourceManager(_colorProfileResources, Assembly.GetAssembly(typeof(ColorContext)));
System\Windows\Navigation\BaseUriHelper.cs (9)
157internal static void GetAssemblyAndPartNameFromPackAppUri(Uri uri, out Assembly assembly, out string partName) 190internal static Assembly GetLoadedAssembly(string assemblyName, string assemblyVersion, string assemblyKey) 192Assembly assembly; 218assembly = Assembly.Load(asmName); 325Assembly assembly = ResourceAssembly; 405internal static Assembly ResourceAssembly 411_resourceAssembly = Assembly.GetEntryAssembly(); 427internal static Uri AppendAssemblyVersion(Uri uri, Assembly assemblyInfo) 631private static Assembly _resourceAssembly;
PresentationFramework (120)
MS\Internal\AppModel\BamlStream.cs (3)
30internal BamlStream(Stream stream, Assembly assembly) 48Assembly IStreamInfo.Assembly 271private Assembly _assembly;
MS\Internal\AppModel\ResourceContainer.cs (4)
47Assembly asmApplication = Application.ResourceAssembly; 190Assembly assembly = args.LoadedAssembly; 235private static void UpdateCachedRMW(ReadOnlySpan<char> key, Assembly assembly) 275Assembly assembly = BaseUriHelper.GetLoadedAssembly(assemblyName, assemblyVersion, assemblyToken);
MS\Internal\Documents\DocumentsTrace.cs (1)
119ReadOnlySpan<char> shortAssemblyName = ReflectionUtils.GetAssemblyPartialName(Assembly.GetCallingAssembly());
MS\Internal\Globalization\BamlTreeUpdater.cs (2)
798Assembly assm = Assembly.Load(assemblyName);
MS\Internal\Navigation\BindStream.cs (2)
433Assembly IStreamInfo.Assembly 437Assembly assembly = null;
MS\Internal\WindowsRuntime\Generated\WinRT.cs (2)
100private static readonly string _currentModuleDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); 130_moduleHandle = NativeLibrary.Load(fileName, Assembly.GetExecutingAssembly(), null);
System\Windows\Application.cs (4)
1068public static Assembly ResourceAssembly 1076_resourceAssembly = Assembly.GetEntryAssembly(); 1088if ((_resourceAssembly == null) && (Assembly.GetEntryAssembly() == null)) 2417private static Assembly _resourceAssembly;
System\Windows\ComponentResourceKey.cs (1)
64public override Assembly Assembly
System\Windows\Controls\GridViewColumnHeader.cs (1)
741System.Reflection.Assembly assembly = this.GetType().Assembly;
System\Windows\Diagnostics\ResourceDictionaryInfo.cs (4)
16Assembly assembly, 17Assembly resourceDictionaryAssembly, 31public Assembly Assembly {get; private set; } 36public Assembly ResourceDictionaryAssembly { get; private set; }
System\Windows\Documents\FixedSchema.cs (3)
459ResourceManager resourceManager = new ResourceManager( "Schemas_S0", Assembly.GetAssembly(typeof(XpsS0Schema))); 471ResourceManager resourceManager = new ResourceManager( "Schemas_S0", Assembly.GetAssembly(typeof(XpsS0Schema))); 754ResourceManager resourceManager = new ResourceManager("Schemas_DocStructure", Assembly.GetAssembly(typeof(XpsDocStructSchema)));
System\Windows\Documents\Serialization\SerializerDescriptor.cs (4)
119Assembly plugIn = Assembly.LoadFrom(assemblyPath); 200Assembly plugIn = Assembly.ReflectionOnlyLoadFrom(sd._assemblyPath);
System\Windows\EventSetterHandlerConverter.cs (1)
55Assembly a = typeof(IRootObjectProvider).Assembly;
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (2)
70public static Assembly GetKnownAssembly(Int16 assemblyId) 72Assembly assembly;
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
2105internal virtual ReadOnlySpan<char> GetAssemblyNameForNamespace(Assembly assembly)
System\Windows\Markup\Baml2006\Baml2006ReaderInternal.cs (1)
36internal override ReadOnlySpan<char> GetAssemblyNameForNamespace(Assembly assembly)
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (14)
12public Baml2006SchemaContext(Assembly localAssembly): 17internal Baml2006SchemaContext(Assembly localAssembly, XamlSchemaContext parentSchemaContext) 18: base(Array.Empty<Assembly>()) 92internal Assembly LocalAssembly { get { return _localAssembly; } } 118internal Assembly GetAssembly(Int16 assemblyId) 455private Assembly ResolveAssembly(BamlAssembly bamlAssembly) 471bamlAssembly.Assembly = Assembly.Load(assemblyName.FullName); 491bamlAssembly.Assembly = Assembly.Load(shortName); 501bamlAssembly.Assembly = Assembly.LoadWithPartialName(assemblyName.Name); 531Assembly assembly = ResolveAssembly(bamlAssembly); 572Assembly assembly = KnownTypes.GetKnownAssembly(assemblyId); 689private Assembly _localAssembly; 710public BamlAssembly(Assembly assembly) 722internal Assembly Assembly;
System\Windows\Markup\Baml2006\Baml6Assembly.cs (6)
13private Assembly _assembly; 26public Baml6Assembly(Assembly assembly) 34public Assembly Assembly 52_assembly = Assembly.Load(assemblyName.FullName); 61_assembly = Assembly.Load(shortName); 66_assembly = Assembly.LoadWithPartialName(assemblyName.Name);
System\Windows\Markup\BamlMapTable.cs (4)
765Assembly assembly = GetAssemblyFromAssemblyInfo(assemblyInfoRecord); 983private Assembly GetAssemblyFromAssemblyInfo(BamlAssemblyInfoRecord assemblyInfoRecord) 1114internal void EnsureAssemblyRecord(Assembly asm) 1563Assembly ownerAsm = ownerType.Assembly;
System\Windows\Markup\BamlReader.cs (3)
1865Assembly asm = Assembly.Load(asmRecord.AssemblyFullName); 2639Assembly typeAssembly = typeInfo.Type.Assembly;
System\Windows\Markup\BamlRecords.cs (2)
4247internal Assembly Assembly 4260private Assembly _assembly;
System\Windows\Markup\BamlWriter.cs (4)
1060private Assembly GetAssembly(string assemblyName) 1062Assembly assy = _assemblies[assemblyName] as Assembly; 1094Assembly assembly = GetAssembly(assemblyName);
System\Windows\Markup\IStreamInfo.cs (1)
17Assembly Assembly { get; }
System\Windows\Markup\ParserContext.cs (3)
392internal Assembly StreamCreatedAssembly 825private Assembly _streamCreatedAssembly; 856Assembly xamlAssembly = attributeType.Assembly;
System\Windows\Markup\Primitives\MarkupWriter.cs (5)
1550private static Dictionary<Assembly, Dictionary<string, string>> XmlnsDefinitions = new Dictionary<Assembly, Dictionary<string, string>>(); 1554private static Dictionary<string, string> GetMappingsFor(Assembly assembly) 1593Assembly referencedAssembly = Assembly.Load(new AssemblyName(definition.AssemblyName));
System\Windows\Markup\XamlTypeMapper.cs (7)
211Assembly assem = ReflectionHelper.GetAlreadyLoadedAssembly(asmName); 2199Assembly assy = ReflectionHelper.LoadAssembly(usd.AssemblyName, null); 2219Assembly assy = namespaces[i].Assembly; 2607Assembly assembly ; 2720Assembly a = pc.StreamCreatedAssembly; 4328internal Assembly Assembly 4381private Assembly _assembly;
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
235protected override Assembly OnAssemblyResolve(string assemblyName)
System\Windows\Markup\XmlnsCache.cs (6)
167Assembly[] asmList = new Assembly[asmNameList.Length]; 182Assembly[] asmList = AppDomain.CurrentDomain.GetAssemblies(); 271private Attribute[] GetAttributes(Assembly asm, Type attrType) 332Assembly[] asmList, 365private void ProcessXmlnsCompatibleWithAttributes(Assembly[] asmList)
System\Windows\ResourceKey.cs (1)
26public abstract Assembly Assembly
System\Windows\SourceUriTypeConverterMarkupExtension.cs (2)
17private Assembly _assemblyInfo; 19public SourceUriTypeConverterMarkupExtension(TypeConverter converter, object value, Assembly assemblyInfo) : base(converter, value)
System\Windows\SystemResourceKey.cs (1)
1975public override Assembly Assembly
System\Windows\SystemResources.cs (20)
354Assembly assembly = (typeKey != null) ? typeKey.Assembly : resourceKey.Assembly; 454private static ResourceDictionaries EnsureDictionarySlot(Assembly assembly) 464_dictionaries = new Dictionary<Assembly, ResourceDictionaries>(1); 477private static bool IgnoreAssembly(Assembly assembly) 482private static Assembly MsCorLib 495private static Assembly PresentationFramework 508private static Assembly PresentationCore 521private static Assembly WindowsBase 543internal ResourceDictionaries(Assembly assembly) 764private void LoadExternalAssembly(bool classic, bool generic, out Assembly assembly, out string assemblyName) 790assembly = Assembly.Load(fullName); 891private ResourceDictionary LoadDictionary(Assembly assembly, string assemblyName, string resourceName, bool isTraceEnabled, out Uri dictionarySourceUri) 983private Assembly _assembly; 990private Assembly _themedDictionaryAssembly; 991private Assembly _genericDictionaryAssembly; 1669private static Dictionary<Assembly, ResourceDictionaries> _dictionaries; 1676private static Assembly _mscorlib; 1677private static Assembly _presentationFramework; 1678private static Assembly _presentationCore; 1679private static Assembly _windowsBase;
System\Windows\SystemThemeKey.cs (2)
33public override Assembly Assembly 92private static Assembly _presentationFrameworkAssembly;
System\Windows\TemplateKey.cs (1)
126public override Assembly Assembly
System\Windows\ThemeInfoAttribute.cs (1)
48internal static ThemeInfoAttribute FromAssembly(Assembly assembly)
Roslyn.Diagnostics.Analyzers (8)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
74public static void CopyHandlersTo(Assembly assembly) 79static void copyHandlerTo(Assembly assembly, ErrorReporterHandler? handler, string handlerName)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (6)
16public static ImmutableArray<Assembly> LoadNearbyAssemblies(ImmutableArray<string> assemblyNames) 18var assemblies = new List<Assembly>(assemblyNames.Length); 22var assembly = TryLoadNearbyAssembly(assemblyName); 32private static Assembly? TryLoadNearbyAssembly(string assemblySimpleName) 48return Assembly.Load(assemblyName); 70var assembly = TryLoadNearbyAssembly(assemblySimpleName);
rzc (19)
Application.cs (1)
88var assembly = typeof(Application).Assembly;
DefaultExtensionAssemblyLoader.cs (13)
19private readonly Dictionary<string, (Assembly assembly, AssemblyIdentity identity)> _loadedByPath; 20private readonly Dictionary<AssemblyIdentity, Assembly> _loadedByIdentity; 30_loadedByPath = new Dictionary<string, (Assembly assembly, AssemblyIdentity identity)>(StringComparer.OrdinalIgnoreCase); 31_loadedByIdentity = new Dictionary<AssemblyIdentity, Assembly>(); 68public override Assembly Load(string assemblyName) 78if (_loadedByIdentity.TryGetValue(identity, out var assembly)) 105public override Assembly LoadFromPath(string filePath) 123private Assembly LoadFromPathUnsafe(string filePath, AssemblyIdentity identity) 135if (identity != null && _loadedByIdentity.TryGetValue(identity, out var assembly)) 149if (_loadedByIdentity.TryGetValue(identity, out var duplicate)) 190protected virtual Assembly LoadFromPathUnsafeCore(string filePath) 224protected override Assembly Load(AssemblyName assemblyName) 227var assembly = _loader.Load(assemblyName.ToString());
DefaultExtensionDependencyChecker.cs (1)
148public Assembly Assembly { get; set; }
ExtensionAssemblyLoader.cs (2)
12public abstract Assembly Load(string assemblyName); 14public abstract Assembly LoadFromPath(string filePath);
Program.cs (1)
71var loadedAssembly = context.LoadFromAssemblyPath(Path.Combine(roslynPath, assembly.Name + ".dll"));
ServerCommand.cs (1)
158var rzcPath = Assembly.GetExecutingAssembly().Location;
System.CodeDom (3)
System\CodeDom\Compiler\CompilerResults.cs (3)
11private Assembly _compiledAssembly; 20public Assembly CompiledAssembly 26_compiledAssembly = Assembly.LoadFile(PathToAssembly);
System.CommandLine (4)
RootCommand.cs (1)
85_toolCommandName = Assembly.GetEntryAssembly()?
VersionOption.cs (3)
82var assembly = Assembly.GetEntryAssembly() ?? Assembly.GetExecutingAssembly();
System.ComponentModel.Composition (23)
Microsoft\Internal\ReflectionServices.cs (1)
16public static Assembly Assembly(this MemberInfo member)
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (11)
27private Assembly _assembly; 284public AssemblyCatalog(Assembly assembly, ReflectionContext reflectionContext) 324public AssemblyCatalog(Assembly assembly, ReflectionContext reflectionContext, ICompositionElement definitionOrigin) 350public AssemblyCatalog(Assembly assembly) 380public AssemblyCatalog(Assembly assembly, ICompositionElement definitionOrigin) 390private void InitializeAssemblyCatalog(Assembly assembly) 439var assembly = (catalogReflectionContextAttribute != null) 466public Assembly Assembly 545private static Assembly LoadAssembly(string codeBase) 565return Assembly.Load(assemblyName); 570return Assembly.LoadFrom(codeBase);
System\ComponentModel\Composition\Hosting\AssemblyCatalogDebuggerProxy.cs (1)
23public Assembly Assembly
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (9)
48/// <see cref="Assembly.Load(AssemblyName)"/> can throw. 82/// <see cref="Assembly.Load(AssemblyName)"/> can throw. 121/// <see cref="Assembly.Load(AssemblyName)"/> can throw. 159/// <see cref="Assembly.Load(AssemblyName)"/> can throw. 202/// <see cref="Assembly.Load(AssemblyName)"/> can throw. 244/// <see cref="Assembly.Load(AssemblyName)"/> can throw. 289/// <see cref="Assembly.Load(AssemblyName)"/> can throw. 339/// <see cref="Assembly.Load(AssemblyName)"/> can throw. 561/// <see cref="Assembly.Load(AssemblyName)"/> can throw.
System\ComponentModel\Composition\Hosting\DirectoryCatalog.DirectoryCatalogDebuggerProxy.cs (1)
26public ReadOnlyCollection<Assembly> Assemblies
System.ComponentModel.Composition.Registration (2)
System\ComponentModel\Composition\Registration\RegistrationBuilder.cs (2)
17public override Assembly MapAssembly(Assembly a) { return a; }
System.ComponentModel.TypeConverter (14)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (5)
28public override string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly) => null; 60public override string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly) 65resourceAssembly ??= Assembly.GetEntryAssembly(); 71foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) 141private static Stream? CaseInsensitiveManifestResourceStreamLookup(Assembly satellite, string name)
System\ComponentModel\Design\ITypeResolutionService.cs (2)
17Assembly? GetAssembly(AssemblyName name); 22Assembly? GetAssembly(AssemblyName name, bool throwOnError);
System\ComponentModel\Design\PropertyTabAttribute.cs (2)
126Assembly a = Assembly.Load(assemblyName);
System\ComponentModel\LicenseContext.cs (1)
22public virtual string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly) => null;
System\ComponentModel\LicenseManager.LicenseInteropHelper.cs (2)
43public override string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly) 71public override string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly) => null;
System\ComponentModel\ReflectionCachesUpdateHandler.cs (1)
31foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System\ComponentModel\TypeDescriptor.cs (1)
2517public static void Refresh(Assembly assembly)
System.Composition.TypedParts (4)
System\Composition\Hosting\ContainerConfiguration.cs (4)
166public ContainerConfiguration WithAssembly(Assembly assembly) 178public ContainerConfiguration WithAssembly(Assembly assembly, AttributedModelProvider conventions) 189public ContainerConfiguration WithAssemblies(IEnumerable<Assembly> assemblies) 201public ContainerConfiguration WithAssemblies(IEnumerable<Assembly> assemblies, AttributedModelProvider conventions)
System.Configuration.ConfigurationManager (6)
System\Configuration\ClientConfigPaths.cs (5)
40Assembly exeAssembly = null; 55exeAssembly = Assembly.GetEntryAssembly(); 242Assembly assembly = Assembly.GetEntryAssembly(); 290private void SetNamesAndVersion(Assembly exeAssembly, bool isHttp)
System\Configuration\TypeUtil.cs (1)
62Assembly configurationAssembly = typeof(ConfigurationException).Assembly;
System.Data.Odbc (2)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.Odbc.cs (1)
28NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), (libraryName, assembly, searchPath) =>
System\Data\Odbc\OdbcConnectionFactory.cs (1)
66Stream? XMLStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("System.Data.Odbc.OdbcMetaData.xml");
System.Data.OleDb (3)
OleDbConnectionFactory.cs (1)
93XMLStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("System.Data.OleDb.OleDbMetaData.xml");
System\Data\ProviderBase\DbConnectionPoolCounters.cs (2)
212Assembly? assembly = Assembly.GetEntryAssembly();
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\Diagnostics\SwitchAttribute.cs (1)
49public static SwitchAttribute[] GetAll(Assembly assembly)
System\Diagnostics\TraceInternal.cs (1)
83internal static string AppName => field ??= Assembly.GetEntryAssembly()?.GetName().Name ?? string.Empty;
System.DirectoryServices.Protocols (1)
src\runtime\src\libraries\Common\src\Interop\Linux\OpenLdap\Interop.Ldap.cs (1)
72Assembly currentAssembly = typeof(Ldap).Assembly;
System.Drawing.Common (1)
System\Drawing\BitmapSelector.cs (1)
24public static Stream? GetResourceStream(Assembly assembly, Type type, string originalName)
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\Helper.cs (2)
107Assembly? assembly = Assembly.GetEntryAssembly();
System.Management (5)
System\Management\WMIGenerator.cs (5)
4822Assembly asm = null; 4850curAssemblyName = Assembly.GetExecutingAssembly().GetName(); 4857asm = Assembly.Load(assemblyName); 4872curAssemblyName = Assembly.GetExecutingAssembly().GetName(); 4879asm = Assembly.Load(assemblyName);
System.Private.CoreLib (191)
Internal\Reflection\Augments\ReflectionAugments.cs (3)
96public static Assembly Load(AssemblyName assemblyRef, bool throwOnFileNotFound) 432public static Assembly[] GetLoadedAssemblies() => RuntimeAssemblyInfo.GetLoadedAssemblies(); 499public static Assembly GetAssemblyForHandle(RuntimeTypeHandle typeHandle)
Internal\Reflection\Core\Execution\ExecutionEnvironment.cs (3)
72public abstract ManifestResourceInfo GetManifestResourceInfo(Assembly assembly, string resourceName); 73public abstract string[] GetManifestResourceNames(Assembly assembly); 74public abstract Stream GetManifestResourceStream(Assembly assembly, string name);
Internal\Reflection\Extensions\NonPortable\CustomAttributeInheritanceRules.cs (3)
27public static IEnumerable<CustomAttributeData> GetMatchingCustomAttributes(this Assembly element, Type optionalAttributeTypeFilter, bool skipTypeValidation = false) 86private sealed class AssemblyCustomAttributeSearcher : CustomAttributeSearcher<Assembly> 88protected sealed override IEnumerable<CustomAttributeData> GetDeclaredCustomAttributes(Assembly element)
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (1)
302Assembly callingAssembly = ReflectionAugments.GetAssemblyForHandle(new RuntimeTypeHandle(pCell->CallingAssemblyType));
Internal\Runtime\CompilerHelpers\ReflectionHelpers.cs (3)
25public static Type ExtensibleGetType(string typeName, string callingAssemblyName, Func<AssemblyName, Assembly?> assemblyResolver, Func<Assembly?, string, bool, Type?>? typeResolver, bool throwOnError, bool ignoreCase) 31public static Assembly GetExecutingAssembly(RuntimeTypeHandle typeHandle)
Internal\Runtime\CompilerHelpers\StartupCode\StartupCodeHelpers.Reflection.cs (2)
6using Assembly = System.Reflection.Assembly; 19internal static Assembly? GetEntryAssembly()
src\runtime\src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
308Func<AssemblyName, Assembly> resolver = alc.LoadFromAssemblyName;
src\runtime\src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\IsolatedComponentLoadContext.cs (1)
32protected override Assembly? Load(AssemblyName assemblyName)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Activator.cs (2)
54Assembly assembly = Assembly.LoadFrom(assemblyFile);
src\runtime\src\libraries\System.Private.CoreLib\src\System\AppContext.cs (1)
37Assembly.GetEntryAssembly()?.GetCustomAttribute<TargetFrameworkAttribute>()?.FrameworkName;
src\runtime\src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (17)
68Assembly? assembly = Assembly.GetEntryAssembly(); 132Assembly assembly = Assembly.LoadFile(fullPath); 143private static int ExecuteAssembly(Assembly assembly, string?[]? args) 159ExecuteAssembly(Assembly.Load(assemblyName), args); 165ExecuteAssembly(Assembly.Load(assemblyName), args); 192public Assembly Load(byte[] rawAssembly) => Assembly.Load(rawAssembly); 195public Assembly Load(byte[] rawAssembly, byte[]? rawSymbolStore) => Assembly.Load(rawAssembly, rawSymbolStore); 197public Assembly Load(AssemblyName assemblyRef) => Assembly.Load(assemblyRef); 199public Assembly Load(string assemblyString) => Assembly.Load(assemblyString); 201public Assembly[] ReflectionOnlyGetAssemblies() => []; 251public Assembly[] GetAssemblies() => AssemblyLoadContext.GetLoadedAssemblies();
src\runtime\src\libraries\System.Private.CoreLib\src\System\AssemblyLoadEventArgs.cs (2)
10public AssemblyLoadEventArgs(Assembly loadedAssembly) 15public Assembly LoadedAssembly { get; }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (3)
623Assembly thisAssembly = typeof(Contract).Assembly; // In case we refactor mscorlib, use Contract class instead of Object. 625Assembly? probablyNotRewritten = null; 628Assembly? caller = stack.GetFrame(i)!.GetMethod()?.DeclaringType?.Assembly;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\RuntimeEventSource.cs (1)
106_assemblyCounter ??= new PollingCounter("assembly-count", this, () => Reflection.Assembly.GetAssemblyCount()) { DisplayName = "Number of Assemblies Loaded" };
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (2)
64public static CompareInfo GetCompareInfo(int culture, Assembly assembly) 82public static CompareInfo GetCompareInfo(string name, Assembly assembly)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeData.cs (1)
27public static IList<CustomAttributeData> GetCustomAttributes(Assembly target)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeExtensions.cs (6)
11public static Attribute? GetCustomAttribute(this Assembly element, Type attributeType) 28public static T? GetCustomAttribute<T>(this Assembly element) where T : Attribute 65public static IEnumerable<Attribute> GetCustomAttributes(this Assembly element) 93public static IEnumerable<Attribute> GetCustomAttributes(this Assembly element, Type attributeType) 110public static IEnumerable<T> GetCustomAttributes<T>(this Assembly element) where T : Attribute 147public static bool IsDefined(this Assembly element, Type attributeType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (1)
331public override Assembly Assembly
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
104public override Assembly Assembly => _genericType.Assembly;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ManifestResourceInfo.cs (2)
8public ManifestResourceInfo(Assembly? containingAssembly, 17public virtual Assembly? ReferencedAssembly { get; }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (1)
91public override Assembly Assembly => _unmodifiedType.Assembly;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Module.cs (1)
16public virtual Assembly Assembly => throw NotImplemented.ByDesign;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ReflectionContext.cs (2)
10public abstract Assembly MapAssembly(Assembly assembly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
85public sealed override Assembly Assembly => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\TypeDelegator.cs (1)
52public override Assembly Assembly => typeImpl.Assembly;
src\runtime\src\libraries\System.Private.CoreLib\src\System\ResolveEventArgs.cs (2)
15public ResolveEventArgs(string name, Assembly? requestingAssembly) 22public Assembly? RequestingAssembly { get; }
src\runtime\src\libraries\System.Private.CoreLib\src\System\ResolveEventHandler.cs (1)
8public delegate Assembly? ResolveEventHandler(object? sender, ResolveEventArgs args);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (10)
42Assembly? satellite; 126internal static CultureInfo GetNeutralResourcesLanguage(Assembly a, out UltimateResourceFallbackLocation fallbackLocation) 166internal ResourceSet CreateResourceSet(Stream store, Assembly assembly) 270private static Assembly? InternalGetSatelliteAssembly(Assembly mainAssembly, CultureInfo culture, Version? version) 313private static Stream? GetManifestResourceStream(Assembly satellite, string fileName) 326private static Stream? CaseInsensitiveManifestResourceStreamLookup(Assembly satellite, string name) 355private Assembly? GetSatelliteAssembly(CultureInfo lookForCulture) 364Assembly? satellite = null; 436private static string GetManifestResourceNamesList(Assembly assembly)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (7)
102protected Assembly? MainAssembly; // Need the assembly manifest sometimes. 186public ResourceManager(string baseName, Assembly assembly) 200public ResourceManager(string baseName, Assembly assembly, 526protected static Version? GetSatelliteContractVersion(Assembly a) 546protected static CultureInfo GetNeutralResourcesLanguage(Assembly a) 778internal static Version? ObtainSatelliteContractVersion(Assembly a) => 787internal Assembly? MainAssembly => _rm.MainAssembly;
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (16)
55private event Func<Assembly, string, IntPtr>? _resolvingUnmanagedDll; 57private event Func<AssemblyLoadContext, AssemblyName, Assembly>? _resolving; 168public IEnumerable<Assembly> Assemblies 172foreach (Assembly a in GetLoadedAssemblies()) 190public event Func<Assembly, string, IntPtr>? ResolvingUnmanagedDll 211public event Func<AssemblyLoadContext, AssemblyName, Assembly?>? Resolving 315protected virtual Assembly? Load(AssemblyName assemblyName) 335public Assembly LoadFromAssemblyPath(string assemblyPath) 353public Assembly LoadFromNativeImagePath(string nativeImagePath, string? assemblyPath) 376public Assembly LoadFromStream(Stream assembly) 382public Assembly LoadFromStream(Stream assembly, Stream? assemblySymbols) 508/// * <see cref="Assembly.Load" /> 509/// * <see cref="Assembly.GetType" /> 561public static ContextualReflectionScope EnterContextualReflection(Assembly? activating) 909internal IntPtr GetResolvedUnmanagedDll(Assembly assembly, string unmanagedDllName) 912foreach (Func<Assembly, string, IntPtr> handler in Delegate.EnumerateInvocationList(_resolvingUnmanagedDll))
src\runtime\src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (1)
158Assembly assembly;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (1)
27public abstract Assembly Assembly { get; }
System\Reflection\Assembly.NativeAot.cs (6)
14private static Assembly? GetEntryAssemblyInternal() => Internal.Runtime.CompilerHelpers.StartupCodeHelpers.GetEntryAssembly(); 17public static Assembly GetExecutingAssembly() { throw NotImplemented.ByDesign; } //Implemented by toolchain. 19public static Assembly GetCallingAssembly() 27public static Assembly Load(AssemblyName assemblyRef) => ReflectionAugments.Load(assemblyRef, throwOnFileNotFound: true); 29public static Assembly Load(string assemblyString) 44public static Assembly LoadWithPartialName(string partialName)
System\Reflection\Attribute.NativeAot.cs (8)
15public static Attribute GetCustomAttribute(Assembly element, Type attributeType) 19public static Attribute GetCustomAttribute(Assembly element, Type attributeType, bool inherit) => GetCustomAttribute(element, attributeType); // "inherit" is meaningless for assemblies 39public static Attribute[] GetCustomAttributes(Assembly element) 44public static Attribute[] GetCustomAttributes(Assembly element, bool inherit) => GetCustomAttributes(element); // "inherit" is meaningless for assemblies 45public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType) 49public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType, bool inherit) => GetCustomAttributes(element, attributeType); // "inherit" is meaningless for modules 87public static bool IsDefined(Assembly element, Type attributeType) 92public static bool IsDefined(Assembly element, Type attributeType, bool inherit) => IsDefined(element, attributeType); // "inherit" is meaningless for assemblies
System\Reflection\Metadata\AssemblyExtensions.cs (1)
20public static unsafe bool TryGetRawMetadata(this Assembly assembly, out byte* blob, out int length)
System\Reflection\Metadata\MetadataUpdater.cs (1)
10public static void ApplyUpdate(Assembly assembly, ReadOnlySpan<byte> metadataDelta, ReadOnlySpan<byte> ilDelta, ReadOnlySpan<byte> pdbDelta)
System\Reflection\Runtime\Assemblies\RuntimeAssemblyInfo.cs (4)
268internal static Assembly[] GetLoadedAssemblies() 275Assembly[] results = new Assembly[bindResults.Count]; 278Assembly assembly = GetRuntimeAssembly(bindResults[i]);
System\Reflection\Runtime\General\ThunkedApis.cs (2)
80public sealed override Assembly GetSatelliteAssembly(CultureInfo culture) { throw new PlatformNotSupportedException(); } 81public sealed override Assembly GetSatelliteAssembly(CultureInfo culture, Version version) { throw new PlatformNotSupportedException(); }
System\Reflection\Runtime\Modules\NativeFormat\NativeFormatRuntimeModule.cs (1)
24public sealed override Assembly Assembly => _assembly;
System\Reflection\Runtime\Modules\RuntimeModule.cs (1)
25public abstract override Assembly Assembly { get; }
System\Reflection\Runtime\TypeInfos\NativeFormat\NativeFormatRuntimeNamedTypeInfo.cs (1)
26public sealed override Assembly Assembly
System\Reflection\Runtime\TypeInfos\RuntimeConstructedGenericTypeInfo.cs (1)
101public sealed override Assembly Assembly
System\Reflection\Runtime\TypeInfos\RuntimeFunctionPointerTypeInfo.cs (1)
36public override Assembly Assembly => typeof(object).Assembly;
System\Reflection\Runtime\TypeInfos\RuntimeGenericParameterTypeInfo.cs (1)
27public sealed override Assembly Assembly
System\Reflection\Runtime\TypeInfos\RuntimeHasElementTypeInfo.cs (1)
42public sealed override Assembly Assembly
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (1)
63public abstract Assembly Assembly { get; }
System\Reflection\RuntimeAssembly.cs (3)
13internal static Assembly? InternalGetSatelliteAssembly(Assembly mainAssembly, CultureInfo culture, Version? version, bool throwOnFileNotFound) 24Assembly? retAssembly = ReflectionAugments.Load(an, throwOnFileNotFound);
System\Reflection\TypeNameResolver.NativeAot.cs (9)
17private Func<AssemblyName, Assembly?>? _assemblyResolver; 18private Func<Assembly?, string, bool, Type?>? _typeResolver; 22private Assembly? _topLevelAssembly; 37Func<AssemblyName, Assembly?>? assemblyResolver, 38Func<Assembly?, string, bool, Type?>? typeResolver, 76Assembly topLevelAssembly) 97private Assembly? ResolveAssembly(Metadata.AssemblyNameInfo assemblyName) 99Assembly? assembly; 123Assembly? assembly;
System\Runtime\InteropServices\NativeLibrary.NativeAot.cs (5)
15internal static bool TryLoad(string libraryName, Assembly assembly, DllImportSearchPath searchPath, out IntPtr handle) 25internal static IntPtr LoadLibraryByName(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, bool throwOnError) 38private static IntPtr LoadLibraryByName(string libraryName, Assembly assembly, bool userSpecifiedSearchFlags, DllImportSearchPath searchPath, bool throwOnError) 53private static DllImportSearchPath GetDllImportSearchPath(Assembly callingAssembly, out bool userSpecifiedSearchFlags) 68internal static IntPtr LoadBySearch(Assembly callingAssembly, bool userSpecifiedSearchFlags, bool searchAssemblyDirectory, int dllImportSearchPathFlags, ref LoadLibErrorTracker errorTracker, string libraryName)
System\Runtime\Loader\AssemblyLoadContext.NativeAot.cs (6)
14internal static Assembly[] GetLoadedAssemblies() => ReflectionAugments.GetLoadedAssemblies(); 16public Assembly LoadFromAssemblyName(AssemblyName assemblyName) 18return Assembly.Load(assemblyName); 31public static AssemblyLoadContext? GetLoadContext(Assembly assembly) 44private static Assembly InternalLoadFromPath(string? assemblyPath, string? nativeImagePath) 53internal Assembly InternalLoad(ReadOnlySpan<byte> rawAssembly, ReadOnlySpan<byte> rawSymbols)
System\RuntimeType.NativeAot.cs (1)
844public override Assembly Assembly
System\Type.NativeAot.cs (6)
79public static Type GetType(string typeName, Func<AssemblyName, Assembly?>? assemblyResolver, Func<Assembly?, string, bool, Type?>? typeResolver) => GetType(typeName, assemblyResolver, typeResolver, throwOnError: false, ignoreCase: false); 82public static Type GetType(string typeName, Func<AssemblyName, Assembly?>? assemblyResolver, Func<Assembly?, string, bool, Type?>? typeResolver, bool throwOnError) => GetType(typeName, assemblyResolver, typeResolver, throwOnError: throwOnError, ignoreCase: false); 85public static Type GetType(string typeName, Func<AssemblyName, Assembly?>? assemblyResolver, Func<Assembly?, string, bool, Type?>? typeResolver, bool throwOnError, bool ignoreCase)
System.Private.DataContractSerialization (7)
System\Runtime\Serialization\DataContract.cs (1)
2256internal static bool IsAssemblyFriendOfSerialization(Assembly assembly)
System\Runtime\Serialization\XsdDataContractExporter.cs (6)
101/// <param name="assemblies">A <see cref="ICollection{T}"/> (of <see cref="Assembly"/>) that contains the types to export.</param> 104public void Export(ICollection<Assembly> assemblies) 111foreach (Assembly assembly in assemblies) 303/// <param name="assemblies">A <see cref="ICollection{T}"/> of <see cref="Assembly"/> that contains the assemblies with the types to export.</param> 307public bool CanExport(ICollection<Assembly> assemblies) 314foreach (Assembly assembly in assemblies)
System.Private.Reflection.Execution (5)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.ManifestResources.cs (4)
22public sealed override ManifestResourceInfo GetManifestResourceInfo(Assembly assembly, string resourceName) 32public sealed override string[] GetManifestResourceNames(Assembly assembly) 69public sealed override Stream GetManifestResourceStream(Assembly assembly, string name) 92private static ResourceInfo FindResourceWithName(Assembly assembly, string resourceName)
Internal\Reflection\Execution\TypeLoader\ConstraintValidatorSupport.cs (1)
141public override Assembly Assembly { get { Debug.Assert(false); throw NotImplemented.ByDesign; } }
System.Private.Windows.Core (4)
System\Assemblies.cs (4)
40private static Assembly? s_mscorlibFacadeAssembly; 41internal static Assembly MscorlibAssembly => s_mscorlibFacadeAssembly 42??= Assembly.Load(Mscorlib); 44internal static Assembly CorelibAssembly { get; } = typeof(string).Assembly;
System.Private.Windows.Core.TestUtilities (1)
BinarySerialization.cs (1)
22public static void EnsureSerializableAttribute(Assembly assemblyUnderTest, HashSet<string> serializableTypes)
System.Private.Windows.GdiPlus (1)
Windows\Win32\PInvokeGdiPlus.cs (1)
19NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), static (_, _, _) =>
System.Private.Xml (37)
System\Xml\Resolvers\XmlPreloadedResolver.cs (1)
66Assembly asm = GetType().Assembly;
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\Xml\Serialization\Compiler.cs (2)
64Assembly assembly = module.Assembly; 76Assembly.Load(new AssemblyName(originalAssemblyInfo.AssemblyFullName));
System\Xml\Serialization\XmlSerializationReader.cs (1)
185protected static Assembly? ResolveDynamicAssembly(string assemblyFullName)
System\Xml\Serialization\XmlSerializationWriter.cs (9)
112protected static Assembly? ResolveDynamicAssembly(string assemblyFullName) 1545Assembly assembly = type.Assembly; 1588internal static void Add(Assembly a) 1597Assembly? oldAssembly = s_nameToAssemblyMap[a.FullName!] as Assembly; 1616internal static Assembly? Get(string fullName) 1618return s_nameToAssemblyMap != null ? (Assembly?)s_nameToAssemblyMap[fullName] : null; 1621internal static string? GetName(Assembly a) 1811_writer.Write($"static {typeof(Assembly).FullName} {assemblyVariable} = ResolveDynamicAssembly(");
System\Xml\Serialization\XmlSerializer.cs (3)
244Assembly? assembly = TempAssembly.LoadGeneratedAssembly(type, defaultNamespace, out contract); 600Assembly? assembly = type == null ? null : TempAssembly.LoadGeneratedAssembly(type, null, out contract); 682Assembly? assembly = null;
System.Reflection (1)
System.Reflection.cs (1)
5[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.Assembly))]
System.Reflection.Context (23)
System\Reflection\Context\Custom\CustomAssembly.cs (1)
10public CustomAssembly(Assembly template, CustomReflectionContext context)
System\Reflection\Context\CustomReflectionContext.cs (4)
13public override Assembly MapAssembly(Assembly assembly) { return assembly; } 49public override Assembly MapAssembly(Assembly assembly)
System\Reflection\Context\CustomReflectionContext.Projector.cs (4)
35public Assembly ProjectAssemblyIfNeeded(Assembly value) 61public override Assembly? ProjectAssembly(Assembly? value)
System\Reflection\Context\Delegation\DelegatingAssembly.cs (4)
18public DelegatingAssembly(Assembly assembly) 43public Assembly UnderlyingAssembly { get; } 183public override Assembly GetSatelliteAssembly(CultureInfo culture) 188public override Assembly GetSatelliteAssembly(CultureInfo culture, Version? version)
System\Reflection\Context\Delegation\DelegatingModule.cs (1)
21public override Assembly Assembly
System\Reflection\Context\Delegation\DelegatingType.cs (1)
27public override Assembly Assembly
System\Reflection\Context\Projection\ProjectingAssembly.cs (3)
15public ProjectingAssembly(Assembly assembly, Projector projector) 79public override Assembly GetSatelliteAssembly(CultureInfo culture) 84public override Assembly GetSatelliteAssembly(CultureInfo culture, Version? version)
System\Reflection\Context\Projection\ProjectingManifestResourceInfo.cs (1)
22public override Assembly? ReferencedAssembly
System\Reflection\Context\Projection\ProjectingModule.cs (1)
24public override Assembly Assembly
System\Reflection\Context\Projection\ProjectingType.cs (1)
29public override Assembly Assembly
System\Reflection\Context\Projection\Projector.cs (2)
48public abstract Assembly? ProjectAssembly(Assembly? value);
System.Reflection.Emit (11)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (1)
331public override Assembly Assembly
System\Reflection\Emit\EnumBuilderImpl.cs (1)
50public override Assembly Assembly => _typeBuilder.Assembly;
System\Reflection\Emit\GenericTypeParameterBuilderImpl.cs (1)
77public override Assembly Assembly => _type.Assembly;
System\Reflection\Emit\ModuleBuilderImpl.cs (5)
17private readonly Assembly _coreAssembly; 22private readonly Dictionary<Assembly, AssemblyReferenceHandle> _assemblyReferences = new(); 46internal ModuleBuilderImpl(string name, Assembly coreAssembly, MetadataBuilder builder, PersistedAssemblyBuilder assemblyBuilder) 836private AssemblyReferenceHandle GetAssemblyReference(Assembly assembly) 1057public override Assembly Assembly => _assemblyBuilder;
System\Reflection\Emit\PersistedAssemblyBuilder.cs (2)
18private readonly Assembly _coreAssembly; 34public PersistedAssemblyBuilder(AssemblyName name, Assembly coreAssembly, IEnumerable<CustomAttributeBuilder>? assemblyAttributes = null)
System\Reflection\Emit\TypeBuilderImpl.cs (1)
605public override Assembly Assembly => _module.Assembly;
System.Reflection.MetadataLoadContext (24)
System\Reflection\MetadataAssemblyResolver.cs (1)
35public abstract Assembly? Resolve(MetadataLoadContext context, AssemblyName assemblyName);
System\Reflection\MetadataLoadContext.Apis.cs (9)
122public Assembly LoadFromAssemblyPath(string assemblyPath) 136public Assembly LoadFromByteArray(byte[] assembly) 153public Assembly LoadFromStream(Stream assembly) 170public Assembly LoadFromAssemblyName(string assemblyName) 188public Assembly LoadFromAssemblyName(AssemblyName assemblyName) 219public Assembly CoreAssembly 233public IEnumerable<Assembly> GetAssemblies() 242/// Returns the <see cref="MetadataLoadContext"/> that an <see cref="Assembly"/> was loaded into, 246public static MetadataLoadContext? GetLoadContext(Assembly assembly)
System\Reflection\MetadataLoadContext.Resolving.cs (1)
61Assembly? assembly = resolver?.Resolve(this, refName.ToAssemblyName());
System\Reflection\PathAssemblyResolver.cs (4)
54public override Assembly? Resolve(MetadataLoadContext context, AssemblyName assemblyName) 57Assembly? candidateWithSamePkt = null; 58Assembly? candidateIgnoringPkt = null; 65Assembly assemblyFromPath = context.LoadFromAssemblyPath(path);
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.Modules.cs (1)
40Assembly containingAssembly = this;
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (2)
204public sealed override Assembly GetSatelliteAssembly(CultureInfo culture) => throw new NotSupportedException(SR.NotSupported_SatelliteAssembly); 205public sealed override Assembly GetSatelliteAssembly(CultureInfo culture, Version? version) => throw new NotSupportedException(SR.NotSupported_SatelliteAssembly);
System\Reflection\TypeLoading\General\Ecma\InternalManifestResourceInfo.cs (1)
10public Assembly ReferencedAssembly;
System\Reflection\TypeLoading\General\Helpers.cs (3)
295Func<AssemblyName, Assembly> assemblyResolver = 298Func<Assembly?, string, bool, Type?> typeResolver = 299delegate (Assembly? assembly, string fullName, bool ignoreCase2)
System\Reflection\TypeLoading\Modules\RoModule.cs (1)
32public sealed override Assembly Assembly => GetRoAssembly();
System\Reflection\TypeLoading\Types\RoType.cs (1)
130public sealed override Assembly Assembly => Module.Assembly;
System.Reflection.TypeExtensions (3)
System\Reflection\TypeExtensions.cs (3)
373public static Type[] GetExportedTypes(this Assembly assembly) 381public static Module[] GetModules(this Assembly assembly) 389public static Type[] GetTypes(this Assembly assembly)
System.Resources.Extensions (11)
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.TypeResolver.cs (11)
24private readonly Dictionary<string, Assembly> _assemblies = []; 59if (!_assemblies.TryGetValue(typeName.AssemblyName.FullName, out Assembly? assembly)) 64assembly = Assembly.Load(assemblyName); 73assembly = Assembly.Load(assemblyName.Name!); 88private static Type? GetSimplyNamedTypeFromAssembly(Assembly assembly, TypeName typeName) 105static Assembly? ResolveSimpleAssemblyName(AssemblyName assemblyName) 109return Assembly.Load(assemblyName); 115return Assembly.Load(assemblyName.Name!); 125private readonly Assembly _topLevelAssembly; 127public TopLevelAssemblyTypeResolver(Assembly topLevelAssembly) => _topLevelAssembly = topLevelAssembly; 130public Type? ResolveType(Assembly? assembly, string simpleTypeName, bool ignoreCase)
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
427[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.Assembly))]
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\RuntimeEnvironment.cs (1)
15public static bool FromGlobalAccessCache(Assembly a) => false;
System.Runtime.InteropServices.JavaScript (3)
System\Runtime\InteropServices\JavaScript\JSHostImplementation.CoreCLR.cs (3)
22Assembly assembly = AssemblyLoadContext.Default.LoadFromAssemblyName(new AssemblyName(assemblyName)); 48var assembly = Assembly.Load(new AssemblyName(assemblyName));
System.Runtime.Serialization.Formatters (4)
System\Runtime\Serialization\FormatterServices.cs (4)
291public static Type? GetTypeFromAssembly(Assembly assem, string name) 298internal static Assembly LoadAssemblyFromString(string assemblyName) 300return Assembly.Load(new AssemblyName(assemblyName)); 303internal static Assembly? LoadAssemblyFromStringNoThrow(string assemblyName)
System.Runtime.Serialization.Schema (3)
System\Runtime\Serialization\Schema\CodeExporter.cs (3)
45AddReferencedAssembly(Assembly.GetExecutingAssembly()); 119private void AddReferencedAssembly(Assembly assembly) 529AssemblyName assemblyName = Assembly.GetExecutingAssembly().GetName();
System.Security.Permissions (4)
System\Security\HostSecurityManager.cs (3)
16public virtual Evidence ProvideAssemblyEvidence(System.Reflection.Assembly loadedAssembly, Evidence inputEvidence) { return default(Evidence); } 20public virtual EvidenceBase GenerateAssemblyEvidence(Type evidenceType, Assembly assembly) { return null; } 22public virtual Type[] GetHostSuppliedAssemblyEvidenceTypes(Assembly assembly) { return null; }
System\Security\Policy\Hash.cs (1)
12public Hash(System.Reflection.Assembly assembly) { }
System.ServiceModel.NetNamedPipe.Tests (1)
NetNamedPipeBindingTest.cs (1)
19Type t = Assembly.GetAssembly(typeof(NamedPipeTransportBindingElement))
System.ServiceModel.Primitives (1)
Extensions\ReflectionExtensions.cs (1)
15public static Assembly Assembly(this Type type)
System.ServiceModel.Primitives.Tests (1)
Security\SecurityUtilsTest.cs (1)
17Type t = Assembly.GetAssembly(typeof(WindowsClientCredential))
System.Speech (21)
Internal\AlphabetConverter.cs (2)
203Assembly assembly = Assembly.GetAssembly(GetType())!;
Internal\SrgsCompiler\AppDomainGrammarProxy.cs (3)
114_assembly = Assembly.Load(il, pdb); 156private static Type? GetTypeForRule(Assembly assembly, string? rule) 303private Assembly _assembly = null!;
Internal\Synthesis\VoiceSynthesis.cs (2)
1358Assembly assembly; 1359if (!string.IsNullOrEmpty(voiceInfo.AssemblyName) && (assembly = Assembly.Load(voiceInfo.AssemblyName)) != null)
Recognition\Grammar.cs (12)
152Assembly assembly = Assembly.GetAssembly(type)!; 419Assembly assembly; 425assembly = Assembly.LoadFrom(uriGrammar.LocalPath); 435assembly = Assembly.Load(grammarName); 459Assembly assembly = Assembly.LoadFrom(grammarName); 694private static Grammar? LoadGrammarFromAssembly(Assembly assembly, string ruleName, string? onInitParameters) 902Assembly executingAssembly = Assembly.GetExecutingAssembly(); 913Assembly assembly = Assembly.GetAssembly(GetType())!;
Result\RecognizedPhrase.cs (2)
996Assembly assembly = grammarType.Assembly; 1007private static Type? GetTypeForRule(Assembly assembly, string rule)
System.Text.Json (3)
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (3)
80if (GetFSharpCoreAssembly(type) is Assembly fsharpCoreAssembly) 108private FSharpCoreReflectionProxy(Assembly fsharpCoreAssembly) 314private static Assembly? GetFSharpCoreAssembly(Type type)
System.Windows.Extensions (1)
System\Xaml\Permissions\XamlAccessLevel.cs (1)
17public static XamlAccessLevel AssemblyAccessTo(Assembly assembly)
System.Windows.Forms (17)
System\Resources\AssemblyNamesTypeResolutionService.cs (7)
13private ConcurrentDictionary<AssemblyName, Assembly>? _cachedAssemblies; 22public Assembly? GetAssembly(AssemblyName name) => GetAssembly(name, true); 25public Assembly? GetAssembly(AssemblyName name, bool throwOnError) 28if (_cachedAssemblies.TryGetValue(name, out Assembly? result) && result is not null) 33result = Assembly.Load(name.FullName); 44result = Assembly.LoadFrom(GetPathOfAssembly(assemblyName)); 132Assembly? assembly = GetAssembly(assemblyName, false);
System\Windows\Forms\Application.cs (8)
169Assembly? entryAssembly = Assembly.GetEntryAssembly(); 501if (Assembly.GetEntryAssembly() is { } entryAssembly) 550Assembly? entryAssembly = Assembly.GetEntryAssembly(); 1150Assembly? exe = Assembly.GetEntryAssembly(); 1296if (Assembly.GetEntryAssembly() is null)
System\Windows\Forms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (1)
82Assembly? assembly = type?.Assembly;
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
179foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System.Windows.Forms.Design (24)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (2)
172Dictionary<Assembly, AssemblyName> assemblies = new(_objects.Count); 176Assembly a = obj.GetType().Assembly;
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.LocalDesignerSerializationManager.cs (6)
63Assembly a = Assembly.Load(n); 74Assembly a = Assembly.Load(n); 79Assembly aDep = Assembly.Load(dep);
System\Drawing\BitmapSelector.cs (7)
54private static Stream? GetResourceStreamHelper(Assembly assembly, Type type, string name) 68private static bool DoesAssemblyHaveCustomAttribute(Assembly assembly, string typeName) => 71private static bool DoesAssemblyHaveCustomAttribute(Assembly assembly, Type attributeType) => 74private static bool SatelliteAssemblyOptIn(Assembly assembly) 86private static bool SameAssemblyOptIn(Assembly assembly) 109Assembly assembly = type.Module.Assembly; 142if (Assembly.Load(assemblyName) is { } satellite)
System\Drawing\Design\ColorEditor.CustomColorDialog.cs (1)
15private static readonly Assembly s_assembly = typeof(ColorEditor).Module.Assembly;
System\Drawing\Design\ToolboxItem.cs (6)
478Assembly? a = ts.GetAssembly(assemblyName); 492Assembly? a = null; 495a = Assembly.Load(assemblyName); 516a = Assembly.LoadFrom(assemblyName.CodeBase); 679Assembly a = Assembly.Load(name);
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (2)
177Assembly? a = trs.GetAssembly(AssemblyName.GetAssemblyName(fullPath)); 187private Type? GetAxTypeFromAssembly(Assembly a)
System.Xaml (98)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\ReflectionUtils.cs (5)
27internal static string GetFullAssemblyNameFromPartialName(Assembly assembly, string partialName) 31ArgumentNullException.ThrowIfNull(fullName, nameof(Assembly.FullName)); 42internal static ReadOnlySpan<char> GetAssemblyPartialName(Assembly assembly) 89/// Parses <see cref="Assembly.FullName"/> and retrieves "Version" and "PublicKeyToken" values from the original string. 95internal static void GetAssemblyVersionPlusToken(Assembly assembly, out ReadOnlySpan<char> assemblyVersion, out ReadOnlySpan<char> assemblyToken)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (3)
100internal static Assembly GetLoadedAssembly(AssemblyName assemblyName) 102Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); 127private static AssemblyName GetAssemblyName(Assembly assembly)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (9)
93Assembly a = null; 387internal static Assembly LoadAssembly(string assemblyName, string assemblyPath) 397internal static Assembly GetAlreadyLoadedAssembly(string assemblyNameLookup) 399return (Assembly)_loadedAssembliesHash[assemblyNameLookup]; 407private static Assembly LoadAssemblyHelper(string assemblyGivenName, string assemblyPath) 414Assembly retassem = (Assembly)_loadedAssembliesHash[assemblyShortName]; 446retassem = Assembly.LoadFile(assemblyPath); 457retassem = Assembly.Load(assemblyGivenName);
System\Xaml\Context\ObjectWriterContext.cs (3)
108public override Assembly LocalAssembly 112Assembly result = base.LocalAssembly; 115result = Assembly.Load(_settings.AccessLevel.AssemblyAccessToAssemblyName);
System\Xaml\Context\XamlContext.cs (2)
17protected Assembly _localAssembly; 29public virtual Assembly LocalAssembly
System\Xaml\Context\XamlParserContext.cs (1)
21public XamlParserContext(XamlSchemaContext schemaContext, Assembly localAssembly)
System\Xaml\InfosetObjects\XamlReaderSettings.cs (1)
15public Assembly LocalAssembly { get; set; }
System\Xaml\MS\Impl\AssemblyNamespacePair.cs (6)
9/// Holds a <see cref="WeakReference"/> to an <see cref="Reflection.Assembly"/> associated with the current <see cref="ClrNamespace"/>. 14private readonly WeakReference<Assembly> _assembly; 17public AssemblyNamespacePair(Assembly asm, string clrNamespace) 19_assembly = new WeakReference<Assembly>(asm); 23public Assembly? Assembly 25get => _assembly.TryGetTarget(out Assembly? assembly) ? assembly : null;
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\RefOnly\LooseTypeExtensions.cs (2)
53private static bool IsWindowsBaseToSystemXamlComparison(Assembly a1, Assembly a2,
System\Xaml\Runtime\DynamicMethodRuntime.cs (2)
42private Assembly _localAssembly; 135_localAssembly = Assembly.Load(accessLevel.AssemblyAccessToAssemblyName);
System\Xaml\Schema\MemberReflector.cs (2)
223internal static bool IsInternalVisibleTo(MethodInfo method, Assembly accessingAssembly, XamlSchemaContext schemaContext) 281internal static bool GenericArgumentsAreVisibleTo(MethodInfo method, Assembly accessingAssembly, XamlSchemaContext schemaContext)
System\Xaml\Schema\TypeReflector.cs (1)
125internal static bool IsVisibleTo(Type type, Assembly accessingAssembly, XamlSchemaContext schemaContext)
System\Xaml\Schema\XamlNamespace.cs (3)
211Assembly asm = assemblyNamespacePair.Assembly; 238Assembly asm = SchemaContext.OnAssemblyResolve(assemblyName); 249Assembly asm = assemblyNamespacePair.Assembly;
System\Xaml\XamlLanguage.cs (2)
431Assembly[] assemblies = new Assembly[]
System\Xaml\XamlMember.cs (2)
492internal bool IsReadVisibleTo(Assembly accessingAssembly, Type accessingType) 511internal bool IsWriteVisibleTo(Assembly accessingAssembly, Type accessingType)
System\Xaml\XamlObjectReader.cs (1)
2557public Assembly LocalAssembly
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\XamlType.cs (1)
620internal bool IsVisibleTo(Assembly accessingAssembly)
UIAutomationClient (7)
MS\Internal\Automation\ProxyManager.cs (7)
50Assembly a = null; 53a = Assembly.Load( assemblyName ); 335Assembly callingAssembly = null; 337Assembly currentAssembly = Assembly.GetExecutingAssembly(); 347Assembly a = t.Assembly; 356AssemblyName ourAssembly = Assembly.GetAssembly(typeof(ProxyManager)).GetName();
VBCSCompiler (3)
src\roslyn\src\Compilers\Server\VBCSCompiler\AnalyzerConsistencyChecker.cs (3)
24/// There are a few type of events that can lead to incorrect <see cref="Assembly"/> loads: 109var loadedAssemblies = new List<Assembly>(); 118var loadedAssembly = loadedAssemblies[i];