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
- IfJoinedCondition.cs
- SchemaEntity.cs
- FileSystemWatcher.cs
- CannotUnloadAppDomainException.cs
- RewritingSimplifier.cs
- DataSetMappper.cs
- BindableTemplateBuilder.cs
- AdapterUtil.cs
- PropertyEmitterBase.cs
- ImmutableCollection.cs
- TextDecoration.cs
- NegotiateStream.cs
- StylusPointDescription.cs
- MetadataCollection.cs
- TreeNodeMouseHoverEvent.cs
- PageAsyncTaskManager.cs
- PropertyGridEditorPart.cs
- ResourceDisplayNameAttribute.cs
- TextTreePropertyUndoUnit.cs
- FileCodeGroup.cs
- PhonemeConverter.cs
- HtmlDocument.cs
- ImageMapEventArgs.cs
- ClientConvert.cs
- Vector3dCollection.cs
- XmlLinkedNode.cs
- SubpageParaClient.cs
- FontCollection.cs
- OracleParameterCollection.cs
- BitmapEffect.cs
- BookmarkOptionsHelper.cs
- QueryContinueDragEventArgs.cs
- DataSourceGeneratorException.cs
- XmlElementAttributes.cs
- FileLogRecordHeader.cs
- WhileDesigner.xaml.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- Graph.cs
- XmlDocument.cs
- GridProviderWrapper.cs
- HtmlInputPassword.cs
- x509store.cs
- WebHttpBindingCollectionElement.cs
- QueuePathDialog.cs
- TextRangeSerialization.cs
- FillRuleValidation.cs
- CompilerScopeManager.cs
- PathNode.cs
- MemoryPressure.cs
- NavigatingCancelEventArgs.cs
- StaticTextPointer.cs
- ByteStreamGeometryContext.cs
- Bidi.cs
- SqlUserDefinedAggregateAttribute.cs
- ServiceRouteHandler.cs
- ParseElementCollection.cs
- _RegBlobWebProxyDataBuilder.cs
- EventBindingService.cs
- FieldMetadata.cs
- XmlAttributes.cs
- GlyphRunDrawing.cs
- RemotingConfigParser.cs
- ObjectConverter.cs
- PageCatalogPart.cs
- HtmlTitle.cs
- JsonFormatReaderGenerator.cs
- RestHandlerFactory.cs
- COM2ExtendedBrowsingHandler.cs
- ComponentDesigner.cs
- CompilerGlobalScopeAttribute.cs
- WebPermission.cs
- HttpPostClientProtocol.cs
- IriParsingElement.cs
- HandlerMappingMemo.cs
- ResourceDictionary.cs
- WebPartDisplayModeEventArgs.cs
- ToolStripDesignerAvailabilityAttribute.cs
- DataGridCell.cs
- IndexerNameAttribute.cs
- CompilationLock.cs
- ConfigXmlWhitespace.cs
- TemplateControl.cs
- GcSettings.cs
- Sequence.cs
- CompositeFontParser.cs
- TabControl.cs
- MessageFault.cs
- SamlAssertion.cs
- SuppressMessageAttribute.cs
- QueryCursorEventArgs.cs
- Separator.cs
- BackStopAuthenticationModule.cs
- DataFieldEditor.cs
- TitleStyle.cs
- TypeDelegator.cs
- XmlReturnWriter.cs
- TextLineBreak.cs
- FrameworkElementFactoryMarkupObject.cs
- DataServiceStreamResponse.cs
- TextElementCollection.cs