internal ServerKey(ArmResource options, ServerKeyData resource) : base(options, resource.Id)
 {
     HasData               = true;
     _data                 = resource;
     _clientDiagnostics    = new ClientDiagnostics(ClientOptions);
     _serverKeysRestClient = new ServerKeysRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
Example #2
0
        internal ServerKey(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _serverKeyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, DiagnosticOptions);
            TryGetApiVersion(ResourceType, out string serverKeyApiVersion);
            _serverKeyRestClient = new ServerKeysRestOperations(_serverKeyClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, serverKeyApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
        internal ServerKeyCollection(ArmResource parent) : base(parent)
        {
            _serverKeyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ServerKey.ResourceType.Namespace, DiagnosticOptions);
            ArmClient.TryGetApiVersion(ServerKey.ResourceType, out string serverKeyApiVersion);
            _serverKeyRestClient = new ServerKeysRestOperations(_serverKeyClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, serverKeyApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
 internal ServerKeysOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null)
 {
     RestClient         = new ServerKeysRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
     _clientDiagnostics = clientDiagnostics;
     _pipeline          = pipeline;
 }
Example #5
0
 internal ServerKeyCollection(ArmResource parent) : base(parent)
 {
     _clientDiagnostics    = new ClientDiagnostics(ClientOptions);
     _serverKeysRestClient = new ServerKeysRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal ServerKey(ArmClientOptions clientOptions, TokenCredential credential, Uri uri, HttpPipeline pipeline, ResourceIdentifier id) : base(clientOptions, credential, uri, pipeline, id)
 {
     _clientDiagnostics    = new ClientDiagnostics(ClientOptions);
     _serverKeysRestClient = new ServerKeysRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal ServerKey(ArmResource options, ResourceIdentifier id) : base(options, id)
 {
     _clientDiagnostics    = new ClientDiagnostics(ClientOptions);
     _serverKeysRestClient = new ServerKeysRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }