public QueryableMultiValueData(MemoryStream keyStream, MemoryStream valueStream, DimensionSet dimensionSet) : base(dimensionSet) { if (keyStream.Length == 0) { this.keys = new BufferedKeyedData <uint>(null, 0, 0, dimensionSet); keyStream.Dispose(); valueStream.Dispose(); } else { this.keyStream = keyStream; this.keys = new BufferedKeyedData <uint>(keyStream.GetBuffer(), 0, (int)keyStream.Length, dimensionSet); this.values = BufferedValueArray.Create(valueStream.GetBuffer(), 0, (int)valueStream.Length); this.valueStream = valueStream; } }
public QueryableMultiValueData(PersistedDataType type, MemoryStream source, DimensionSet dimensionSet, int keyCount) : base(dimensionSet) { if (source.Length == 0) { this.keys = new BufferedKeyedData <uint>(null, 0, 0, dimensionSet); source.Dispose(); } else { this.keyStream = source; this.valueStream = null; var keyPortionLength = (int)BufferedKeyedData <uint> .GetBufferSizeForKeyCount(keyCount, dimensionSet); var sourceBuffer = source.GetBuffer(); var sourceLength = (int)source.Length; this.keys = new BufferedKeyedData <uint>(sourceBuffer, 0, keyPortionLength, dimensionSet); this.values = BufferedValueArray.Create(type, sourceBuffer, keyPortionLength, sourceLength - keyPortionLength); } }
protected override void Dispose(bool disposing) { if (this.keys != null) { this.keys.Dispose(); this.keys = null; } if (this.keyStream != null) { this.keyStream.Dispose(); this.keyStream = null; } if (this.values != null) // may be null for empty sets of keys. { this.values.Dispose(); this.values = null; } if (this.valueStream != null) { this.valueStream.Dispose(); this.valueStream = null; } }
public MultiValueMergeSource(IBufferedValueArray bufferedData, long startOffset) { this.BufferedData = bufferedData; this.StartOffset = startOffset; }