AppHarbor.Commands.CreateAppCommand.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("An application name must be provided to create an application");
            }

            var result = _appHarborClient.CreateApplication(arguments.First(), _region);

            _textWriter.WriteLine("Created application \"{0}\" | URL: https://{0}.apphb.com", result.Id);
            _textWriter.WriteLine("");

            try
            {
                _textWriter.WriteLine("This directory is already configured to track application \"{0}\".",
                    _applicationConfiguration.GetApplicationId());
            }
            catch (ApplicationConfigurationException)
            {
                _applicationConfiguration.SetupApplication(result.Id, _appHarborClient.GetUser());
            }
        }