Class ConventionContext
The context in which a convention is applied.
Inheritance
System.Object
ConventionContext
Namespace: McMaster.Extensions.CommandLineUtils.Conventions
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
public class ConventionContext
Constructors
| Improve this Doc View SourceConventionContext(CommandLineApplication, Type)
Initializes an instance of ConventionContext.
Declaration
public ConventionContext(CommandLineApplication application, Type modelType)
Parameters
Type | Name | Description |
---|---|---|
CommandLineApplication | application | The application |
System.Type | modelType | The type of the model. |
Properties
| Improve this Doc View SourceApplication
The application to which the convention is applied.
Declaration
public CommandLineApplication Application { get; }
Property Value
Type | Description |
---|---|
CommandLineApplication |
ModelAccessor
A convenience accessor for getting the application model object. Can be null when applied to CommandLineApplication instead of CommandLineApplication<TModel>.
Declaration
public IModelAccessor ModelAccessor { get; }
Property Value
Type | Description |
---|---|
IModelAccessor |
ModelType
The type of the application model. Can be null when applied to CommandLineApplication instead of CommandLineApplication<TModel>.
Declaration
public Type ModelType { get; }
Property Value
Type | Description |
---|---|
System.Type |