CheckoutManager DownloadFilesAsync - How to use for downloading large amounts of files?
Hi Community, does anyone of you have sample code for "downloadFilesAsync" C# function? Aras Innovator provides the CheckoutManager to download Files from the Filevault to the server. There are a couple of examples that show how to use "DownloadFiles", but I have found none that shows how to use "DownloadFilesAsync". This piece of code does nothing: [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:9b5f7ba6-bf31-4a4c-941f-e60f5a86d0f9:type=csharp&text=%2F%2F%20Create%20a%20checkout%20manager%20to%20download%20all%20of%20the%20files%20to%20the%20server%0D%0AAras.IOME.CheckoutManager%20cm%20%3D%20new%20Aras.IOME.CheckoutManager%28files%29%3B%0D%0A%2F%2Fcm.DownloadFiles%28filePath%2C%204%29%3B%0D%0Acm.DownloadFilesAsync%28filePath%2C%204%29%3B] When comparing Aras version of "DownloadFileAsync" to regular WebClient DownloadFilesAsync code, I think Async downloads need some additional event handlers. So I tried something like this: [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:c5a0c97b-62fa-48e8-8450-3a2794c8e01e:type=csharp&text=%2F%2F%20Create%20a%20checkout%20manager%20to%20download%20all%20of%20the%20files%20to%20the%20server%0D%0Ausing%28Aras.IOME.CheckoutManager%20cm%20%3D%20new%20Aras.IOME.CheckoutManager%28files%29%29%0D%0A%7B%0D%0A%20%20%20%20%2F%2Fcm.DownloadFiles%28filePath%2C%204%29%3B%0D%0A%20%20%20%20cm.DownloadFilesAsync%28filePath%2C%204%29%3B%0D%0A%20%20%20%20cm.DownloadFileCompleted%20%2B%3D%20DownloadFileCompletedEventHandler%3B%0D%0A%7D%0D%0A%0D%0A%0D%0Areturn%20this%3B%0D%0A%7D%0D%0A%2F%2F%20Handle%20the%20DownloadFileCompleted%20event%0D%0Aprivate%20static%20void%20DownloadFileCompletedEventHandler%28object%20sender%2C%20EventArgs%20e%29%0D%0A%7B] "DownloadFileCompleted" is not listed in the official Aras Innovator 12.0 .NET API Reference. But when using this function I didn´t get an error message in the Method editor, so the Innovator API definitely supports it. But the 2nd sample of course still does nothing. Does anyone know more? Best regards! Angela583Views0likes4Comments