public void RemoveExportGroup(ExportGroupVm exportGroupVm) { if (exportGroupVm != null) { //todo this.Investigation.RemoveExportGroup(exportGroupVm.ExportGroup); } }
private void ProcessExportGroup(ExportGroupVm exportGroup, CollectionChangeAction action) { foreach (var exportGroupVm in exportGroup.ExportGroups) { this.ProcessExportGroup(exportGroupVm, action); } this.ProcessExports(exportGroup, action); }
private void ProcessExports(ExportGroupVm exportGroup, CollectionChangeAction action) { foreach (var snooperExport in exportGroup.ExportGroup.Exports) { var exports = (snooperExport as SnooperExportBase)?.ExportObjects; if (exports == null) { continue; } foreach (var snooperExportedObjectBase in exports) { var sipMessages = (snooperExportedObjectBase as SIPEvent)?.SipMessages; if (sipMessages == null) { continue; } foreach (var sipMsg in sipMessages) { switch (action) { case CollectionChangeAction.Add: { DispatcherHelper.CheckBeginInvokeOnUI(() => { this.SipMessages.AddNew(sipMsg); }); if (sipMsg.RequestLine?.Method == "INVITE") { var to = sipMsg.Headers.To.Substring(sipMsg.Headers.To.IndexOf("sip:") + 4).TrimEnd('>'); var reverseTo = ReverseString(to); this.PrefixTrie.Add(reverseTo, sipMsg); } } break; case CollectionChangeAction.Remove: { DispatcherHelper.CheckBeginInvokeOnUI(() => { this.SipMessages.Remove(sipMsg); }); if (sipMsg.RequestLine?.Method == "INVITE") { var to = sipMsg.Headers.To.Substring(sipMsg.Headers.To.IndexOf("sip:") + 4).TrimEnd('>'); var reverseTo = ReverseString(to); if (this.PrefixTrie.Contains(reverseTo, sipMsg)) { this.PrefixTrie.Remove(reverseTo); } } } break; } } } } }
public ExportOverviewVm(WindsorContainer investigationWindsorContainer, ExportGroupVm model) : base(investigationWindsorContainer, model) { this.ExportGroupVm = model; DispatcherHelper.CheckBeginInvokeOnUI(() => this.View = this.ApplicationOrInvestigationWindsorContainer.Resolve <IExportOverviewView>()); }
public void RemoveExportGroup(ExportGroupVm exportGroupVm) { }