示例#1
0
 public LazinatorMemory(MemoryChunkCollection memoryChunkCollection)
 {
     MultipleMemoryChunks = memoryChunkCollection;
     SingleMemoryChunk    = null;
     StartIndex           = 0;
     Offset = 0;
     Length = memoryChunkCollection.Length;
 }
示例#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;
     }
 }
示例#3
0
        public virtual MemoryChunkCollection DeepCopy()
        {
            var collection = new MemoryChunkCollection(MemoryChunks);

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