private IDataSourceAdapter Create(IDocumentDbSourceAdapterConfiguration configuration, IDataTransferContext context)
        {
            Guard.NotNull("configuration", configuration);

            ValidateBaseConfiguration(configuration);

            var source = new DocumentDbSourceAdapter(
                CreateClient(configuration, context),
                GetDataItemTransformation(configuration),
                GetInstanceConfiguration(configuration));

            source.Initialize();

            return(source);
        }
        public async Task <IDataSourceAdapter> CreateAsync(IDocumentDbSourceAdapterConfiguration configuration, IDataTransferContext context, CancellationToken cancellation)
        {
            Guard.NotNull("configuration", configuration);

            ValidateBaseConfiguration(configuration);

            var source = new DocumentDbSourceAdapter(
                CreateClient(configuration, context, false),
                GetDataItemTransformation(configuration),
                GetInstanceConfiguration(configuration));

            await source.InitializeAsync(cancellation);

            return(source);
        }