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
- BlockExpression.cs
- WebPartZoneCollection.cs
- COM2ExtendedTypeConverter.cs
- FamilyTypefaceCollection.cs
- FigureParagraph.cs
- ToolStripManager.cs
- ObjectDataSource.cs
- TextMarkerSource.cs
- LogReserveAndAppendState.cs
- ColorMap.cs
- JoinElimination.cs
- AccessKeyManager.cs
- ShaperBuffers.cs
- MSHTMLHost.cs
- CopyOfAction.cs
- DataGridViewTopRowAccessibleObject.cs
- StrokeNodeData.cs
- BitmapSource.cs
- MouseCaptureWithinProperty.cs
- StreamGeometry.cs
- ProjectedWrapper.cs
- TypeBuilder.cs
- WebPartCollection.cs
- VariableExpressionConverter.cs
- ExpressionParser.cs
- HttpCachePolicy.cs
- SpotLight.cs
- DataRelationCollection.cs
- Model3DGroup.cs
- CannotUnloadAppDomainException.cs
- HttpConfigurationSystem.cs
- CaseStatement.cs
- AsyncCallback.cs
- BrowserCapabilitiesCodeGenerator.cs
- TextPattern.cs
- HashMembershipCondition.cs
- TagMapCollection.cs
- AutomationPattern.cs
- SubtreeProcessor.cs
- SchemaManager.cs
- MailMessageEventArgs.cs
- CodeCatchClause.cs
- RegexCompilationInfo.cs
- UIntPtr.cs
- ApplicationManager.cs
- InlineCollection.cs
- InternalUserCancelledException.cs
- BaseProcessor.cs
- ObjectPropertyMapping.cs
- StickyNoteContentControl.cs
- CombinedGeometry.cs
- TypeSystemHelpers.cs
- TypeListConverter.cs
- WinInetCache.cs
- DrawingVisual.cs
- AppDomainCompilerProxy.cs
- CodeDomSerializer.cs
- WebPartConnectionsCancelVerb.cs
- DbXmlEnabledProviderManifest.cs
- GradientSpreadMethodValidation.cs
- PortCache.cs
- AnnotationComponentManager.cs
- XhtmlBasicControlAdapter.cs
- SortedSet.cs
- NamespaceMapping.cs
- IdentityValidationException.cs
- Operator.cs
- CustomPopupPlacement.cs
- CodeStatement.cs
- TraceFilter.cs
- TreeIterators.cs
- XmlSchemaComplexContent.cs
- HyperLinkField.cs
- DbCommandTree.cs
- MailHeaderInfo.cs
- Mapping.cs
- TextStore.cs
- XMLSyntaxException.cs
- DatatypeImplementation.cs
- DependencyPropertyDescriptor.cs
- CodeArrayCreateExpression.cs
- ConnectionsZone.cs
- CommonRemoteMemoryBlock.cs
- ExtentKey.cs
- HGlobalSafeHandle.cs
- MetafileHeader.cs
- GenericEnumerator.cs
- CallTemplateAction.cs
- DbConnectionStringCommon.cs
- OpCopier.cs
- DigitShape.cs
- ContentDisposition.cs
- DataGridComboBoxColumn.cs
- AssemblyCollection.cs
- RegionInfo.cs
- TiffBitmapEncoder.cs
- UnknownBitmapEncoder.cs
- BehaviorEditorPart.cs
- ConnectionStringsSection.cs
- Stylesheet.cs