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
- DrawingBrush.cs
- TextSchema.cs
- CounterSampleCalculator.cs
- XmlRawWriterWrapper.cs
- HostedTransportConfigurationManager.cs
- FontSource.cs
- ConfigDefinitionUpdates.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- CfgRule.cs
- ValidatingReaderNodeData.cs
- ArglessEventHandlerProxy.cs
- QueryIntervalOp.cs
- CFStream.cs
- RepeaterItem.cs
- DocumentApplicationJournalEntry.cs
- ParentQuery.cs
- ServiceModelSectionGroup.cs
- BindingContext.cs
- DataGridViewComboBoxColumn.cs
- ObjectKeyFrameCollection.cs
- HtmlInputButton.cs
- DateTimeOffset.cs
- GridViewPageEventArgs.cs
- Type.cs
- DateTimeUtil.cs
- GridEntry.cs
- PermissionRequestEvidence.cs
- SimpleHandlerBuildProvider.cs
- GridViewSortEventArgs.cs
- CharacterMetrics.cs
- CapabilitiesRule.cs
- SqlServices.cs
- ParallelEnumerable.cs
- ReverseComparer.cs
- SynchronizationLockException.cs
- SqlComparer.cs
- XmlNamespaceManager.cs
- EllipticalNodeOperations.cs
- KeyNotFoundException.cs
- CodeParameterDeclarationExpression.cs
- WebPartVerbCollection.cs
- InputLangChangeRequestEvent.cs
- BitmapImage.cs
- SurrogateEncoder.cs
- XmlAttributeProperties.cs
- AmbientEnvironment.cs
- Bezier.cs
- XmlSchemaSimpleContent.cs
- DbFunctionCommandTree.cs
- MaskedTextProvider.cs
- DataServiceException.cs
- Trace.cs
- SQLRoleProvider.cs
- IntellisenseTextBox.cs
- ClosureBinding.cs
- BasicViewGenerator.cs
- SqlBuffer.cs
- TextBoxRenderer.cs
- UserControlDesigner.cs
- HelpKeywordAttribute.cs
- PageAsyncTask.cs
- TransformPattern.cs
- XmlWhitespace.cs
- DefaultEvaluationContext.cs
- ColumnCollection.cs
- PropertyNames.cs
- Hash.cs
- ConfigurationPropertyCollection.cs
- MarshalByRefObject.cs
- CacheVirtualItemsEvent.cs
- GridViewEditEventArgs.cs
- ControllableStoryboardAction.cs
- DefaultPropertyAttribute.cs
- JsonReaderWriterFactory.cs
- Timeline.cs
- OptimalTextSource.cs
- XmlElementCollection.cs
- Executor.cs
- List.cs
- IODescriptionAttribute.cs
- FtpCachePolicyElement.cs
- SelectionPattern.cs
- DbExpressionBuilder.cs
- IListConverters.cs
- NetTcpBindingCollectionElement.cs
- NameSpaceExtractor.cs
- StaticDataManager.cs
- BinHexEncoder.cs
- GrammarBuilder.cs
- TimeZone.cs
- HtmlShimManager.cs
- StringDictionaryWithComparer.cs
- SafeNativeMethods.cs
- CommentGlyph.cs
- AssemblyResourceLoader.cs
- Metafile.cs
- EditCommandColumn.cs
- XmlSerializerVersionAttribute.cs
- LicenseContext.cs
- FontStyleConverter.cs