Class LogReader
Provides abstraction for binary object log readers. Use Open(stream method) to obtain the instance of the reader type appropriate for particular content. This class is NOT thread safe
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Log.Bin
Assembly: NFX.dll
Syntax
public abstract class LogReader
Constructors
LogReader(Stream)
Declaration
protected LogReader(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
Properties
Stream
Returns the underlying stream
Declaration
public Stream Stream { get; }
Property Value
Type | Description |
---|---|
System.IO.Stream |
Methods
Open(Stream)
Opens the appropriate reader type from the stream
Declaration
public static LogReader Open(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
Returns
Type | Description |
---|---|
LogReader |
read(Boolean)
Declaration
public IEnumerable<object> read(bool includeMetadata)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | includeMetadata |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> |
ReadFromAround(DateTime, Boolean)
Returns the lazy enumerable that fetches data from the point in time, optionally including time stamps
Declaration
public IEnumerable<object> ReadFromAround(DateTime startUTC, bool includeMetadata = true)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | startUTC | |
System.Boolean | includeMetadata |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> |
ReadFromStart(Boolean)
Returns the lazy enumerable that fetches data from the very log start, optionally including time stamps
Declaration
public IEnumerable<object> ReadFromStart(bool includeMetadata = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | includeMetadata |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> |
seekForTimeStamp(DateTime)
Declaration
public void seekForTimeStamp(DateTime startUTC)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | startUTC |