Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- DataGridViewCellLinkedList.cs
- PageContentCollection.cs
- XmlParserContext.cs
- DiscoveryDocumentLinksPattern.cs
- DataGridViewTopLeftHeaderCell.cs
- IsolatedStorage.cs
- ExpressionConverter.cs
- PageEventArgs.cs
- DiffuseMaterial.cs
- DrawingDrawingContext.cs
- DocumentViewerBaseAutomationPeer.cs
- ComplexPropertyEntry.cs
- BindingMAnagerBase.cs
- Input.cs
- WebPartHelpVerb.cs
- ControlTemplate.cs
- XmlCodeExporter.cs
- ListControlActionList.cs
- DockingAttribute.cs
- Floater.cs
- ArgIterator.cs
- wgx_render.cs
- Assert.cs
- OracleParameter.cs
- UnaryNode.cs
- CultureInfo.cs
- StoreContentChangedEventArgs.cs
- FolderLevelBuildProvider.cs
- AssemblySettingAttributes.cs
- SecurityTokenContainer.cs
- PhysicalAddress.cs
- Cursor.cs
- StrokeNodeEnumerator.cs
- ProfileServiceManager.cs
- TableRowCollection.cs
- RNGCryptoServiceProvider.cs
- FilterEventArgs.cs
- XpsS0ValidatingLoader.cs
- SQLMoneyStorage.cs
- MediaElementAutomationPeer.cs
- CompositeControl.cs
- OleDbException.cs
- ManagementException.cs
- XmlWriterTraceListener.cs
- CollectionViewGroupRoot.cs
- DataColumnCollection.cs
- ExecutionEngineException.cs
- MembershipUser.cs
- SqlException.cs
- arclist.cs
- DesigntimeLicenseContextSerializer.cs
- EntityTransaction.cs
- PermissionSetTriple.cs
- PrtCap_Public_Simple.cs
- XmlDocumentSerializer.cs
- QueryExpr.cs
- Base64Decoder.cs
- WebPartManagerDesigner.cs
- PolicyLevel.cs
- HtmlUtf8RawTextWriter.cs
- ApplicationServiceHelper.cs
- DropDownList.cs
- AtomicFile.cs
- SiteMapNode.cs
- GenericEnumerator.cs
- PostBackTrigger.cs
- InvokeProviderWrapper.cs
- FrameworkElementAutomationPeer.cs
- TextSelectionHelper.cs
- XmlDomTextWriter.cs
- EditorPartChrome.cs
- SchemaElementDecl.cs
- SqlGatherConsumedAliases.cs
- FileDialog_Vista.cs
- InvalidOperationException.cs
- XmlSchemaType.cs
- _BasicClient.cs
- HttpRuntime.cs
- DataGridViewElement.cs
- TextEditorCopyPaste.cs
- ListViewGroup.cs
- BitmapFrameDecode.cs
- Pointer.cs
- TimeoutHelper.cs
- HashSetDebugView.cs
- BackgroundFormatInfo.cs
- _NestedSingleAsyncResult.cs
- SecurityContextSecurityTokenAuthenticator.cs
- UserControlParser.cs
- SystemIPInterfaceStatistics.cs
- Types.cs
- ReadOnlyTernaryTree.cs
- CanonicalFontFamilyReference.cs
- ReadOnlyHierarchicalDataSource.cs
- InvokeWebService.cs
- TaskFormBase.cs
- SchemaImporterExtensionElement.cs
- DataGridRelationshipRow.cs
- ReferentialConstraintRoleElement.cs
- NavigatorInvalidBodyAccessException.cs