Esempio n. 1
0
        /// <summary>
        /// Creates a custom value for DiskSkuTypes.
        /// </summary>
        /// <param name="value">the custom value</param>
        public DiskSkuTypes(DiskStorageAccountTypes value)
        {
            if (ValuesByName == null)
            {
                ValuesByName = new Dictionary <string, DiskSkuTypes>();
            }

            ValuesByName[value.ToString().ToLower()] = this;
            this.value = value;
        }
Esempio n. 2
0
        /// <summary>
        /// Parses a disk SKU type from a storage account type.
        /// </summary>
        /// <param name="value">a storage account type</param>
        /// <returns>a disk SKU type</returns>
        public static DiskSkuTypes FromStorageAccountType(DiskStorageAccountTypes value)
        {
            DiskSkuTypes result;

            if (ValuesByName == null)
            {
                return(new DiskSkuTypes(value));
            }
            else if (ValuesByName.TryGetValue(value.ToString().ToLower(), out result))
            {
                return(result);
            }
            else
            {
                return(new DiskSkuTypes(value));
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the DiskSku class.
 /// </summary>
 /// <param name="name">The sku name. Possible values include:
 /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS',
 /// 'UltraSSD_LRS'</param>
 /// <param name="tier">The sku tier.</param>
 public DiskSku(DiskStorageAccountTypes name = default(DiskStorageAccountTypes), string tier = default(string))
 {
     Name = name;
     Tier = tier;
     CustomInit();
 }