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
- TypeDescriptor.cs
- StreamAsIStream.cs
- VScrollProperties.cs
- ReliableMessagingHelpers.cs
- WorkflowServiceBehavior.cs
- Parser.cs
- ComplexTypeEmitter.cs
- TextEditorCharacters.cs
- MimeWriter.cs
- QilVisitor.cs
- StickyNoteContentControl.cs
- FixedFindEngine.cs
- PermissionListSet.cs
- FirewallWrapper.cs
- Internal.cs
- MetadataCacheItem.cs
- ToolStripScrollButton.cs
- GlyphingCache.cs
- OdbcConnectionPoolProviderInfo.cs
- RewritingPass.cs
- VirtualStackFrame.cs
- TileModeValidation.cs
- RootBrowserWindowProxy.cs
- ModuleBuilder.cs
- ControlUtil.cs
- NamespaceMapping.cs
- Quad.cs
- SatelliteContractVersionAttribute.cs
- EpmSyndicationContentDeSerializer.cs
- ParameterCollection.cs
- HScrollProperties.cs
- MsmqIntegrationMessageProperty.cs
- Cursor.cs
- NullRuntimeConfig.cs
- TextServicesHost.cs
- TypeInitializationException.cs
- BindingExpressionUncommonField.cs
- ManifestResourceInfo.cs
- MetabaseReader.cs
- DbUpdateCommandTree.cs
- XmlSchemaFacet.cs
- JsonStringDataContract.cs
- InternalControlCollection.cs
- InheritanceAttribute.cs
- SectionInput.cs
- ResourceDefaultValueAttribute.cs
- Style.cs
- MetadataWorkspace.cs
- WrappingXamlSchemaContext.cs
- FixedDSBuilder.cs
- StringArrayConverter.cs
- CurrencyWrapper.cs
- BitStack.cs
- DocobjHost.cs
- CharAnimationUsingKeyFrames.cs
- PermissionSet.cs
- MatchAttribute.cs
- SqlNotificationEventArgs.cs
- Clause.cs
- ContextStaticAttribute.cs
- EntityCommandExecutionException.cs
- UTF7Encoding.cs
- ChangeDirector.cs
- SmiTypedGetterSetter.cs
- DataSourceXmlSerializationAttribute.cs
- SqlTopReducer.cs
- WebPartTransformerCollection.cs
- SignedInfo.cs
- SecurityDocument.cs
- UpdateProgress.cs
- HelpInfo.cs
- Source.cs
- CheckableControlBaseAdapter.cs
- DynamicActivityTypeDescriptor.cs
- InputScope.cs
- XmlILAnnotation.cs
- ParameterToken.cs
- ImageDrawing.cs
- TemplateFactory.cs
- SmtpMail.cs
- SmtpCommands.cs
- SizeKeyFrameCollection.cs
- RectAnimationUsingKeyFrames.cs
- TextBounds.cs
- FileEnumerator.cs
- WebPartEditorApplyVerb.cs
- DependencyPropertyChangedEventArgs.cs
- DataGridViewDataErrorEventArgs.cs
- XmlAnyElementAttribute.cs
- XmlComplianceUtil.cs
- Blend.cs
- SQLBytesStorage.cs
- ServerIdentity.cs
- RenderTargetBitmap.cs
- ValidatorAttribute.cs
- SubpageParagraph.cs
- OleDbParameter.cs
- BufferedOutputStream.cs
- StyleSheetDesigner.cs
- UnicodeEncoding.cs