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
- DrawingGroupDrawingContext.cs
- SymDocumentType.cs
- CallSite.cs
- FreezableDefaultValueFactory.cs
- RuntimeEnvironment.cs
- DataReaderContainer.cs
- ReflectionPermission.cs
- TextCollapsingProperties.cs
- TextContainerChangeEventArgs.cs
- UserControl.cs
- SimpleHandlerFactory.cs
- ForEachAction.cs
- filewebrequest.cs
- DeploymentExceptionMapper.cs
- ToolStripControlHost.cs
- NamespaceInfo.cs
- XmlWhitespace.cs
- CrossSiteScriptingValidation.cs
- XmlWhitespace.cs
- XmlIgnoreAttribute.cs
- ObjectDataProvider.cs
- ValidationRule.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- SimpleLine.cs
- FileDialogCustomPlacesCollection.cs
- HierarchicalDataBoundControlAdapter.cs
- TraversalRequest.cs
- AppDomain.cs
- Constraint.cs
- WindowsFormsHostPropertyMap.cs
- AllMembershipCondition.cs
- Utils.cs
- ConfigurationLockCollection.cs
- DeviceContext2.cs
- XmlUtil.cs
- ComponentConverter.cs
- ReflectionServiceProvider.cs
- CountAggregationOperator.cs
- dataprotectionpermission.cs
- ResourceIDHelper.cs
- WebPartCloseVerb.cs
- ConsumerConnectionPointCollection.cs
- TagNameToTypeMapper.cs
- ThreadStateException.cs
- DataGridViewButtonCell.cs
- TableRowCollection.cs
- TagMapCollection.cs
- XamlPointCollectionSerializer.cs
- XamlParser.cs
- DecoratedNameAttribute.cs
- BrowserCapabilitiesFactory.cs
- DbConnectionPoolGroupProviderInfo.cs
- Menu.cs
- DataObjectPastingEventArgs.cs
- RealProxy.cs
- XmlSchemaAttribute.cs
- NameSpaceExtractor.cs
- DesignerSerializationVisibilityAttribute.cs
- SerialReceived.cs
- VisualProxy.cs
- StatusBarDesigner.cs
- OverlappedAsyncResult.cs
- StsCommunicationException.cs
- loginstatus.cs
- EventLogPermissionAttribute.cs
- ConstraintConverter.cs
- ClusterSafeNativeMethods.cs
- ObjectNavigationPropertyMapping.cs
- PixelFormatConverter.cs
- DigitShape.cs
- VersionedStream.cs
- Message.cs
- PasswordRecoveryDesigner.cs
- DuplicateWaitObjectException.cs
- XPathNavigatorKeyComparer.cs
- OpenFileDialog.cs
- StrongNamePublicKeyBlob.cs
- SqlBuilder.cs
- OrderToken.cs
- InputBindingCollection.cs
- TypedColumnHandler.cs
- SqlCacheDependency.cs
- TemplateLookupAction.cs
- DesignerDeviceConfig.cs
- Object.cs
- IdentitySection.cs
- control.ime.cs
- ServicesExceptionNotHandledEventArgs.cs
- TraceUtility.cs
- JournalEntryListConverter.cs
- ValidatingPropertiesEventArgs.cs
- WindowsClientCredential.cs
- WindowProviderWrapper.cs
- DiagnosticTraceRecords.cs
- EventRecord.cs
- FormsAuthenticationTicket.cs
- ToolStripLabel.cs
- WebColorConverter.cs
- _SSPISessionCache.cs
- XamlToRtfParser.cs