1 //---------------------------------------------------------------------
2 // <copyright file="TypeGeneratedEventArgs.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 // @backupOwner Microsoft
8 //---------------------------------------------------------------------
12 using System
.Collections
.Generic
;
13 using System
.Data
.Metadata
.Edm
;
14 using System
.Diagnostics
;
16 namespace System
.Data
.Entity
.Design
19 /// This class encapsulates the EventArgs dispatched as part of the event
20 /// raised when a type is generated.
22 public sealed class TypeGeneratedEventArgs
: EventArgs
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
>();
37 /// Default constructor
39 public TypeGeneratedEventArgs()
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
;
58 public GlobalItem TypeSource
62 return this._typeSource
;
67 /// The type appropriate for the TypeSource
69 public CodeTypeReference BaseType
73 return this._baseType
;
77 this._baseType
= value;
82 /// Interfaces to be included in the new type's definition
84 public List
<Type
> AdditionalInterfaces
88 return this._additionalInterfaces
;
93 /// Members to be included in the new type's definition
95 public List
<CodeTypeMember
> AdditionalMembers
99 return this._additionalMembers
;
104 /// Attributes to be added to the property's CustomAttributes collection
106 public List
<CodeAttributeDeclaration
> AdditionalAttributes
110 return this._additionalAttributes
;