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
- DiscoveryDocumentSearchPattern.cs
- ScaleTransform3D.cs
- FixedMaxHeap.cs
- HtmlInputControl.cs
- ConnectionPoolRegistry.cs
- TreeChangeInfo.cs
- CultureInfoConverter.cs
- UInt16Converter.cs
- ADConnectionHelper.cs
- ByteAnimationBase.cs
- ExtenderControl.cs
- SyntaxCheck.cs
- WebPartDescriptionCollection.cs
- CommandTreeTypeHelper.cs
- _ContextAwareResult.cs
- XmlQueryType.cs
- AtomEntry.cs
- InstanceDataCollection.cs
- CodeSpit.cs
- IntSecurity.cs
- TextParagraphCache.cs
- HighlightVisual.cs
- Classification.cs
- CodeDomConfigurationHandler.cs
- LockingPersistenceProvider.cs
- TrustDriver.cs
- XmlBinaryReaderSession.cs
- CustomTypeDescriptor.cs
- GraphicsPath.cs
- OraclePermissionAttribute.cs
- VirtualizedItemPattern.cs
- ZoneMembershipCondition.cs
- DataGridColumnDropSeparator.cs
- CalendarDay.cs
- _HelperAsyncResults.cs
- ParseChildrenAsPropertiesAttribute.cs
- DecimalAnimation.cs
- StringUtil.cs
- ProxyManager.cs
- StorageComplexPropertyMapping.cs
- CriticalExceptions.cs
- EventsTab.cs
- SAPICategories.cs
- TemplatedControlDesigner.cs
- SamlAuthenticationStatement.cs
- UnsafeNativeMethods.cs
- JoinCqlBlock.cs
- ManagementClass.cs
- HtmlEmptyTagControlBuilder.cs
- ModifiableIteratorCollection.cs
- JsonDataContract.cs
- Viewport3DVisual.cs
- DragDrop.cs
- InvalidateEvent.cs
- SrgsRulesCollection.cs
- WmlCommandAdapter.cs
- HandlerBase.cs
- XmlCodeExporter.cs
- SystemWebSectionGroup.cs
- AttributeSetAction.cs
- CustomValidator.cs
- RemoteDebugger.cs
- SystemResourceKey.cs
- GestureRecognizer.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- TextProviderWrapper.cs
- PartialToken.cs
- BaseCollection.cs
- LockedBorderGlyph.cs
- _DigestClient.cs
- WriteFileContext.cs
- EnumDataContract.cs
- ObjectConverter.cs
- ActiveXHost.cs
- DataControlImageButton.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ObjectIDGenerator.cs
- ConnectionManagementElement.cs
- GeometryHitTestResult.cs
- SolidBrush.cs
- ComponentDispatcher.cs
- ExtensionQuery.cs
- PathSegment.cs
- TextViewSelectionProcessor.cs
- OracleInfoMessageEventArgs.cs
- List.cs
- SimpleBitVector32.cs
- _SslState.cs
- DataRecordInternal.cs
- StringOutput.cs
- ObjectNavigationPropertyMapping.cs
- AuthenticationManager.cs
- BitmapEffectDrawingContextState.cs
- SafeTimerHandle.cs
- Light.cs
- PartBasedPackageProperties.cs
- JournalEntry.cs
- NativeWindow.cs
- HealthMonitoringSection.cs
- HttpContextWrapper.cs