コード例 #1
0
        public async Task <String> ExportInventoryAsync(IApiContext apiContext, Product product, IList <LocationInventory> locations)
        {
            await product.FillProductLocalizedImages(apiContext);

            var inventoryExportXml = product.BuildInventoryExportMessageAsync(ProviderCode, XRefMerchantId, locations);
            var client             = new InventoryImport_wrapService {
                Url = _inventoryImportServiceUrl
            };
            var result = await ExportInventoryAsyncTask(client, inventoryExportXml);

            return(result.Result);
        }
コード例 #2
0
        Task <InventoryImportService.acceptCompletedEventArgs> ExportInventoryAsyncTask(InventoryImport_wrapService client, string exportXml)
        {
            var tcs = new TaskCompletionSource <InventoryImportService.acceptCompletedEventArgs>();

            client.acceptCompleted += (sender, e) => TransferCompletion(tcs, e, () => e);
            client.acceptAsync(exportXml, ServiceUsername, ServicePassword);
            return(tcs.Task);
        }