public LogMessageFilter(Stream stream)
 {
     byte version = stream.ReadNextByte();
     switch (version)
     {
         case 1:
             FilterLevel = (FilterLevel)stream.ReadNextByte();
             if (stream.ReadBoolean())
                 TimeFilter = new TimestampMatching(stream);
             if (stream.ReadBoolean())
                 Classification = new EnumMatchingFlags(stream);
             if (stream.ReadBoolean())
                 Level = new EnumMatchingFlags(stream);
             if (stream.ReadBoolean())
                 Flags = new EnumMatchingFlags(stream);
             if (stream.ReadBoolean())
                 Assembly = new StringMatching(stream);
             if (stream.ReadBoolean())
                 Type = new StringMatching(stream);
             if (stream.ReadBoolean())
                 RelatedType = new StringMatching(stream);
             if (stream.ReadBoolean())
                 StackDetails = new StackDetailsMatching(stream);
             if (stream.ReadBoolean())
                 StackTraceDetails = new StackTraceMatching(stream);
             if (stream.ReadBoolean())
                 EventName = new StringMatching(stream);
             if (stream.ReadBoolean())
                 MessageText = new StringMatching(stream);
             if (stream.ReadBoolean())
                 DetailsText = new StringMatching(stream);
             if (stream.ReadBoolean())
                 ExceptionText = new StringMatching(stream);
             break;
         default:
             throw new VersionNotFoundException();
     }
 }
示例#2
0
        public LogMessageFilter(Stream stream)
        {
            byte version = stream.ReadNextByte();

            switch (version)
            {
            case 1:
                FilterLevel = (FilterLevel)stream.ReadNextByte();
                if (stream.ReadBoolean())
                {
                    TimeFilter = new TimestampMatching(stream);
                }
                if (stream.ReadBoolean())
                {
                    Classification = new EnumMatchingFlags(stream);
                }
                if (stream.ReadBoolean())
                {
                    Level = new EnumMatchingFlags(stream);
                }
                if (stream.ReadBoolean())
                {
                    Flags = new EnumMatchingFlags(stream);
                }
                if (stream.ReadBoolean())
                {
                    Assembly = new StringMatching(stream);
                }
                if (stream.ReadBoolean())
                {
                    Type = new StringMatching(stream);
                }
                if (stream.ReadBoolean())
                {
                    RelatedType = new StringMatching(stream);
                }
                if (stream.ReadBoolean())
                {
                    StackDetails = new StackDetailsMatching(stream);
                }
                if (stream.ReadBoolean())
                {
                    StackTraceDetails = new StackTraceMatching(stream);
                }
                if (stream.ReadBoolean())
                {
                    EventName = new StringMatching(stream);
                }
                if (stream.ReadBoolean())
                {
                    MessageText = new StringMatching(stream);
                }
                if (stream.ReadBoolean())
                {
                    DetailsText = new StringMatching(stream);
                }
                if (stream.ReadBoolean())
                {
                    ExceptionText = new StringMatching(stream);
                }
                break;

            default:
                throw new VersionNotFoundException();
            }
        }