Exemplo n.º 1
0
        private DeploymentProfile CreateNew(string profileName, string username, ProjectMetadata metadata)
        {
            Console.WriteLine(Resources.CreatingProfile, profileName);
            Console.WriteLine(Resources.InformationPrompt);
            var settings = new CustomizableSettings();
            var profile  = new DeploymentProfile(profileName, settings);

            if (string.IsNullOrWhiteSpace(username))
            {
                username = PromptRemoteUsername();
            }

            FillWithDefaults(username, metadata, settings);
            Fill(settings);
            return(profile);
        }
Exemplo n.º 2
0
 public void AddOrUpdate(DeploymentProfile profile)
 {
     dict[profile.Name] = profile.Settings;
     Save();
 }
Exemplo n.º 3
0
 private void UpdateExisting(string profileName, DeploymentProfile profile)
 {
     Console.WriteLine(Resources.UpdatingProfile, profileName);
     Console.WriteLine(Resources.InformationPrompt);
     Fill(profile.Settings);
 }
Exemplo n.º 4
0
        public DeploymentProfile Configure(string profileName, ProjectMetadata metadata, string username, DeploymentProfile profile = null)
        {
            if (profile != null)
            {
                UpdateExisting(profileName, profile);
            }
            else
            {
                profile = CreateNew(profileName, username, metadata);
            }

            return(profile);
        }