Esempio n. 1
0
 public LazinatorMemory(MemoryChunkCollection memoryChunkCollection)
 {
     MultipleMemoryChunks = memoryChunkCollection;
     SingleMemoryChunk    = null;
     StartIndex           = 0;
     Offset = 0;
     Length = memoryChunkCollection.Length;
 }
Esempio n. 2
0
 public LazinatorMemory(MemoryChunk memoryChunk, int startPosition, long length)
 {
     SingleMemoryChunk    = memoryChunk;
     MultipleMemoryChunks = null;
     StartIndex           = 0;
     if (startPosition < 0)
     {
         throw new ArgumentException();
     }
     Offset = startPosition;
     if (length < 0)
     {
         Length = 0;
     }
     else
     {
         Length = length;
     }
 }
Esempio n. 3
0
        public virtual MemoryChunkCollection DeepCopy()
        {
            var collection = new MemoryChunkCollection(MemoryChunks);

            return(collection);
        }
Esempio n. 4
0
 public LazinatorMemory(IEnumerable <MemoryChunk> moreMemoryChunks, int startIndex, int startPosition, long length) : this(null, startPosition, length)
 {
     MultipleMemoryChunks = new MemoryChunkCollection(moreMemoryChunks);
     StartIndex           = startIndex;
 }
Esempio n. 5
0
 public LazinatorMemory(MemoryChunkCollection moreMemoryChunks, int startIndex, int startPosition, long length) : this(null, startPosition, length)
 {
     MultipleMemoryChunks = moreMemoryChunks;
     StartIndex           = startIndex;
 }