protected void OnAfterDelete(object s, IndexingEventArgs args) { if (AfterDelete != null) { AfterDelete(s, args); } }
protected void OnAfterIndex(object s, IndexingEventArgs args) { if (AfterIndex != null) { AfterIndex(s, args); } }
private static void DelegateAfterEvent(Dictionary <string, Tuple <Type, Action <object, IndexingEventArgs>, bool> > list, object n, IndexingEventArgs e) { var type = e.Node.GetType(); //refactor:can probably use is operator to implement event propagation var types = ApiHelper.BaseTypes(type); types.Add(type); list.Where(x => x.Value.Item1 == type || (x.Value.Item3 && types.Contains(x.Value.Item1))) .ToList().ForEach(x => { x.Value.Item2(n, e); }); }
private static void DelegateAfterDelete(object n, IndexingEventArgs e) { DelegateAfterEvent(AfterIndexActionList, n, e); }
private void OnIndexingProgress(object sender, IndexingEventArgs e) { _dispatcher.BeginInvoke(() => IsIndexing = e.IsIndexing); }