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
- ComEventsMethod.cs
- PropertyBuilder.cs
- HMACMD5.cs
- SelectorItemAutomationPeer.cs
- CheckBoxFlatAdapter.cs
- LoginNameDesigner.cs
- TableColumn.cs
- FatalException.cs
- DataSourceHelper.cs
- MarkupProperty.cs
- SelectionItemProviderWrapper.cs
- COM2PropertyPageUITypeConverter.cs
- BindValidator.cs
- RetriableClipboard.cs
- ToolStripItemEventArgs.cs
- ManagementEventWatcher.cs
- XmlIgnoreAttribute.cs
- ResourceProviderFactory.cs
- PeerServiceMessageContracts.cs
- PersonalizationProviderCollection.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- DataGridViewCheckBoxCell.cs
- Composition.cs
- AttachmentService.cs
- HandlerFactoryCache.cs
- ReflectionServiceProvider.cs
- MobileRedirect.cs
- SliderAutomationPeer.cs
- SqlResolver.cs
- XamlReaderHelper.cs
- DragDeltaEventArgs.cs
- TextEditorTyping.cs
- WindowHideOrCloseTracker.cs
- SmtpCommands.cs
- Exceptions.cs
- PagesSection.cs
- ResourceExpressionEditorSheet.cs
- WizardPanelChangingEventArgs.cs
- Convert.cs
- PingReply.cs
- XmlTextReaderImplHelpers.cs
- DragEvent.cs
- InputGestureCollection.cs
- XmlTextReaderImpl.cs
- HandleExceptionArgs.cs
- FileVersion.cs
- WindowShowOrOpenTracker.cs
- TargetConverter.cs
- Visual3D.cs
- DataService.cs
- MTConfigUtil.cs
- PrivacyNoticeBindingElement.cs
- VectorCollectionValueSerializer.cs
- CompressStream.cs
- PropertySourceInfo.cs
- ReadOnlyCollectionBuilder.cs
- Freezable.cs
- GestureRecognizer.cs
- WindowsSpinner.cs
- DisplayMemberTemplateSelector.cs
- ReachDocumentSequenceSerializerAsync.cs
- SqlRetyper.cs
- TraceSection.cs
- GradientStopCollection.cs
- TextShapeableCharacters.cs
- Attributes.cs
- FixedDocument.cs
- OLEDB_Util.cs
- ContextBase.cs
- ThreadStartException.cs
- RangeValueProviderWrapper.cs
- CellPartitioner.cs
- CodeStatement.cs
- _NegoStream.cs
- DecimalConverter.cs
- FilterEventArgs.cs
- OperatorExpressions.cs
- SqlDataSource.cs
- RotationValidation.cs
- WsatStrings.cs
- InternalConfigRoot.cs
- BaseTemplateParser.cs
- CodeAttributeDeclaration.cs
- DefaultAuthorizationContext.cs
- Localizer.cs
- DashStyles.cs
- TimeSpanOrInfiniteConverter.cs
- NamespaceQuery.cs
- ConfigurationFileMap.cs
- DataGridViewCellStyleEditor.cs
- EntityTypeBase.cs
- SynchronizationLockException.cs
- SQlBooleanStorage.cs
- RecordConverter.cs
- UndirectedGraph.cs
- documentsequencetextview.cs
- ClientSponsor.cs
- MenuItemBinding.cs
- DesignerOptionService.cs
- ValueChangedEventManager.cs