Пример #1
0
 public void GetColumn <T>(IReadOnlyList <LogLineIndex> sourceIndices,
                           IColumnDescriptor <T> column,
                           T[] destination,
                           int destinationIndex,
                           LogSourceQueryOptions queryOptions)
 {
     if (ReferenceEquals(column, Core.Columns.RawContent))
     {
         var view = new SingleColumnLogBufferView <T>(column, destination, destinationIndex, sourceIndices.Count);
         ReadRawData(sourceIndices, view, 0, queryOptions);
     }
     else if (ReferenceEquals(column, Core.Columns.Index))
     {
         GetIndices(sourceIndices, (LogLineIndex[])(object)destination, destinationIndex);
     }
     else if (ReferenceEquals(column, StreamingTextLogSource.LineOffsetInBytes))
     {
         lock (_index)
         {
             _index.CopyTo(column, sourceIndices, destination, destinationIndex);
         }
     }
     else
     {
         throw new NoSuchColumnException(column);
     }
 }
Пример #2
0
 public SingleColumnReadOnlyLogEntry(SingleColumnLogBufferView <T> buffer, int index)
 {
     _buffer = buffer;
     _index  = index;
 }