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
- ImageUrlEditor.cs
- Literal.cs
- processwaithandle.cs
- HashRepartitionStream.cs
- SEHException.cs
- HitTestFilterBehavior.cs
- DeviceOverridableAttribute.cs
- ConfigurationLockCollection.cs
- CollectionConverter.cs
- CodeCommentStatement.cs
- ValueHandle.cs
- X509AsymmetricSecurityKey.cs
- KeySplineConverter.cs
- DataServiceKeyAttribute.cs
- WindowsUpDown.cs
- TrustManagerPromptUI.cs
- ZipArchive.cs
- FormatConvertedBitmap.cs
- IndexedString.cs
- DataMisalignedException.cs
- Pair.cs
- OperationParameterInfo.cs
- WindowsListViewGroup.cs
- SqlServices.cs
- BinaryConverter.cs
- _SslStream.cs
- OleDbMetaDataFactory.cs
- ToolStripGrip.cs
- loginstatus.cs
- JsonQNameDataContract.cs
- HostExecutionContextManager.cs
- XmlAttributeOverrides.cs
- TextEditorCopyPaste.cs
- EntityCommand.cs
- OraclePermission.cs
- InputScope.cs
- Win32SafeHandles.cs
- Propagator.cs
- Knowncolors.cs
- Constants.cs
- EventLogException.cs
- QueryExtender.cs
- InstanceData.cs
- TraversalRequest.cs
- EntityCodeGenerator.cs
- DNS.cs
- ChtmlLinkAdapter.cs
- SafeThreadHandle.cs
- HttpProfileBase.cs
- TreeView.cs
- CodeTypeMemberCollection.cs
- Rectangle.cs
- LabelLiteral.cs
- VariantWrapper.cs
- SQLDateTimeStorage.cs
- BooleanSwitch.cs
- SmiTypedGetterSetter.cs
- autovalidator.cs
- XmlDocumentSerializer.cs
- BindingContext.cs
- TypeDescriptor.cs
- TextBoxBase.cs
- ChildDocumentBlock.cs
- Context.cs
- FrameworkTextComposition.cs
- XmlEventCache.cs
- XmlBindingWorker.cs
- Set.cs
- ActiveXHost.cs
- WSHttpSecurity.cs
- ArrowControl.xaml.cs
- TcpConnectionPoolSettings.cs
- PageParserFilter.cs
- SqlGenerator.cs
- UriParserTemplates.cs
- QueryStringHandler.cs
- SqlCommand.cs
- OrderedDictionary.cs
- ClientUrlResolverWrapper.cs
- AstTree.cs
- XPathConvert.cs
- ScrollPattern.cs
- DataControlImageButton.cs
- CfgParser.cs
- BlobPersonalizationState.cs
- Comparer.cs
- cookiecontainer.cs
- AnonymousIdentificationSection.cs
- WindowsListBox.cs
- precedingquery.cs
- CodeSnippetExpression.cs
- NameValueCollection.cs
- ResourceContainer.cs
- TypeBuilderInstantiation.cs
- SiteMapDataSource.cs
- NativeMethods.cs
- FilterException.cs
- CodeRegionDirective.cs
- WebConfigurationHostFileChange.cs
- ContainerSelectorBehavior.cs