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
- EntityReference.cs
- EntityProviderFactory.cs
- UpdateCompiler.cs
- IntSecurity.cs
- CommandBinding.cs
- WebPartVerbCollection.cs
- IPGlobalProperties.cs
- ForeignKeyFactory.cs
- PeerCredential.cs
- ConnectionPoolManager.cs
- EventLogEntryCollection.cs
- ZipIOLocalFileHeader.cs
- ParseHttpDate.cs
- QuotedStringFormatReader.cs
- DesignObjectWrapper.cs
- FolderBrowserDialog.cs
- StaticSiteMapProvider.cs
- GeometryGroup.cs
- SmtpAuthenticationManager.cs
- New.cs
- FileResponseElement.cs
- GraphicsState.cs
- EventBookmark.cs
- XsltArgumentList.cs
- CapacityStreamGeometryContext.cs
- BinarySerializer.cs
- ToolStripProgressBar.cs
- TrackingProfileCache.cs
- QuaternionConverter.cs
- PriorityQueue.cs
- HttpAsyncResult.cs
- Padding.cs
- QilCloneVisitor.cs
- RequestSecurityToken.cs
- SspiSafeHandles.cs
- TextSpanModifier.cs
- UrlEncodedParameterWriter.cs
- IfAction.cs
- MarkupCompiler.cs
- ThemeDictionaryExtension.cs
- CommandHelpers.cs
- ResizeGrip.cs
- ErrorStyle.cs
- KnownColorTable.cs
- XPathDocumentNavigator.cs
- OleDbCommandBuilder.cs
- Mapping.cs
- CalendarButtonAutomationPeer.cs
- TranslateTransform3D.cs
- DataExchangeServiceBinder.cs
- EmptyQuery.cs
- MasterPageParser.cs
- CodePropertyReferenceExpression.cs
- SerTrace.cs
- ValidationSummary.cs
- IntegerValidatorAttribute.cs
- BindingParameterCollection.cs
- BaseCodePageEncoding.cs
- SettingsBindableAttribute.cs
- DataViewSetting.cs
- PageHandlerFactory.cs
- StatusBarItem.cs
- HtmlButton.cs
- MouseActionValueSerializer.cs
- __TransparentProxy.cs
- wmiprovider.cs
- OleCmdHelper.cs
- TagPrefixAttribute.cs
- LinkedList.cs
- GridViewHeaderRowPresenter.cs
- VisualCollection.cs
- DataSourceView.cs
- Substitution.cs
- MenuTracker.cs
- NumericUpDownAccelerationCollection.cs
- SmiMetaDataProperty.cs
- SingleTagSectionHandler.cs
- hwndwrapper.cs
- FixedSOMLineCollection.cs
- TrackingStringDictionary.cs
- DecoderExceptionFallback.cs
- ISO2022Encoding.cs
- NonParentingControl.cs
- SystemPens.cs
- ExtenderControl.cs
- ImportContext.cs
- TextSelectionHelper.cs
- PropertyBuilder.cs
- PingOptions.cs
- ValidatorCollection.cs
- DrawingContext.cs
- HeaderCollection.cs
- MessagingActivityHelper.cs
- PrincipalPermission.cs
- XPathExpr.cs
- UriSectionData.cs
- BindingMemberInfo.cs
- TextSelectionHighlightLayer.cs
- XmlSchemaChoice.cs
- Region.cs