Skip to content

Commit

Permalink
use const
Browse files Browse the repository at this point in the history
  • Loading branch information
jfullerton44 committed Oct 17, 2023
1 parent c02fae1 commit d06efcc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cs/src/Management/TunnelManagementClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ public class TunnelManagementClient : ITunnelManagementClient
"2023-09-27-preview"
};


/// <summary>
/// ApiVersion that will be used if one is not specified
/// </summary>
public const string DefaultApiVersion = "2023-09-27-preview";

private static readonly ProductInfoHeaderValue TunnelSdkUserAgent =
TunnelUserAgent.GetUserAgent(typeof(TunnelManagementClient).Assembly, "Dev-Tunnels-Service-CSharp-SDK")!;
Expand All @@ -91,7 +94,7 @@ public class TunnelManagementClient : ITunnelManagementClient
public TunnelManagementClient(
ProductInfoHeaderValue userAgent,
Func<Task<AuthenticationHeaderValue?>>? userTokenCallback = null,
string apiVersion = "2023-09-27-preview")
string apiVersion = DefaultApiVersion)
: this(new[] { userAgent }, userTokenCallback, tunnelServiceUri: null, httpHandler: null, apiVersion)
{
}
Expand All @@ -112,7 +115,7 @@ public TunnelManagementClient(
public TunnelManagementClient(
ProductInfoHeaderValue[] userAgents,
Func<Task<AuthenticationHeaderValue?>>? userTokenCallback = null,
string apiVersion = "2023-09-27-preview")
string apiVersion = DefaultApiVersion)
: this(userAgents, userTokenCallback, tunnelServiceUri: null, httpHandler: null, apiVersion)
{
}
Expand Down Expand Up @@ -140,7 +143,7 @@ public TunnelManagementClient(
Func<Task<AuthenticationHeaderValue?>>? userTokenCallback = null,
Uri? tunnelServiceUri = null,
HttpMessageHandler? httpHandler = null,
string apiVersion = "2023-09-27-preview")
string apiVersion = DefaultApiVersion)
: this(new[] { userAgent }, userTokenCallback, tunnelServiceUri, httpHandler, apiVersion)
{
}
Expand Down Expand Up @@ -170,7 +173,7 @@ public TunnelManagementClient(
Func<Task<AuthenticationHeaderValue?>>? userTokenCallback = null,
Uri? tunnelServiceUri = null,
HttpMessageHandler? httpHandler = null,
string apiVersion = "2023-09-27-preview")
string apiVersion = DefaultApiVersion)
{
Requires.NotNullEmptyOrNullElements(userAgents, nameof(userAgents));
UserAgents = Requires.NotNull(userAgents, nameof(userAgents));
Expand Down

0 comments on commit d06efcc

Please sign in to comment.