Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DLinq / Dlinq / SqlClient / Query / SqlGatherConsumedAliases.cs / 1305376 / 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
- DataGridParentRows.cs
- CodeConditionStatement.cs
- SqlDataSourceSummaryPanel.cs
- GrammarBuilderRuleRef.cs
- EventLogPermission.cs
- SafeFileMappingHandle.cs
- ByteStack.cs
- PropertyToken.cs
- GeneralTransform3DTo2D.cs
- PeerIPHelper.cs
- SQLGuidStorage.cs
- RecognizerInfo.cs
- SemaphoreSecurity.cs
- SoapMessage.cs
- Expr.cs
- DesignerActionKeyboardBehavior.cs
- DateTimeFormatInfoScanner.cs
- ImageCodecInfoPrivate.cs
- XamlToRtfWriter.cs
- RepeaterDataBoundAdapter.cs
- WebResourceUtil.cs
- UriTemplateEquivalenceComparer.cs
- ObjectItemAttributeAssemblyLoader.cs
- ELinqQueryState.cs
- MailWriter.cs
- XmlSerializerFactory.cs
- ColumnBinding.cs
- _LocalDataStore.cs
- ServiceInstallComponent.cs
- DataRowCollection.cs
- HttpWebRequestElement.cs
- GridView.cs
- DateTimeFormatInfoScanner.cs
- ByteRangeDownloader.cs
- OperationParameterInfo.cs
- FragmentNavigationEventArgs.cs
- DataList.cs
- RegexTree.cs
- KeyFrames.cs
- ExpressionLink.cs
- ConcurrentQueue.cs
- ExpressionVisitor.cs
- RuntimeCompatibilityAttribute.cs
- QueryCacheEntry.cs
- KoreanLunisolarCalendar.cs
- Bezier.cs
- WorkflowFileItem.cs
- VolatileEnlistmentMultiplexing.cs
- PreProcessInputEventArgs.cs
- SystemIPInterfaceStatistics.cs
- SchemaObjectWriter.cs
- ExcCanonicalXml.cs
- EntityStoreSchemaGenerator.cs
- XmlMtomWriter.cs
- EventEntry.cs
- SinglePhaseEnlistment.cs
- HttpListenerPrefixCollection.cs
- SizeAnimation.cs
- GeneralTransform3D.cs
- DataGridColumnHeader.cs
- ItemContainerGenerator.cs
- HtmlSelect.cs
- StringAnimationBase.cs
- SHA1.cs
- WorkflowEnvironment.cs
- FilteredReadOnlyMetadataCollection.cs
- XmlDataSource.cs
- Animatable.cs
- MatrixTransform3D.cs
- RefreshPropertiesAttribute.cs
- SHA256Cng.cs
- EventLogReader.cs
- CounterSampleCalculator.cs
- MinimizableAttributeTypeConverter.cs
- OdbcReferenceCollection.cs
- TokenDescriptor.cs
- ObjectManager.cs
- SortDescriptionCollection.cs
- SafeProcessHandle.cs
- FixedTextBuilder.cs
- PermissionRequestEvidence.cs
- _PooledStream.cs
- ListParaClient.cs
- precedingquery.cs
- WindowsToolbar.cs
- SmiMetaDataProperty.cs
- HybridCollection.cs
- DetailsViewPageEventArgs.cs
- DataBindingCollectionConverter.cs
- Animatable.cs
- UntypedNullExpression.cs
- Graphics.cs
- EnumerableRowCollection.cs
- UrlPath.cs
- Byte.cs
- ComboBox.cs
- QilXmlReader.cs
- ValidationSummary.cs
- ExtendedPropertyDescriptor.cs
- WebPartActionVerb.cs