Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- StorageBasedPackageProperties.cs
- UpdatePanel.cs
- FilterEventArgs.cs
- ConnectionPoolManager.cs
- HttpProfileGroupBase.cs
- Completion.cs
- AdornerPresentationContext.cs
- ParameterModifier.cs
- FreezableCollection.cs
- _NTAuthentication.cs
- METAHEADER.cs
- DragDrop.cs
- Empty.cs
- HttpResponseInternalBase.cs
- HttpModuleCollection.cs
- __TransparentProxy.cs
- UriSectionData.cs
- CheckBox.cs
- StandardOleMarshalObject.cs
- ZoomPercentageConverter.cs
- LocalizationParserHooks.cs
- Attributes.cs
- XmlStrings.cs
- Classification.cs
- BooleanAnimationBase.cs
- ThreadAttributes.cs
- ResourceDescriptionAttribute.cs
- TextSerializer.cs
- TextPointer.cs
- AddToCollection.cs
- UnionCqlBlock.cs
- ObjRef.cs
- SqlMethodAttribute.cs
- Vector3D.cs
- ZipIOLocalFileBlock.cs
- SelectionList.cs
- BindingGroup.cs
- SafeSecurityHelper.cs
- CacheChildrenQuery.cs
- FixedSOMTableCell.cs
- WorkflowMarkupElementEventArgs.cs
- InternalPermissions.cs
- ServiceHostFactory.cs
- PropertyEntry.cs
- HtmlHead.cs
- StrongNameKeyPair.cs
- BinHexEncoder.cs
- propertytag.cs
- TableLayoutRowStyleCollection.cs
- ParallelTimeline.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- TextDecorations.cs
- TextEffect.cs
- ShapeTypeface.cs
- URLAttribute.cs
- Crc32Helper.cs
- BooleanFunctions.cs
- PropertyTabChangedEvent.cs
- ResourcePermissionBase.cs
- SystemMulticastIPAddressInformation.cs
- EventListenerClientSide.cs
- BinaryFormatter.cs
- ColorAnimationUsingKeyFrames.cs
- StackBuilderSink.cs
- ProxyWebPartManager.cs
- ListCardsInFileRequest.cs
- DispatchWrapper.cs
- SizeFConverter.cs
- SoapAttributes.cs
- CqlIdentifiers.cs
- MetaForeignKeyColumn.cs
- ScaleTransform3D.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- RootBuilder.cs
- LambdaCompiler.Logical.cs
- SQLStringStorage.cs
- WaitHandleCannotBeOpenedException.cs
- FrugalMap.cs
- BitmapEffectInputConnector.cs
- TdsParser.cs
- IconConverter.cs
- FormatConvertedBitmap.cs
- RowsCopiedEventArgs.cs
- Decimal.cs
- XmlDesigner.cs
- QilFunction.cs
- EntityTypeBase.cs
- OneOfConst.cs
- ConfigXmlComment.cs
- XmlEntity.cs
- CodeFieldReferenceExpression.cs
- WpfGeneratedKnownTypes.cs
- BindToObject.cs
- SolidColorBrush.cs
- UrlPropertyAttribute.cs
- SchemaMerger.cs
- MediaPlayerState.cs
- Int64AnimationUsingKeyFrames.cs
- EditCommandColumn.cs
- ObjectFactoryCodeDomTreeGenerator.cs