public GFUTaskProgress(GFUTaskProgress other) { _percentComplete = other.PercentComplete; _message = other.Message; _state = other.State; _exception = other.Exception; }
public GFUTaskProgress(GFUTaskState state) { _percentComplete = 0; _message = String.Empty; _exception = null; _state = GFUTaskState.Pending; State = state; }
public GFUTaskProgress(int pct, string msg = null, GFUTaskState state = GFUTaskState.Pending) { _percentComplete = 0; _message = String.Empty; _state = GFUTaskState.Pending; _exception = null; PercentComplete = pct; Message = msg?.Trim() ?? ""; State = state; Exception = null; }
public GFUTaskProgress(Exception ex, int pct = -1) { _percentComplete = 0; _message = String.Empty; _state = GFUTaskState.Pending; _exception = null; PercentComplete = pct; Exception = ex; Message = ex?.Message?.Trim() ?? ""; State = ex != null ? GFUTaskState.Failed : GFUTaskState.Unspecified; }