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
- ExclusiveNamedPipeTransportManager.cs
- HtmlInputPassword.cs
- SplitterPanel.cs
- SqlDataSourceQueryConverter.cs
- SafeNativeMemoryHandle.cs
- View.cs
- EntityCommand.cs
- LambdaSerializationException.cs
- SafeEventHandle.cs
- BCryptHashAlgorithm.cs
- AdapterUtil.cs
- Rule.cs
- DefaultTextStore.cs
- shaperfactoryquerycachekey.cs
- XamlVector3DCollectionSerializer.cs
- StorageSetMapping.cs
- GenericIdentity.cs
- UnknownBitmapEncoder.cs
- DefaultMemberAttribute.cs
- PeerToPeerException.cs
- SparseMemoryStream.cs
- ServiceOperationInvoker.cs
- XslNumber.cs
- ToolBarOverflowPanel.cs
- SoapAttributeOverrides.cs
- TriState.cs
- SolidBrush.cs
- DataGridViewCellPaintingEventArgs.cs
- SimpleMailWebEventProvider.cs
- Padding.cs
- CodeConditionStatement.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- CheckBoxList.cs
- Function.cs
- OverrideMode.cs
- MessagingActivityHelper.cs
- AuthorizationRule.cs
- DPTypeDescriptorContext.cs
- CustomValidator.cs
- ProcessHostServerConfig.cs
- figurelength.cs
- KerberosReceiverSecurityToken.cs
- PagerSettings.cs
- TileModeValidation.cs
- SectionVisual.cs
- SQLBinary.cs
- MediaCommands.cs
- KeyTime.cs
- FormatException.cs
- BehaviorDragDropEventArgs.cs
- BulletedList.cs
- DBConcurrencyException.cs
- ColumnMapVisitor.cs
- EntityTypeEmitter.cs
- TextParagraph.cs
- XmlChoiceIdentifierAttribute.cs
- DigitShape.cs
- ClientSettingsStore.cs
- StylusPointPropertyId.cs
- DataGridViewDataErrorEventArgs.cs
- XmlSchemaSimpleTypeList.cs
- Transform.cs
- XpsS0ValidatingLoader.cs
- SQLSingleStorage.cs
- NullableBoolConverter.cs
- DebugView.cs
- ParameterInfo.cs
- ISAPIRuntime.cs
- RemotingException.cs
- KnownBoxes.cs
- FusionWrap.cs
- DbInsertCommandTree.cs
- FormatVersion.cs
- sqlnorm.cs
- shaperfactoryquerycachekey.cs
- PersonalizableTypeEntry.cs
- DockPattern.cs
- ListDictionaryInternal.cs
- CompressEmulationStream.cs
- ClusterRegistryConfigurationProvider.cs
- AssociatedControlConverter.cs
- SqlProfileProvider.cs
- ControlValuePropertyAttribute.cs
- DesignColumnCollection.cs
- BidirectionalDictionary.cs
- MatrixTransform3D.cs
- DataBindingExpressionBuilder.cs
- AnimationClock.cs
- NamedPermissionSet.cs
- MatchingStyle.cs
- ParseChildrenAsPropertiesAttribute.cs
- HttpApplication.cs
- ControlEvent.cs
- CacheAxisQuery.cs
- ColorContextHelper.cs
- DataPagerFieldItem.cs
- SemanticResultKey.cs
- SafeNativeMethodsOther.cs
- MessageBox.cs
- RecordBuilder.cs