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
- FastEncoder.cs
- EndpointAddressElementBase.cs
- NetCodeGroup.cs
- DocumentOrderQuery.cs
- GridErrorDlg.cs
- DayRenderEvent.cs
- DeflateStream.cs
- datacache.cs
- CatalogZone.cs
- EllipseGeometry.cs
- SqlCacheDependencyDatabaseCollection.cs
- ConnectionStringsExpressionBuilder.cs
- DNS.cs
- NamespaceEmitter.cs
- RemoteHelper.cs
- Int64.cs
- AllMembershipCondition.cs
- PersonalizableTypeEntry.cs
- FilteredXmlReader.cs
- XmlSchemaAnyAttribute.cs
- _FtpControlStream.cs
- Helper.cs
- AddInIpcChannel.cs
- ByeMessageApril2005.cs
- AudioFormatConverter.cs
- TransportBindingElementImporter.cs
- Int32RectConverter.cs
- BaseTemplateParser.cs
- ICollection.cs
- OledbConnectionStringbuilder.cs
- Crc32.cs
- TdsValueSetter.cs
- WarningException.cs
- SqlInternalConnection.cs
- SamlAuthorizationDecisionClaimResource.cs
- ZoneIdentityPermission.cs
- ModulesEntry.cs
- FixedSOMTextRun.cs
- Bezier.cs
- WebPartActionVerb.cs
- RowsCopiedEventArgs.cs
- GenericAuthenticationEventArgs.cs
- ISAPIApplicationHost.cs
- SafeRegistryKey.cs
- FixedSOMTextRun.cs
- FixedSOMTable.cs
- CroppedBitmap.cs
- XmlChildEnumerator.cs
- DelegatingTypeDescriptionProvider.cs
- XPathNodeInfoAtom.cs
- AssertFilter.cs
- UIElementIsland.cs
- HeaderedContentControl.cs
- GridItem.cs
- SiteMapNodeItem.cs
- XPathNavigatorException.cs
- ReflectTypeDescriptionProvider.cs
- WSHttpBinding.cs
- SHA1.cs
- Attachment.cs
- CompilerWrapper.cs
- CurrencyManager.cs
- DispatcherHooks.cs
- UnsafeNativeMethods.cs
- MsmqInputSessionChannelListener.cs
- AttributeUsageAttribute.cs
- DbParameterHelper.cs
- TreeNodeConverter.cs
- SqlDataSourceQueryEditorForm.cs
- SplashScreen.cs
- SingleStorage.cs
- DLinqDataModelProvider.cs
- XmlObjectSerializerWriteContext.cs
- JumpItem.cs
- TreeViewImageKeyConverter.cs
- FunctionImportMapping.cs
- ToolStripContainer.cs
- ServiceMetadataContractBehavior.cs
- ServiceMetadataExtension.cs
- Switch.cs
- TimeIntervalCollection.cs
- ConnectivityStatus.cs
- ModifiableIteratorCollection.cs
- TextEditorSelection.cs
- StylusButton.cs
- TPLETWProvider.cs
- AppSettingsExpressionEditor.cs
- SerializationHelper.cs
- DocumentXPathNavigator.cs
- Line.cs
- NetworkInformationPermission.cs
- InputLangChangeEvent.cs
- ListItemConverter.cs
- DataBindingValueUIHandler.cs
- FullTextState.cs
- FileAuthorizationModule.cs
- CodeSubDirectory.cs
- NetTcpBindingElement.cs
- CommandArguments.cs
- OneOfScalarConst.cs