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
- InputReferenceExpression.cs
- PointKeyFrameCollection.cs
- SqlBulkCopy.cs
- DbDataAdapter.cs
- SqlXmlStorage.cs
- TemplateAction.cs
- AdapterUtil.cs
- SvcMapFileLoader.cs
- InternalsVisibleToAttribute.cs
- DataKeyArray.cs
- UndoEngine.cs
- XmlSerializableWriter.cs
- TileBrush.cs
- ContextDataSourceView.cs
- CustomCredentialPolicy.cs
- X509ClientCertificateAuthentication.cs
- ImageIndexConverter.cs
- codemethodreferenceexpression.cs
- DesignerTransactionCloseEvent.cs
- WinInet.cs
- InvalidDataException.cs
- HttpResponse.cs
- arclist.cs
- RawMouseInputReport.cs
- SeparatorAutomationPeer.cs
- DefaultAutoFieldGenerator.cs
- WebBrowserHelper.cs
- followingquery.cs
- ListViewHitTestInfo.cs
- BinaryObjectWriter.cs
- UserUseLicenseDictionaryLoader.cs
- WebConfigurationHostFileChange.cs
- AppSettingsSection.cs
- ReadWriteObjectLock.cs
- HandlerBase.cs
- MaskDesignerDialog.cs
- MetadataProperty.cs
- EventLogQuery.cs
- XmlPropertyBag.cs
- EditorAttribute.cs
- SelectionRangeConverter.cs
- HighContrastHelper.cs
- TableRowCollection.cs
- PseudoWebRequest.cs
- EasingKeyFrames.cs
- WindowsScrollBar.cs
- ToolStripArrowRenderEventArgs.cs
- CopyAction.cs
- CodeTypeReference.cs
- ExtensionFile.cs
- StructuralType.cs
- GatewayDefinition.cs
- BitmapEffectState.cs
- CheckableControlBaseAdapter.cs
- AuthorizationPolicyTypeElementCollection.cs
- BindingOperations.cs
- ToolBar.cs
- ManifestBasedResourceGroveler.cs
- WorkflowMessageEventHandler.cs
- OleDbStruct.cs
- Camera.cs
- ToolStripControlHost.cs
- Transactions.cs
- WebPartVerb.cs
- ToolStripPanelCell.cs
- AuthenticatedStream.cs
- COM2PictureConverter.cs
- MenuRendererStandards.cs
- ExpanderAutomationPeer.cs
- AvtEvent.cs
- Rule.cs
- TargetControlTypeCache.cs
- BindingCollection.cs
- WebBrowserSiteBase.cs
- AppDomainFactory.cs
- MILUtilities.cs
- DesignerUtility.cs
- BasePropertyDescriptor.cs
- PropertyGrid.cs
- WeakEventTable.cs
- NameValueSectionHandler.cs
- ToolboxComponentsCreatingEventArgs.cs
- EmptyImpersonationContext.cs
- ImageSourceValueSerializer.cs
- DataGridViewComboBoxEditingControl.cs
- ArcSegment.cs
- ValidationSummary.cs
- RefreshEventArgs.cs
- TitleStyle.cs
- CaseKeyBox.xaml.cs
- DataGridCell.cs
- EditorResources.cs
- SiteMembershipCondition.cs
- DataGridViewTopRowAccessibleObject.cs
- RegexRunnerFactory.cs
- EmptyCollection.cs
- NativeStructs.cs
- DBParameter.cs
- DataGridToolTip.cs
- SqlCommandSet.cs