diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index 596bdc7b9a..914985be2b 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -226,6 +226,9 @@ Microsoft\Data\SqlClient\SqlInfoMessageEventHandler.cs + + Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs + Microsoft\Data\SqlClient\SqlNotificationInfo.cs @@ -519,7 +522,6 @@ - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs deleted file mode 100644 index 0e37f820ea..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs +++ /dev/null @@ -1,35 +0,0 @@ -// 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; - -namespace Microsoft.Data.SqlClient -{ - /// - public class SqlNotificationEventArgs : EventArgs - { - private SqlNotificationType _type; - private SqlNotificationInfo _info; - private SqlNotificationSource _source; - - /// - public SqlNotificationEventArgs(SqlNotificationType type, SqlNotificationInfo info, SqlNotificationSource source) - { - _info = info; - _source = source; - _type = type; - } - - /// - public SqlNotificationType Type => _type; - - /// - public SqlNotificationInfo Info => _info; - - /// - public SqlNotificationSource Source => _source; - - internal static SqlNotificationEventArgs s_notifyError = new SqlNotificationEventArgs(SqlNotificationType.Subscribe, SqlNotificationInfo.Error, SqlNotificationSource.Object); - } -} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj index ae61c39607..cda363d331 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -300,6 +300,9 @@ Microsoft\Data\SqlClient\SqlInfoMessageEventHandler.cs + + Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs + Microsoft\Data\SqlClient\SqlNotificationInfo.cs @@ -481,7 +484,6 @@ - diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs deleted file mode 100644 index 1c28c64859..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs +++ /dev/null @@ -1,55 +0,0 @@ -// 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; - -namespace Microsoft.Data.SqlClient -{ - /// - public class SqlNotificationEventArgs : EventArgs - { - private SqlNotificationType _type; - private SqlNotificationInfo _info; - private SqlNotificationSource _source; - - /// - public SqlNotificationEventArgs(SqlNotificationType type, SqlNotificationInfo info, SqlNotificationSource source) - { - _info = info; - _source = source; - _type = type; - } - - /// - public SqlNotificationType Type - { - get - { - return _type; - } - } - - /// - public SqlNotificationInfo Info - { - get - { - return _info; - } - } - - /// - public SqlNotificationSource Source - { - get - { - return _source; - } - } - - internal static SqlNotificationEventArgs NotifyError = new SqlNotificationEventArgs(SqlNotificationType.Subscribe, SqlNotificationInfo.Error, SqlNotificationSource.Object); - } -} - - diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs new file mode 100644 index 0000000000..6e7c6d4ca7 --- /dev/null +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlNotificationEventArgs.cs @@ -0,0 +1,35 @@ +// 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; + +namespace Microsoft.Data.SqlClient +{ + /// + public class SqlNotificationEventArgs : EventArgs + { + private readonly SqlNotificationType _type; + private readonly SqlNotificationInfo _info; + private readonly SqlNotificationSource _source; + + /// + public SqlNotificationEventArgs(SqlNotificationType type, SqlNotificationInfo info, SqlNotificationSource source) + { + _info = info; + _source = source; + _type = type; + } + + /// + public SqlNotificationType Type => _type; + + /// + public SqlNotificationInfo Info => _info; + + /// + public SqlNotificationSource Source => _source; + + internal static SqlNotificationEventArgs s_notifyError = new(SqlNotificationType.Subscribe, SqlNotificationInfo.Error, SqlNotificationSource.Object); + } +}