sparse-intern-71089
06/09/2021, 12:10 PMtall-librarian-49374
06/09/2021, 12:14 PMtall-librarian-49374
06/09/2021, 12:14 PMSkuName.Standard
mysterious-australia-14256
06/09/2021, 1:21 PMmysterious-australia-14256
06/09/2021, 4:20 PM[EnumType]
public readonly struct SkuName : IEquatable<SkuName>
{
public static SkuName Basic { get; }
public static SkuName Standard { get; }
public static SkuName Premium { get; }
If I try to use Enum.Parse on this I get back an error saying "Type provided must be an Enum.".
Do you know how I can convert the string "Standard" stored in a config file into something that SBSkuArgs will accept as a value for Name or Tier?
I was trying
(SkuName)Enum.Parse(typeof(SkuName), "Standard")
mysterious-australia-14256
06/10/2021, 10:53 AMTier = (SkuTier)(typeof(SkuTier).GetProperty(configTier )?.GetValue(null))!,
but is is a lot uglier than the AzureNextGen version which was simply
Tier = configTier
tall-librarian-49374
06/10/2021, 11:50 AMmysterious-australia-14256
06/10/2021, 12:12 PM