Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / System.Data.Entity.Design / System / Data / EntityModel / TypeGeneratedEventArgs.cs
blob63e42956a977bfb80a97d53585a2d2e7de78a50d
1 //---------------------------------------------------------------------
2 // <copyright file="TypeGeneratedEventArgs.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 // </copyright>
5 //
6 // @owner Microsoft
7 // @backupOwner Microsoft
8 //---------------------------------------------------------------------
9 using System;
10 using System.Data;
11 using System.CodeDom;
12 using System.Collections.Generic;
13 using System.Data.Metadata.Edm;
14 using System.Diagnostics;
16 namespace System.Data.Entity.Design
18 /// <summary>
19 /// This class encapsulates the EventArgs dispatched as part of the event
20 /// raised when a type is generated.
21 /// </summary>
22 public sealed class TypeGeneratedEventArgs : EventArgs
24 #region Private Data
26 private GlobalItem _typeSource;
27 private CodeTypeReference _baseType;
28 private List<Type> _additionalInterfaces = new List<Type>();
29 private List<CodeTypeMember> _additionalMembers = new List<CodeTypeMember>();
30 private List<CodeAttributeDeclaration> _additionalAttributes = new List<CodeAttributeDeclaration>();
32 #endregion
34 #region Constructors
36 /// <summary>
37 /// Default constructor
38 /// </summary>
39 public TypeGeneratedEventArgs()
43 /// <summary>
44 /// Constructor
45 /// </summary>
46 /// <param name="typeSource">The source of the event</param>
47 /// <param name="baseType">The base type of the type being generated</param>
48 public TypeGeneratedEventArgs(GlobalItem typeSource, CodeTypeReference baseType)
50 this._typeSource = typeSource;
51 this._baseType = baseType;
54 #endregion
56 #region Properties
58 public GlobalItem TypeSource
60 get
62 return this._typeSource;
66 /// <summary>
67 /// The type appropriate for the TypeSource
68 /// </summary>
69 public CodeTypeReference BaseType
71 get
73 return this._baseType;
75 set
77 this._baseType = value;
81 /// <summary>
82 /// Interfaces to be included in the new type's definition
83 /// </summary>
84 public List<Type> AdditionalInterfaces
86 get
88 return this._additionalInterfaces;
92 /// <summary>
93 /// Members to be included in the new type's definition
94 /// </summary>
95 public List<CodeTypeMember> AdditionalMembers
97 get
99 return this._additionalMembers;
103 /// <summary>
104 /// Attributes to be added to the property's CustomAttributes collection
105 /// </summary>
106 public List<CodeAttributeDeclaration> AdditionalAttributes
110 return this._additionalAttributes;
114 #endregion