private void ApplyEventArgsChanges(FileSystemVisitorEventArgs args) { switch (args.State) { case FileSystemVisitorEventArgsStates.None: break; case FileSystemVisitorEventArgsStates.StopOnFirstFindedCoincidence: this.action = FileSystemVisitorAction.Interrupt; break; case FileSystemVisitorEventArgsStates.IgnoreThisEntry: this.action = FileSystemVisitorAction.Ignore; break; default: throw new ArgumentOutOfRangeException(nameof(args.State), args.State, "FileSystemVisitorEventArgs state is out of range"); } }
private void InvokeConsiderFilter(FileSystemVisitorIgnoreOnDefaultFilterEvent ev, object obj, FileSystemVisitorEventArgs args) { if (this.Filter != FileSystemVisitor.DefaultFilter) { ev?.Invoke(obj, args); this.ApplyEventArgsChanges(args); } }
private void InvokeConsiderFilter(FileSystemVisitorEvent ev, object obj, FileSystemVisitorEventArgs args) { ev?.Invoke(obj, args); this.ApplyEventArgsChanges(args); }