本文整理汇总了C#中Microsoft.SqlServer.Server.SmiEventSink类的典型用法代码示例。如果您正苦于以下问题:C# SmiEventSink类的具体用法?C# SmiEventSink怎么用?C# SmiEventSink使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SmiEventSink类属于Microsoft.SqlServer.Server命名空间,在下文中一共展示了SmiEventSink类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBytesLength
// valid for SqlDbTypes: Binary, VarBinary, Image, Udt, Xml, Char, VarChar, Text, NChar, NVarChar, NText
// (Character type support needed for ExecuteXmlReader handling)
public virtual Int64 GetBytesLength(SmiEventSink sink, int ordinal) {
if (!CanGet) {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.InvalidSmiCall);
}
else {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod);
}
}
示例2: GetVariantType
// Check what type current sql_variant value is
// valid for SqlDbType.Variant
public virtual SmiMetaData GetVariantType(SmiEventSink sink, int ordinal) {
if (!CanGet) {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.InvalidSmiCall);
}
else {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod);
}
}
示例3: GetCharsLength
public virtual long GetCharsLength(SmiEventSink sink, int ordinal)
{
if (!this.CanGet)
{
throw ADP.InternalError(ADP.InternalErrorCode.InvalidSmiCall);
}
throw ADP.InternalError(ADP.InternalErrorCode.UnimplementedSMIMethod);
}
示例4: GetDateTimeOffset
public virtual DateTimeOffset GetDateTimeOffset(SmiEventSink sink, int ordinal)
{
if (!this.CanGet)
{
throw ADP.InternalError(ADP.InternalErrorCode.InvalidSmiCall);
}
throw ADP.InternalError(ADP.InternalErrorCode.UnimplementedSMIMethod);
}
示例5: GetChars
public virtual int GetChars(SmiEventSink sink, int ordinal, long fieldOffset, char[] buffer, int bufferOffset, int length)
{
if (!this.CanGet)
{
throw ADP.InternalError(ADP.InternalErrorCode.InvalidSmiCall);
}
throw ADP.InternalError(ADP.InternalErrorCode.UnimplementedSMIMethod);
}
示例6: GetBoolean
public virtual bool GetBoolean(SmiEventSink sink, int ordinal)
{
if (!this.CanGet)
{
throw ADP.InternalError(ADP.InternalErrorCode.InvalidSmiCall);
}
throw ADP.InternalError(ADP.InternalErrorCode.UnimplementedSMIMethod);
}
示例7: EndElements
internal virtual void EndElements(SmiEventSink sink)
{
if (!this.CanSet)
{
throw ADP.InternalError(ADP.InternalErrorCode.InvalidSmiCall);
}
throw ADP.InternalError(ADP.InternalErrorCode.UnimplementedSMIMethod);
}
示例8: GetBytes
public virtual int GetBytes(SmiEventSink sink, int ordinal, long fieldOffset, byte[] buffer, int bufferOffset, int length) {
if (!CanGet) {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.InvalidSmiCall);
}
else {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod);
}
}
示例9: GetScratchStream
// Scratch LOB storage region
internal virtual SmiStream GetScratchStream( SmiEventSink sink ) {
// Adding as of V3
// Implement body with throw because there are only a couple of ways to get to this code:
// 1) Client is calling this method even though the server negotiated for V2- and hasn't implemented V3 yet.
// 2) Server didn't implement V3, but negotiated V3+.
System.Data.Common.ADP.InternalError( System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod );
return null;
}
示例10: SqlDataReaderSmi
internal SqlDataReaderSmi(SmiEventStream eventStream, SqlCommand parent, CommandBehavior behavior, SqlInternalConnectionSmi connection, SmiEventSink parentSink) : base(parent, behavior)
{
this._eventStream = eventStream;
this._currentConnection = connection;
this._readerEventSink = new ReaderEventSink(this, parentSink);
this._currentPosition = PositionState.BeforeResults;
this._isOpen = true;
this._indexMap = null;
this._visibleColumnCount = 0;
}
示例11: Close
public virtual void Close(
SmiEventSink eventSink
) {
// Adding as of V3
// Implement body with throw because there are only a couple of ways to get to this code:
// 1) Client is calling this method even though the server negotiated for V2- and hasn't implemented V3 yet.
// 2) Server didn't implement V3 on some interface, but negotiated V3+.
throw System.Data.Common.ADP.InternalError( System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod );
}
示例12: SetVariantMetaData
public virtual void SetVariantMetaData( SmiEventSink sink, int ordinal, SmiMetaData metaData ) {
// ******** OBSOLETING from SMI -- this should have been removed from ITypedSettersV3
// Intended to be removed prior to RTM. Sub-classes need not implement
// Implement body with throw because there are only a couple of ways to get to this code:
// 1) Client is calling this method even though the server negotiated for V3+ and dropped support for V2-.
// 2) Server didn't implement V2- on some interface and negotiated V2-.
throw System.Data.Common.ADP.InternalError( System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod );
}
示例13: SetDateTimeOffset
// valid for DateTimeOffset
public virtual void SetDateTimeOffset(SmiEventSink sink, int ordinal, DateTimeOffset value) {
if (!CanSet) {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.InvalidSmiCall);
} else {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod);
}
}
示例14: SetString
// valid for character types: Char, VarChar, Text, NChar, NVarChar, NText
public virtual void SetString(SmiEventSink sink, int ordinal, string value, int offset, int length) {
if (!CanSet) {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.InvalidSmiCall);
}
else {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod);
}
}
示例15: SetCharsLength
public virtual void SetCharsLength(SmiEventSink sink, int ordinal, long length) {
if (!CanSet) {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.InvalidSmiCall);
}
else {
throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod);
}
}