Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / SqlClient / SqlGen / SymbolTable.cs / 2 / SymbolTable.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //--------------------------------------------------------------------- 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 [....], [....] //--------------------------------------------------------------------- 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
- TabControlAutomationPeer.cs
- Label.cs
- TraceSwitch.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- ValidatingReaderNodeData.cs
- NativeMethodsCLR.cs
- BamlBinaryReader.cs
- ActivityExecutionWorkItem.cs
- DbConnectionPoolOptions.cs
- Translator.cs
- ByteAnimationUsingKeyFrames.cs
- JapaneseCalendar.cs
- ParameterCollection.cs
- MemberProjectedSlot.cs
- AddInServer.cs
- FontUnitConverter.cs
- ScaleTransform.cs
- SecurityTokenException.cs
- ToolTipService.cs
- EventHandlerList.cs
- MessageSmuggler.cs
- XmlSequenceWriter.cs
- MappingModelBuildProvider.cs
- LinearGradientBrush.cs
- UIntPtr.cs
- UserNameSecurityTokenAuthenticator.cs
- AttributeData.cs
- TextBoxRenderer.cs
- FloaterBaseParaClient.cs
- TextEffect.cs
- NativeMethods.cs
- _UncName.cs
- CapabilitiesAssignment.cs
- PrintControllerWithStatusDialog.cs
- MembershipSection.cs
- MatrixTransform3D.cs
- Stroke2.cs
- FreezableCollection.cs
- PanelStyle.cs
- DataListItemCollection.cs
- WebRequestModuleElement.cs
- SelectManyQueryOperator.cs
- TextRenderer.cs
- RightsManagementSuppressedStream.cs
- FusionWrap.cs
- HtmlMeta.cs
- BookmarkScopeManager.cs
- DbParameterCollectionHelper.cs
- RuntimeConfig.cs
- KnownBoxes.cs
- TextEffect.cs
- ChangePassword.cs
- ExternalException.cs
- FactoryId.cs
- NativeMethods.cs
- CallbackValidator.cs
- HttpConfigurationSystem.cs
- SelectionListComponentEditor.cs
- WsatStrings.cs
- PathTooLongException.cs
- ListViewDeletedEventArgs.cs
- DictionaryContent.cs
- Quaternion.cs
- Block.cs
- UserPreferenceChangingEventArgs.cs
- ProxyAttribute.cs
- XmlValidatingReaderImpl.cs
- GenericPrincipal.cs
- UserPreferenceChangingEventArgs.cs
- RangeValidator.cs
- UpdatableWrapper.cs
- NetDataContractSerializer.cs
- HttpHandler.cs
- QueueException.cs
- LinkedResourceCollection.cs
- HttpEncoder.cs
- SinglePhaseEnlistment.cs
- SqlCommandSet.cs
- DataGridItem.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- SQLMembershipProvider.cs
- EventRecord.cs
- FileAuthorizationModule.cs
- OdbcConnectionString.cs
- CollectionBase.cs
- StreamWriter.cs
- ADMembershipUser.cs
- IntSecurity.cs
- EventManager.cs
- TreeNodeStyle.cs
- LineUtil.cs
- Identity.cs
- DataGrid.cs
- Message.cs
- XmlChildNodes.cs
- JsonReaderDelegator.cs
- XamlFilter.cs
- ServicesUtilities.cs
- Native.cs
- DecimalKeyFrameCollection.cs