public DrainCommand(IApplicationConfiguration applicationConfiguration, IAccessTokenConfiguration accessTokenConfiguration, TextWriter writer) : base(applicationConfiguration) { _accessToken = accessTokenConfiguration.GetAccessToken(); _restClient = new RestClient(AppHarborBaseUrl); _writer = writer; }
public DeployAppCommand(IApplicationConfiguration applicationConfiguration, IAccessTokenConfiguration accessTokenConfiguration, TextReader reader, TextWriter writer) : base(applicationConfiguration) { _accessToken = accessTokenConfiguration.GetAccessToken(); _restClient = new RestClient("https://packageclient.apphb.com/"); _reader = reader; _writer = writer; _excludedDirectories = new List<string> { ".git", ".hg" }; OptionSet.Add("e|excluded-directory=", "Add excluded directory name", x => _excludedDirectories.Add(x)); }
public LogAppCommand(IApplicationConfiguration applicationConfiguration, IAccessTokenConfiguration accessTokenConfiguration, TextWriter writer) : base(applicationConfiguration) { _accessToken = accessTokenConfiguration.GetAccessToken(); _writer = writer; _restClient = new RestClient(AppHarborBaseUrl); _assignedColors = new Dictionary <string, ConsoleColor>(); OptionSet.Add("t|tail", "Tail log", x => _tail = true); OptionSet.Add("n|num=", "Number of log messages", (int x) => _limit = x); OptionSet.Add("p|process=", "Filter log to this process (case-sensitive)", x => _processFilter = x); OptionSet.Add("s|source=", "Filter log to this source", x => _sourceFilter = x); }
public LogAppCommand(IApplicationConfiguration applicationConfiguration, IAccessTokenConfiguration accessTokenConfiguration, TextWriter writer) : base(applicationConfiguration) { _accessToken = accessTokenConfiguration.GetAccessToken(); _writer = writer; _restClient = new RestClient(AppHarborBaseUrl); _assignedColors = new Dictionary<string, ConsoleColor>(); OptionSet.Add("t|tail", "Tail log", x => _tail = true); OptionSet.Add("n|num=", "Number of log messages", (int x) => _limit = x); OptionSet.Add("p|process=", "Filter log to this process (case-sensitive)", x => _processFilter = x); OptionSet.Add("s|source=", "Filter log to this source", x => _sourceFilter = x); }
public DeployAppCommand(IApplicationConfiguration applicationConfiguration, IAccessTokenConfiguration accessTokenConfiguration, TextReader reader, TextWriter writer) : base(applicationConfiguration) { _accessToken = accessTokenConfiguration.GetAccessToken(); _restClient = new RestClient(PackageClientBaseUrl); _reader = reader; _writer = writer; _sourceDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); OptionSet.Add("source-directory=", "Set source directory", x => _sourceDirectory = new DirectoryInfo(x)); _excludedDirectories = new List<string> { ".git", ".hg" }; OptionSet.Add("e|excluded-directory=", "Add excluded directory name", x => _excludedDirectories.Add(x)); OptionSet.Add("m|message=", "Specify commit message", x => _message = x); }
public DeployAppCommand(IApplicationConfiguration applicationConfiguration, IAccessTokenConfiguration accessTokenConfiguration, TextReader reader, TextWriter writer) : base(applicationConfiguration) { _accessToken = accessTokenConfiguration.GetAccessToken(); _restClient = new RestClient(PackageClientBaseUrl); _reader = reader; _writer = writer; _sourceDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); OptionSet.Add("source-directory=", "Set source directory", x => _sourceDirectory = new DirectoryInfo(x)); _excludedDirectories = new List <string> { ".git", ".hg" }; OptionSet.Add("e|excluded-directory=", "Add excluded directory name", x => _excludedDirectories.Add(x)); OptionSet.Add("m|message=", "Specify commit message", x => _message = x); }
protected override void InnerExecute(string[] arguments) { if (_accessTokenConfiguration.GetAccessToken() != null) { throw new CommandException("You're already logged in. You need to log out (\"logout\") before you can log in again."); } _writer.Write("Username: "******"Password: "******"Successfully logged in as {0}", username); }
public AddDrainCommand(IApplicationConfiguration applicationConfiguration, IAccessTokenConfiguration accessTokenConfiguration) : base(applicationConfiguration) { _accessToken = accessTokenConfiguration.GetAccessToken(); _restClient = new RestClient(AppHarborBaseUrl); }
public RemoveDrainCommand(IApplicationConfiguration applicationConfiguration, IAccessTokenConfiguration accessTokenConfiguration) : base(applicationConfiguration) { _accessToken = accessTokenConfiguration.GetAccessToken(); _restClient = new RestClient(AppHarborBaseUrl); }