Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SmiRecordBuffer.cs">
<Link>Microsoft\Data\SqlClient\Server\SmiRecordBuffer.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SmiEventSink.cs">
<Link>Microsoft\Data\SqlClient\Server\SmiEventSink.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SmiEventSink_Default.Common.cs">
<Link>Microsoft\Data\SqlClient\Server\SmiEventSink_Default.Common.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SmiEventSink_Default.netcore.cs">
<Link>Microsoft\Data\SqlClient\Server\SmiEventSink_Default.netcore.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Reliability\Common\SqlRetryingEventArgs.cs">
<Link>Microsoft\Data\SqlClient\Reliability\SqlRetryingEventArgs.cs</Link>
</Compile>
Expand Down Expand Up @@ -428,8 +437,6 @@
</EmbeddedResource>
<Compile Include="Microsoft\Data\SqlClient\AAsyncCallContext.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\MetadataUtilsSmi.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiEventSink.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiEventSink_Default.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiMetaDataProperty.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiTypedGetterSetter.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiXetterAccessMap.cs" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@
<Compile Include="..\..\src\Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs">
<Link>Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SmiEventSink.cs">
<Link>Microsoft\Data\SqlClient\Server\SmiEventSink.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SmiEventSink_Default.Common.cs">
<Link>Microsoft\Data\SqlClient\Server\SmiEventSink_Default.Common.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SmiEventSink_Default.netfx.cs">
<Link>Microsoft\Data\SqlClient\Server\SmiEventSink_Default.netfx.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\OnChangedEventHandler.cs">
<Link>Microsoft\Data\SqlClient\OnChangedEventHandler.cs</Link>
</Compile>
Expand Down Expand Up @@ -537,8 +546,6 @@
<Compile Include="Microsoft\Data\SqlClient\Server\SmiConnection.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiContext.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiContextFactory.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiEventSink.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiEventSink_Default.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiEventSink_DeferedProcessing.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiEventStream.cs" />
<Compile Include="Microsoft\Data\SqlClient\Server\SmiExecuteType.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace Microsoft.Data.SqlClient.Server
// thrown in the native to managed boundary...
internal abstract class SmiEventSink
{

#region Active methods
#if NETFRAMEWORK
#region Active methods

// Called at end of stream whether errors or no
internal abstract void BatchCompleted();
Expand Down Expand Up @@ -80,10 +80,10 @@ internal virtual void RowAvailable(SmiTypedGetterSetter rowData)
// Called when a transaction is started (ENVCHANGE token)
internal abstract void TransactionStarted(long transactionId);

#endregion
#endregion

#region OBSOLETE METHODS
#region OBSOLETED as of V200 but active in previous version
#region OBSOLETE METHODS
#region OBSOLETED as of V200 but active in previous version
// Called zero or one time when output parameters are available (errors could prevent event from occuring)
internal virtual void ParametersAvailable(SmiParameterMetaData[] metaData, ITypedGettersV3 paramValues)
{
Expand All @@ -108,9 +108,9 @@ internal virtual void RowAvailable(ITypedGettersV3 rowData)
Microsoft.Data.Common.ADP.InternalError(Microsoft.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod);
}

#endregion
#endregion

#region OBSOLETED and never shipped (without ObsoleteAttribute)
#region OBSOLETED and never shipped (without ObsoleteAttribute)
// Called when a new row arrives (ROW token)
internal virtual void RowAvailable(ITypedGetters rowData)
{
Expand All @@ -123,8 +123,10 @@ internal virtual void RowAvailable(ITypedGetters rowData)
Microsoft.Data.Common.ADP.InternalError(Microsoft.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod);
}

#endregion
#endregion
#endregion
#endregion

#endif
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Diagnostics;

namespace Microsoft.Data.SqlClient.Server
{
internal partial class SmiEventSink_Default : SmiEventSink
{
private SqlErrorCollection _errors;
private SqlErrorCollection _warnings;

virtual internal string ServerVersion
{
get
{
return null;
}
}

internal SmiEventSink_Default()
{
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,17 @@

namespace Microsoft.Data.SqlClient.Server
{
internal class SmiEventSink_Default : SmiEventSink
internal partial class SmiEventSink_Default : SmiEventSink
{
private SqlErrorCollection _errors;
private SqlErrorCollection _warnings;


internal bool HasMessages
{
get
{
{
bool result = (null != _errors || null != _warnings);
return result;
}
bool result = (null != _errors || null != _warnings);
return result;
}
}

virtual internal string ServerVersion
{
get
{
return null;
}
}


protected virtual void DispatchMessages()
{
// virtual because we want a default implementation in the cases
Expand Down Expand Up @@ -101,11 +86,6 @@ internal void ProcessMessagesAndThrow()
}
}



internal SmiEventSink_Default()
{
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@

namespace Microsoft.Data.SqlClient.Server
{
internal class SmiEventSink_Default : SmiEventSink
internal partial class SmiEventSink_Default : SmiEventSink
{

private SmiEventSink _parent; // next level up, which we'll defer to if we don't need to handle the event.

private SqlErrorCollection _errors;
private SqlErrorCollection _warnings;

private SqlErrorCollection Errors
{
get
Expand Down Expand Up @@ -44,14 +40,6 @@ internal bool HasMessages
}
}

virtual internal string ServerVersion
{
get
{
return null;
}
}

internal SmiEventSink Parent
{
get
Expand Down Expand Up @@ -206,11 +194,6 @@ internal enum UnexpectedEventType
TransactionStarted,
}


internal SmiEventSink_Default()
{
}

internal SmiEventSink_Default(SmiEventSink parent)
{
_parent = parent;
Expand Down