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
- TrackBarRenderer.cs
- ButtonStandardAdapter.cs
- ComPlusThreadInitializer.cs
- StrokeFIndices.cs
- WindowsToolbarItemAsMenuItem.cs
- Win32KeyboardDevice.cs
- XmlObjectSerializerContext.cs
- DeploymentSectionCache.cs
- JoinElimination.cs
- SmtpTransport.cs
- ArrangedElement.cs
- InkSerializer.cs
- FilePresentation.cs
- Process.cs
- FontClient.cs
- XmlSigningNodeWriter.cs
- OperationSelectorBehavior.cs
- DbLambda.cs
- _TLSstream.cs
- LinqTreeNodeEvaluator.cs
- TabletDeviceInfo.cs
- AutoCompleteStringCollection.cs
- ToolbarAUtomationPeer.cs
- Vector3DValueSerializer.cs
- TimeSpanMinutesConverter.cs
- CheckBox.cs
- SessionState.cs
- TextParagraphCache.cs
- PerfCounters.cs
- XmlWriter.cs
- basenumberconverter.cs
- LocalizationParserHooks.cs
- BindingListCollectionView.cs
- XNodeNavigator.cs
- Formatter.cs
- MailDefinition.cs
- KnowledgeBase.cs
- ErrorProvider.cs
- ResourceReferenceExpression.cs
- NodeFunctions.cs
- MdiWindowListStrip.cs
- CapabilitiesSection.cs
- DBDataPermission.cs
- MDIControlStrip.cs
- ConfigXmlSignificantWhitespace.cs
- DataGridLinkButton.cs
- MimeTypeAttribute.cs
- RectIndependentAnimationStorage.cs
- TokenBasedSetEnumerator.cs
- UITypeEditor.cs
- LinqDataSourceSelectEventArgs.cs
- AlternationConverter.cs
- UpdateProgress.cs
- ListViewItemSelectionChangedEvent.cs
- LayoutManager.cs
- ConfigurationStrings.cs
- RuleProcessor.cs
- DiscreteKeyFrames.cs
- Font.cs
- Site.cs
- PointIndependentAnimationStorage.cs
- StructureChangedEventArgs.cs
- XMLUtil.cs
- ProtocolsConfiguration.cs
- ITextView.cs
- NegatedCellConstant.cs
- DomNameTable.cs
- ThemeDirectoryCompiler.cs
- MediaContext.cs
- AssemblyNameUtility.cs
- ValidatorUtils.cs
- _NetRes.cs
- SystemIPInterfaceProperties.cs
- XPathItem.cs
- NamespaceDisplay.xaml.cs
- _UncName.cs
- InputProcessorProfilesLoader.cs
- PrintEvent.cs
- DataColumn.cs
- SerializationSectionGroup.cs
- XsltException.cs
- FtpWebResponse.cs
- Transform3D.cs
- TCEAdapterGenerator.cs
- Border.cs
- DataTableCollection.cs
- DependencyPropertyKind.cs
- DataObjectFieldAttribute.cs
- ParserExtension.cs
- XmlWellformedWriter.cs
- CodeDirectoryCompiler.cs
- Decorator.cs
- XmlQueryContext.cs
- HttpRequestCacheValidator.cs
- SqlCacheDependencyDatabaseCollection.cs
- ParagraphResult.cs
- Win32.cs
- UrlMappingCollection.cs
- CollectionCodeDomSerializer.cs
- UserPreferenceChangedEventArgs.cs