<PackageReference Include="Azure.Storage.Blobs" Version="12.25.1" />

DeleteSnapshotsOptionExtensions

using System; namespace Azure.Storage.Blobs.Models { internal static class DeleteSnapshotsOptionExtensions { public static string ToSerialString(this DeleteSnapshotsOption value) { switch (value) { case DeleteSnapshotsOption.IncludeSnapshots: return "include"; case DeleteSnapshotsOption.OnlySnapshots: return "only"; default: throw new ArgumentOutOfRangeException("value", value, "Unknown DeleteSnapshotsOption value."); } } public static DeleteSnapshotsOption ToDeleteSnapshotsOption(this string value) { if (StringComparer.OrdinalIgnoreCase.Equals(value, "include")) return DeleteSnapshotsOption.IncludeSnapshots; if (StringComparer.OrdinalIgnoreCase.Equals(value, "only")) return DeleteSnapshotsOption.OnlySnapshots; throw new ArgumentOutOfRangeException("value", value, "Unknown DeleteSnapshotsOption value."); } } }