Skip to content

Commit

Permalink
Cosmetic code changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kundadebdatta committed Feb 6, 2024
1 parent 5a39ba3 commit 65b9b44
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Microsoft.Azure.Cosmos/src/Routing/GlobalEndpointManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private class GetAccountPropertiesHelper : IDisposable
{
private readonly CancellationTokenSource CancellationTokenSource;
private readonly Uri DefaultEndpoint;
private readonly bool ShouldVisitGlobalEndpointOnly;
private readonly bool LimitToGlobalEndpointOnly;
private readonly IEnumerator<Uri> ServiceEndpointEnumerator;
private readonly Func<Uri, Task<AccountProperties>> GetDatabaseAccountFn;
private readonly List<Exception> TransientExceptions = new List<Exception>();
Expand All @@ -155,7 +155,7 @@ public GetAccountPropertiesHelper(
CancellationToken cancellationToken)
{
this.DefaultEndpoint = defaultEndpoint;
this.ShouldVisitGlobalEndpointOnly = (locations == null || locations.Count == 0) && (accountInitializationCustomEndpoints == null || accountInitializationCustomEndpoints.Count == 0);
this.LimitToGlobalEndpointOnly = (locations == null || locations.Count == 0) && (accountInitializationCustomEndpoints == null || accountInitializationCustomEndpoints.Count == 0);
this.GetDatabaseAccountFn = getDatabaseAccountFn;
this.CancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
this.ServiceEndpointEnumerator = GetAccountPropertiesHelper
Expand All @@ -169,7 +169,7 @@ public GetAccountPropertiesHelper(
public async Task<AccountProperties> GetAccountPropertiesAsync()
{
// If there are no preferred regions or private endpoints, then just wait for the global endpoint results
if (this.ShouldVisitGlobalEndpointOnly)
if (this.LimitToGlobalEndpointOnly)
{
return await this.GetOnlyGlobalEndpointAsync();
}
Expand Down Expand Up @@ -229,7 +229,7 @@ public async Task<AccountProperties> GetAccountPropertiesAsync()

private async Task<AccountProperties> GetOnlyGlobalEndpointAsync()
{
if (!this.ShouldVisitGlobalEndpointOnly)
if (!this.LimitToGlobalEndpointOnly)
{
throw new ArgumentException("GetOnlyGlobalEndpointAsync should only be called if there are no other private endpoints or regions");
}
Expand Down

0 comments on commit 65b9b44

Please sign in to comment.