Skip to content

AssemblyInfo

NexusLabs.Needlr.Injection

NexusLabs.Needlr.Injection.AssemblyOrdering

AssemblyInfo Class

Provides a simplified view of assembly information for ordering expressions. This abstraction works for both reflection (runtime Assembly) and source-gen (compile-time info).

public sealed class AssemblyInfo

Inheritance System.Object 🡒 AssemblyInfo

Properties

AssemblyInfo.Location Property

The full file path/location of the assembly (if available).

public string Location { get; }

Property Value

System.String

AssemblyInfo.Name Property

The assembly name (without extension).

public string Name { get; }

Property Value

System.String

Methods

AssemblyInfo.FromAssembly(Assembly) Method

Creates an AssemblyInfo from a runtime Assembly.

public static NexusLabs.Needlr.Injection.AssemblyOrdering.AssemblyInfo FromAssembly(System.Reflection.Assembly assembly);

Parameters

assembly System.Reflection.Assembly

Returns

AssemblyInfo

Remarks

Note: In single-file published apps, Assembly.Location returns an empty string. This is expected behavior and the Location property will be empty in those scenarios.

AssemblyInfo.FromStrings(string, string) Method

Creates an AssemblyInfo from string values (for source-gen scenarios).

public static NexusLabs.Needlr.Injection.AssemblyOrdering.AssemblyInfo FromStrings(string name, string location="");

Parameters

name System.String

location System.String

Returns

AssemblyInfo