| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System; |
| | 5 | | using static Azure.Messaging.EventGrid.EventGridPublisherClientOptions; |
| | 6 | |
|
| | 7 | | namespace Azure.Messaging.EventGrid |
| | 8 | | { |
| | 9 | | internal static class ServiceVersionExtensions |
| | 10 | | { |
| | 11 | | internal static string GetVersionString(this ServiceVersion version) |
| | 12 | | { |
| 88 | 13 | | return version switch |
| 88 | 14 | | { |
| 176 | 15 | | ServiceVersion.V2018_01_01 => "2018-01-01", |
| 0 | 16 | | _ => throw new ArgumentException($"Version {version.ToString()} not supported."), |
| 88 | 17 | | }; |
| | 18 | | } |
| | 19 | | } |
| | 20 | | } |