Exemple #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="span">Span</param>
 public HexBufferSpanInvalidatedEventArgs(HexSpan span)
 {
     Span = span;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="buffer">Buffer</param>
 /// <param name="start">Start point</param>
 /// <param name="length">Length</param>
 public HexBufferSpan(HexBuffer buffer, HexPosition start, ulong length)
 {
     Buffer = buffer ?? throw new ArgumentNullException(nameof(buffer));
     Span   = new HexSpan(start, length);
 }
Exemple #3
0
 /// <summary>
 /// Reads bytes
 /// </summary>
 /// <param name="span">Span</param>
 /// <returns></returns>
 public abstract byte[] ReadBytes(HexSpan span);
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="buffer">Buffer</param>
 /// <param name="span">Span</param>
 public HexBufferSpan(HexBuffer buffer, HexSpan span)
 {
     Buffer = buffer ?? throw new ArgumentNullException(nameof(buffer));
     Span   = span;
 }
 /// <summary>
 /// Returns true if <paramref name="span"/> intersects with this instance
 /// </summary>
 /// <param name="span">Span</param>
 /// <returns></returns>
 public bool IntersectsWith(HexSpan span) => Span.IntersectsWith(span);
 /// <summary>
 /// Returns true if this instances overlaps with <paramref name="span"/>
 /// </summary>
 /// <param name="span"></param>
 /// <returns></returns>
 public bool OverlapsWith(HexSpan span) => Span.OverlapsWith(span);
 /// <summary>
 /// Returns true if <paramref name="span"/> lies within this span
 /// </summary>
 /// <param name="span">Span</param>
 /// <returns></returns>
 public bool Contains(HexSpan span) => Span.Contains(span);
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="buffer">Buffer</param>
 /// <param name="span">Span</param>
 public NormalizedHexBufferSpanCollection(HexBuffer buffer, HexSpan span)
 {
     coll        = new NormalizedHexSpanCollection(span);
     this.buffer = buffer ?? throw new ArgumentNullException(nameof(buffer));
 }