コード例 #1
0
        internal static WpfEvent GetEvent(int id)
        {
            WpfEvent e = null;

            events.TryGetValue(id, out e);
            return(e);
        }
コード例 #2
0
        public override void ParseUserData(uint eventId, BinaryReader reader)
        {
            int id = (int)eventId;

            Event = WpfEventTraceWatcher.GetEvent(id);
            if (Event != null)
            {
                if (Event.StartId == id)
                {
                    this.EventId = 1; // bugbug
                }
                else if (Event.StopId == id)
                {
                    this.EventId = 2; // bugbug
                }
            }
        }
コード例 #3
0
        private static WpfEvent Addevent(int id, string task, string opcode, string symbol)
        {
            WpfEvent evt = null;

            if (!tasks.TryGetValue(task, out evt))
            {
                evt = new WpfEvent()
                {
                    Task = task, Symbol = symbol
                };
                tasks[task] = evt;
            }
            if (opcode.EndsWith("Start"))
            {
                evt.StartId = id;
                events[id]  = evt;
            }
            else if (opcode.EndsWith("Stop"))
            {
                evt.StopId = id;
                events[id] = evt;
            }
            return(evt);
        }