Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System.Data / System / Data / OleDb / OleDbInfoMessageEvent.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="OleDbInfoMessageEvent.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 //------------------------------------------------------------------------------
8
9 namespace System.Data.OleDb {
10
11     using System;
12     using System.Diagnostics;
13
14     public sealed class OleDbInfoMessageEventArgs : System.EventArgs {
15         readonly private OleDbException exception;
16
17         internal OleDbInfoMessageEventArgs(OleDbException exception) {
18             Debug.Assert(null != exception, "OleDbInfoMessageEventArgs without OleDbException"); 
19             this.exception = exception;
20         }
21
22         public int ErrorCode {
23             get {
24                 return this.exception.ErrorCode;
25             }
26         }
27
28         public OleDbErrorCollection Errors {
29             get {
30                 return this.exception.Errors;
31             }
32         }
33
34         internal bool ShouldSerializeErrors() { // MDAC 65548
35             return this.exception.ShouldSerializeErrors();
36         }
37
38
39         public string Message {
40             get {
41                 return this.exception.Message;
42             }
43         }
44
45         public string Source {
46             get {
47                 return this.exception.Source;
48             }
49         }
50
51         override public string ToString() {
52             return Message;
53         }
54     }
55 }