-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move into Shared for SqlInfoMessageEvent.cs (#1311)
- Loading branch information
1 parent
542056a
commit c10207a
Showing
5 changed files
with
40 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInfoMessageEvent.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 0 additions & 47 deletions
47
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlInfoMessageEvent.cs
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInfoMessageEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// 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. | ||
|
||
namespace Microsoft.Data.SqlClient | ||
{ | ||
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlInfoMessageEventArgs.xml' path='docs/members[@name="SqlInfoMessageEventArgs"]/SqlInfoMessageEventArgs/*' /> | ||
public sealed class SqlInfoMessageEventArgs : System.EventArgs | ||
{ | ||
private readonly SqlException _exception; | ||
|
||
internal SqlInfoMessageEventArgs(SqlException exception) | ||
{ | ||
_exception = exception; | ||
} | ||
|
||
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlInfoMessageEventArgs.xml' path='docs/members[@name="SqlInfoMessageEventArgs"]/Errors/*' /> | ||
public SqlErrorCollection Errors => _exception.Errors; | ||
|
||
// MDAC 65548 | ||
private bool ShouldSerializeErrors() => (null != _exception) && (0 < _exception.Errors.Count); | ||
|
||
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlInfoMessageEventArgs.xml' path='docs/members[@name="SqlInfoMessageEventArgs"]/Message/*' /> | ||
public string Message => _exception.Message; | ||
|
||
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlInfoMessageEventArgs.xml' path='docs/members[@name="SqlInfoMessageEventArgs"]/Source/*' /> | ||
// MDAC 68482 | ||
public string Source => _exception.Source; | ||
|
||
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlInfoMessageEventArgs.xml' path='docs/members[@name="SqlInfoMessageEventArgs"]/ToString/*' /> | ||
// MDAC 68482 | ||
override public string ToString() => Message; | ||
} | ||
} |