protected GitCommandBase(ICommandContext context, string name, string description, IHostProviderRegistry hostProviderRegistry)
            : base(name, description)
        {
            EnsureArgument.NotNull(hostProviderRegistry, nameof(hostProviderRegistry));
            EnsureArgument.NotNull(context, nameof(context));

            Context = context;
            _hostProviderRegistry = hostProviderRegistry;

            Handler = CommandHandler.Create(ExecuteAsync);
        }
예제 #2
0
        internal Application(ICommandContext context,
                             IHostProviderRegistry providerRegistry,
                             IConfigurationService configurationService)
            : base(context)
        {
            EnsureArgument.NotNull(providerRegistry, nameof(providerRegistry));
            EnsureArgument.NotNull(configurationService, nameof(configurationService));

            _providerRegistry     = providerRegistry;
            _configurationService = configurationService;

            _configurationService.AddComponent(this);
        }
 public TestCommand(ICommandContext context, IHostProviderRegistry hostProviderRegistry)
     : base(context, "test", null, hostProviderRegistry)
 {
 }
예제 #4
0
 public GetCommand(IHostProviderRegistry hostProviderRegistry)
     : base(hostProviderRegistry)
 {
 }
 public GetCommand(ICommandContext context, IHostProviderRegistry hostProviderRegistry)
     : base(context, "get", "[Git] Return a stored credential", hostProviderRegistry)
 {
 }
 public EraseCommand(ICommandContext context, IHostProviderRegistry hostProviderRegistry)
     : base(context, "erase", "[Git] Erase a stored credential", hostProviderRegistry)
 {
 }
 public StoreCommand(ICommandContext context, IHostProviderRegistry hostProviderRegistry)
     : base(context, "store", "[Git] Store a credential", hostProviderRegistry)
 {
 }
예제 #8
0
        protected HostProviderCommandBase(IHostProviderRegistry hostProviderRegistry)
        {
            EnsureArgument.NotNull(hostProviderRegistry, nameof(hostProviderRegistry));

            _hostProviderRegistry = hostProviderRegistry;
        }
 public Application(ICommandContext context)
     : base(context)
 {
     _providerRegistry = new HostProviderRegistry(context);
 }
예제 #10
0
 public StoreCommand(IHostProviderRegistry hostProviderRegistry)
     : base(hostProviderRegistry)
 {
 }