Skip to content

Commit 31597a4

Browse files
committed
Standardize list resource name: List<Resource>s
1 parent 5752caf commit 31597a4

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/corelib/Compute/v2_1/ComputeApiBuilder.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ public virtual async Task<TPage> ListServerReferencesAsync<TPage>(Url url, Cance
202202
}
203203

204204
/// <summary />
205-
public virtual async Task<TPage> ListServerDetailsAsync<TPage>(IQueryStringBuilder queryString, CancellationToken cancellationToken = default(CancellationToken))
205+
public virtual async Task<TPage> ListServersAsync<TPage>(IQueryStringBuilder queryString, CancellationToken cancellationToken = default(CancellationToken))
206206
where TPage : IPageBuilder<TPage>, IEnumerable<IServiceResource>
207207
{
208-
Url initialRequestUrl = await BuildListServerDetailsUrlAsync(queryString, cancellationToken);
208+
Url initialRequestUrl = await BuildListServersUrlAsync(queryString, cancellationToken);
209209
return await ListServerReferencesAsync<TPage>(initialRequestUrl, cancellationToken);
210210
}
211211

212212
/// <summary />
213-
public virtual async Task<TPage> ListServerDetailsAsync<TPage>(Url url, CancellationToken cancellationToken)
213+
public virtual async Task<TPage> ListServersAsync<TPage>(Url url, CancellationToken cancellationToken)
214214
where TPage : IPageBuilder<TPage>, IEnumerable<IServiceResource>
215215
{
216216
var results = await url
@@ -220,13 +220,13 @@ public virtual async Task<TPage> ListServerDetailsAsync<TPage>(Url url, Cancella
220220
.SendAsync()
221221
.ReceiveJson<TPage>();
222222

223-
results.SetNextPageHandler(ListServerDetailsAsync<TPage>);
223+
results.SetNextPageHandler(ListServersAsync<TPage>);
224224
results.PropogateOwner(this);
225225
return results;
226226
}
227227

228228
/// <summary />
229-
public virtual async Task<Url> BuildListServerDetailsUrlAsync(IQueryStringBuilder queryString, CancellationToken cancellationToken = default(CancellationToken))
229+
public virtual async Task<Url> BuildListServersUrlAsync(IQueryStringBuilder queryString, CancellationToken cancellationToken = default(CancellationToken))
230230
{
231231
Url endpoint = await UrlBuilder.GetEndpoint(cancellationToken).ConfigureAwait(false);
232232

src/corelib/Compute/v2_1/ComputeService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public ComputeService(IAuthenticationProvider authenticationProvider, string reg
5959
return await _computeApi.ListServerReferencesAsync<ServerReferenceCollection>(options, cancellationToken);
6060
}
6161

62-
/// <inheritdoc cref="ComputeApiBuilder.ListServerDetailsAsync{TPage}(IQueryStringBuilder,CancellationToken)" />
63-
public async Task<IPage<Server>> ListServerDetailsAsync(ServerListOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
62+
/// <inheritdoc cref="ComputeApiBuilder.ListServersAsync{TPage}(IQueryStringBuilder,CancellationToken)" />
63+
public async Task<IPage<Server>> ListServersAsync(ServerListOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
6464
{
65-
return await _computeApi.ListServerDetailsAsync<ServerCollection>(options, cancellationToken);
65+
return await _computeApi.ListServersAsync<ServerCollection>(options, cancellationToken);
6666
}
6767

6868
/// <inheritdoc cref="ComputeApiBuilder.UpdateServerAsync{T}" />

src/corelib/Compute/v2_1/ComputeServiceExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public static IPage<ServerReference> ListServerReferences(this ComputeService se
4242
return service.ListServerReferencesAsync(options).ForceSynchronous();
4343
}
4444

45-
/// <inheritdoc cref="ComputeService.ListServerDetailsAsync" />
46-
public static IPage<Server> ListServerDetails(this ComputeService service, ServerListOptions options = null)
45+
/// <inheritdoc cref="ComputeService.ListServersAsync" />
46+
public static IPage<Server> ListServers(this ComputeService service, ServerListOptions options = null)
4747
{
48-
return service.ListServerDetailsAsync(options).ForceSynchronous();
48+
return service.ListServersAsync(options).ForceSynchronous();
4949
}
5050

5151
/// <inheritdoc cref="ComputeService.UpdateServerAsync" />

src/testing/integration/Compute/v2_1/ServerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ public async Task FindServersTest()
114114
}
115115

116116
[Fact]
117-
public async Task ListServerDetailsTest()
117+
public async Task ListServersTest()
118118
{
119-
var results = await _compute.ListServerDetailsAsync(new ServerListOptions { PageSize = 1 });
119+
var results = await _compute.ListServersAsync(new ServerListOptions { PageSize = 1 });
120120

121121
while (results.Any())
122122
{

0 commit comments

Comments
 (0)