You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 31, 2022. It is now read-only.
hi,
could anyone help me to understand how the progress works ?
the pull/push methods can receive a IProgress object.
this object has a report function, but it wants an integer parameter.
i want something like this:
`Dim tProgress As IProgress(Of Integer) = Nothing
Dim tActProgress As Integer = 0
Using tService As SyncService = New SyncService(New AdbSocket(New IPEndPoint(IPAddress.Loopback, AdbClient.AdbServerPort)), tWorkerArgs.QuestDevice)
Using tStream As Stream = File.OpenWrite(tAPKDestFullPath)
tService.Pull(tAPKSourceFullPath, tStream, tProgress, CancellationToken.None)
While tActProgress < 100
tProgress.Report(tActProgress)
SimpleWait(1)
End While
End Using
End Using`
would be nice if anyone could help me
The text was updated successfully, but these errors were encountered:
I don't know much the VB.NET syntax so you gotta convert a bit from C# here but basically you create and initialize an IProgress<T> object, with T as the type of progress (in this case, int - Integer in VB.NET-) and assign a method to the EventHandler.
Then, when you call a method and you give it the IProgress<int>, every time the progress changes, the method you assigned will be called with the progress as a parameter.
Hope this helps!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
hi,
could anyone help me to understand how the progress works ?
the pull/push methods can receive a IProgress object.
this object has a report function, but it wants an integer parameter.
i want something like this:
`Dim tProgress As IProgress(Of Integer) = Nothing
Dim tActProgress As Integer = 0
would be nice if anyone could help me
The text was updated successfully, but these errors were encountered: