Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- EventDescriptor.cs
- ReaderWriterLock.cs
- Rotation3D.cs
- ExpressionBinding.cs
- ContentPresenter.cs
- FlowDocumentPageViewerAutomationPeer.cs
- GradientBrush.cs
- SortedSetDebugView.cs
- ByeMessageCD1.cs
- DragCompletedEventArgs.cs
- RemotingAttributes.cs
- ThreadLocal.cs
- StringStorage.cs
- DataControlLinkButton.cs
- DataGridTextBoxColumn.cs
- LinearGradientBrush.cs
- PageParser.cs
- LocalizationParserHooks.cs
- Publisher.cs
- FrameworkObject.cs
- PopupRootAutomationPeer.cs
- LogExtentCollection.cs
- PropertyChangingEventArgs.cs
- ApplicationManager.cs
- LayoutTableCell.cs
- XmlSerializerImportOptions.cs
- Italic.cs
- AnimationClock.cs
- SqlUserDefinedTypeAttribute.cs
- RootProjectionNode.cs
- ContainerParaClient.cs
- _StreamFramer.cs
- SwitchLevelAttribute.cs
- ScrollPattern.cs
- RequestNavigateEventArgs.cs
- PropertyTab.cs
- AttachedAnnotation.cs
- DataErrorValidationRule.cs
- PerspectiveCamera.cs
- ObjectConverter.cs
- EastAsianLunisolarCalendar.cs
- SevenBitStream.cs
- RelatedImageListAttribute.cs
- QueryCacheManager.cs
- SystemIcmpV6Statistics.cs
- XmlSchemaDocumentation.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- followingsibling.cs
- ProxyAssemblyNotLoadedException.cs
- ADMembershipProvider.cs
- ChangeDirector.cs
- SafeCertificateContext.cs
- FileDialog.cs
- UIElementPropertyUndoUnit.cs
- ToolTip.cs
- x509utils.cs
- ScriptControlDescriptor.cs
- RayHitTestParameters.cs
- SqlBulkCopy.cs
- AnimationClockResource.cs
- FunctionImportElement.cs
- ConvertEvent.cs
- _KerberosClient.cs
- TextPattern.cs
- InfiniteTimeSpanConverter.cs
- RemotingAttributes.cs
- _SSPIWrapper.cs
- FixUp.cs
- documentsequencetextview.cs
- MobileControlsSectionHelper.cs
- PartialCachingAttribute.cs
- EventTrigger.cs
- PreProcessInputEventArgs.cs
- BuildProviderAppliesToAttribute.cs
- ElementHost.cs
- FusionWrap.cs
- PropertyValueEditor.cs
- MultiSelectRootGridEntry.cs
- ComponentChangingEvent.cs
- PaintEvent.cs
- EnvironmentPermission.cs
- FamilyTypeface.cs
- jithelpers.cs
- StorageEntitySetMapping.cs
- EncoderBestFitFallback.cs
- ConnectionStringsSection.cs
- InstanceDataCollection.cs
- GregorianCalendarHelper.cs
- BitVector32.cs
- ProgressBarRenderer.cs
- StyleSheetDesigner.cs
- BuiltInExpr.cs
- SimpleType.cs
- PropertyDescriptorCollection.cs
- SafeNativeMethods.cs
- CreatingCookieEventArgs.cs
- ChtmlTextWriter.cs
- JsonReaderDelegator.cs
- BinaryObjectReader.cs
- SmiConnection.cs