Class ConventionContext
- Namespace
- McMaster.Extensions.CommandLineUtils.Conventions
- Assembly
- McMaster.Extensions.CommandLineUtils.dll
The context in which a convention is applied.
public class ConventionContext
- Inheritance
-
objectConventionContext
Constructors
ConventionContext(CommandLineApplication, Type?)
Initializes an instance of ConventionContext.
public ConventionContext(CommandLineApplication application, Type? modelType)
Parameters
applicationCommandLineApplicationThe application
modelTypeTypeThe type of the model.
Properties
Application
The application to which the convention is applied.
public CommandLineApplication Application { get; }
Property Value
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
ModelType
The type of the application model. Can be null when applied to CommandLineApplication instead of CommandLineApplication<TModel>.
public Type? ModelType { get; }