public static DeploymentBaseOptions GetDestinationOptions(WebDeploySettings settings) { var options = new DeploymentBaseOptions(); options.AuthenticationType = "basic"; options.ComputerName = settings.PublishUrl; options.UserName = settings.Username; options.Password = settings.Password; options.RetryAttempts = settings.RetryAttempts ?? default; options.RetryInterval = settings.RetryInterval ?? default; return(options); }
public static DeploymentSyncOptions GetSyncOptions(WebDeploySettings settings) { var options = new DeploymentSyncOptions(); options.DoNotDelete = settings.EnableDoNotDeleteRule ?? false; options.WhatIf = settings.ShowWhatIf ?? false; if (settings.EnableAppOfflineRule ?? false) { var appOfflineRule = GetRuleByName("AppOffline"); options.Rules.Add(appOfflineRule); } // TODO MORE RULES return(options); }
private static void AppendCustomParameters(WebDeploySettings settings, DeploymentObject deploymentObject) { if (settings.Parameters != null) { foreach (var kv in settings.Parameters) { if (deploymentObject.SyncParameters.Contains(kv.Key)) { deploymentObject.SyncParameters[kv.Key].Value = kv.Value; } else { deploymentObject.SyncParameters.Add(new DeploymentSyncParameter(kv.Key, kv.Key, "", "") { Value = kv.Value }); } } } }
public static WebDeploySettings ResetWrapAppOffline(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.WrapAppOffline = null; return(toolSettings); }
public static WebDeploySettings DisableWrapAppOffline(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.WrapAppOffline = false; return(toolSettings); }
public static WebDeploySettings ToggleEnableAppOfflineRule(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.EnableAppOfflineRule = !toolSettings.EnableAppOfflineRule; return(toolSettings); }
public static WebDeploySettings ResetShowWhatIf(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.ShowWhatIf = null; return(toolSettings); }
public static WebDeploySettings ClearParameters(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.ParametersInternal.Clear(); return(toolSettings); }
public static WebDeploySettings RemoveParameter(this WebDeploySettings toolSettings, string parameterKey) { toolSettings = toolSettings.NewInstance(); toolSettings.ParametersInternal.Remove(parameterKey); return(toolSettings); }
public static WebDeploySettings ResetSourcePath(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.SourcePath = null; return(toolSettings); }
public static WebDeploySettings ResetAppOfflineHtmlTemplate(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.AppOfflineHtmlTemplate = null; return(toolSettings); }
public static WebDeploySettings ResetSiteName(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.SiteName = null; return(toolSettings); }
public static WebDeploySettings SetSourcePath(this WebDeploySettings toolSettings, string sourcePath) { toolSettings = toolSettings.NewInstance(); toolSettings.SourcePath = sourcePath; return(toolSettings); }
public static WebDeploySettings SetSiteName(this WebDeploySettings toolSettings, string siteName) { toolSettings = toolSettings.NewInstance(); toolSettings.SiteName = siteName; return(toolSettings); }
public static WebDeploySettings ToggleShowWhatIf(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.ShowWhatIf = !toolSettings.ShowWhatIf; return(toolSettings); }
public static WebDeploySettings DisableShowWhatIf(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.ShowWhatIf = false; return(toolSettings); }
public static WebDeploySettings ToggleWrapAppOffline(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.WrapAppOffline = !toolSettings.WrapAppOffline; return(toolSettings); }
public static WebDeploySettings SetRetryAttempts(this WebDeploySettings toolSettings, int?retryAttempts) { toolSettings = toolSettings.NewInstance(); toolSettings.RetryAttempts = retryAttempts; return(toolSettings); }
public static WebDeploySettings SetAppOfflineHtmlTemplate(this WebDeploySettings toolSettings, string appOfflineHtmlTemplate) { toolSettings = toolSettings.NewInstance(); toolSettings.AppOfflineHtmlTemplate = appOfflineHtmlTemplate; return(toolSettings); }
public static WebDeploySettings ResetRetryAttempts(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.RetryAttempts = null; return(toolSettings); }
public static WebDeploySettings SetParameters(this WebDeploySettings toolSettings, IDictionary <string, string> parameters) { toolSettings = toolSettings.NewInstance(); toolSettings.ParametersInternal = parameters.ToDictionary(x => x.Key, x => x.Value, StringComparer.OrdinalIgnoreCase); return(toolSettings); }
public static WebDeploySettings SetRetryInterval(this WebDeploySettings toolSettings, int?retryInterval) { toolSettings = toolSettings.NewInstance(); toolSettings.RetryInterval = retryInterval; return(toolSettings); }
public static WebDeploySettings AddParameter(this WebDeploySettings toolSettings, string parameterKey, string parameterValue) { toolSettings = toolSettings.NewInstance(); toolSettings.ParametersInternal.Add(parameterKey, parameterValue); return(toolSettings); }
public AppOfflineWrapper(WebDeploySettings settings) { _settings = settings; CreateAppOffline(); }
public static WebDeploySettings SetParameter(this WebDeploySettings toolSettings, string parameterKey, string parameterValue) { toolSettings = toolSettings.NewInstance(); toolSettings.ParametersInternal[parameterKey] = parameterValue; return(toolSettings); }
public static WebDeploySettings ResetEnableAppOfflineRule(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.EnableAppOfflineRule = null; return(toolSettings); }
public static WebDeploySettings ResetRetryInterval(this WebDeploySettings toolSettings) { toolSettings = toolSettings.NewInstance(); toolSettings.RetryInterval = null; return(toolSettings); }
public static WebDeploySettings SetShowWhatIf(this WebDeploySettings toolSettings, bool?showWhatIf) { toolSettings = toolSettings.NewInstance(); toolSettings.ShowWhatIf = showWhatIf; return(toolSettings); }
public static WebDeploySettings SetWrapAppOffline(this WebDeploySettings toolSettings, bool?wrapAppOffline) { toolSettings = toolSettings.NewInstance(); toolSettings.WrapAppOffline = wrapAppOffline; return(toolSettings); }
public static WebDeploySettings SetEnableAppOfflineRule(this WebDeploySettings toolSettings, bool?enableAppOfflineRule) { toolSettings = toolSettings.NewInstance(); toolSettings.EnableAppOfflineRule = enableAppOfflineRule; return(toolSettings); }