internal ServerAdvisor(ArmResource options, AdvisorData resource) : base(options, resource.Id)
 {
     HasData                   = true;
     _data                     = resource;
     _clientDiagnostics        = new ClientDiagnostics(ClientOptions);
     _serverAdvisorsRestClient = new ServerAdvisorsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
예제 #2
0
        internal ServerAdvisor(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _serverAdvisorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, DiagnosticOptions);
            TryGetApiVersion(ResourceType, out string serverAdvisorApiVersion);
            _serverAdvisorRestClient = new ServerAdvisorsRestOperations(Pipeline, DiagnosticOptions.ApplicationId, BaseUri, serverAdvisorApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
예제 #3
0
        internal ServerAdvisorCollection(ArmResource parent) : base(parent)
        {
            _serverAdvisorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ServerAdvisor.ResourceType.Namespace, DiagnosticOptions);
            ArmClient.TryGetApiVersion(ServerAdvisor.ResourceType, out string serverAdvisorApiVersion);
            _serverAdvisorRestClient = new ServerAdvisorsRestOperations(_serverAdvisorClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, serverAdvisorApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
 internal ServerAdvisor(ArmClientOptions clientOptions, TokenCredential credential, Uri uri, HttpPipeline pipeline, ResourceIdentifier id) : base(clientOptions, credential, uri, pipeline, id)
 {
     _clientDiagnostics        = new ClientDiagnostics(ClientOptions);
     _serverAdvisorsRestClient = new ServerAdvisorsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal ServerAdvisor(ArmResource options, ResourceIdentifier id) : base(options, id)
 {
     _clientDiagnostics        = new ClientDiagnostics(ClientOptions);
     _serverAdvisorsRestClient = new ServerAdvisorsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal ServerAdvisorCollection(ArmResource parent) : base(parent)
 {
     _clientDiagnostics        = new ClientDiagnostics(ClientOptions);
     _serverAdvisorsRestClient = new ServerAdvisorsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }