AssemblyContext Class
Definition
- Namespace
- Cuemon.Reflection
- Assemblies
- Cuemon.Core.dll
Provides a set of static methods and properties to manage and filter assemblies in the current application domain.
public static class AssemblyContext
- Inheritance
-
AssemblyContext
Examples
The following example demonstrates how to filter and enumerate loaded assemblies using AssemblyContext. It retrieves all assemblies whose name starts with "Cuemon" and prints each assembly name.
// Program.cs
using System;
using System.Linq;
using Cuemon.Reflection;
var assemblies = AssemblyContext.GetCurrentDomainAssemblies(options =>
{
options.AssemblyFilter = a => a.FullName?.StartsWith("Cuemon") == true;
});
foreach (var assembly in assemblies)
{
Console.WriteLine($"Assembly: {assembly.GetName().Name}");
}
Methods
| Name | Description |
|---|---|
| GetCurrentDomainAssemblies(Action<AssemblyContextOptions>) | Gets the qualified assemblies from the current application domain. |