Merge branch 'feature/v3' into network-interface-sample
This commit is contained in:
Коммит
cb2be3ff13
|
@ -14,15 +14,15 @@ using Azure.Storage.Management.Models;
|
||||||
|
|
||||||
namespace Azure.Storage.Management
|
namespace Azure.Storage.Management
|
||||||
{
|
{
|
||||||
public partial class Client
|
public partial class OperationsClient
|
||||||
{
|
{
|
||||||
private readonly ClientDiagnostics clientDiagnostics;
|
private readonly ClientDiagnostics clientDiagnostics;
|
||||||
private readonly HttpPipeline pipeline;
|
private readonly HttpPipeline pipeline;
|
||||||
internal RestClient RestClient { get; }
|
internal OperationsRestClient RestClient { get; }
|
||||||
/// <summary> Initializes a new instance of Client. </summary>
|
/// <summary> Initializes a new instance of OperationsClient. </summary>
|
||||||
internal Client(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string host = "https://management.azure.com", string ApiVersion = "2019-06-01")
|
internal OperationsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string host = "https://management.azure.com", string ApiVersion = "2019-06-01")
|
||||||
{
|
{
|
||||||
RestClient = new RestClient(clientDiagnostics, pipeline, host, ApiVersion);
|
RestClient = new OperationsRestClient(clientDiagnostics, pipeline, host, ApiVersion);
|
||||||
this.clientDiagnostics = clientDiagnostics;
|
this.clientDiagnostics = clientDiagnostics;
|
||||||
this.pipeline = pipeline;
|
this.pipeline = pipeline;
|
||||||
}
|
}
|
|
@ -16,14 +16,14 @@ using Azure.Storage.Management.Models;
|
||||||
|
|
||||||
namespace Azure.Storage.Management
|
namespace Azure.Storage.Management
|
||||||
{
|
{
|
||||||
internal partial class RestClient
|
internal partial class OperationsRestClient
|
||||||
{
|
{
|
||||||
private string host;
|
private string host;
|
||||||
private string ApiVersion;
|
private string ApiVersion;
|
||||||
private ClientDiagnostics clientDiagnostics;
|
private ClientDiagnostics clientDiagnostics;
|
||||||
private HttpPipeline pipeline;
|
private HttpPipeline pipeline;
|
||||||
/// <summary> Initializes a new instance of RestClient. </summary>
|
/// <summary> Initializes a new instance of OperationsRestClient. </summary>
|
||||||
public RestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string host = "https://management.azure.com", string ApiVersion = "2019-06-01")
|
public OperationsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string host = "https://management.azure.com", string ApiVersion = "2019-06-01")
|
||||||
{
|
{
|
||||||
if (host == null)
|
if (host == null)
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ namespace Azure.Storage.Management
|
||||||
/// <param name="cancellationToken"> The cancellation token to use. </param>
|
/// <param name="cancellationToken"> The cancellation token to use. </param>
|
||||||
public async ValueTask<Response<OperationListResult>> ListAsync(CancellationToken cancellationToken = default)
|
public async ValueTask<Response<OperationListResult>> ListAsync(CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
using var scope = clientDiagnostics.CreateScope("Client.List");
|
using var scope = clientDiagnostics.CreateScope("OperationsClient.List");
|
||||||
scope.Start();
|
scope.Start();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,7 @@ namespace Azure.Storage.Management
|
||||||
/// <param name="cancellationToken"> The cancellation token to use. </param>
|
/// <param name="cancellationToken"> The cancellation token to use. </param>
|
||||||
public Response<OperationListResult> List(CancellationToken cancellationToken = default)
|
public Response<OperationListResult> List(CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
using var scope = clientDiagnostics.CreateScope("Client.List");
|
using var scope = clientDiagnostics.CreateScope("OperationsClient.List");
|
||||||
scope.Start();
|
scope.Start();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -127,7 +127,7 @@ namespace Azure.Storage.Management
|
||||||
throw new ArgumentNullException(nameof(nextLink));
|
throw new ArgumentNullException(nameof(nextLink));
|
||||||
}
|
}
|
||||||
|
|
||||||
using var scope = clientDiagnostics.CreateScope("Client.List");
|
using var scope = clientDiagnostics.CreateScope("OperationsClient.List");
|
||||||
scope.Start();
|
scope.Start();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -161,7 +161,7 @@ namespace Azure.Storage.Management
|
||||||
throw new ArgumentNullException(nameof(nextLink));
|
throw new ArgumentNullException(nameof(nextLink));
|
||||||
}
|
}
|
||||||
|
|
||||||
using var scope = clientDiagnostics.CreateScope("Client.List");
|
using var scope = clientDiagnostics.CreateScope("OperationsClient.List");
|
||||||
scope.Start();
|
scope.Start();
|
||||||
try
|
try
|
||||||
{
|
{
|
|
@ -161,7 +161,7 @@ namespace AutoRest.CSharp.V3.Output.Builders
|
||||||
name = string.IsNullOrEmpty(name) ? "Service" : name.ToCleanName();
|
name = string.IsNullOrEmpty(name) ? "Service" : name.ToCleanName();
|
||||||
|
|
||||||
var operationsSuffix = "Operations";
|
var operationsSuffix = "Operations";
|
||||||
if (name.EndsWith(operationsSuffix))
|
if (name.EndsWith(operationsSuffix) && name.Length > operationsSuffix.Length)
|
||||||
{
|
{
|
||||||
name = name.Substring(0, name.Length - operationsSuffix.Length);
|
name = name.Substring(0, name.Length - operationsSuffix.Length);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче