AppHarbor.Commands.LinkAppCommand.InnerExecute C# (CSharp) Method

InnerExecute() protected method

protected InnerExecute ( string arguments ) : void
arguments string
return void
        protected override void InnerExecute(string[] arguments)
        {
            if (arguments.Length == 0)
            {
                throw new CommandException("Please specify an application id.");
            }

            var user = _appharborClient.GetUser();

            Application application;
            try
            {
                application = _appharborClient.GetApplication(arguments[0]);
            }
            catch (ApiException)
            {
                throw new CommandException("The application could not be found");
            }

            _applicationConfiguration.SetupApplication(application.Slug, user);
        }