Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- // // 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
- MouseEvent.cs
- SecurityUtils.cs
- XmlDocumentFragment.cs
- AlternateViewCollection.cs
- HandleCollector.cs
- WindowsMenu.cs
- FacetEnabledSchemaElement.cs
- EmptyStringExpandableObjectConverter.cs
- BaseCAMarshaler.cs
- PersonalizationAdministration.cs
- StateBag.cs
- SrgsDocumentParser.cs
- WebPartEditorCancelVerb.cs
- HtmlAnchor.cs
- SizeChangedInfo.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- TransactionChannelListener.cs
- SatelliteContractVersionAttribute.cs
- DelegatingStream.cs
- PackWebResponse.cs
- XmlNamespaceManager.cs
- CreateRefExpr.cs
- DataObjectAttribute.cs
- Schema.cs
- AuthenticationService.cs
- ParseNumbers.cs
- CalendarButtonAutomationPeer.cs
- TextRangeEdit.cs
- StorageInfo.cs
- AttributeTable.cs
- InvalidPropValue.cs
- ValuePattern.cs
- SrgsRuleRef.cs
- ObjectDataSource.cs
- WebContentFormatHelper.cs
- DrawingBrush.cs
- ConstraintConverter.cs
- ISAPIApplicationHost.cs
- WorkflowRuntimeService.cs
- HtmlShim.cs
- PropertyDescriptorGridEntry.cs
- XmlSchemaElement.cs
- ErrorTableItemStyle.cs
- BaseDataBoundControl.cs
- TypeUtils.cs
- SingleTagSectionHandler.cs
- validation.cs
- SparseMemoryStream.cs
- PageHandlerFactory.cs
- TabletDeviceInfo.cs
- PersistencePipeline.cs
- TdsParserStaticMethods.cs
- PrintEvent.cs
- MenuBase.cs
- Encoding.cs
- TypeResolvingOptions.cs
- ListViewDeleteEventArgs.cs
- CurrentTimeZone.cs
- GridProviderWrapper.cs
- WeakReference.cs
- TemplateBuilder.cs
- MultiSelectRootGridEntry.cs
- ImplicitInputBrush.cs
- StyleHelper.cs
- filewebresponse.cs
- CollectionBuilder.cs
- DataControlImageButton.cs
- SettingsSavedEventArgs.cs
- StandardMenuStripVerb.cs
- TableLayoutStyle.cs
- WpfKnownMember.cs
- SecurityChannel.cs
- RequestTimeoutManager.cs
- WizardPanelChangingEventArgs.cs
- WebPartVerb.cs
- RefType.cs
- AudioFileOut.cs
- UInt64Storage.cs
- ExtensibleClassFactory.cs
- WebCategoryAttribute.cs
- ProtocolViolationException.cs
- LocalsItemDescription.cs
- LogPolicy.cs
- WebContext.cs
- RadioButton.cs
- InvalidDataException.cs
- KeysConverter.cs
- PropertyEntry.cs
- DataObjectMethodAttribute.cs
- UseAttributeSetsAction.cs
- SqlConnection.cs
- ByeOperationCD1AsyncResult.cs
- TemplateColumn.cs
- safemediahandle.cs
- StyleSheet.cs
- Operators.cs
- MappingItemCollection.cs
- OleDbFactory.cs
- BackgroundWorker.cs
- Application.cs