示例#1
0
        private ISession FindAndStartSession(Guid sessionUid)
        {
            ISession session = null;

            Host.IApplicationCollection hostApplications = new Host.ApplicationCollection();
            //TODO: bad design - you need to reload the list of Host Applications from settings
            hostApplications.ConnectLocal(false);
            foreach (Host.IApplication hostApplication in hostApplications)
            {
                if (hostApplication.Sessions.Contains(sessionUid))
                {
                    session = hostApplication.Sessions[sessionUid];
                    break;
                }
            }
            if (session != null)
            {
                session.StartDecoding(this);
            }
            ProfilingTimer = session.ProfilingTimer;
            //hostApplications.TryDispose();
            return(session);
        }
示例#2
0
 public TimelineViewModel(IEventTreeCollection eventTrees, IProfilingTimer profilingTimer)
 {
     _eventTrees    = eventTrees;
     ProfilingTimer = profilingTimer;
     _eventTrees.CollectionUpdated += OnEventTreesCollectionUpdated;
 }