protected override async Task <IDataSinkAdapter> CreateAsync(DocumentDbClient client, IDataItemTransformation transformation,
                                                                     IDocumentDbParallelSinkAdapterConfiguration configuration, IEnumerable <string> collectionNames, CancellationToken cancellation)
        {
            var sink = new DocumentDbParallelSinkAdapter(client, transformation, GetInstanceConfiguration(configuration, collectionNames));
            await sink.InitializeAsync();

            return(sink);
        }
コード例 #2
0
        protected override async Task <IDataSinkAdapter> CreateAsync(DocumentDbClient client,
                                                                     IDataItemTransformation transformation, IDocumentDbParallelSinkAdapterConfiguration configuration)
        {
            var sink = new DocumentDbParallelSinkAdapter(client, transformation, GetInstanceConfiguration(configuration));
            await sink.InitializeAsync();

            return(sink);
        }
        protected override async Task <IDataSinkAdapter> CreateAsync(IDataTransferContext context, IDataItemTransformation transformation,
                                                                     IDocumentDbParallelSinkAdapterConfiguration configuration, CancellationToken cancellation)
        {
            if (String.IsNullOrEmpty(configuration.Collection))
            {
                throw Errors.CollectionNameMissing();
            }

            var sink = new DocumentDbParallelSinkAdapter(
                CreateClient(configuration, context, false), transformation,
                GetInstanceConfiguration(configuration));

            await sink.InitializeAsync();

            return(sink);
        }