Class ServiceBufferFileStreamWriter
Writer for service buffer formatted file streams
Inheritance
Inherited Members
Namespace:Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public class ServiceBufferFileStreamWriter : IFileStreamWriter, IDisposable
Constructors
| Improve this Doc View SourceServiceBufferFileStreamWriter(Stream, Int32, Int32)
Constructs a new writer
Declaration
public ServiceBufferFileStreamWriter(Stream stream, int maxCharsToStore, int maxXmlCharsToStore)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | The file wrapper to use as the underlying file stream |
| System.Int32 | maxCharsToStore | Maximum number of characters to store for long text fields |
| System.Int32 | maxXmlCharsToStore | Maximum number of characters to store for XML fields |
Methods
| Improve this Doc View SourceDispose()
Declaration
public void Dispose()
Implements
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
Finalize()
Declaration
protected void Finalize()
FlushBuffer()
Flushes the internal buffer to the file stream
Declaration
public void FlushBuffer()
Implements
| Improve this Doc View SourceWriteBoolean(Boolean)
Writes a bool to the file
Declaration
public int WriteBoolean(bool val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the bool |
Implements
| Improve this Doc View SourceWriteByte(Byte)
Writes a byte to the file
Declaration
public int WriteByte(byte val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the byte |
Implements
| Improve this Doc View SourceWriteBytes(Byte[])
Writes a byte[] to the file
Declaration
public int WriteBytes(byte[] bytesVal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | bytesVal |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the byte[] |
Implements
| Improve this Doc View SourceWriteChar(Char)
Writes a char to the file
Declaration
public int WriteChar(char val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the char |
Implements
| Improve this Doc View SourceWriteDateTime(DbColumnWrapper, DateTime)
Writes a DateTime to the file as precision and ticks
Declaration
public int WriteDateTime(DbColumnWrapper col, DateTime dtVal)
Parameters
| Type | Name | Description |
|---|---|---|
| DbColumnWrapper | col | |
| System.DateTime | dtVal |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the DateTime |
Implements
| Improve this Doc View SourceWriteDateTimeOffset(DateTimeOffset)
Writes a DateTimeOffset to the file
Declaration
public int WriteDateTimeOffset(DateTimeOffset dtoVal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.DateTimeOffset | dtoVal |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the DateTimeOffset |
Implements
| Improve this Doc View SourceWriteDecimal(Decimal)
Writes a decimal to the file
Declaration
public int WriteDecimal(decimal val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Decimal | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the decimal |
Implements
| Improve this Doc View SourceWriteDouble(Double)
Writes a double to the file
Declaration
public int WriteDouble(double val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the double |
Implements
| Improve this Doc View SourceWriteGuid(Guid)
Stores a GUID value to the file by treating it as a byte array
Declaration
public int WriteGuid(Guid val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | val | The GUID to write to the file |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes written to the file |
Implements
| Improve this Doc View SourceWriteInt16(Int16)
Writes a short to the file
Declaration
public int WriteInt16(short val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int16 | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the short |
Implements
| Improve this Doc View SourceWriteInt32(Int32)
Writes a int to the file
Declaration
public int WriteInt32(int val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the int |
Implements
| Improve this Doc View SourceWriteInt64(Int64)
Writes a long to the file
Declaration
public int WriteInt64(long val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the long |
Implements
| Improve this Doc View SourceWriteMoney(SqlMoney)
Stores a SqlMoney value to the file by treating it as a decimal
Declaration
public int WriteMoney(SqlMoney val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Data.SqlTypes.SqlMoney | val | The SqlMoney value to write to the file |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes written to the file |
Implements
| Improve this Doc View SourceWriteNull()
Writes null to the file as one 0x00 byte
Declaration
public int WriteNull()
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the null |
Implements
| Improve this Doc View SourceWriteRow(StorageDataReader)
Writes an entire row to the file stream
Declaration
public int WriteRow(StorageDataReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| StorageDataReader | reader | A primed reader |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to write the row |
Implements
| Improve this Doc View SourceWriteSingle(Single)
Writes a float to the file
Declaration
public int WriteSingle(float val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the float |
Implements
| Improve this Doc View SourceWriteSqlDecimal(SqlDecimal)
Writes a SqlDecimal to the file
Declaration
public int WriteSqlDecimal(SqlDecimal val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Data.SqlTypes.SqlDecimal | val |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the SqlDecimal |
Implements
| Improve this Doc View SourceWriteString(String)
Writes a string to the file
Declaration
public int WriteString(string sVal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | sVal |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the string |
Implements
| Improve this Doc View SourceWriteTimeSpan(TimeSpan)
Writes a TimeSpan to the file
Declaration
public int WriteTimeSpan(TimeSpan timeSpan)
Parameters
| Type | Name | Description |
|---|---|---|
| System.TimeSpan | timeSpan |
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of bytes used to store the TimeSpan |