示例#1
0
        public static LogMatchSection MinimumBoundingLine(LogMatchSection lhs, LogMatchSection rhs)
        {
            LogMatchIndex minIndex = LogMatchIndex.Min(lhs.Index, rhs.Index);
            LogMatchIndex maxIndex = LogMatchIndex.Max(lhs.Index + lhs.Count, rhs.Index + rhs.Count);
            int           count    = maxIndex - minIndex;

            return(new LogMatchSection(minIndex, count));
        }
示例#2
0
        public LogMatchSection(LogMatchIndex index, int count, bool invalidateSection = false)
        {
            if (count < 0)
                throw new ArgumentOutOfRangeException("count");

            Index = index;
            Count = count;
            InvalidateSection = invalidateSection;
        }
示例#3
0
        public LogMatchSection(LogMatchIndex index, int count, bool invalidateSection = false)
        {
            if (count < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(count));
            }

            Index             = index;
            Count             = count;
            InvalidateSection = invalidateSection;
        }
示例#4
0
 public int CompareTo(LogMatchIndex other)
 {
     return(_value.CompareTo(other._value));
 }
示例#5
0
 public bool Equals(LogMatchIndex other)
 {
     return(_value == other._value);
 }
示例#6
0
 static LogMatchIndex()
 {
     Invalid = new LogMatchIndex(-1);
 }
示例#7
0
 public static LogMatchIndex Max(LogMatchIndex left, LogMatchIndex right)
 {
     return(Math.Max(left._value, right._value));
 }
示例#8
0
 public static LogMatchIndex Min(LogMatchIndex left, LogMatchIndex rigth)
 {
     return(Math.Min(left._value, rigth._value));
 }
示例#9
0
 public bool IsEndOfSection(LogMatchIndex index)
 {
     return(index >= Index + Count);
 }
示例#10
0
 public bool IsEndOfSection(LogMatchIndex index)
 {
     return index >= Index + Count;
 }
示例#11
0
 public static LogMatchIndex Min(LogMatchIndex left, LogMatchIndex rigth)
 {
     return Math.Min(left._value, rigth._value);
 }
示例#12
0
 public static LogMatchIndex Max(LogMatchIndex left, LogMatchIndex right)
 {
     return Math.Max(left._value, right._value);
 }
示例#13
0
 static LogMatchIndex()
 {
     Invalid = new LogMatchIndex(-1);
 }
示例#14
0
 public bool Equals(LogMatchIndex other)
 {
     return _value == other._value;
 }
示例#15
0
 public int CompareTo(LogMatchIndex other)
 {
     return _value.CompareTo(other._value);
 }