e79aa3c0ed
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
47 lines
1.7 KiB
C#
47 lines
1.7 KiB
C#
//------------------------------------------------------------------------------
|
|
// <copyright file="SmiStream.cs" company="Microsoft">
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// </copyright>
|
|
// <owner current="true" primary="true">alazela</owner>
|
|
// <owner current="true" primary="false">stevesta</owner>
|
|
//------------------------------------------------------------------------------
|
|
|
|
// Stream-like object that uses SmiEventSink for server-side errors.
|
|
namespace Microsoft.SqlServer.Server {
|
|
using System;
|
|
using System.IO;
|
|
|
|
internal abstract class SmiStream {
|
|
public abstract bool CanRead {
|
|
get;
|
|
}
|
|
|
|
// If CanSeek is false, Position, Seek, Length, and SetLength should throw.
|
|
public abstract bool CanSeek {
|
|
get;
|
|
}
|
|
|
|
public abstract bool CanWrite {
|
|
get;
|
|
}
|
|
|
|
public abstract long GetLength( SmiEventSink sink );
|
|
|
|
public abstract long GetPosition( SmiEventSink sink );
|
|
public abstract void SetPosition( SmiEventSink sink, long position );
|
|
|
|
public abstract void Flush( SmiEventSink sink );
|
|
|
|
public abstract long Seek( SmiEventSink sink, long offset, SeekOrigin origin );
|
|
|
|
public abstract void SetLength( SmiEventSink sink, long value );
|
|
|
|
public abstract int Read( SmiEventSink sink, byte[] buffer, int offset, int count );
|
|
public abstract void Write( SmiEventSink sink, byte[] buffer, int offset, int count );
|
|
|
|
public abstract int Read( SmiEventSink sink, char[] buffer, int offset, int count );
|
|
public abstract void Write( SmiEventSink sink, char[] buffer, int offset, int count );
|
|
}
|
|
|
|
}
|