Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System.Web.Entity / System / Data / WebControls / EntityDataSourceSelectedEventArgs.cs
1 //---------------------------------------------------------------------
2 // <copyright file="EntityDataSourceSelectedEventArgs.cs" company="Microsoft">
3 //      Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //
6 // @owner       [....]
7 // @backupOwner objsdev
8 //---------------------------------------------------------------------
9
10 using System;
11 using System.Collections.Generic;
12 using System.Linq;
13 using System.Text;
14 using System.Data.Objects;
15 using System.Collections;
16
17 namespace System.Web.UI.WebControls
18 {
19     public class EntityDataSourceSelectedEventArgs : EventArgs
20     {
21         private readonly ObjectContext _context;
22         private readonly Exception _exception = null;
23         private bool _exceptionHandled = false;
24         private readonly IEnumerable _results = null;
25         private readonly int _totalRowCount = 0;
26         private readonly DataSourceSelectArguments _selectArguments;
27
28         internal EntityDataSourceSelectedEventArgs(ObjectContext context, 
29                                                    IEnumerable results, 
30                                                    int totalRowCount, 
31                                                    DataSourceSelectArguments selectArgs)
32         {
33             _context = context;
34             _results = results;
35             _totalRowCount = totalRowCount;
36             _selectArguments = selectArgs;
37         }
38
39         internal EntityDataSourceSelectedEventArgs(Exception exception)
40         {
41             _exception = exception;
42         }
43
44         public Exception Exception
45         {
46             get { return _exception; }
47         }
48
49         public bool ExceptionHandled
50         {
51             get { return _exceptionHandled; }
52             set { _exceptionHandled = value; }
53         }
54
55         public IEnumerable Results
56         {
57             get { return _results; }
58         }
59
60         public ObjectContext Context
61         {
62             get { return _context; }
63         }
64
65         public int TotalRowCount
66         {
67             get { return _totalRowCount; }
68         }
69
70         public DataSourceSelectArguments SelectArguments
71         {
72             get { return _selectArguments; }
73         }
74     }
75 }