Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DLinq / Dlinq / SqlClient / Query / SqlGatherConsumedAliases.cs / 1 / 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
- FixedSOMImage.cs
- DCSafeHandle.cs
- SendActivityEventArgs.cs
- HostedTcpTransportManager.cs
- CellTreeNode.cs
- ServicePoint.cs
- CrossContextChannel.cs
- ReadWriteSpinLock.cs
- Rect3D.cs
- SQLSingleStorage.cs
- InputScopeAttribute.cs
- PrincipalPermissionMode.cs
- ServiceControllerDesigner.cs
- WindowsAltTab.cs
- Light.cs
- Number.cs
- AutomationProperties.cs
- AvTraceFormat.cs
- ToolStripTemplateNode.cs
- CreatingCookieEventArgs.cs
- PingReply.cs
- HtmlMeta.cs
- Rotation3DAnimationBase.cs
- DocumentPageTextView.cs
- RealProxy.cs
- TabRenderer.cs
- RsaSecurityKey.cs
- EUCJPEncoding.cs
- FormsAuthenticationModule.cs
- DataGridColumnCollection.cs
- InstalledVoice.cs
- TrackingCondition.cs
- ProfileSettings.cs
- SoapAttributes.cs
- UserControlCodeDomTreeGenerator.cs
- ElementInit.cs
- RelationshipEndCollection.cs
- ProfilePropertySettings.cs
- Win32SafeHandles.cs
- ErrorLog.cs
- ToolbarAUtomationPeer.cs
- Pen.cs
- OneWayChannelFactory.cs
- IndexedString.cs
- TextureBrush.cs
- MsmqElementBase.cs
- ClientProtocol.cs
- StylusLogic.cs
- UnorderedHashRepartitionStream.cs
- ListViewItem.cs
- DocumentViewerBaseAutomationPeer.cs
- OdbcRowUpdatingEvent.cs
- TextProperties.cs
- ExceptionUtil.cs
- OutputCacheProviderCollection.cs
- BasicExpressionVisitor.cs
- UpdateProgress.cs
- DataGridViewCellValidatingEventArgs.cs
- PolyLineSegment.cs
- _DomainName.cs
- PageContent.cs
- ObjectDataSourceFilteringEventArgs.cs
- ObjectViewEntityCollectionData.cs
- CustomActivityDesigner.cs
- WebPartConnectionsEventArgs.cs
- SqlHelper.cs
- QueryResponse.cs
- NodeCounter.cs
- SqlFactory.cs
- Context.cs
- OutputCacheSection.cs
- BitStream.cs
- OracleConnectionStringBuilder.cs
- initElementDictionary.cs
- DefaultPropertyAttribute.cs
- WindowInteractionStateTracker.cs
- Calendar.cs
- ScaleTransform3D.cs
- TextRunTypographyProperties.cs
- MultiSelector.cs
- XmlMtomReader.cs
- NestPullup.cs
- DbProviderServices.cs
- AccessedThroughPropertyAttribute.cs
- ExcCanonicalXml.cs
- FrameworkObject.cs
- UserPreferenceChangingEventArgs.cs
- BindingValueChangedEventArgs.cs
- AnonymousIdentificationModule.cs
- CustomError.cs
- MemberAccessException.cs
- DataGridColumn.cs
- TextContainerHelper.cs
- UnsafeNativeMethods.cs
- ProtocolsConfiguration.cs
- List.cs
- coordinator.cs
- _ListenerAsyncResult.cs
- BitmapSizeOptions.cs
- ProxyWebPart.cs