Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SqlInfoMessageEvent.cs « SqlClient « Data « System « System.Data « referencesource « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1e3eadb40fd039d81cb130c72185da31a56a82d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//------------------------------------------------------------------------------
// <copyright file="SqlInfoMessageEvent.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>                                                                
// <owner current="true" primary="true">Microsoft</owner>
// <owner current="true" primary="false">Microsoft</owner>
//------------------------------------------------------------------------------

namespace System.Data.SqlClient {
    using System;

    public sealed class SqlInfoMessageEventArgs : System.EventArgs {
        private SqlException exception;

        internal SqlInfoMessageEventArgs(SqlException exception) {
            this.exception = exception;
        }

        public SqlErrorCollection Errors {
            get { return exception.Errors;}
        }

        /*virtual protected*/private bool ShouldSerializeErrors() { // MDAC 65548
            return (null != exception) && (0 < exception.Errors.Count);
        }

        public string Message { // MDAC 68482
            get { return exception.Message; }
        }

        public string Source { // MDAC 68482
            get { return exception.Source;}
        }

        override public string ToString() { // MDAC 68482
            return Message;
        }
    }
}