Exemplo n.º 1
0
Arquivo: Data.cs Projeto: dzamkov/DUIP
 /// <summary>
 /// Writes a region to a stream.
 /// </summary>
 public static void Write(DataRegion Region, OutStream Stream)
 {
     Stream.WriteLong(Region.Start);
     Stream.WriteLong(Region.Size);
 }
Exemplo n.º 2
0
Arquivo: Data.cs Projeto: dzamkov/DUIP
 /// <summary>
 /// Gets a region of this data. The resulting data will have a size smaller than requested if the bounds of the region exceeds
 /// the size of the data.
 /// </summary>
 public Data GetRegion(DataRegion Region)
 {
     long dsize = this.Size;
     long size = Math.Max(0, Math.Min(Region.Size, dsize - Region.Start));
     return this.GetPartion(Region.Start, size);
 }