/// <summary>
        /// Update patching category enum
        /// </summary>
        /// <param name="category"></param>
        public void UpdatePatchingCategory(string category)
        {
            if (!string.IsNullOrEmpty(category))
            {
                switch (category.ToLower())
                {
                case Important:
                    this.patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Important;
                    break;

                case Optional:
                    this.patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Optional;
                    break;

                default:
                    this.patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Unknown;
                    break;
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Map strings Auto-patching public settings -> Powershell API
        ///      "WindowsMandatoryUpdates" -> "Important"
        ///       "MicrosoftOptionalUpdates" -> "Optional"
        /// </summary>
        /// <param name="patchCategory"></param>
        /// <returns></returns>
        private AzureVMSqlServerAutoPatchingPatchCategoryEnum ResolvePatchCategoryStringforPowerShell(string category)
        {
            AzureVMSqlServerAutoPatchingPatchCategoryEnum patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Important;

            if (!string.IsNullOrEmpty(category))
            {
                switch (category.ToLower())
                {
                case "windowsmandatoryupdates":
                    patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Important;
                    break;

                case "microsoftoptionalupdates":
                    patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Optional;
                    break;

                default:
                    patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Unknown;
                    break;
                }
            }

            return(patchCategory);
        }
        /// <summary>
        /// Update patching category enum
        /// </summary>
        /// <param name="category"></param>
        public void UpdatePatchingCategory(string category)
        {
            if (!string.IsNullOrEmpty(category))
            {
                switch (category.ToLower())
                {
                    case Important:
                        this.patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Important;
                        break;

                    case Optional:
                        this.patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Optional;
                        break;

                    default:
                        this.patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Unknown;
                        break;
                }
            }
        }
 public void UpdatePatchingCategory(AzureVMSqlServerAutoPatchingPatchCategoryEnum category)
 {
     this.patchCategory = category;
 }
 public void UpdatePatchingCategory(AzureVMSqlServerAutoPatchingPatchCategoryEnum category)
 {
     this.patchCategory = category;
 }