Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DLinq / Dlinq / SqlClient / Query / SqlGatherConsumedAliases.cs / 2 / SqlGatherConsumedAliases.cs
using System; using System.Collections.Generic; using System.Text; namespace System.Data.Linq.SqlClient { ////// Walk a tree and return the set of unique aliases it consumes. /// class SqlGatherConsumedAliases { internal static HashSetGather(SqlNode node) { Gatherer g = new Gatherer(); g.Visit(node); return g.Consumed; } private class Gatherer : SqlVisitor { internal HashSet Consumed = new HashSet (); internal void VisitAliasConsumed(SqlAlias a) { Consumed.Add(a); } internal override SqlExpression VisitColumn(SqlColumn col) { VisitAliasConsumed(col.Alias); VisitExpression(col.Expression); return col; } internal override SqlExpression VisitColumnRef(SqlColumnRef cref) { VisitAliasConsumed(cref.Column.Alias); return cref; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; using System.Text; namespace System.Data.Linq.SqlClient { /// /// Walk a tree and return the set of unique aliases it consumes. /// class SqlGatherConsumedAliases { internal static HashSetGather(SqlNode node) { Gatherer g = new Gatherer(); g.Visit(node); return g.Consumed; } private class Gatherer : SqlVisitor { internal HashSet Consumed = new HashSet (); internal void VisitAliasConsumed(SqlAlias a) { Consumed.Add(a); } internal override SqlExpression VisitColumn(SqlColumn col) { VisitAliasConsumed(col.Alias); VisitExpression(col.Expression); return col; } internal override SqlExpression VisitColumnRef(SqlColumnRef cref) { VisitAliasConsumed(cref.Column.Alias); return cref; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IPHostEntry.cs
- BindingSource.cs
- DataRelationCollection.cs
- ProvidersHelper.cs
- formatter.cs
- EditingMode.cs
- ValidationRule.cs
- PerformanceCounterPermission.cs
- ButtonBase.cs
- TimelineGroup.cs
- CannotUnloadAppDomainException.cs
- Stroke2.cs
- TemplateComponentConnector.cs
- DbConnectionHelper.cs
- MenuCommand.cs
- PieceDirectory.cs
- Asn1IntegerConverter.cs
- figurelengthconverter.cs
- RichTextBox.cs
- ObjectReaderCompiler.cs
- PathGeometry.cs
- SignatureToken.cs
- DateTimeUtil.cs
- AssemblyBuilderData.cs
- MultipleCopiesCollection.cs
- MatrixCamera.cs
- PriorityChain.cs
- ScriptingProfileServiceSection.cs
- SqlConnectionPoolProviderInfo.cs
- WebConfigurationFileMap.cs
- SafeArchiveContext.cs
- XmlAnyAttributeAttribute.cs
- MimePart.cs
- EventMap.cs
- GridViewCommandEventArgs.cs
- QueryExpression.cs
- StringFreezingAttribute.cs
- SizeConverter.cs
- IsolatedStorageFile.cs
- PerformanceCounterCategory.cs
- HtmlImageAdapter.cs
- IdentitySection.cs
- HtmlInputControl.cs
- DbConnectionStringCommon.cs
- oledbmetadatacolumnnames.cs
- RC2.cs
- HostedHttpContext.cs
- CompilerLocalReference.cs
- Verify.cs
- ProviderUtil.cs
- XmlSchemaProviderAttribute.cs
- CatchBlock.cs
- XmlObjectSerializerReadContext.cs
- SaveFileDialog.cs
- ISAPIWorkerRequest.cs
- PenContexts.cs
- TrackingMemoryStream.cs
- MethodRental.cs
- RtfControlWordInfo.cs
- SQLBinary.cs
- DynamicValueConverter.cs
- XmlSignificantWhitespace.cs
- EventProviderWriter.cs
- CryptoProvider.cs
- RelatedPropertyManager.cs
- SyntaxCheck.cs
- TextWriter.cs
- WebConfigurationHostFileChange.cs
- ListViewDeletedEventArgs.cs
- PrintPreviewControl.cs
- ObjectViewQueryResultData.cs
- ContourSegment.cs
- XsltConvert.cs
- TextEffect.cs
- IntellisenseTextBox.cs
- StorageMappingItemCollection.cs
- IssuanceLicense.cs
- PolicyManager.cs
- XsdCachingReader.cs
- PropertyGridEditorPart.cs
- LineInfo.cs
- DeploymentSection.cs
- DrawingBrush.cs
- SqlUtil.cs
- GuidTagList.cs
- _HTTPDateParse.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- BitmapData.cs
- DtcInterfaces.cs
- TextRangeEdit.cs
- DrawListViewColumnHeaderEventArgs.cs
- ListDependantCardsRequest.cs
- FaultContractInfo.cs
- Int32AnimationUsingKeyFrames.cs
- ELinqQueryState.cs
- LayoutEngine.cs
- RegexMatchCollection.cs
- SamlConstants.cs
- ProviderConnectionPoint.cs
- PropertyConverter.cs