Exemple #1
0
 public GFUTaskProgress(GFUTaskProgress other)
 {
     _percentComplete = other.PercentComplete;
     _message         = other.Message;
     _state           = other.State;
     _exception       = other.Exception;
 }
Exemple #2
0
 public GFUTaskProgress(GFUTaskState state)
 {
     _percentComplete = 0;
     _message         = String.Empty;
     _exception       = null;
     _state           = GFUTaskState.Pending;
     State            = state;
 }
Exemple #3
0
 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;
 }
Exemple #4
0
 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;
 }