Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / System.Data / System / Data / SqlClient / SqlInfoMessageEvent.cs
blob1e3eadb40fd039d81cb130c72185da31a56a82d0
1 //------------------------------------------------------------------------------
2 // <copyright file="SqlInfoMessageEvent.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 // </copyright>
5 // <owner current="true" primary="true">Microsoft</owner>
6 // <owner current="true" primary="false">Microsoft</owner>
7 //------------------------------------------------------------------------------
9 namespace System.Data.SqlClient {
10 using System;
12 public sealed class SqlInfoMessageEventArgs : System.EventArgs {
13 private SqlException exception;
15 internal SqlInfoMessageEventArgs(SqlException exception) {
16 this.exception = exception;
19 public SqlErrorCollection Errors {
20 get { return exception.Errors;}
23 /*virtual protected*/private bool ShouldSerializeErrors() { // MDAC 65548
24 return (null != exception) && (0 < exception.Errors.Count);
27 public string Message { // MDAC 68482
28 get { return exception.Message; }
31 public string Source { // MDAC 68482
32 get { return exception.Source;}
35 override public string ToString() { // MDAC 68482
36 return Message;