Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / SqlClient / SqlGen / SymbolTable.cs / 1305376 / SymbolTable.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- 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 [....] // @backupOwner [....] //--------------------------------------------------------------------- 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
- SecurityHelper.cs
- EditorAttribute.cs
- DetailsViewUpdatedEventArgs.cs
- SmtpSection.cs
- Themes.cs
- XmlObjectSerializerReadContext.cs
- PropertyPushdownHelper.cs
- CultureInfo.cs
- XmlElementAttributes.cs
- DataStorage.cs
- XXXOnTypeBuilderInstantiation.cs
- ReceiveMessageAndVerifySecurityAsyncResultBase.cs
- TextOnlyOutput.cs
- FontStyle.cs
- HostedController.cs
- controlskin.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- PersonalizationProviderHelper.cs
- MediaContext.cs
- TextAdaptor.cs
- GridViewPageEventArgs.cs
- SourceLineInfo.cs
- SymbolType.cs
- FastEncoderStatics.cs
- DataColumnMapping.cs
- PnrpPermission.cs
- Validator.cs
- RequiredFieldValidator.cs
- Filter.cs
- PackageRelationshipCollection.cs
- ConcurrentBag.cs
- PackageDigitalSignature.cs
- GenericTypeParameterBuilder.cs
- SqlDependencyUtils.cs
- RegexWorker.cs
- MetaColumn.cs
- XmlTextAttribute.cs
- ToolTip.cs
- ZipIOBlockManager.cs
- X500Name.cs
- CodeTypeOfExpression.cs
- StaticDataManager.cs
- PointAnimationUsingPath.cs
- ConditionBrowserDialog.cs
- DataMemberAttribute.cs
- IISUnsafeMethods.cs
- ClientBuildManager.cs
- X509ImageLogo.cs
- WebSysDescriptionAttribute.cs
- XPathScanner.cs
- QilGeneratorEnv.cs
- ProfilePropertySettings.cs
- ChangeToolStripParentVerb.cs
- documentsequencetextview.cs
- WebServiceParameterData.cs
- QuaternionRotation3D.cs
- ConsumerConnectionPointCollection.cs
- Socket.cs
- SelfIssuedAuthRSACryptoProvider.cs
- MimeMultiPart.cs
- RenderData.cs
- HoistedLocals.cs
- PerformanceCounter.cs
- LinqDataSourceUpdateEventArgs.cs
- UserControlDesigner.cs
- TypeReference.cs
- DataIdProcessor.cs
- DesignerSerializationOptionsAttribute.cs
- IconBitmapDecoder.cs
- AttachedAnnotationChangedEventArgs.cs
- EasingQuaternionKeyFrame.cs
- DBAsyncResult.cs
- Range.cs
- SequenceDesigner.cs
- XmlEventCache.cs
- RegularExpressionValidator.cs
- templategroup.cs
- Column.cs
- SectionXmlInfo.cs
- Stopwatch.cs
- UnionExpr.cs
- InternalPolicyElement.cs
- FrameworkContextData.cs
- FactoryGenerator.cs
- Vector3DCollection.cs
- XmlSchemaAnnotation.cs
- FlowDocument.cs
- MouseBinding.cs
- ResourcesChangeInfo.cs
- DataControlFieldCell.cs
- SoapRpcServiceAttribute.cs
- Util.cs
- SemaphoreFullException.cs
- PropertyItem.cs
- MarginsConverter.cs
- ELinqQueryState.cs
- DataSpaceManager.cs
- ReceiveReply.cs
- UrlMappingCollection.cs
- CodeGroup.cs