Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / EntitySql / AST / AstNode.cs / 1305376 / AstNode.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 base class for nodes in the eSQL abstract syntax tree OM. /// internal abstract class Node { private ErrorContext _errCtx = new ErrorContext(); internal Node() { } internal Node(string commandText, int inputPosition) { _errCtx.CommandText = commandText; _errCtx.InputPosition = inputPosition; } ////// Ast Node error context. /// internal ErrorContext ErrCtx { get { return _errCtx; } set { _errCtx = value; } } } ////// An ast node represents a generic list of ast nodes. /// internal sealed class NodeList: Node, System.Collections.Generic.IEnumerable where T : Node { private readonly List _list = new List (); /// /// Default constructor. /// internal NodeList() { } ////// Initializes adding one item to the list. /// /// expression internal NodeList(T item) { _list.Add(item); } ////// Add an item to the list, return the updated list. /// internal NodeListAdd(T item) { _list.Add(item); return this; } /// /// Returns the number of elements in the list. /// internal int Count { get { return _list.Count; } } ////// Indexer to the list entries. /// /// integer position of the element in the list internal T this[int index] { get { return _list[index]; } } #region GetEnumerator System.Collections.Generic.IEnumeratorSystem.Collections.Generic.IEnumerable .GetEnumerator() { return _list.GetEnumerator(); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return _list.GetEnumerator(); } #endregion } } // 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 base class for nodes in the eSQL abstract syntax tree OM. /// internal abstract class Node { private ErrorContext _errCtx = new ErrorContext(); internal Node() { } internal Node(string commandText, int inputPosition) { _errCtx.CommandText = commandText; _errCtx.InputPosition = inputPosition; } ////// Ast Node error context. /// internal ErrorContext ErrCtx { get { return _errCtx; } set { _errCtx = value; } } } ////// An ast node represents a generic list of ast nodes. /// internal sealed class NodeList: Node, System.Collections.Generic.IEnumerable where T : Node { private readonly List _list = new List (); /// /// Default constructor. /// internal NodeList() { } ////// Initializes adding one item to the list. /// /// expression internal NodeList(T item) { _list.Add(item); } ////// Add an item to the list, return the updated list. /// internal NodeListAdd(T item) { _list.Add(item); return this; } /// /// Returns the number of elements in the list. /// internal int Count { get { return _list.Count; } } ////// Indexer to the list entries. /// /// integer position of the element in the list internal T this[int index] { get { return _list[index]; } } #region GetEnumerator System.Collections.Generic.IEnumeratorSystem.Collections.Generic.IEnumerable .GetEnumerator() { return _list.GetEnumerator(); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return _list.GetEnumerator(); } #endregion } } // 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
- Transform3D.cs
- SerializationException.cs
- WindowsTokenRoleProvider.cs
- HelpProvider.cs
- NativeRecognizer.cs
- Style.cs
- XmlSchemaInfo.cs
- FileDialog_Vista_Interop.cs
- WaitHandle.cs
- ToolBarTray.cs
- OracleParameter.cs
- DNS.cs
- EditableRegion.cs
- ComponentSerializationService.cs
- SHA384.cs
- HostedController.cs
- WindowCollection.cs
- FrameworkElement.cs
- WebZone.cs
- ImageIndexConverter.cs
- TemplateParser.cs
- PolicyLevel.cs
- XmlUtf8RawTextWriter.cs
- MailSettingsSection.cs
- WorkflowMarkupSerializationManager.cs
- GenerateHelper.cs
- ObjectTag.cs
- OutputScope.cs
- ThemeDirectoryCompiler.cs
- ListViewUpdateEventArgs.cs
- ObjectListSelectEventArgs.cs
- DockPanel.cs
- WorkflowPersistenceService.cs
- GetPageNumberCompletedEventArgs.cs
- DecoratedNameAttribute.cs
- WebPartZoneBase.cs
- MaskInputRejectedEventArgs.cs
- DataDocumentXPathNavigator.cs
- ParameterCollection.cs
- FormatException.cs
- Stack.cs
- DataViewSettingCollection.cs
- SectionVisual.cs
- FileSystemInfo.cs
- RuntimeArgument.cs
- DbConnectionHelper.cs
- DesigntimeLicenseContext.cs
- SetterBase.cs
- FixedSOMPage.cs
- PLINQETWProvider.cs
- CodeCatchClauseCollection.cs
- RequestStatusBarUpdateEventArgs.cs
- GZipStream.cs
- GregorianCalendar.cs
- RelatedPropertyManager.cs
- Label.cs
- SmtpNtlmAuthenticationModule.cs
- ServiceModelSecurityTokenTypes.cs
- Section.cs
- AlternateView.cs
- KnownBoxes.cs
- TypeUtil.cs
- BaseConfigurationRecord.cs
- EventWaitHandle.cs
- QueryOpeningEnumerator.cs
- ModelTreeManager.cs
- PolyLineSegment.cs
- ThreadLocal.cs
- WebBrowserNavigatingEventHandler.cs
- DataKeyArray.cs
- WmfPlaceableFileHeader.cs
- UnaryNode.cs
- ClientReliableChannelBinder.cs
- SQLInt64Storage.cs
- CannotUnloadAppDomainException.cs
- Permission.cs
- FixedStringLookup.cs
- TextBoxBase.cs
- SemanticTag.cs
- EffectiveValueEntry.cs
- HitTestParameters.cs
- QilList.cs
- ResourceDisplayNameAttribute.cs
- Evidence.cs
- Image.cs
- DeviceSpecificChoice.cs
- OdbcPermission.cs
- VisualBrush.cs
- ValidatedControlConverter.cs
- PartialCachingAttribute.cs
- WebControlsSection.cs
- SourceSwitch.cs
- GroupStyle.cs
- RuntimeResourceSet.cs
- CacheVirtualItemsEvent.cs
- NameTable.cs
- XLinq.cs
- PeerEndPoint.cs
- ToolStripStatusLabel.cs
- DataBoundLiteralControl.cs