Code:
                         / 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / EntitySql / AST / TypeDefinition.cs / 1305376 / TypeDefinition.cs
                        
                        
                            //---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
//  
// 
// @owner  [....]
// @backupOwner [....] 
//--------------------------------------------------------------------- 
namespace System.Data.Common.EntitySql.AST 
{
    using System;
    using System.Globalization;
    using System.Collections; 
    using System.Collections.Generic;
 
    ///  
    /// Represents an ast node for a collection type definition.
    ///   
    internal sealed class CollectionTypeDefinition : Node
    {
        private readonly Node _elementTypeDef;
 
        /// 
        /// Initializes collection type definition using the element type definition. 
        ///   
        internal CollectionTypeDefinition(Node elementTypeDef)
        { 
            this._elementTypeDef = elementTypeDef;
        }
        ///  
        /// Returns collection element type defintion.
        ///   
        internal Node ElementTypeDef 
        {
            get { return this._elementTypeDef; } 
        }
    }
    ///  
    /// Represents an ast node for a reference type definition.
    ///   
    internal sealed class RefTypeDefinition : Node 
    {
        private readonly Node _refTypeIdentifier; 
        /// 
        /// Initializes reference type definition using the referenced type identifier.
        ///   
        internal RefTypeDefinition(Node refTypeIdentifier)
        { 
            this._refTypeIdentifier = refTypeIdentifier; 
        }
 
        /// 
        /// Returns referenced type identifier.
        ///  
        internal Node RefTypeIdentifier 
        {
            get { return this._refTypeIdentifier; } 
        } 
    }
 
    /// 
    /// Represents an ast node for a row type definition.
    ///  
    internal sealed class RowTypeDefinition : Node 
    {
        private readonly NodeList _propDefList; 
 
        /// 
        /// Initializes row type definition using the property definitions. 
        ///  
        internal RowTypeDefinition(NodeList propDefList)
        {
            this._propDefList = propDefList; 
        }
 
        ///  
        /// Returns property definitions.
        ///   
        internal NodeList Properties
        {
            get { return this._propDefList; }
        } 
    }
 
    ///  
    /// Represents an ast node for a property definition (name/type)
    ///   
    internal sealed class PropDefinition : Node
    {
        private readonly Identifier _name;
        private readonly Node _typeDefExpr; 
        ///  
        /// Initializes property definition using the name and the type definition. 
        ///  
        ///  
        internal PropDefinition(Identifier name, Node typeDefExpr)
        {
            this._name = name;
            this._typeDefExpr = typeDefExpr; 
        }
 
        ///  
        /// Returns property name.
        ///   
        internal Identifier Name
        {
            get { return this._name; }
        } 
        ///  
        /// Returns property type. 
        ///  
        internal Node Type 
        {
            get { return this._typeDefExpr; }
        }
    } 
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
//  
// 
// @owner  [....]
// @backupOwner [....] 
//--------------------------------------------------------------------- 
namespace System.Data.Common.EntitySql.AST 
{
    using System;
    using System.Globalization;
    using System.Collections; 
    using System.Collections.Generic;
 
    ///  
    /// Represents an ast node for a collection type definition.
    ///   
    internal sealed class CollectionTypeDefinition : Node
    {
        private readonly Node _elementTypeDef;
 
        /// 
        /// Initializes collection type definition using the element type definition. 
        ///   
        internal CollectionTypeDefinition(Node elementTypeDef)
        { 
            this._elementTypeDef = elementTypeDef;
        }
        ///  
        /// Returns collection element type defintion.
        ///   
        internal Node ElementTypeDef 
        {
            get { return this._elementTypeDef; } 
        }
    }
    ///  
    /// Represents an ast node for a reference type definition.
    ///   
    internal sealed class RefTypeDefinition : Node 
    {
        private readonly Node _refTypeIdentifier; 
        /// 
        /// Initializes reference type definition using the referenced type identifier.
        ///   
        internal RefTypeDefinition(Node refTypeIdentifier)
        { 
            this._refTypeIdentifier = refTypeIdentifier; 
        }
 
        /// 
        /// Returns referenced type identifier.
        ///  
        internal Node RefTypeIdentifier 
        {
            get { return this._refTypeIdentifier; } 
        } 
    }
 
    /// 
    /// Represents an ast node for a row type definition.
    ///  
    internal sealed class RowTypeDefinition : Node 
    {
        private readonly NodeList _propDefList; 
 
        /// 
        /// Initializes row type definition using the property definitions. 
        ///  
        internal RowTypeDefinition(NodeList propDefList)
        {
            this._propDefList = propDefList; 
        }
 
        ///  
        /// Returns property definitions.
        ///   
        internal NodeList Properties
        {
            get { return this._propDefList; }
        } 
    }
 
    ///  
    /// Represents an ast node for a property definition (name/type)
    ///   
    internal sealed class PropDefinition : Node
    {
        private readonly Identifier _name;
        private readonly Node _typeDefExpr; 
        ///  
        /// Initializes property definition using the name and the type definition. 
        ///  
        ///  
        internal PropDefinition(Identifier name, Node typeDefExpr)
        {
            this._name = name;
            this._typeDefExpr = typeDefExpr; 
        }
 
        ///  
        /// Returns property name.
        ///   
        internal Identifier Name
        {
            get { return this._name; }
        } 
        ///  
        /// Returns property type. 
        ///  
        internal Node Type 
        {
            get { return this._typeDefExpr; }
        }
    } 
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                              
                        
                        
                        
                    Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ZipIOCentralDirectoryBlock.cs
 - CompareInfo.cs
 - FrameworkContentElement.cs
 - FileDialogCustomPlace.cs
 - PermissionListSet.cs
 - ClientApiGenerator.cs
 - FlowLayoutPanel.cs
 - Command.cs
 - DataPointer.cs
 - GeneralTransformCollection.cs
 - TextEvent.cs
 - ItemTypeToolStripMenuItem.cs
 - SystemException.cs
 - IdnMapping.cs
 - HiddenField.cs
 - WindowsScroll.cs
 - TextParagraph.cs
 - StructuralType.cs
 - DesignBindingPropertyDescriptor.cs
 - OdbcParameter.cs
 - DragStartedEventArgs.cs
 - StorageSetMapping.cs
 - Mappings.cs
 - ResourceDescriptionAttribute.cs
 - Icon.cs
 - ListControl.cs
 - FontNamesConverter.cs
 - TextSearch.cs
 - Missing.cs
 - DesignerCatalogPartChrome.cs
 - NotificationContext.cs
 - CompilerGlobalScopeAttribute.cs
 - PublisherIdentityPermission.cs
 - EntryPointNotFoundException.cs
 - DiffuseMaterial.cs
 - LocationChangedEventArgs.cs
 - SendSecurityHeaderElement.cs
 - DataGridViewRowDividerDoubleClickEventArgs.cs
 - DataGridViewLayoutData.cs
 - HtmlInputSubmit.cs
 - TextFormatter.cs
 - SoapAttributeAttribute.cs
 - RangeValidator.cs
 - LongTypeConverter.cs
 - TransformedBitmap.cs
 - MobileUITypeEditor.cs
 - QueueException.cs
 - NestedContainer.cs
 - FixedSOMTextRun.cs
 - ZipIOModeEnforcingStream.cs
 - Substitution.cs
 - XmlStreamNodeWriter.cs
 - GeneratedContractType.cs
 - NamedPermissionSet.cs
 - COAUTHINFO.cs
 - AddInProcess.cs
 - Int32Converter.cs
 - StreamReader.cs
 - RegexRunnerFactory.cs
 - FlowLayout.cs
 - URLIdentityPermission.cs
 - Lease.cs
 - ProcessInputEventArgs.cs
 - FocusChangedEventArgs.cs
 - PiiTraceSource.cs
 - XmlAttribute.cs
 - Formatter.cs
 - RelatedPropertyManager.cs
 - EntityParameterCollection.cs
 - Directory.cs
 - Int64AnimationUsingKeyFrames.cs
 - AccessViolationException.cs
 - GroupBox.cs
 - OleDbPropertySetGuid.cs
 - StateMachineExecutionState.cs
 - BitmapImage.cs
 - MarkupCompiler.cs
 - ClientSponsor.cs
 - SplineKeyFrames.cs
 - SqlTriggerAttribute.cs
 - CompoundFileReference.cs
 - RSAPKCS1SignatureFormatter.cs
 - DbParameterHelper.cs
 - EventLogPermissionEntryCollection.cs
 - GroupStyle.cs
 - SoapEnumAttribute.cs
 - XmlFormatExtensionPrefixAttribute.cs
 - DocumentViewerAutomationPeer.cs
 - ApplicationServicesHostFactory.cs
 - AutomationEventArgs.cs
 - OracleString.cs
 - OperationResponse.cs
 - DocumentReference.cs
 - SolidBrush.cs
 - EdmFunctions.cs
 - RuntimeUtils.cs
 - CatalogPartDesigner.cs
 - IntegerValidator.cs
 - DispatchChannelSink.cs
 - AutomationPatternInfo.cs