Skip to content

Commit 73919ca

Browse files
authored
Move into Shared SqlNotificationEventArgs.cs (#1314)
1 parent b659f88 commit 73919ca

File tree

5 files changed

+41
-92
lines changed

5 files changed

+41
-92
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@
265265
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlInfoMessageEventHandler.cs">
266266
<Link>Microsoft\Data\SqlClient\SqlInfoMessageEventHandler.cs</Link>
267267
</Compile>
268+
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs">
269+
<Link>Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs</Link>
270+
</Compile>
268271
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlNotificationInfo.cs">
269272
<Link>Microsoft\Data\SqlClient\SqlNotificationInfo.cs</Link>
270273
</Compile>
@@ -549,7 +552,6 @@
549552
<Compile Include="Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs" />
550553
<Compile Include="Microsoft\Data\SqlClient\SqlInternalTransaction.cs" />
551554
<Compile Include="Microsoft\Data\SqlClient\SqlMetadataFactory.cs" />
552-
<Compile Include="Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs" />
553555
<Compile Include="Microsoft\Data\SqlClient\SqlParameter.cs" />
554556
<Compile Include="Microsoft\Data\SqlClient\SqlReferenceCollection.cs" />
555557
<Compile Include="Microsoft\Data\SqlClient\SqlSequentialStream.cs" />

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@
348348
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlInfoMessageEventHandler.cs">
349349
<Link>Microsoft\Data\SqlClient\SqlInfoMessageEventHandler.cs</Link>
350350
</Compile>
351+
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs">
352+
<Link>Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs</Link>
353+
</Compile>
351354
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlNotificationInfo.cs">
352355
<Link>Microsoft\Data\SqlClient\SqlNotificationInfo.cs</Link>
353356
</Compile>
@@ -534,7 +537,6 @@
534537
<Compile Include="Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs" />
535538
<Compile Include="Microsoft\Data\SqlClient\sqlinternaltransaction.cs" />
536539
<Compile Include="Microsoft\Data\SqlClient\sqlmetadatafactory.cs" />
537-
<Compile Include="Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs" />
538540
<Compile Include="Microsoft\Data\SqlClient\SqlParameter.cs" />
539541
<Compile Include="Microsoft\Data\SqlClient\SqlReferenceCollection.cs" />
540542
<Compile Include="Microsoft\Data\SqlClient\SqlSequentialStream.cs" />

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs

Lines changed: 0 additions & 55 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System;
6+
7+
namespace Microsoft.Data.SqlClient
8+
{
9+
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlNotificationEventArgs.xml' path='docs/members[@name="SqlNotificationEventArgs"]/SqlNotificationEventArgs/*' />
10+
public class SqlNotificationEventArgs : EventArgs
11+
{
12+
private readonly SqlNotificationType _type;
13+
private readonly SqlNotificationInfo _info;
14+
private readonly SqlNotificationSource _source;
15+
16+
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlNotificationEventArgs.xml' path='docs/members[@name="SqlNotificationEventArgs"]/ctor/*' />
17+
public SqlNotificationEventArgs(SqlNotificationType type, SqlNotificationInfo info, SqlNotificationSource source)
18+
{
19+
_info = info;
20+
_source = source;
21+
_type = type;
22+
}
23+
24+
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlNotificationEventArgs.xml' path='docs/members[@name="SqlNotificationEventArgs"]/Type/*' />
25+
public SqlNotificationType Type => _type;
26+
27+
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlNotificationEventArgs.xml' path='docs/members[@name="SqlNotificationEventArgs"]/Info/*' />
28+
public SqlNotificationInfo Info => _info;
29+
30+
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlNotificationEventArgs.xml' path='docs/members[@name="SqlNotificationEventArgs"]/Source/*' />
31+
public SqlNotificationSource Source => _source;
32+
33+
internal static SqlNotificationEventArgs s_notifyError = new(SqlNotificationType.Subscribe, SqlNotificationInfo.Error, SqlNotificationSource.Object);
34+
}
35+
}

0 commit comments

Comments
 (0)