Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System.Data.Entity / System / Data / Objects / ObjectMaterializedEventArgs.cs
1 //---------------------------------------------------------------------
2 // <copyright file="ObjectContext.cs" company="Microsoft">
3 //      Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //
6 // @owner       [....]
7 // @backupOwner [....]
8 //---------------------------------------------------------------------
9
10 using System;
11 using System.Collections.Generic;
12 using System.Linq;
13 using System.Text;
14
15 namespace System.Data.Objects
16 {
17     /// <summary>
18     /// EventArgs for the ObjectMaterialized event.
19     /// </summary>
20     public class ObjectMaterializedEventArgs : EventArgs
21     {
22         /// <summary>
23         /// The object that was materialized.
24         /// </summary>
25         private readonly object _entity;
26
27         /// <summary>
28         /// Constructs new arguments for the ObjectMaterialized event.
29         /// </summary>
30         /// <param name="entity">The object that has been materialized.</param>
31         internal ObjectMaterializedEventArgs(object entity)
32         {
33             _entity = entity;
34         }
35
36         /// <summary>
37         /// The object that was materialized.
38         /// </summary>
39         public object Entity
40         {
41             get { return _entity; }
42         }
43     }
44
45     /// <summary>
46     /// Delegate for the ObjectMaterialized event.
47     /// </summary>
48     /// <param name="sender">The ObjectContext responsable for materializing the object.</param>
49     /// <param name="e">EventArgs containing a reference to the materialized object.</param>
50     public delegate void ObjectMaterializedEventHandler(object sender, ObjectMaterializedEventArgs e);
51 }