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
- XhtmlConformanceSection.cs
- TrackingMemoryStreamFactory.cs
- DodSequenceMerge.cs
- shaperfactoryquerycachekey.cs
- CornerRadiusConverter.cs
- SqlAliasesReferenced.cs
- TemplatePagerField.cs
- Asn1IntegerConverter.cs
- WorkflowTransactionOptions.cs
- GenericTextProperties.cs
- WmlListAdapter.cs
- SectionRecord.cs
- RuntimeResourceSet.cs
- XpsException.cs
- DataDocumentXPathNavigator.cs
- WebPartDescription.cs
- SQLByte.cs
- MouseOverProperty.cs
- IndividualDeviceConfig.cs
- XmlSchemaCollection.cs
- InstanceCreationEditor.cs
- WebControlsSection.cs
- RightsManagementEncryptedStream.cs
- _UriTypeConverter.cs
- safesecurityhelperavalon.cs
- LowerCaseStringConverter.cs
- FrameworkElementAutomationPeer.cs
- Int32.cs
- RequestSecurityTokenForGetBrowserToken.cs
- WmfPlaceableFileHeader.cs
- ToolboxDataAttribute.cs
- Path.cs
- WebServiceClientProxyGenerator.cs
- CurrentChangedEventManager.cs
- PointCollection.cs
- DataGridViewCellCancelEventArgs.cs
- SecurityDocument.cs
- OutOfProcStateClientManager.cs
- HWStack.cs
- HybridObjectCache.cs
- WebPageTraceListener.cs
- GPPOINT.cs
- TextParentUndoUnit.cs
- XmlIgnoreAttribute.cs
- BaseTemplateCodeDomTreeGenerator.cs
- Math.cs
- PropertyDescriptorCollection.cs
- NavigationExpr.cs
- ListViewGroup.cs
- EntityType.cs
- UidManager.cs
- SqlDataRecord.cs
- CodeTryCatchFinallyStatement.cs
- XmlSerializerObjectSerializer.cs
- SessionStateUtil.cs
- CommandID.cs
- PublisherIdentityPermission.cs
- ServicesUtilities.cs
- ListSortDescription.cs
- ElementHostAutomationPeer.cs
- ThemeableAttribute.cs
- AbsoluteQuery.cs
- ConfigurationLoader.cs
- InputScopeConverter.cs
- ViewGenerator.cs
- ShadowGlyph.cs
- BamlRecordHelper.cs
- ParserExtension.cs
- SimpleTableProvider.cs
- DBBindings.cs
- XmlRootAttribute.cs
- ExceptionWrapper.cs
- BuildDependencySet.cs
- BasicAsyncResult.cs
- SqlIdentifier.cs
- VisualTreeHelper.cs
- CodeMemberField.cs
- ListViewDesigner.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- FrugalList.cs
- HostingPreferredMapPath.cs
- NumberFormatter.cs
- DataView.cs
- Viewport3DVisual.cs
- PaintEvent.cs
- CompModSwitches.cs
- InkCanvasSelectionAdorner.cs
- GeneralTransform3DGroup.cs
- HMACRIPEMD160.cs
- VectorCollectionValueSerializer.cs
- ActiveXSite.cs
- WorkflowDebuggerSteppingAttribute.cs
- Helper.cs
- ValueType.cs
- SystemNetworkInterface.cs
- RtfControls.cs
- FloaterParagraph.cs
- FaultContractAttribute.cs
- NamespaceEmitter.cs
- DynamicPropertyHolder.cs