internal MongoDBDatabase(ArmResource options, MongoDBDatabaseData resource) : base(options, resource.Id)
 {
     HasData                     = true;
     _data                       = resource;
     _clientDiagnostics          = new ClientDiagnostics(ClientOptions);
     _mongoDBResourcesRestClient = new MongoDBResourcesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
Пример #2
0
        MongoDBDatabaseResource IOperationSource <MongoDBDatabaseResource> .CreateResult(Response response, CancellationToken cancellationToken)
        {
            using var document = JsonDocument.Parse(response.ContentStream);
            var data = MongoDBDatabaseData.DeserializeMongoDBDatabaseData(document.RootElement);

            return(new MongoDBDatabaseResource(_client, data));
        }
 internal MongoDBDatabaseResource(ArmClient client, MongoDBDatabaseData data) : this(client, data.Id)
 {
     HasData = true;
     _data   = data;
 }
 internal MongoDBDatabase(ArmClient armClient, MongoDBDatabaseData data) : this(armClient, data.Id)
 {
     HasData = true;
     _data   = data;
 }