Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Propagator.ExtentPlaceholderCreator.cs
- HexParser.cs
- IImplicitResourceProvider.cs
- ReadOnlyDataSource.cs
- Executor.cs
- EventPrivateKey.cs
- Column.cs
- SrgsDocumentParser.cs
- SiblingIterators.cs
- XmlNullResolver.cs
- RecognizeCompletedEventArgs.cs
- SchemaNamespaceManager.cs
- dataSvcMapFileLoader.cs
- HMAC.cs
- ToolStripScrollButton.cs
- X509Certificate.cs
- PageAsyncTask.cs
- ScrollViewer.cs
- SqlTransaction.cs
- HttpRequest.cs
- RangeBaseAutomationPeer.cs
- MatchingStyle.cs
- FillRuleValidation.cs
- HMACSHA256.cs
- XmlSchemaAny.cs
- RootBrowserWindowProxy.cs
- ExpandSegmentCollection.cs
- TimelineGroup.cs
- ListenerTraceUtility.cs
- DataBindingHandlerAttribute.cs
- KeyPullup.cs
- ConsoleCancelEventArgs.cs
- XmlNamespaceMapping.cs
- XPathChildIterator.cs
- Control.cs
- InvalidDataException.cs
- ValueTypeFixupInfo.cs
- FixedBufferAttribute.cs
- TextElement.cs
- NetworkInformationPermission.cs
- EventSetterHandlerConverter.cs
- ObjectDataSourceFilteringEventArgs.cs
- DefaultBinder.cs
- StaticExtension.cs
- EventSourceCreationData.cs
- TextEditorLists.cs
- StringConcat.cs
- SocketElement.cs
- MarginsConverter.cs
- BitmapCache.cs
- StaticSiteMapProvider.cs
- TypedElement.cs
- ElasticEase.cs
- SchemaObjectWriter.cs
- SHA384Cng.cs
- AdCreatedEventArgs.cs
- ListViewContainer.cs
- ExceptionHandlersDesigner.cs
- ToolStripContainer.cs
- SqlGenericUtil.cs
- Emitter.cs
- PieceNameHelper.cs
- DataGridViewColumnCollection.cs
- ApplicationFileParser.cs
- NonClientArea.cs
- RandomNumberGenerator.cs
- XdrBuilder.cs
- AsyncParams.cs
- ProfileSettingsCollection.cs
- Compiler.cs
- TripleDES.cs
- ServiceThrottlingElement.cs
- StringKeyFrameCollection.cs
- ViewPort3D.cs
- CharStorage.cs
- HttpWriter.cs
- WebPartManagerDesigner.cs
- XmlSchemaImport.cs
- NotifyIcon.cs
- SqlFactory.cs
- KnownIds.cs
- DeflateStream.cs
- EntityCollectionChangedParams.cs
- DescendantBaseQuery.cs
- CounterSampleCalculator.cs
- WindowClosedEventArgs.cs
- IOException.cs
- ApplicationActivator.cs
- WorkflowExecutor.cs
- ProxySimple.cs
- BooleanAnimationBase.cs
- formatter.cs
- TextHidden.cs
- WeakHashtable.cs
- NavigateEvent.cs
- DocumentGridContextMenu.cs
- PopupEventArgs.cs
- UnicodeEncoding.cs
- AudioFormatConverter.cs
- SchemaAttDef.cs