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
- PartManifestEntry.cs
- ApplicationFileParser.cs
- Adorner.cs
- XmlIgnoreAttribute.cs
- CertificateReferenceElement.cs
- XmlnsDictionary.cs
- CompositeClientFormatter.cs
- PeerTransportElement.cs
- PerspectiveCamera.cs
- FloatMinMaxAggregationOperator.cs
- XmlHierarchyData.cs
- OleDbRowUpdatingEvent.cs
- NotConverter.cs
- DataGridComponentEditor.cs
- Utility.cs
- InvalidFilterCriteriaException.cs
- DataIdProcessor.cs
- SqlFunctionAttribute.cs
- MatrixIndependentAnimationStorage.cs
- ReferenceSchema.cs
- XmlBaseReader.cs
- _SslStream.cs
- XPathAncestorIterator.cs
- StringPropertyBuilder.cs
- Parser.cs
- KeyMatchBuilder.cs
- UserControlBuildProvider.cs
- TranslateTransform.cs
- TypeTypeConverter.cs
- externdll.cs
- CompoundFileStorageReference.cs
- ScopelessEnumAttribute.cs
- DesignerLoader.cs
- DecoderFallbackWithFailureFlag.cs
- MarkupCompiler.cs
- DataTableClearEvent.cs
- DataGridColumn.cs
- BinaryFormatterWriter.cs
- MessagePropertyAttribute.cs
- TreeViewAutomationPeer.cs
- DESCryptoServiceProvider.cs
- HttpServerChannel.cs
- Int32AnimationUsingKeyFrames.cs
- DataSourceHelper.cs
- SQLStringStorage.cs
- DynamicControl.cs
- PackWebResponse.cs
- HttpEncoder.cs
- rsa.cs
- PanelDesigner.cs
- RangeBase.cs
- CharKeyFrameCollection.cs
- SqlDependencyListener.cs
- PublisherIdentityPermission.cs
- While.cs
- AtomicFile.cs
- DataControlFieldCell.cs
- TextEffect.cs
- ping.cs
- XmlAtomErrorReader.cs
- PanelStyle.cs
- GuidTagList.cs
- TriggerAction.cs
- ClientSession.cs
- TabControlEvent.cs
- UniqueIdentifierService.cs
- HandledEventArgs.cs
- NativeMethods.cs
- SystemPens.cs
- DivideByZeroException.cs
- LoginUtil.cs
- PropertyBuilder.cs
- ArgumentOutOfRangeException.cs
- EntityDataSourceView.cs
- StaticSiteMapProvider.cs
- SchemaNames.cs
- Utils.cs
- DateTimeConverter2.cs
- ActivationServices.cs
- PatternMatcher.cs
- DataListCommandEventArgs.cs
- PageThemeCodeDomTreeGenerator.cs
- BitmapInitialize.cs
- ConfigUtil.cs
- Util.cs
- BoundPropertyEntry.cs
- HttpDictionary.cs
- JsonSerializer.cs
- CategoryNameCollection.cs
- RegistrationServices.cs
- ContactManager.cs
- SqlServices.cs
- HybridDictionary.cs
- StringResourceManager.cs
- XPathNavigator.cs
- NumberFormatInfo.cs
- ThreadStartException.cs
- BufferedGraphics.cs
- ValuePattern.cs
- PropertyRecord.cs