Skip to content

Commit 894840b

Browse files
committed
Enable UseInternalUrl in Networking
1 parent 00cef99 commit 894840b

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/corelib/Networking/v2/NetworkingApiBuilder.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ public class NetworkingApiBuilder
3030
/// <param name="serviceType">The service type for the desired networking provider.</param>
3131
/// <param name="authenticationProvider">The authentication provider.</param>
3232
/// <param name="region">The region.</param>
33-
public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider authenticationProvider, string region)
33+
/// <param name="useInternalUrl">if set to <c>true</c> uses the internal URLs specified in the ServiceCatalog, otherwise the public URLs are used.</param>
34+
public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider authenticationProvider, string region, bool useInternalUrl)
3435
{
3536
if(serviceType == null)
3637
throw new ArgumentNullException("serviceType");
@@ -40,7 +41,7 @@ public NetworkingApiBuilder(IServiceType serviceType, IAuthenticationProvider au
4041
throw new ArgumentException("region cannot be null or empty", "region");
4142

4243
AuthenticationProvider = authenticationProvider;
43-
Endpoint = new ServiceEndpoint(serviceType, authenticationProvider, region);
44+
Endpoint = new ServiceEndpoint(serviceType, authenticationProvider, region, useInternalUrl);
4445
}
4546

4647
#region Networks

src/corelib/Networking/v2/NetworkingService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ public class NetworkingService
2222
/// </summary>
2323
/// <param name="authenticationProvider">The authentication provider.</param>
2424
/// <param name="region">The region.</param>
25-
public NetworkingService(IAuthenticationProvider authenticationProvider, string region)
25+
/// <param name="useInternalUrl">if set to <c>true</c> uses the internal URLs specified in the ServiceCatalog, otherwise the public URLs are used.</param>
26+
public NetworkingService(IAuthenticationProvider authenticationProvider, string region, bool useInternalUrl = false)
2627
{
27-
_networkingApiBuilder = new NetworkingApiBuilder(ServiceType.Networking, authenticationProvider, region);
28+
_networkingApiBuilder = new NetworkingApiBuilder(ServiceType.Networking, authenticationProvider, region, useInternalUrl);
2829
}
2930

3031
#region Networks

0 commit comments

Comments
 (0)