Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / SqlClient / SqlGen / SymbolTable.cs / 1305376 / SymbolTable.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; using System.Data.SqlClient; using System.Data.Metadata.Edm; using System.Data.Common.CommandTrees; namespace System.Data.SqlClient.SqlGen { ////// The symbol table is quite primitive - it is a stack with a new entry for /// each scope. Lookups search from the top of the stack to the bottom, until /// an entry is found. /// /// The symbols are of the following kinds /// internal sealed class SymbolTable { private List///
/// /// Symbols represent names- ///
represents tables (extents/nested selects/unnests) - ///
represents Join nodes - ///
columns. to be resolved, /// or things to be renamed. /// > symbols = new List >(); internal void EnterScope() { symbols.Add(new Dictionary (StringComparer.OrdinalIgnoreCase)); } internal void ExitScope() { symbols.RemoveAt(symbols.Count - 1); } internal void Add(string name, Symbol value) { symbols[symbols.Count - 1][name] = value; } internal Symbol Lookup(string name) { for (int i = symbols.Count - 1; i >= 0; --i) { if (symbols[i].ContainsKey(name)) { return symbols[i][name]; } } return null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; using System.Data.SqlClient; using System.Data.Metadata.Edm; using System.Data.Common.CommandTrees; namespace System.Data.SqlClient.SqlGen { ////// The symbol table is quite primitive - it is a stack with a new entry for /// each scope. Lookups search from the top of the stack to the bottom, until /// an entry is found. /// /// The symbols are of the following kinds /// internal sealed class SymbolTable { private List///
/// /// Symbols represent names- ///
represents tables (extents/nested selects/unnests) - ///
represents Join nodes - ///
columns. to be resolved, /// or things to be renamed. /// > symbols = new List >(); internal void EnterScope() { symbols.Add(new Dictionary (StringComparer.OrdinalIgnoreCase)); } internal void ExitScope() { symbols.RemoveAt(symbols.Count - 1); } internal void Add(string name, Symbol value) { symbols[symbols.Count - 1][name] = value; } internal Symbol Lookup(string name) { for (int i = symbols.Count - 1; i >= 0; --i) { if (symbols[i].ContainsKey(name)) { return symbols[i][name]; } } return null; } } } // 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
- Axis.cs
- RegexCapture.cs
- StringUtil.cs
- Wizard.cs
- Math.cs
- XslTransform.cs
- ConnectionManagementElement.cs
- ImageList.cs
- IncomingWebResponseContext.cs
- StructuredTypeEmitter.cs
- ModelItemKeyValuePair.cs
- TypedColumnHandler.cs
- SeverityFilter.cs
- CollectionViewProxy.cs
- XmlTypeAttribute.cs
- RtfControls.cs
- MenuItemStyleCollection.cs
- ConnectionManagementElement.cs
- SmtpCommands.cs
- DebugManager.cs
- DataTableMapping.cs
- DataPagerFieldItem.cs
- UniformGrid.cs
- Parameter.cs
- EntitySqlQueryCacheKey.cs
- SafeNativeMemoryHandle.cs
- MobileErrorInfo.cs
- ResourceDisplayNameAttribute.cs
- ResourceIDHelper.cs
- Pair.cs
- PassportAuthentication.cs
- MatrixCamera.cs
- FileDetails.cs
- Style.cs
- XsltOutput.cs
- ContainerAction.cs
- CompilerErrorCollection.cs
- FormatStringEditor.cs
- AsyncPostBackTrigger.cs
- formatter.cs
- TaskbarItemInfo.cs
- ContextMenuStrip.cs
- BaseValidator.cs
- TextTreeInsertUndoUnit.cs
- CornerRadiusConverter.cs
- ImageSourceValueSerializer.cs
- HatchBrush.cs
- EntityProviderServices.cs
- UriExt.cs
- JpegBitmapEncoder.cs
- SchemaInfo.cs
- GridViewSelectEventArgs.cs
- BoundPropertyEntry.cs
- TreeNodeMouseHoverEvent.cs
- DockProviderWrapper.cs
- MatrixIndependentAnimationStorage.cs
- AsyncCompletedEventArgs.cs
- ParentControlDesigner.cs
- DrawingContextWalker.cs
- TileBrush.cs
- DynamicFilterExpression.cs
- ObjectCacheSettings.cs
- WebPartDisplayModeCancelEventArgs.cs
- HorizontalAlignConverter.cs
- DbDataAdapter.cs
- XmlSchemaInfo.cs
- SqlConnectionString.cs
- EditorZoneAutoFormat.cs
- VisualStyleRenderer.cs
- ConstructorNeedsTagAttribute.cs
- DataGridViewLinkColumn.cs
- ProfileSettingsCollection.cs
- DisableDpiAwarenessAttribute.cs
- PropertySet.cs
- ResXBuildProvider.cs
- RegularExpressionValidator.cs
- ExplicitDiscriminatorMap.cs
- ConstraintEnumerator.cs
- _NTAuthentication.cs
- BindingCollection.cs
- ClientTarget.cs
- XmlToDatasetMap.cs
- EventPropertyMap.cs
- TransportConfigurationTypeElement.cs
- XmlSchemaInferenceException.cs
- OleDbParameterCollection.cs
- XmlReaderSettings.cs
- ProfileService.cs
- XmlSchemaObject.cs
- DbConnectionStringCommon.cs
- DbTransaction.cs
- DetailsViewUpdateEventArgs.cs
- ChangeDirector.cs
- TextLineBreak.cs
- Model3D.cs
- CodePageUtils.cs
- FollowerQueueCreator.cs
- ComponentTray.cs
- RoleManagerEventArgs.cs
- AssociationType.cs