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
- AttributedMetaModel.cs
- TemplatedAdorner.cs
- RuntimeArgumentHandle.cs
- DbConnectionPoolIdentity.cs
- EventTrigger.cs
- ConfigXmlElement.cs
- CompositeDataBoundControl.cs
- PersonalizationStateInfoCollection.cs
- HttpListenerPrefixCollection.cs
- Cursor.cs
- BinaryMessageEncodingBindingElement.cs
- WhitespaceSignificantCollectionAttribute.cs
- _UriTypeConverter.cs
- TextRange.cs
- VirtualPathProvider.cs
- FacetChecker.cs
- DESCryptoServiceProvider.cs
- DbMetaDataColumnNames.cs
- MiniConstructorInfo.cs
- MobileFormsAuthentication.cs
- InstanceHandle.cs
- StoragePropertyMapping.cs
- ValidationRuleCollection.cs
- mansign.cs
- KeyEventArgs.cs
- CriticalFinalizerObject.cs
- OracleInfoMessageEventArgs.cs
- ObjRef.cs
- CollectionChangedEventManager.cs
- TTSVoice.cs
- XmlAtomErrorReader.cs
- ProxyWebPart.cs
- CanExecuteRoutedEventArgs.cs
- QueryExecutionOption.cs
- InvokeSchedule.cs
- FactoryId.cs
- CodeVariableDeclarationStatement.cs
- RemoteWebConfigurationHostServer.cs
- translator.cs
- DataGridViewToolTip.cs
- SQLSingle.cs
- ToolStripDropDown.cs
- DeviceSpecificDialogCachedState.cs
- OverrideMode.cs
- SerializerWriterEventHandlers.cs
- WinInet.cs
- ActivityPreviewDesigner.cs
- FileUpload.cs
- Encoder.cs
- AnonymousIdentificationModule.cs
- Scene3D.cs
- SqlAggregateChecker.cs
- PageFunction.cs
- MarkupObject.cs
- PixelFormats.cs
- StackBuilderSink.cs
- PathFigure.cs
- AppDomainAttributes.cs
- QilIterator.cs
- XmlSchemaExporter.cs
- SmiEventSink_DeferedProcessing.cs
- EdmPropertyAttribute.cs
- WmlValidatorAdapter.cs
- FindCriteriaApril2005.cs
- WebPartManager.cs
- Int32Animation.cs
- ToolStripMenuItem.cs
- DataTableExtensions.cs
- ReturnValue.cs
- EpmTargetTree.cs
- XpsFilter.cs
- StringConverter.cs
- DummyDataSource.cs
- DropSource.cs
- CodeGenerator.cs
- WMICapabilities.cs
- InvalidEnumArgumentException.cs
- XMLSchema.cs
- ConfigurationManagerInternalFactory.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- TextCompositionManager.cs
- storepermission.cs
- DbMetaDataColumnNames.cs
- LinkLabel.cs
- CredentialCache.cs
- METAHEADER.cs
- TextSelectionProcessor.cs
- PagePropertiesChangingEventArgs.cs
- ContainerSelectorActiveEvent.cs
- Funcletizer.cs
- Events.cs
- TempEnvironment.cs
- wgx_render.cs
- FormatConvertedBitmap.cs
- ServiceNotStartedException.cs
- ConnectionStringSettingsCollection.cs
- XmlSchemaFacet.cs
- SafeRightsManagementSessionHandle.cs
- SystemNetworkInterface.cs
- newinstructionaction.cs