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
- PeerNearMe.cs
- PositiveTimeSpanValidator.cs
- SecurityDescriptor.cs
- StorageModelBuildProvider.cs
- DataRowComparer.cs
- XmlElementCollection.cs
- DetailsViewUpdateEventArgs.cs
- Variable.cs
- LoginAutoFormat.cs
- CheckBoxDesigner.cs
- ArrayList.cs
- AsyncResult.cs
- XmlDictionaryReader.cs
- DeclaredTypeValidator.cs
- AssociationSetEnd.cs
- WmfPlaceableFileHeader.cs
- AutoResizedEvent.cs
- LineBreak.cs
- MutexSecurity.cs
- TCEAdapterGenerator.cs
- GCHandleCookieTable.cs
- AutomationPatternInfo.cs
- figurelength.cs
- TextUtf8RawTextWriter.cs
- InvokeMethodActivityDesigner.cs
- RemoveStoryboard.cs
- CompilationAssemblyInstallComponent.cs
- WebBrowserPermission.cs
- SRGSCompiler.cs
- StringArrayConverter.cs
- WindowsRegion.cs
- CollectionViewGroupRoot.cs
- XmlSchemaAnnotated.cs
- LogManagementAsyncResult.cs
- LineInfo.cs
- XmlUtf8RawTextWriter.cs
- DataGridPageChangedEventArgs.cs
- SelectionEditingBehavior.cs
- MediaSystem.cs
- BooleanToVisibilityConverter.cs
- Viewport2DVisual3D.cs
- ConvertEvent.cs
- Calendar.cs
- TextBox.cs
- BindingFormattingDialog.cs
- ListViewItem.cs
- D3DImage.cs
- hwndwrapper.cs
- CalendarDateChangedEventArgs.cs
- LinkConverter.cs
- RequestCacheEntry.cs
- SafeHandles.cs
- AppliedDeviceFiltersEditor.cs
- ExpiredSecurityTokenException.cs
- printdlgexmarshaler.cs
- SelectionEditingBehavior.cs
- AssemblyAttributes.cs
- ServiceOperation.cs
- PerformanceCounterManager.cs
- XmlAttributeAttribute.cs
- ProfileEventArgs.cs
- TransformerInfoCollection.cs
- ApplicationDirectoryMembershipCondition.cs
- IssuanceLicense.cs
- TableRowCollection.cs
- SerialPinChanges.cs
- XamlPoint3DCollectionSerializer.cs
- OutgoingWebRequestContext.cs
- ConstraintManager.cs
- NonBatchDirectoryCompiler.cs
- AnchorEditor.cs
- JsonDeserializer.cs
- ColorKeyFrameCollection.cs
- SelectionPattern.cs
- SendMessageChannelCache.cs
- TrackingMemoryStream.cs
- XmlNodeList.cs
- TableItemStyle.cs
- StrongNameMembershipCondition.cs
- MatrixIndependentAnimationStorage.cs
- Pool.cs
- DeobfuscatingStream.cs
- ValidatorCollection.cs
- TextCompositionManager.cs
- DataServiceResponse.cs
- NullEntityWrapper.cs
- CodeTypeReference.cs
- ChtmlCommandAdapter.cs
- CellCreator.cs
- TableAutomationPeer.cs
- ValueConversionAttribute.cs
- TaskFormBase.cs
- XmlNodeList.cs
- ContourSegment.cs
- RequestCachePolicy.cs
- TraceHwndHost.cs
- KeyGesture.cs
- LambdaValue.cs
- AnnotationComponentChooser.cs
- ExpanderAutomationPeer.cs