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
- FileSystemEventArgs.cs
- IItemContainerGenerator.cs
- TemplatePartAttribute.cs
- RegexStringValidatorAttribute.cs
- grammarelement.cs
- HttpRequestBase.cs
- MsmqChannelFactoryBase.cs
- _Events.cs
- MenuCommands.cs
- InvalidAsynchronousStateException.cs
- MeasurementDCInfo.cs
- ContourSegment.cs
- KeyEventArgs.cs
- ToolStripGrip.cs
- WinEventTracker.cs
- Imaging.cs
- PropertyInfoSet.cs
- FunctionDescription.cs
- CommandArguments.cs
- SizeConverter.cs
- DateTimeConstantAttribute.cs
- _Connection.cs
- TypefaceCollection.cs
- formatstringdialog.cs
- ChtmlFormAdapter.cs
- CodeSnippetCompileUnit.cs
- WindowsIdentity.cs
- ToolStripDropDownItem.cs
- assemblycache.cs
- EDesignUtil.cs
- CachedFontFace.cs
- CodeMethodReturnStatement.cs
- SortedList.cs
- PropertyItemInternal.cs
- TextTrailingCharacterEllipsis.cs
- ProcessThread.cs
- BamlResourceContent.cs
- DrawingContextDrawingContextWalker.cs
- XmlSignificantWhitespace.cs
- WindowInteropHelper.cs
- OverlappedContext.cs
- WebConvert.cs
- ReferenceConverter.cs
- DataGridViewCellCancelEventArgs.cs
- LOSFormatter.cs
- WindowsRegion.cs
- ObjectStorage.cs
- CodeChecksumPragma.cs
- CodeValidator.cs
- XamlSerializerUtil.cs
- SecurityDescriptor.cs
- StrokeCollection.cs
- DeviceSpecificChoiceCollection.cs
- HtmlInputControl.cs
- XmlTypeAttribute.cs
- TargetInvocationException.cs
- TaskHelper.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- FactoryMaker.cs
- XmlReaderSettings.cs
- ControlCachePolicy.cs
- ComplexTypeEmitter.cs
- XmlSchemaObject.cs
- DrawingGroup.cs
- FormClosingEvent.cs
- Msmq4PoisonHandler.cs
- SqlParameterCollection.cs
- ListenerElementsCollection.cs
- TextRangeProviderWrapper.cs
- OdbcFactory.cs
- WebEvents.cs
- Transform3DCollection.cs
- DetailsViewAutoFormat.cs
- Imaging.cs
- EdmEntityTypeAttribute.cs
- DynamicILGenerator.cs
- MetadataImporterQuotas.cs
- RotationValidation.cs
- XamlTemplateSerializer.cs
- SEHException.cs
- ResourceSet.cs
- WebPartEditorOkVerb.cs
- ConfigurationSettings.cs
- SystemDropShadowChrome.cs
- TransactionManager.cs
- MarshalDirectiveException.cs
- Timeline.cs
- SafeSecurityHandles.cs
- DbInsertCommandTree.cs
- ImmutablePropertyDescriptorGridEntry.cs
- CompilerError.cs
- XmlDataSourceNodeDescriptor.cs
- HScrollProperties.cs
- TextServicesDisplayAttributePropertyRanges.cs
- ThemeInfoAttribute.cs
- TrackBarRenderer.cs
- ConfigXmlWhitespace.cs
- TileModeValidation.cs
- TextModifier.cs
- UnhandledExceptionEventArgs.cs