예제 #1
0
        public bool Match(LogEntry log)
        {
            bool stat       = false;
            int  MatchCount = 0;


            Filters.Iterate(delegate(LogFilter filter)
            {
                if (filter.Match(log))
                {
                    if (LinkWithAnd)
                    {
                        MatchCount++;
                        return(false);
                    }

                    stat = true;
                    return(true);
                }

                return(false);
            });


            if (LinkWithAnd && Filters.Count == MatchCount)
            {
                stat = true;
            }

            return(stat);
        }
예제 #2
0
        void LogcatProcess_OnLineOutputReceive(string line)
        {
            if (line == "DEVCON")
            {
                if (OnDeviceConnected != null)
                {
                    OnDeviceConnected();
                }

                return;
            }

            LogEntry entry          = LogEntry.Parse(line);
            bool     IsGeneralEntry = true;

            Slots.Iterate(delegate(FilteredLogSlot slot)
            {
                if (slot.TryAdd(entry))
                {
                    IsGeneralEntry = false;
                    return(true);
                }

                IsGeneralEntry = true;
                return(false);
            });



            if (IsGeneralEntry)
            {
                GeneralEntries.AddEntry(entry);

                if (GeneralTabUi.InvokeRequired)
                {
                    GeneralTabUi.Invoke(new System.Windows.Forms.MethodInvoker(delegate()
                    {
                        GeneralTabUi.WriteLog(entry);
                    }));
                }
            }
        }