TypeGeneratedEventArgs.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Design / system / Data / EntityModel / TypeGeneratedEventArgs.cs / 1305376 / TypeGeneratedEventArgs.cs

                            //---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// 
// @owner       [....]
// @backupOwner [....] 
//--------------------------------------------------------------------- 
using System.CodeDom;
using System.Collections.Generic; 
using System.Data.Metadata.Edm;

namespace System.Data.Services.Design
{ 
    /// 
    /// This class encapsulates the EventArgs dispatched as part of the event 
    /// raised when a type is generated. 
    /// 
    public sealed class TypeGeneratedEventArgs : EventArgs 
    {
        #region Private Data

        private GlobalItem _typeSource; 
        private CodeTypeReference _baseType;
        private List _additionalInterfaces = new List(); 
        private List _additionalMembers = new List(); 
        private List _additionalAttributes = new List();
 
        #endregion

        #region Constructors
 
        /// 
        /// Default constructor 
        ///  
        public TypeGeneratedEventArgs()
        { 
        }

        /// 
        /// Constructor 
        /// 
        /// The source of the event 
        /// The base type of the type being generated 
        public TypeGeneratedEventArgs(GlobalItem typeSource, CodeTypeReference baseType)
        { 
            this._typeSource = typeSource;
            this._baseType = baseType;
        }
 
        #endregion
 
        #region Properties 

        public GlobalItem TypeSource 
        {
            get
            {
                return this._typeSource; 
            }
        } 
 
        /// 
        /// The type appropriate for the TypeSource 
        /// 
        public CodeTypeReference BaseType
        {
            get 
            {
                return this._baseType; 
            } 
            set
            { 
                this._baseType = value;
            }
        }
 
        /// 
        /// Interfaces to be included in the new type's definition 
        ///  
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002", Justification = "Same as System.Data.Entity.Design")]
        public List AdditionalInterfaces 
        {
            get
            {
                return this._additionalInterfaces; 
            }
        } 
 
        /// 
        /// Members to be included in the new type's definition 
        /// 
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002", Justification = "Same as System.Data.Entity.Design")]
        public List AdditionalMembers
        { 
            get
            { 
                return this._additionalMembers; 
            }
        } 

        /// 
        /// Attributes to be added to the property's CustomAttributes collection
        ///  
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002", Justification = "Same as System.Data.Entity.Design")]
        public List AdditionalAttributes 
        { 
            get
            { 
                return this._additionalAttributes;
            }
        }
 
        #endregion
    } 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// 
// @owner       [....]
// @backupOwner [....] 
//--------------------------------------------------------------------- 
using System.CodeDom;
using System.Collections.Generic; 
using System.Data.Metadata.Edm;

namespace System.Data.Services.Design
{ 
    /// 
    /// This class encapsulates the EventArgs dispatched as part of the event 
    /// raised when a type is generated. 
    /// 
    public sealed class TypeGeneratedEventArgs : EventArgs 
    {
        #region Private Data

        private GlobalItem _typeSource; 
        private CodeTypeReference _baseType;
        private List _additionalInterfaces = new List(); 
        private List _additionalMembers = new List(); 
        private List _additionalAttributes = new List();
 
        #endregion

        #region Constructors
 
        /// 
        /// Default constructor 
        ///  
        public TypeGeneratedEventArgs()
        { 
        }

        /// 
        /// Constructor 
        /// 
        /// The source of the event 
        /// The base type of the type being generated 
        public TypeGeneratedEventArgs(GlobalItem typeSource, CodeTypeReference baseType)
        { 
            this._typeSource = typeSource;
            this._baseType = baseType;
        }
 
        #endregion
 
        #region Properties 

        public GlobalItem TypeSource 
        {
            get
            {
                return this._typeSource; 
            }
        } 
 
        /// 
        /// The type appropriate for the TypeSource 
        /// 
        public CodeTypeReference BaseType
        {
            get 
            {
                return this._baseType; 
            } 
            set
            { 
                this._baseType = value;
            }
        }
 
        /// 
        /// Interfaces to be included in the new type's definition 
        ///  
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002", Justification = "Same as System.Data.Entity.Design")]
        public List AdditionalInterfaces 
        {
            get
            {
                return this._additionalInterfaces; 
            }
        } 
 
        /// 
        /// Members to be included in the new type's definition 
        /// 
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002", Justification = "Same as System.Data.Entity.Design")]
        public List AdditionalMembers
        { 
            get
            { 
                return this._additionalMembers; 
            }
        } 

        /// 
        /// Attributes to be added to the property's CustomAttributes collection
        ///  
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002", Justification = "Same as System.Data.Entity.Design")]
        public List AdditionalAttributes 
        { 
            get
            { 
                return this._additionalAttributes;
            }
        }
 
        #endregion
    } 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK