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
- GlobalizationAssembly.cs
- TreeIterators.cs
- HtmlUtf8RawTextWriter.cs
- FileVersion.cs
- ProxyWebPart.cs
- ProjectionQueryOptionExpression.cs
- FloaterBaseParaClient.cs
- XmlSchemaSubstitutionGroup.cs
- SoundPlayerAction.cs
- IdentityHolder.cs
- DataGridViewCheckBoxCell.cs
- LoadedOrUnloadedOperation.cs
- ContentElement.cs
- AssemblyFilter.cs
- LocatorPartList.cs
- userdatakeys.cs
- LineUtil.cs
- BuildProviderAppliesToAttribute.cs
- ComAdminWrapper.cs
- BatchServiceHost.cs
- UntypedNullExpression.cs
- WebPartsPersonalization.cs
- EndpointAddressProcessor.cs
- Style.cs
- CompilerScopeManager.cs
- PropertyGeneratedEventArgs.cs
- EventArgs.cs
- ProtocolElement.cs
- UrlAuthorizationModule.cs
- _SslStream.cs
- LogArchiveSnapshot.cs
- MinimizableAttributeTypeConverter.cs
- Vector3DAnimation.cs
- Size.cs
- OracleColumn.cs
- WebZone.cs
- xsdvalidator.cs
- SqlErrorCollection.cs
- PropertyBuilder.cs
- NotEqual.cs
- ScrollBarAutomationPeer.cs
- LockRecoveryTask.cs
- FunctionParameter.cs
- XPathException.cs
- ComContractElementCollection.cs
- ToolStripControlHost.cs
- BinHexEncoding.cs
- PageAdapter.cs
- UnknownWrapper.cs
- Pen.cs
- FixedDSBuilder.cs
- FontFaceLayoutInfo.cs
- FlowPosition.cs
- TypeDescriptionProvider.cs
- SortKey.cs
- DescendantBaseQuery.cs
- _Semaphore.cs
- Int64AnimationBase.cs
- DependencyObjectType.cs
- MailWriter.cs
- FontDriver.cs
- HtmlLink.cs
- ModuleBuilderData.cs
- wgx_exports.cs
- WebPartVerb.cs
- RegistryKey.cs
- AmbientLight.cs
- CollectionViewGroup.cs
- DesignerCategoryAttribute.cs
- AlternateView.cs
- SoapIncludeAttribute.cs
- MSAAWinEventWrap.cs
- WebOperationContext.cs
- SiteMapNodeItem.cs
- SecurityHelper.cs
- CompositionDesigner.cs
- SourceLineInfo.cs
- ListItemsPage.cs
- Vector3DCollectionConverter.cs
- VariableQuery.cs
- AssemblyBuilderData.cs
- Popup.cs
- TreePrinter.cs
- COMException.cs
- PropertyConverter.cs
- NativeMethods.cs
- Query.cs
- FileFormatException.cs
- DeviceFilterEditorDialog.cs
- OrderingInfo.cs
- SimpleApplicationHost.cs
- BaseValidatorDesigner.cs
- DetailsViewDeletedEventArgs.cs
- FileClassifier.cs
- CapabilitiesPattern.cs
- ResourceAttributes.cs
- CookieParameter.cs
- LinkedResource.cs
- DeviceSpecificChoice.cs
- DataExpression.cs