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
- XmlBindingWorker.cs
- assemblycache.cs
- GroupQuery.cs
- UrlAuthFailedErrorFormatter.cs
- ElementAction.cs
- TextWriter.cs
- VersionedStream.cs
- OutputCacheProfile.cs
- DesignerUtils.cs
- MsmqIntegrationMessagePool.cs
- CheckBox.cs
- ToolStripPanel.cs
- Point3DConverter.cs
- DictionaryItemsCollection.cs
- FormViewUpdatedEventArgs.cs
- ReferencedType.cs
- TypeDependencyAttribute.cs
- TypeInfo.cs
- NativeRecognizer.cs
- loginstatus.cs
- NamespaceEmitter.cs
- TableLayoutPanel.cs
- ConstNode.cs
- HwndSubclass.cs
- PointF.cs
- PropertyNames.cs
- XmlSchemaChoice.cs
- WindowsSecurityTokenAuthenticator.cs
- DataRowIndexBuffer.cs
- LongTypeConverter.cs
- ListItem.cs
- NaturalLanguageHyphenator.cs
- CapabilitiesAssignment.cs
- SiteOfOriginPart.cs
- LabelEditEvent.cs
- XmlLinkedNode.cs
- TabControlAutomationPeer.cs
- TerminateDesigner.cs
- PassportPrincipal.cs
- TemplateColumn.cs
- GroupByQueryOperator.cs
- Timer.cs
- SafeBitVector32.cs
- CodeMemberMethod.cs
- TimerElapsedEvenArgs.cs
- ExpressionLexer.cs
- XsdSchemaFileEditor.cs
- ServiceDescriptionImporter.cs
- RawUIStateInputReport.cs
- OdbcConnection.cs
- XmlWriterTraceListener.cs
- DataGridTablesFactory.cs
- MetadataArtifactLoaderCompositeFile.cs
- ConfigXmlSignificantWhitespace.cs
- MetadataFile.cs
- Number.cs
- ImageMap.cs
- DataSourceCacheDurationConverter.cs
- ContentPropertyAttribute.cs
- IgnoreFlushAndCloseStream.cs
- OrderedParallelQuery.cs
- PersonalizationEntry.cs
- CompositeScriptReferenceEventArgs.cs
- UIElement3D.cs
- StrokeFIndices.cs
- ImageListUtils.cs
- BackgroundWorker.cs
- Compilation.cs
- WorkflowQueuingService.cs
- CommonEndpointBehaviorElement.cs
- NativeRecognizer.cs
- DataObjectSettingDataEventArgs.cs
- MediaElementAutomationPeer.cs
- UserInitiatedNavigationPermission.cs
- SingleConverter.cs
- ConnectionProviderAttribute.cs
- ToolStripDropDownButton.cs
- TextDecorationUnitValidation.cs
- RadioButtonFlatAdapter.cs
- InvalidFilterCriteriaException.cs
- ComboBoxRenderer.cs
- ClientTargetCollection.cs
- DropShadowBitmapEffect.cs
- CodeGenerationManager.cs
- TableLayoutPanel.cs
- CancelEventArgs.cs
- RuleSettingsCollection.cs
- XmlEntity.cs
- MarshalByValueComponent.cs
- DesignerDataView.cs
- ParserExtension.cs
- ListMarkerSourceInfo.cs
- CodeObject.cs
- Literal.cs
- EraserBehavior.cs
- ADMembershipUser.cs
- FormViewInsertEventArgs.cs
- LinqDataView.cs
- WebColorConverter.cs
- ObjectListCommandEventArgs.cs