Table of Contents

Interface IMetadataResolver

Namespace
McMaster.Extensions.CommandLineUtils.SourceGeneration
Assembly
McMaster.Extensions.CommandLineUtils.dll

Resolves command metadata for a type using either generated or reflection-based providers.

public interface IMetadataResolver

Methods

GetProvider(Type)

Gets the metadata provider for a type. Returns generated metadata if available, otherwise uses reflection.

ICommandMetadataProvider GetProvider(Type modelType)

Parameters

modelType Type

The model type.

Returns

ICommandMetadataProvider

A metadata provider for the type.

GetProvider<TModel>()

Gets the metadata provider for a type. Returns generated metadata if available, otherwise uses reflection.

ICommandMetadataProvider<TModel> GetProvider<TModel>() where TModel : class

Returns

ICommandMetadataProvider<TModel>

A metadata provider for the type.

Type Parameters

TModel

The model type.

HasGeneratedMetadata(Type)

Checks if generated metadata is available for a type.

bool HasGeneratedMetadata(Type modelType)

Parameters

modelType Type

The model type.

Returns

bool

True if generated metadata is available; otherwise, false.