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
- TreeViewImageKeyConverter.cs
- Expressions.cs
- XsltSettings.cs
- TCEAdapterGenerator.cs
- EndpointAddress.cs
- RootDesignerSerializerAttribute.cs
- SigningCredentials.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- ArglessEventHandlerProxy.cs
- TcpChannelHelper.cs
- GridLength.cs
- SecurityResources.cs
- ReferencedType.cs
- QueryExpression.cs
- DetailsViewDeletedEventArgs.cs
- DeploymentExceptionMapper.cs
- OutputCacheSection.cs
- BamlVersionHeader.cs
- StackSpiller.Temps.cs
- Util.cs
- MenuCommand.cs
- FillErrorEventArgs.cs
- XmlCharacterData.cs
- MsmqIntegrationChannelListener.cs
- SqlConnectionFactory.cs
- TextEncodedRawTextWriter.cs
- SqlEnums.cs
- HttpListenerRequestUriBuilder.cs
- DataGridRowsPresenter.cs
- DelegatingChannelListener.cs
- SqlRecordBuffer.cs
- ExtensionMethods.cs
- CloseSequence.cs
- CurrentChangingEventManager.cs
- TextServicesProperty.cs
- MinimizableAttributeTypeConverter.cs
- XPathException.cs
- HierarchicalDataSourceControl.cs
- ViewSimplifier.cs
- FileDialogCustomPlace.cs
- TextFormatterHost.cs
- Comparer.cs
- GeometryCombineModeValidation.cs
- SqlXmlStorage.cs
- RegexBoyerMoore.cs
- UInt64.cs
- Relationship.cs
- __FastResourceComparer.cs
- DispatcherObject.cs
- ClientBuildManagerCallback.cs
- DeleteMemberBinder.cs
- ColorIndependentAnimationStorage.cs
- XmlSchemaExporter.cs
- SqlLiftWhereClauses.cs
- ReturnType.cs
- XmlDictionaryReaderQuotas.cs
- TextEditorCharacters.cs
- FunctionNode.cs
- PopupRoot.cs
- StateMachineHelpers.cs
- EnterpriseServicesHelper.cs
- AlternateView.cs
- WebBrowserNavigatedEventHandler.cs
- RuntimeConfigLKG.cs
- EventProxy.cs
- CompressEmulationStream.cs
- EventArgs.cs
- XmlSchemaAttributeGroupRef.cs
- AsyncOperationManager.cs
- EFAssociationProvider.cs
- DecimalAnimationUsingKeyFrames.cs
- SchemaNames.cs
- GeometryCollection.cs
- ListGeneralPage.cs
- UnsafeNativeMethods.cs
- TemplateControlParser.cs
- Substitution.cs
- ByValueEqualityComparer.cs
- MessageSmuggler.cs
- Win32SafeHandles.cs
- PropertyDescriptor.cs
- DataObjectEventArgs.cs
- ZipIOExtraFieldElement.cs
- ListViewInsertedEventArgs.cs
- AudioFileOut.cs
- ReadOnlyDataSource.cs
- CodePropertyReferenceExpression.cs
- RotateTransform.cs
- CodeLinePragma.cs
- VirtualPathData.cs
- ElementNotAvailableException.cs
- MatrixCamera.cs
- SafeBitVector32.cs
- WizardStepBase.cs
- JoinSymbol.cs
- PropertyDescriptorCollection.cs
- ConstraintEnumerator.cs
- DataSourceXmlSerializer.cs
- ListDesigner.cs
- TemplateColumn.cs