CodeFactory for Windows CodeFactory for Windows
CodeFactory for Windows CodeFactory for Windows
CodeFactory

Search Results for

    Class VsCommandBase<TModel>

    Base implementation for a factory command that supports integration with visual studio.

    Inheritance
    object
    VsCommandBase<TModel>
    CSharpSourceCommandBase
    ProjectCommandBase
    ProjectDocumentCommandBase
    ProjectFolderCommandBase
    SolutionCommandBase
    SolutionDocumentCommandBase
    SolutionFolderCommandBase
    Implements
    IVsConfigurableCommand<TModel>
    IVsFactoryCommand<TModel>
    IVsCommandInformation
    ICommand<TModel>
    ICommandBase<TModel>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: CodeFactory.WinVs.Commands
    Assembly: CodeFactory.WinVs.dll
    Syntax
    public abstract class VsCommandBase<TModel> : IVsConfigurableCommand<TModel>, IVsFactoryCommand<TModel>, IVsCommandInformation, ICommand<TModel>, ICommandBase<TModel> where TModel : class
    Type Parameters
    Name Description
    TModel

    The target visual studio model type to be returned from the visual studio command.

    Constructors

    VsCommandBase(ILogger, IVsActions, VsCommandType, string, string)

    Base constructor used it initialize a visual studio command.

    Declaration
    protected VsCommandBase(ILogger logger, IVsActions commands, VsCommandType commandType, string commandTitle, string commandDescription)
    Parameters
    Type Name Description
    ILogger logger

    The code factory logger to be used by the logger.

    IVsActions commands

    The global visual studio commands that can be used by this visual studio command.

    VsCommandType commandType

    The target type of command being created.

    string commandTitle

    The title displayed in visual studio for this command.

    string commandDescription

    A brief description of the purpose of this command.

    Fields

    _commandDescription

    Backing field for the property CommandDescription

    Declaration
    protected readonly string _commandDescription
    Field Value
    Type Description
    string

    _commandTitle

    Backing field for the property CommandTitle

    Declaration
    protected readonly string _commandTitle
    Field Value
    Type Description
    string

    _logger

    Logging method that is used by the command to log to the code factory logging framework.

    Declaration
    protected readonly ILogger _logger
    Field Value
    Type Description
    ILogger

    Properties

    CommandDescription

    An optional discription that discribes what this factory command is intended for.

    Declaration
    public string CommandDescription { get; }
    Property Value
    Type Description
    string

    CommandTitle

    Action title that will be displayed within visual studio.

    Declaration
    public string CommandTitle { get; }
    Property Value
    Type Description
    string

    CommandType

    The target type of command that is being loaded.

    Declaration
    public VsCommandType CommandType { get; }
    Property Value
    Type Description
    VsCommandType

    VisualStudioActions

    Global visual studio commands that can be accessed from this visual studio command.

    Declaration
    public IVsActions VisualStudioActions { get; }
    Property Value
    Type Description
    IVsActions

    Methods

    EnableCommandAsync(TModel)

    Validation logic that will determine if this command should be enabled for execution.

    Declaration
    public abstract Task<bool> EnableCommandAsync(TModel result)
    Parameters
    Type Name Description
    TModel result

    The target model data that will be used to determine if this command should be enabled.

    Returns
    Type Description
    Task<bool>

    Boolean flag that will tell code factory to enable this command or disable it.

    ExecuteCommandAsync(TModel)

    Code factory framework calls this method when the command has been executed.

    Declaration
    public abstract Task ExecuteCommandAsync(TModel result)
    Parameters
    Type Name Description
    TModel result

    The code factory model that has generated and provided to the command to process.

    Returns
    Type Description
    Task

    LoadExternalConfigDefinition()

    Loads the external configuration definition for this command.

    Declaration
    public abstract ConfigCommand LoadExternalConfigDefinition()
    Returns
    Type Description
    ConfigCommand

    Will return the command configuration or null if this command does not support external configurations.

    Implements

    IVsConfigurableCommand<TModel>
    IVsFactoryCommand<TModel>
    IVsCommandInformation
    ICommand<TModel>
    ICommandBase<TModel>
    © CodeFactory, LLC. All rights reserved.