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
- OleDbSchemaGuid.cs
- DataContractSerializerSection.cs
- UnauthorizedAccessException.cs
- SamlSecurityTokenAuthenticator.cs
- FrameworkTemplate.cs
- FormViewDeleteEventArgs.cs
- GeneratedCodeAttribute.cs
- ResourceIDHelper.cs
- WebSysDescriptionAttribute.cs
- SchemaEntity.cs
- MenuBindingsEditorForm.cs
- OpCopier.cs
- CategoryAttribute.cs
- ComponentEditorForm.cs
- Comparer.cs
- _LocalDataStore.cs
- TcpConnectionPoolSettingsElement.cs
- EncoderParameter.cs
- MsmqHostedTransportManager.cs
- SessionParameter.cs
- DerivedKeySecurityToken.cs
- TemplateControlParser.cs
- FactoryGenerator.cs
- CheckBox.cs
- ObjectNotFoundException.cs
- FixedSOMLineRanges.cs
- ListViewTableCell.cs
- HtmlDocument.cs
- Cursors.cs
- BrowserDefinitionCollection.cs
- HiddenField.cs
- FieldAccessException.cs
- BinaryNode.cs
- HighContrastHelper.cs
- TempEnvironment.cs
- CryptoConfig.cs
- XmlUTF8TextWriter.cs
- ResourceManagerWrapper.cs
- ServiceProviders.cs
- BuildResultCache.cs
- TextEditorCopyPaste.cs
- OdbcStatementHandle.cs
- PropertyNames.cs
- TaskForm.cs
- LicFileLicenseProvider.cs
- ThousandthOfEmRealPoints.cs
- SettingsAttributeDictionary.cs
- PageTrueTypeFont.cs
- storepermission.cs
- XmlNodeChangedEventManager.cs
- GridViewRow.cs
- WindowsSecurityTokenAuthenticator.cs
- CommandID.cs
- WindowsScroll.cs
- BindingSource.cs
- EqualityComparer.cs
- PersistNameAttribute.cs
- HijriCalendar.cs
- DataProtection.cs
- TextLine.cs
- QuadraticBezierSegment.cs
- ScriptResourceAttribute.cs
- PreviewControlDesigner.cs
- VersionedStream.cs
- GacUtil.cs
- SchemaEntity.cs
- BindToObject.cs
- PropertyAccessVisitor.cs
- RegexParser.cs
- AnonymousIdentificationSection.cs
- Console.cs
- TemplateComponentConnector.cs
- DocumentStatusResources.cs
- PageSetupDialog.cs
- ComponentChangedEvent.cs
- CodePageEncoding.cs
- SerialPort.cs
- COM2ICategorizePropertiesHandler.cs
- TypedAsyncResult.cs
- ThicknessAnimationUsingKeyFrames.cs
- MonthCalendar.cs
- IISUnsafeMethods.cs
- DataException.cs
- FloatUtil.cs
- ConstructorNeedsTagAttribute.cs
- UrlAuthFailedErrorFormatter.cs
- CompilationUtil.cs
- OpenTypeCommon.cs
- CodeSnippetTypeMember.cs
- StatementContext.cs
- ConfigurationValidatorAttribute.cs
- DBDataPermissionAttribute.cs
- SQLDecimalStorage.cs
- InplaceBitmapMetadataWriter.cs
- CalendarTable.cs
- KeyPullup.cs
- CompressionTracing.cs
- SelectionGlyphBase.cs
- FixedTextContainer.cs
- DataGridViewBand.cs