Azure-cosmos-dotnet-v3: Provide a mechanism to fully initialize the clients

Created on 26 Jun 2020  路  5Comments  路  Source: Azure/azure-cosmos-dotnet-v3

Provide a mechanism to initialize the client fully at start-up time.

Current work-around:
Do any dummy operation forcing the initialization.

API_REVIEW

Most helpful comment

What about adding a static create method? This way it prevents people from calling the OpenAsync multiple calls like in v2, and it would be more obvious then having a random method on the client.

c# CosmosClient client = await CosmosClient.CreateAsync( string endpoint, string key, ClientOptions options);

All 5 comments

What about adding a static create method? This way it prevents people from calling the OpenAsync multiple calls like in v2, and it would be more obvious then having a random method on the client.

c# CosmosClient client = await CosmosClient.CreateAsync( string endpoint, string key, ClientOptions options);

I like it - but i would prefer a method name like CreateAndInitializeAsync - or CreateAndWarmUpAsync etc.

I agree that would be a better method name. I prefer CreateAndInitializeAsync.

Async CTOR's would have been really awesome!

Thoughts on how to enable API/scenario reviews in open-way. I.e. enable community also participate?

Created #1706 to cover wider scenarios and alternatives, discussion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miiitch picture miiitch  路  5Comments

Liversage picture Liversage  路  7Comments

j82w picture j82w  路  4Comments

kirankumarkolli picture kirankumarkolli  路  7Comments

lukasz-pyrzyk picture lukasz-pyrzyk  路  3Comments