Class ConventionContext
The context in which a convention is applied.
Inheritance
System.Object
ConventionContext
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: McMaster.Extensions.CommandLineUtils.Conventions
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
public class ConventionContext
Constructors
| Improve this Doc View SourceConventionContext(CommandLineApplication, Nullable<Type>)
Initializes an instance of ConventionContext.
Declaration
public ConventionContext(CommandLineApplication application, Type? modelType)
Parameters
Type | Name | Description |
---|---|---|
CommandLineApplication | application | The application |
System.Nullable<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 |
---|---|
System.Nullable<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.Nullable<System.Type> |