コード例 #1
0
 public void RemoveExportGroup(ExportGroupVm exportGroupVm)
 {
     if (exportGroupVm != null)
     {
         //todo this.Investigation.RemoveExportGroup(exportGroupVm.ExportGroup);
     }
 }
コード例 #2
0
 private void ProcessExportGroup(ExportGroupVm exportGroup, CollectionChangeAction action)
 {
     foreach (var exportGroupVm in exportGroup.ExportGroups)
     {
         this.ProcessExportGroup(exportGroupVm, action);
     }
     this.ProcessExports(exportGroup, action);
 }
コード例 #3
0
        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;
                        }
                    }
                }
            }
        }
コード例 #4
0
 public ExportOverviewVm(WindsorContainer investigationWindsorContainer, ExportGroupVm model) : base(investigationWindsorContainer, model)
 {
     this.ExportGroupVm = model;
     DispatcherHelper.CheckBeginInvokeOnUI(() => this.View = this.ApplicationOrInvestigationWindsorContainer.Resolve <IExportOverviewView>());
 }
コード例 #5
0
 public void RemoveExportGroup(ExportGroupVm exportGroupVm)
 {
 }