예제 #1
0
 public void RemoveError(IAcError error) {
     if (!_errors.Contains(error)) return;
     _errors.Remove(error);
     if (Errors.Count == 0) {
         OnPropertyChanged(nameof(HasErrors));
     }
 }
예제 #2
0
 public void AddError(IAcError error) {
     if (HasError(error.Type) && !IsSeveralAllowed(error.Type)) return;
     _errors.Add(error);
     if (Errors.Count == 1) {
         OnPropertyChanged(nameof(HasErrors));
     }
 }
예제 #3
0
 protected AcErrorWrapper(IAcError baseError)
 {
     Target   = baseError.Target;
     Category = baseError.Category;
     Type     = baseError.Type;
     Message  = baseError.Message;
 }
예제 #4
0
 public void RemoveError(IAcError error)
 {
     if (!_errors.Contains(error))
     {
         return;
     }
     _errors.Remove(error);
     if (Errors.Count == 0)
     {
         OnPropertyChanged(nameof(HasErrors));
         CommandManager.InvalidateRequerySuggested();
     }
 }
예제 #5
0
 public void AddError(IAcError error)
 {
     if (HasError(error.Type) && !IsSeveralAllowed(error.Type))
     {
         return;
     }
     _errors.Add(error);
     if (Errors.Count == 1)
     {
         OnPropertyChanged(nameof(HasErrors));
         CommandManager.InvalidateRequerySuggested();
     }
 }
예제 #6
0
 public AcEventError(KunosCareerEventObject ev, IAcError baseError)
     : base(baseError)
 {
     _ev        = ev;
     _baseError = baseError;
 }
예제 #7
0
 protected AcErrorWrapper(IAcError baseError) {
     Target = baseError.Target;
     Category = baseError.Category;
     Type = baseError.Type;
     Message = baseError.Message;
 }
예제 #8
0
 public override Task Run(IAcError error, IProgress <AsyncProgressEntry> progress, CancellationToken cancellation)
 {
     _action?.Invoke(error);
     return(Task.Delay(0, cancellation));
 }
예제 #9
0
 public override Task Run(IAcError error, IProgress <AsyncProgressEntry> progress, CancellationToken cancellation)
 {
     return(Run(new[] { error }, progress, cancellation));
 }
예제 #10
0
 public override Task Run(IAcError error, IProgress<AsyncProgressEntry> progress, CancellationToken cancellation) {
     return _progressAction != null ? _progressAction(error, cancellation) : _action(error);
 }
예제 #11
0
 public abstract Task Run(IAcError error, IProgress <AsyncProgressEntry> progress, CancellationToken cancellation);
예제 #12
0
 public abstract Task Run(IAcError error, IProgress<AsyncProgressEntry> progress, CancellationToken cancellation);
예제 #13
0
 public override Task Run(IAcError error, IProgress <AsyncProgressEntry> progress, CancellationToken cancellation)
 {
     return(_progressAction != null?_progressAction(error, cancellation) : _action(error));
 }