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
- DLinqDataModelProvider.cs
- RegisteredHiddenField.cs
- ListControl.cs
- ValidatingPropertiesEventArgs.cs
- Visual3D.cs
- WebExceptionStatus.cs
- DataGridBoolColumn.cs
- FixedSOMTable.cs
- KeyTime.cs
- nulltextnavigator.cs
- SessionStateItemCollection.cs
- DesignerActionKeyboardBehavior.cs
- IteratorFilter.cs
- DesignTable.cs
- DefaultSection.cs
- Int64Converter.cs
- VersionedStream.cs
- Automation.cs
- Soap12ServerProtocol.cs
- WindowsListViewItemCheckBox.cs
- ExpressionBuilder.cs
- PageAsyncTaskManager.cs
- SplitterEvent.cs
- ToolStripItemCollection.cs
- EventKeyword.cs
- SectionUpdates.cs
- ValidationErrorCollection.cs
- HtmlTextArea.cs
- CacheManager.cs
- FileDialogCustomPlacesCollection.cs
- BinaryMessageFormatter.cs
- KerberosSecurityTokenProvider.cs
- RtfToXamlReader.cs
- CompoundFileReference.cs
- PassportAuthenticationEventArgs.cs
- MultiSelectRootGridEntry.cs
- SecurityChannel.cs
- BackgroundWorker.cs
- FileDialogCustomPlace.cs
- HostProtectionPermission.cs
- ObfuscationAttribute.cs
- CursorInteropHelper.cs
- StatusBar.cs
- SchemaManager.cs
- Brush.cs
- EntryPointNotFoundException.cs
- CalendarTable.cs
- HashCoreRequest.cs
- FrameworkTextComposition.cs
- InternalPermissions.cs
- ResourceReferenceExpressionConverter.cs
- ThumbAutomationPeer.cs
- XmlSchemaAttributeGroupRef.cs
- LambdaValue.cs
- MobileTemplatedControlDesigner.cs
- XmlWellformedWriter.cs
- PeerContact.cs
- Tuple.cs
- BinaryObjectWriter.cs
- Package.cs
- AppearanceEditorPart.cs
- SchemaDeclBase.cs
- AutomationPropertyInfo.cs
- DrawingServices.cs
- CharConverter.cs
- RunWorkerCompletedEventArgs.cs
- SmtpSection.cs
- PageEventArgs.cs
- ComplexLine.cs
- HtmlFormWrapper.cs
- CodeDesigner.cs
- SystemColorTracker.cs
- ObjectPersistData.cs
- VectorCollectionValueSerializer.cs
- ObjectDataSourceView.cs
- SmiEventStream.cs
- XslTransform.cs
- PageMediaType.cs
- SQLBytesStorage.cs
- Console.cs
- SearchExpression.cs
- BitmapImage.cs
- ChildrenQuery.cs
- XmlBinaryReader.cs
- OutputCacheProfile.cs
- TextOptions.cs
- ToolStripLabel.cs
- InputLanguageProfileNotifySink.cs
- DoubleKeyFrameCollection.cs
- DiscardableAttribute.cs
- smtppermission.cs
- ExpressionNormalizer.cs
- PageHandlerFactory.cs
- PathGeometry.cs
- MsmqReceiveParameters.cs
- HtmlTextArea.cs
- ToolStripArrowRenderEventArgs.cs
- TextEditorSelection.cs
- TemplateComponentConnector.cs
- SingleConverter.cs