Table of Contents

Class ConventionContext

Namespace
McMaster.Extensions.CommandLineUtils.Conventions
Assembly
McMaster.Extensions.CommandLineUtils.dll

The context in which a convention is applied.

public class ConventionContext
Inheritance
object
ConventionContext

Constructors

ConventionContext(CommandLineApplication, Type?)

Initializes an instance of ConventionContext.

public ConventionContext(CommandLineApplication application, Type? modelType)

Parameters

application CommandLineApplication

The application

modelType Type

The type of the model.

Properties

Application

The application to which the convention is applied.

public CommandLineApplication Application { get; }

Property Value

CommandLineApplication

ModelAccessor

A convenience accessor for getting the application model object. Can be null when applied to CommandLineApplication instead of CommandLineApplication<TModel>.

public IModelAccessor? ModelAccessor { get; }

Property Value

IModelAccessor

ModelType

The type of the application model. Can be null when applied to CommandLineApplication instead of CommandLineApplication<TModel>.

public Type? ModelType { get; }

Property Value

Type