Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / SqlClient / SqlGen / SymbolTable.cs / 1 / 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
- precedingsibling.cs
- TransformerInfoCollection.cs
- TreePrinter.cs
- GlobalItem.cs
- controlskin.cs
- OleDbConnection.cs
- FloaterBaseParaClient.cs
- XpsS0ValidatingLoader.cs
- RunClient.cs
- safesecurityhelperavalon.cs
- NullableDecimalSumAggregationOperator.cs
- ConfigurationStrings.cs
- ExpressionBuilderContext.cs
- WebPartUtil.cs
- IsolationInterop.cs
- ContentDisposition.cs
- SourceSwitch.cs
- EntityFrameworkVersions.cs
- DispatcherHooks.cs
- SatelliteContractVersionAttribute.cs
- WebBrowserNavigatingEventHandler.cs
- ModelItem.cs
- Package.cs
- DrawingBrush.cs
- SchemaElementLookUpTableEnumerator.cs
- C14NUtil.cs
- ListControl.cs
- SystemFonts.cs
- SQLByteStorage.cs
- RemotingConfiguration.cs
- SqlBuilder.cs
- DataGridViewElement.cs
- BinaryUtilClasses.cs
- CryptoConfig.cs
- MethodToken.cs
- RequiredFieldValidator.cs
- ReturnValue.cs
- XPathNavigator.cs
- Documentation.cs
- HorizontalAlignConverter.cs
- ListItemCollection.cs
- RoutedUICommand.cs
- MergeLocalizationDirectives.cs
- OraclePermission.cs
- CustomCredentialPolicy.cs
- Wow64ConfigurationLoader.cs
- MouseButtonEventArgs.cs
- EditBehavior.cs
- IPipelineRuntime.cs
- _SSPISessionCache.cs
- FrameworkContentElement.cs
- Walker.cs
- PaginationProgressEventArgs.cs
- XamlGridLengthSerializer.cs
- Matrix3D.cs
- DataServiceResponse.cs
- EntityObject.cs
- OpCopier.cs
- loginstatus.cs
- SerializerWriterEventHandlers.cs
- AuthenticationConfig.cs
- DrawingCollection.cs
- ColorKeyFrameCollection.cs
- ServicePoint.cs
- PermissionSetTriple.cs
- LinkDescriptor.cs
- XmlFileEditor.cs
- WebProxyScriptElement.cs
- SessionPageStatePersister.cs
- SecurityKeyType.cs
- PassportIdentity.cs
- WebConfigurationHost.cs
- EventPrivateKey.cs
- TreeBuilderXamlTranslator.cs
- ParallelTimeline.cs
- XmlSchemaChoice.cs
- AssemblyName.cs
- WriteableOnDemandPackagePart.cs
- VarRemapper.cs
- EventProviderWriter.cs
- FontFamilyIdentifier.cs
- TextElementEnumerator.cs
- TargetInvocationException.cs
- MulticastDelegate.cs
- Main.cs
- ScopelessEnumAttribute.cs
- Pair.cs
- Trigger.cs
- TreeNode.cs
- MediaSystem.cs
- BmpBitmapDecoder.cs
- DropShadowBitmapEffect.cs
- FileUpload.cs
- SqlRecordBuffer.cs
- RawStylusActions.cs
- HttpResponseHeader.cs
- BinaryObjectInfo.cs
- CollectionViewGroup.cs
- HandleRef.cs
- LabelAutomationPeer.cs