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
- NavigationWindowAutomationPeer.cs
- RemotingAttributes.cs
- SourceSwitch.cs
- TypeGeneratedEventArgs.cs
- TreeNodeClickEventArgs.cs
- ToolTipService.cs
- ResourceReferenceKeyNotFoundException.cs
- NullToBooleanConverter.cs
- NumberFunctions.cs
- UnsafeNativeMethods.cs
- ConfigurationValidatorAttribute.cs
- PackageFilter.cs
- ScriptReference.cs
- WindowsTitleBar.cs
- CreateDataSourceDialog.cs
- SequentialUshortCollection.cs
- XmlUrlResolver.cs
- ScriptRegistrationManager.cs
- RegexTree.cs
- ObjectStateManagerMetadata.cs
- objectresult_tresulttype.cs
- RemoteWebConfigurationHost.cs
- CodeAttributeArgument.cs
- BaseTemplateBuildProvider.cs
- Rules.cs
- HttpSessionStateBase.cs
- StringConcat.cs
- SecurityContext.cs
- DSASignatureDeformatter.cs
- ObjectNavigationPropertyMapping.cs
- CssStyleCollection.cs
- ListViewGroupConverter.cs
- ISAPIWorkerRequest.cs
- IList.cs
- ServiceChannelManager.cs
- TypePropertyEditor.cs
- Logging.cs
- FaultContractInfo.cs
- URLAttribute.cs
- ComponentConverter.cs
- UpdatePanelControlTrigger.cs
- VisualStyleRenderer.cs
- PassportAuthentication.cs
- UnsafeNativeMethodsCLR.cs
- ZipIOExtraFieldElement.cs
- DataRowExtensions.cs
- WindowsListViewItemCheckBox.cs
- GradientBrush.cs
- Oid.cs
- ToolStripDropTargetManager.cs
- WebPartVerb.cs
- KnownBoxes.cs
- StateMachine.cs
- ExceptionHelpers.cs
- StylusPoint.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- StateBag.cs
- ConfigXmlElement.cs
- FrameworkRichTextComposition.cs
- AlternateView.cs
- ClearCollection.cs
- FormsAuthenticationCredentials.cs
- Wizard.cs
- Utils.cs
- BStrWrapper.cs
- BooleanFunctions.cs
- ModelUtilities.cs
- SqlReferenceCollection.cs
- DataGridViewColumnHeaderCell.cs
- SetterBase.cs
- X509SecurityTokenProvider.cs
- QuotedStringWriteStateInfo.cs
- CancellationState.cs
- GuidTagList.cs
- DataColumnMapping.cs
- Internal.cs
- Misc.cs
- FieldToken.cs
- TableRowCollection.cs
- OleServicesContext.cs
- ElementNotEnabledException.cs
- XmlSchemaAnnotation.cs
- XmlValidatingReaderImpl.cs
- _ContextAwareResult.cs
- RootBrowserWindow.cs
- ListBindableAttribute.cs
- IIS7WorkerRequest.cs
- altserialization.cs
- ThreadAbortException.cs
- ListViewGroupItemCollection.cs
- ColorTransform.cs
- FixedSOMLineCollection.cs
- HttpApplicationFactory.cs
- SafeEventHandle.cs
- AppDomainFactory.cs
- SqlConnectionString.cs
- OptimizerPatterns.cs
- CodeAccessPermission.cs
- UidManager.cs
- AnnotationMap.cs