Exemple #1
0
        IEnumerator CreateNewPackageAsync()
        {
            var userInput = _view.PromptForInput("Enter new package name:", "Untitled");

            yield return(userInput);

            if (userInput.Current == null)
            {
                // User Cancelled
                yield break;
            }

            var packageName = userInput.Current;
            var packageDir  = PrjPathVars.Expand(Path.Combine(_model.GetCurrentPackageFolderPath(), packageName));

            Log.Debug("Creating new package directory at '{0}'", packageDir);
            Directory.CreateDirectory(packageDir);

            yield return(_packageHandler.RefreshPackagesAsync());
        }