Show / Hide Table of Contents

# Class ServiceBufferFileStreamReader

Reader for service buffer formatted file streams

##### Inheritance

System.Object
ServiceBufferFileStreamReader

##### 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:Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage

###### Assembly:Microsoft.SqlTools.ServiceLayer.dll

##### Syntax

    public class ServiceBufferFileStreamReader : IFileStreamReader, IDisposable

### Constructors

| Improve this Doc View Source

#### ServiceBufferFileStreamReader(Stream)

Constructs a new ServiceBufferFileStreamReader and initializes its state

##### Declaration

    public ServiceBufferFileStreamReader(Stream stream)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.Stream | stream | The filestream to read from

### Methods

| Improve this Doc View Source

#### Dispose()

##### Declaration

    public void Dispose()

##### Implements

System.IDisposable.Dispose()
| Improve this Doc View Source

#### Dispose(Boolean)

##### Declaration

    protected virtual void Dispose(bool disposing)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | disposing |

| Improve this Doc View Source

#### Finalize()

##### Declaration

    protected void Finalize()

| Improve this Doc View Source

#### ReadBoolean(Int64)

Reads a bool from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadBoolean(long fileOffset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | fileOffset | Offset into the file to read the bool from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A bool

##### Implements

IFileStreamReader.ReadBoolean(Int64)
| Improve this Doc View Source

#### ReadByte(Int64)

Reads a byte from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadByte(long fileOffset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | fileOffset | Offset into the file to read the byte from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A byte

##### Implements

IFileStreamReader.ReadByte(Int64)
| Improve this Doc View Source

#### ReadBytes(Int64)

Reads bytes from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadBytes(long offset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | offset | Offset into the file to read the bytes from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A byte array

##### Implements

IFileStreamReader.ReadBytes(Int64)
| Improve this Doc View Source

#### ReadChar(Int64)

Reads a char from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadChar(long fileOffset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | fileOffset | Offset into the file to read the char from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A char

##### Implements

IFileStreamReader.ReadChar(Int64)
| Improve this Doc View Source

#### ReadDateTime(Int64)

Reads a DateTime from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadDateTime(long offset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | offset | Offset into the file to read the DateTime from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A DateTime

##### Implements

IFileStreamReader.ReadDateTime(Int64)
| Improve this Doc View Source

#### ReadDateTimeOffset(Int64)

Reads a DateTimeOffset from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadDateTimeOffset(long offset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | offset | Offset into the file to read the DateTimeOffset from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A DateTimeOffset

##### Implements

IFileStreamReader.ReadDateTimeOffset(Int64)
| Improve this Doc View Source

#### ReadDecimal(Int64)

Reads a decimal from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadDecimal(long offset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | offset | Offset into the file to read the decimal from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A decimal

##### Implements

IFileStreamReader.ReadDecimal(Int64)
| Improve this Doc View Source

#### ReadDouble(Int64)

Reads a double from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadDouble(long fileOffset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | fileOffset | Offset into the file to read the double from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A double

##### Implements

IFileStreamReader.ReadDouble(Int64)
| Improve this Doc View Source

#### ReadGuid(Int64)

Reads the bytes that make up a GUID at the offset provided

##### Declaration

    public FileStreamReadResult ReadGuid(long offset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | offset | Offset into the file to read the bytes from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A guid type object

##### Implements

IFileStreamReader.ReadGuid(Int64)
| Improve this Doc View Source

#### ReadInt16(Int64)

Reads a short from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadInt16(long fileOffset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | fileOffset | Offset into the file to read the short from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A short

##### Implements

IFileStreamReader.ReadInt16(Int64)
| Improve this Doc View Source

#### ReadInt32(Int64)

Reads a int from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadInt32(long fileOffset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | fileOffset | Offset into the file to read the int from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | An int

##### Implements

IFileStreamReader.ReadInt32(Int64)
| Improve this Doc View Source

#### ReadInt64(Int64)

Reads a long from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadInt64(long fileOffset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | fileOffset | Offset into the file to read the long from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A long

##### Implements

IFileStreamReader.ReadInt64(Int64)
| Improve this Doc View Source

#### ReadMoney(Int64)

Reads a SqlMoney type from the offset provided into a

##### Declaration

    public FileStreamReadResult ReadMoney(long offset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | offset |

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A sql money type object

##### Implements

IFileStreamReader.ReadMoney(Int64)
| Improve this Doc View Source

#### ReadRow(Int64, IEnumerable<DbColumnWrapper>)

Reads a row from the file, based on the columns provided

##### Declaration

    public IList<DbCellValue> ReadRow(long fileOffset, IEnumerable<DbColumnWrapper> columns)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | fileOffset | Offset into the file where the row starts
System.Collections.Generic.IEnumerable<DbColumnWrapper> | columns | The columns that were encoded

##### Returns

Type | Description
--- | ---
System.Collections.Generic.IList<DbCellValue> | The objects from the row, ready for output to the client

##### Implements

IFileStreamReader.ReadRow(Int64, IEnumerable<DbColumnWrapper>)
| Improve this Doc View Source

#### ReadSingle(Int64)

Reads a single from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadSingle(long fileOffset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | fileOffset | Offset into the file to read the single from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A single

##### Implements

IFileStreamReader.ReadSingle(Int64)
| Improve this Doc View Source

#### ReadSqlDecimal(Int64)

Reads a SqlDecimal from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadSqlDecimal(long offset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | offset | Offset into the file to read the SqlDecimal from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A SqlDecimal

##### Implements

IFileStreamReader.ReadSqlDecimal(Int64)
| Improve this Doc View Source

#### ReadString(Int64)

Reads a string from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadString(long offset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | offset | Offset into the file to read the string from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A string

##### Implements

IFileStreamReader.ReadString(Int64)
| Improve this Doc View Source

#### ReadTimeSpan(Int64)

Reads a TimeSpan from the file at the offset provided

##### Declaration

    public FileStreamReadResult ReadTimeSpan(long offset)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | offset | Offset into the file to read the TimeSpan from

##### Returns

Type | Description
--- | ---
FileStreamReadResult | A TimeSpan

##### Implements

IFileStreamReader.ReadTimeSpan(Int64)