static void callback(HttpProcessData processPercent) { if (processPercent.ProgressPercentage == 40) { tokenSource.Cancel(); } }
override public void callback(HttpProcessData httpProcessData) { factory.StartNew((stateobj) => { HttpProcessData data = (HttpProcessData)stateobj; Percent = data.ProgressPercentage; Size = data.TotalBytes; ProcessSize = data.BytesTransferred; }, httpProcessData); }
override public void callback(HttpProcessData httpProcessData) { if (httpProcessData.ProgressPercentage == 100) { factory.StartNew((stateobj) => { HttpProcessData data = (HttpProcessData)stateobj; ProcessSize += (long)data.TotalBytes; Percent = (int)(1.0 * ProcessSize / Size * 100); }, httpProcessData); } }
public abstract void callback(HttpProcessData httpProcessData);