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

EntityDataSourceChangedEventArgs.cs « WebControls « Data « System « System.Web.Entity « referencesource « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c3ff8c1e14ca01489871d76a5d505bb75ea970f2 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//---------------------------------------------------------------------
// <copyright file="EntityDataSourceChangedEventArgs.cs" company="Microsoft">
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//
// @owner       [....]
// @backupOwner objsdev
//---------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects;

namespace System.Web.UI.WebControls
{
    public class EntityDataSourceChangedEventArgs : EventArgs
    {
        private readonly ObjectContext _context;
        private readonly Exception _exception = null;
        private bool _exceptionHandled = false;
        private readonly object _entity = null;

        internal EntityDataSourceChangedEventArgs(ObjectContext context, object entity)
        {
            _context = context;
            _entity = entity;
        }

        internal EntityDataSourceChangedEventArgs(Exception exception) 
        {
            _exception = exception;
        }

        public Exception Exception 
        {
            get { return _exception; }
        }

        public bool ExceptionHandled 
        {
            get {  return _exceptionHandled; }
            set { _exceptionHandled = value; }
        }

        public object Entity 
        {
            get {  return _entity; }
        }

        public ObjectContext Context
        {
            get { return _context; }
        }
    }
}