internal static string ToSerializedValue(this KeyVaultSecretStatus value) { switch( value ) { case KeyVaultSecretStatus.Initialized: return "Initialized"; case KeyVaultSecretStatus.WaitingOnCertificateOrder: return "WaitingOnCertificateOrder"; case KeyVaultSecretStatus.Succeeded: return "Succeeded"; case KeyVaultSecretStatus.CertificateOrderFailed: return "CertificateOrderFailed"; case KeyVaultSecretStatus.OperationNotPermittedOnKeyVault: return "OperationNotPermittedOnKeyVault"; case KeyVaultSecretStatus.AzureServiceUnauthorizedToAccessKeyVault: return "AzureServiceUnauthorizedToAccessKeyVault"; case KeyVaultSecretStatus.KeyVaultDoesNotExist: return "KeyVaultDoesNotExist"; case KeyVaultSecretStatus.KeyVaultSecretDoesNotExist: return "KeyVaultSecretDoesNotExist"; case KeyVaultSecretStatus.UnknownError: return "UnknownError"; case KeyVaultSecretStatus.ExternalPrivateKey: return "ExternalPrivateKey"; case KeyVaultSecretStatus.Unknown: return "Unknown"; } return null; }
public static string ToSerialString(this KeyVaultSecretStatus value) => value switch {
/// <summary> /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider" /// /> and <see cref="ignoreCase" /> /// </summary> /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param> /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param> /// <param name="formatProvider">not used by this TypeConverter.</param> /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param> /// <returns> /// an instance of <see cref="KeyVaultSecretStatus" />, or <c>null</c> if there is no suitable conversion. /// </returns> public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => KeyVaultSecretStatus.CreateFrom(sourceValue);