Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- SpellerStatusTable.cs
- Int32Converter.cs
- FileStream.cs
- documentsequencetextview.cs
- RequestQueue.cs
- ControlCachePolicy.cs
- ReadOnlyAttribute.cs
- FolderNameEditor.cs
- DeclarativeExpressionConditionDeclaration.cs
- HtmlToClrEventProxy.cs
- SmiConnection.cs
- EncryptedType.cs
- ScrollProperties.cs
- XmlArrayItemAttributes.cs
- XMLUtil.cs
- OleDbRowUpdatedEvent.cs
- ImageList.cs
- Byte.cs
- querybuilder.cs
- ControlIdConverter.cs
- ForeignConstraint.cs
- SynchronizingStream.cs
- SyndicationDeserializer.cs
- IsolatedStorageException.cs
- LineBreakRecord.cs
- RefreshEventArgs.cs
- Renderer.cs
- XmlSerializerAssemblyAttribute.cs
- Simplifier.cs
- XmlNodeComparer.cs
- HtmlPageAdapter.cs
- ModelVisual3D.cs
- MetadataLocation.cs
- TextViewBase.cs
- CallInfo.cs
- IResourceProvider.cs
- DynamicActivityXamlReader.cs
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- ServiceOperation.cs
- MetadataFile.cs
- DefaultSerializationProviderAttribute.cs
- BlurBitmapEffect.cs
- Rectangle.cs
- ListControlDataBindingHandler.cs
- BitmapEffectGroup.cs
- SizeConverter.cs
- WebPartVerb.cs
- DoubleKeyFrameCollection.cs
- DateBoldEvent.cs
- EndOfStreamException.cs
- SelfIssuedAuthRSAPKCS1SignatureDeformatter.cs
- CodeDirectiveCollection.cs
- KoreanLunisolarCalendar.cs
- EncoderReplacementFallback.cs
- BinaryUtilClasses.cs
- PolyBezierSegmentFigureLogic.cs
- BitmapEffect.cs
- SimpleBitVector32.cs
- Int32Rect.cs
- RunClient.cs
- StructuralCache.cs
- SecurityContext.cs
- TextBounds.cs
- MsmqAppDomainProtocolHandler.cs
- TableRow.cs
- AsyncResult.cs
- WsatAdminException.cs
- CommandField.cs
- AnnotationObservableCollection.cs
- StringAttributeCollection.cs
- DynamicMethod.cs
- RemotingAttributes.cs
- ComponentCollection.cs
- manifestimages.cs
- StretchValidation.cs
- WebPartCatalogAddVerb.cs
- TargetControlTypeCache.cs
- XmlQueryTypeFactory.cs
- WSTrustFeb2005.cs
- EdmSchemaAttribute.cs
- LineMetrics.cs
- OutOfMemoryException.cs
- WebControlAdapter.cs
- ToolBarOverflowPanel.cs
- PointCollectionConverter.cs
- FakeModelItemImpl.cs
- DataSvcMapFileSerializer.cs
- ZeroOpNode.cs
- DataGridCaption.cs
- SqlTriggerContext.cs
- ControlBindingsCollection.cs
- ErrorTableItemStyle.cs
- ObjectContext.cs
- TagPrefixCollection.cs
- BindableTemplateBuilder.cs
- WindowsTab.cs
- ResourceReader.cs
- TypeUsage.cs
- MimeMultiPart.cs
- SoapAttributeAttribute.cs