Ejemplo n.º 1
0
        public override async Task Between(SmugglerBetweenOptions<FilesConnectionStringOptions> betweenOptions)
        {
            if (betweenOptions.From == null)
                throw new ArgumentNullException("betweenOptions.From");

            if (betweenOptions.To == null)
                throw new ArgumentNullException("betweenOptions.To");            

            using (primaryStore = await CreateStore(betweenOptions.From))
            using (secondaryStore = await CreateStore(betweenOptions.To))
            using (documentStore = CreateDocumentStore(betweenOptions.To))
            {
                Operations = new SmugglerBetweenRemoteFilesOperations(() => primaryStore, () => secondaryStore, () => documentStore);

                await base.Between(betweenOptions);
            }              
        }
Ejemplo n.º 2
0
        public override async Task Between(SmugglerBetweenOptions <FilesConnectionStringOptions> betweenOptions)
        {
            if (betweenOptions.From == null)
            {
                throw new ArgumentNullException("betweenOptions.From");
            }

            if (betweenOptions.To == null)
            {
                throw new ArgumentNullException("betweenOptions.To");
            }

            using (primaryStore = await CreateStore(betweenOptions.From))
                using (secondaryStore = await CreateStore(betweenOptions.To))
                    using (documentStore = CreateDocumentStore(betweenOptions.To))
                    {
                        Operations = new SmugglerBetweenRemoteFilesOperations(() => primaryStore, () => secondaryStore, () => documentStore);

                        await base.Between(betweenOptions);
                    }
        }