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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DragEventArgs.cs
- XmlElement.cs
- ReadingWritingEntityEventArgs.cs
- DictionaryContent.cs
- ObjectCloneHelper.cs
- LineServicesRun.cs
- UnicodeEncoding.cs
- LogPolicy.cs
- DbProviderFactories.cs
- Int16Storage.cs
- TransformPattern.cs
- ResourceDictionary.cs
- Trace.cs
- StorageMappingItemLoader.cs
- TableLayoutPanel.cs
- WebPartEventArgs.cs
- TextCollapsingProperties.cs
- SafeFileMappingHandle.cs
- WMIGenerator.cs
- XslVisitor.cs
- AutomationProperties.cs
- XmlSchemaRedefine.cs
- SafePEFileHandle.cs
- ResourcesBuildProvider.cs
- EventlogProvider.cs
- XmlSchemaSimpleContentExtension.cs
- PrintDialog.cs
- HttpHeaderCollection.cs
- XpsS0ValidatingLoader.cs
- SizeConverter.cs
- XmlAttributeAttribute.cs
- VirtualPathUtility.cs
- ActionMessageFilter.cs
- PriorityChain.cs
- XmlDocumentType.cs
- RegionIterator.cs
- PeerToPeerException.cs
- WorkflowDesignerColors.cs
- ChildChangedEventArgs.cs
- Funcletizer.cs
- SystemBrushes.cs
- FloatAverageAggregationOperator.cs
- InkPresenter.cs
- DesigntimeLicenseContext.cs
- DependencyObjectPropertyDescriptor.cs
- DataGridViewComboBoxColumnDesigner.cs
- OleDbPropertySetGuid.cs
- EntityContainerRelationshipSet.cs
- PageContent.cs
- CodeTypeReferenceCollection.cs
- OleDbMetaDataFactory.cs
- DecimalSumAggregationOperator.cs
- MobileCapabilities.cs
- webproxy.cs
- GPPOINTF.cs
- CreateUserWizard.cs
- ModelItem.cs
- SQLInt64Storage.cs
- DefaultTraceListener.cs
- RequestResizeEvent.cs
- PersonalizationProviderCollection.cs
- ConfigXmlComment.cs
- FixedLineResult.cs
- IssuerInformation.cs
- MessageBox.cs
- TextElementEditingBehaviorAttribute.cs
- KeySplineConverter.cs
- ScaleTransform.cs
- VBCodeProvider.cs
- CreateUserWizardAutoFormat.cs
- GradientBrush.cs
- MemberInitExpression.cs
- TextPenaltyModule.cs
- BookmarkInfo.cs
- CalendarDay.cs
- DbBuffer.cs
- CodeDOMUtility.cs
- XmlReader.cs
- CompositeFontInfo.cs
- SmiMetaDataProperty.cs
- SimpleFileLog.cs
- EnglishPluralizationService.cs
- WeakReference.cs
- SevenBitStream.cs
- dtdvalidator.cs
- OdbcPermission.cs
- Matrix3DStack.cs
- UpDownBase.cs
- HttpBindingExtension.cs
- RootProjectionNode.cs
- HostUtils.cs
- ProfileEventArgs.cs
- WebPartsPersonalizationAuthorization.cs
- ReachVisualSerializer.cs
- SizeConverter.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- RectAnimationBase.cs
- TextAnchor.cs
- JsonByteArrayDataContract.cs
- TypeDescriptorContext.cs