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)); }
public LogMatchSection(LogMatchIndex index, int count, bool invalidateSection = false) { if (count < 0) throw new ArgumentOutOfRangeException("count"); Index = index; Count = count; InvalidateSection = invalidateSection; }
public LogMatchSection(LogMatchIndex index, int count, bool invalidateSection = false) { if (count < 0) { throw new ArgumentOutOfRangeException(nameof(count)); } Index = index; Count = count; InvalidateSection = invalidateSection; }
public int CompareTo(LogMatchIndex other) { return(_value.CompareTo(other._value)); }
public bool Equals(LogMatchIndex other) { return(_value == other._value); }
static LogMatchIndex() { Invalid = new LogMatchIndex(-1); }
public static LogMatchIndex Max(LogMatchIndex left, LogMatchIndex right) { return(Math.Max(left._value, right._value)); }
public static LogMatchIndex Min(LogMatchIndex left, LogMatchIndex rigth) { return(Math.Min(left._value, rigth._value)); }
public bool IsEndOfSection(LogMatchIndex index) { return(index >= Index + Count); }
public bool IsEndOfSection(LogMatchIndex index) { return index >= Index + Count; }
public static LogMatchIndex Min(LogMatchIndex left, LogMatchIndex rigth) { return Math.Min(left._value, rigth._value); }
public static LogMatchIndex Max(LogMatchIndex left, LogMatchIndex right) { return Math.Max(left._value, right._value); }
public bool Equals(LogMatchIndex other) { return _value == other._value; }
public int CompareTo(LogMatchIndex other) { return _value.CompareTo(other._value); }