Skip to content

OptionsCatalogEntry

NexusLabs.Needlr

NexusLabs.Needlr.Catalog

OptionsCatalogEntry Class

Represents an options/configuration binding discovered at compile time.

public sealed record OptionsCatalogEntry : System.IEquatable<NexusLabs.Needlr.Catalog.OptionsCatalogEntry>

Inheritance System.Object 🡒 OptionsCatalogEntry

Implements System.IEquatable<OptionsCatalogEntry>

Constructors

OptionsCatalogEntry(string, string, string, string, string, bool, bool, bool, string) Constructor

Represents an options/configuration binding discovered at compile time.

public OptionsCatalogEntry(string TypeName, string ShortTypeName, string SectionName, string AssemblyName, string? Name=null, bool ValidateOnStart=false, bool HasValidator=false, bool HasDataAnnotations=false, string? SourceFilePath=null);

Parameters

TypeName System.String

The fully qualified name of the options type.

ShortTypeName System.String

The short name of the options type (without namespace).

SectionName System.String

The configuration section name this options type binds to.

AssemblyName System.String

The assembly name where this type is defined.

Name System.String

The named options name, or null for default options.

ValidateOnStart System.Boolean

True if validation is performed on application start.

HasValidator System.Boolean

True if this options type has a validation method.

HasDataAnnotations System.Boolean

True if this options type has DataAnnotation validation attributes.

SourceFilePath System.String

Source file path where the type is defined, if available.

Properties

OptionsCatalogEntry.AssemblyName Property

The assembly name where this type is defined.

public string AssemblyName { get; init; }

Property Value

System.String

OptionsCatalogEntry.HasDataAnnotations Property

True if this options type has DataAnnotation validation attributes.

public bool HasDataAnnotations { get; init; }

Property Value

System.Boolean

OptionsCatalogEntry.HasValidator Property

True if this options type has a validation method.

public bool HasValidator { get; init; }

Property Value

System.Boolean

OptionsCatalogEntry.Name Property

The named options name, or null for default options.

public string? Name { get; init; }

Property Value

System.String

OptionsCatalogEntry.SectionName Property

The configuration section name this options type binds to.

public string SectionName { get; init; }

Property Value

System.String

OptionsCatalogEntry.ShortTypeName Property

The short name of the options type (without namespace).

public string ShortTypeName { get; init; }

Property Value

System.String

OptionsCatalogEntry.SourceFilePath Property

Source file path where the type is defined, if available.

public string? SourceFilePath { get; init; }

Property Value

System.String

OptionsCatalogEntry.TypeName Property

The fully qualified name of the options type.

public string TypeName { get; init; }

Property Value

System.String

OptionsCatalogEntry.ValidateOnStart Property

True if validation is performed on application start.

public bool ValidateOnStart { get; init; }

Property Value

System.Boolean