in Microsoft.Azure.WebJobs.Extensions.AzureCosmosDb.Mongo/Binding/CosmosDBMongoBindingAsyncCollector.cs [55:66]
private async Task InitializeCollection(MongoCollectionReference reference)
{
if (reference.createIfNotExists)
{
await MongoUtility.CreateCollectionIfNotExistAsync(reference);
this._logger.LogDebug(Events.OnIntializedCollection, $"Collection {reference.collectionName} created successfully.");
}
var database = reference.client.GetDatabase(reference.databaseName);
// should throw error if _collection not exist and createifnotexists is false
var collection = database.GetCollection<T>(reference.collectionName);
}