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
- DesignerSerializationOptionsAttribute.cs
- ContextDataSourceContextData.cs
- NestPullup.cs
- MultipartContentParser.cs
- DependencyPropertyKey.cs
- HttpFileCollectionWrapper.cs
- XhtmlBasicListAdapter.cs
- EntityViewGenerator.cs
- AncestorChangedEventArgs.cs
- NativeMethods.cs
- securestring.cs
- DmlSqlGenerator.cs
- InvalidPropValue.cs
- SingleConverter.cs
- VBCodeProvider.cs
- UnsignedPublishLicense.cs
- Path.cs
- EventLogPermission.cs
- XsdBuildProvider.cs
- CollectionViewGroupInternal.cs
- SoapSchemaImporter.cs
- ProfileSettingsCollection.cs
- CollectionViewProxy.cs
- LinqDataSource.cs
- EmissiveMaterial.cs
- SendActivityDesignerTheme.cs
- RootBrowserWindowProxy.cs
- OdbcTransaction.cs
- XmlNamespaceDeclarationsAttribute.cs
- CodeStatementCollection.cs
- CodeVariableReferenceExpression.cs
- Hyperlink.cs
- DbProviderManifest.cs
- ObjectSecurity.cs
- Context.cs
- ObjectDataSourceMethodEventArgs.cs
- GreenMethods.cs
- CompilerTypeWithParams.cs
- SafeThreadHandle.cs
- COM2Enum.cs
- ItemAutomationPeer.cs
- MembershipUser.cs
- FixedNode.cs
- SplayTreeNode.cs
- Helpers.cs
- DataGridViewTextBoxColumn.cs
- IArgumentProvider.cs
- ImportFileRequest.cs
- UserValidatedEventArgs.cs
- CanonicalFontFamilyReference.cs
- PageRouteHandler.cs
- WebPartConnectionsEventArgs.cs
- TypeUsage.cs
- CompressedStack.cs
- AssertUtility.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- Misc.cs
- Delegate.cs
- ToolStripTextBox.cs
- SourceFileBuildProvider.cs
- LinearGradientBrush.cs
- PrinterResolution.cs
- ValidationError.cs
- ConstraintEnumerator.cs
- ExpressionQuoter.cs
- TableItemStyle.cs
- SuppressIldasmAttribute.cs
- WrapPanel.cs
- LongSumAggregationOperator.cs
- RemoteWebConfigurationHostServer.cs
- AbandonedMutexException.cs
- BrowserTree.cs
- ToolboxItemFilterAttribute.cs
- TemplateAction.cs
- Panel.cs
- ProcessProtocolHandler.cs
- PersonalizationEntry.cs
- diagnosticsswitches.cs
- RuntimeHelpers.cs
- DoubleLinkListEnumerator.cs
- DocComment.cs
- GeometryHitTestResult.cs
- RoleServiceManager.cs
- AdRotator.cs
- TripleDESCryptoServiceProvider.cs
- PropertyTabAttribute.cs
- ControlValuePropertyAttribute.cs
- ContainerSelectorBehavior.cs
- MediaTimeline.cs
- PropertyGridEditorPart.cs
- WrappedKeySecurityTokenParameters.cs
- Pair.cs
- ClosableStream.cs
- HttpStaticObjectsCollectionBase.cs
- CodeGroup.cs
- MediaElement.cs
- TextTreeRootTextBlock.cs
- WebPartManagerDesigner.cs
- ObjectDataSourceDesigner.cs
- ExpressionLink.cs