Skip to content

Commit

Permalink
5584
Browse files Browse the repository at this point in the history
  • Loading branch information
bquantump committed Mar 1, 2021
1 parent 2226745 commit 3b55384
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions sdk/resourcemanager/Proto.Client/network/SubnetContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public SubnetBuilder Construct(string subnetCidr, NetworkSecurityGroupData group
/// </summary>
/// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="P:System.Threading.CancellationToken.None" />. </param>
/// <returns> A collection of resource operations that may take multiple service requests to iterate over. </returns>
public Pageable<SubnetOperations> List(CancellationToken cancellationToken = default)
public Pageable<Subnet> List(CancellationToken cancellationToken = default)
{
return new PhWrappingPageable<Azure.ResourceManager.Network.Models.Subnet, SubnetOperations>(
return new PhWrappingPageable<Azure.ResourceManager.Network.Models.Subnet, Subnet>(
Operations.List(Id.ResourceGroup, Id.Name, cancellationToken),
convertor());
}
Expand All @@ -102,9 +102,9 @@ public Pageable<SubnetOperations> List(CancellationToken cancellationToken = def
/// </summary>
/// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="P:System.Threading.CancellationToken.None" />. </param>
/// <returns> An async collection of resource operations that may take multiple service requests to iterate over. </returns>
public AsyncPageable<SubnetOperations> ListAsync(CancellationToken cancellationToken = default)
public AsyncPageable<Subnet> ListAsync(CancellationToken cancellationToken = default)
{
return new PhWrappingAsyncPageable<Azure.ResourceManager.Network.Models.Subnet, SubnetOperations>(
return new PhWrappingAsyncPageable<Azure.ResourceManager.Network.Models.Subnet, Subnet>(
Operations.ListAsync(Id.ResourceGroup, Id.Name, cancellationToken),
convertor());
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/resourcemanager/Proto.Client/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ static void Main(string[] args)
Scenario scenario = null;
try
{
scenario = ScenarioFactory.GetScenario(Scenarios.CreateSingleVmExample);
scenario = ScenarioFactory.GetScenario(Scenarios.GetByContainers);
scenario.Execute();
}
finally
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ public override void Execute()
Debug.Assert(virtualNetwork.Value.Data.Name.Equals(response.Data.Id.Name));
foreach (var subnetResponse in response.GetSubnetContainer().List())
{
var actualSubnet = subnetResponse.Get();
var subnets = response.GetSubnetContainer().Get(actualSubnet.Value.Data.Name);
Debug.Assert(subnets.Value.Data.Name.Equals(actualSubnet.Value.Data.Name));
var subnets = response.GetSubnetContainer().Get(subnetResponse.Data.Name);
Debug.Assert(subnets.Value.Data.Name.Equals(subnetResponse.Data.Name));
}
}
Console.WriteLine("\nDone all asserts passed ...");
Expand Down

0 comments on commit 3b55384

Please sign in to comment.