internal static SmsProviderInfoEntity Create(SmsProvider provider, string countryCode, SmsDeliveryStatus status) { return(new SmsProviderInfoEntity { PartitionKey = GeneratePartitionKey(provider), RowKey = GenerateRowKey(countryCode), Provider = provider.ToString(), CountryCode = countryCode, DeliveredCount = status == SmsDeliveryStatus.Delivered ? 1 : 0, DeliveryFailedCount = status == SmsDeliveryStatus.Failed ? 1 : 0, UnknownCount = status == SmsDeliveryStatus.Unknown ? 1 : 0 }); }
internal static string GeneratePartitionKey(SmsProvider provider) => provider.ToString();