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
- ConnectionConsumerAttribute.cs
- WSSecurityTokenSerializer.cs
- XPathDocumentBuilder.cs
- Tokenizer.cs
- ArithmeticException.cs
- CharAnimationBase.cs
- ProcessDesigner.cs
- TraceContext.cs
- AddInServer.cs
- InputLangChangeEvent.cs
- StorageSetMapping.cs
- WebPermission.cs
- CacheDependency.cs
- EndpointAddressElementBase.cs
- OperatorExpressions.cs
- DocumentPageHost.cs
- ChtmlSelectionListAdapter.cs
- CurrentChangedEventManager.cs
- WorkflowControlClient.cs
- XmlText.cs
- ObjectHandle.cs
- SafeNativeMethods.cs
- XmlAtomicValue.cs
- ScaleTransform3D.cs
- MultiPropertyDescriptorGridEntry.cs
- FreezableDefaultValueFactory.cs
- EntityDataSourceWrapperCollection.cs
- EpmHelper.cs
- OdbcPermission.cs
- Inflater.cs
- FactoryGenerator.cs
- DesignerTransaction.cs
- ColorContextHelper.cs
- Imaging.cs
- CompilationUtil.cs
- NextPreviousPagerField.cs
- HashMembershipCondition.cs
- CompositeDuplexBindingElement.cs
- LogLogRecord.cs
- ToolStripItem.cs
- WeakReferenceList.cs
- Label.cs
- OleDbSchemaGuid.cs
- TemplateLookupAction.cs
- CapabilitiesRule.cs
- NotifyInputEventArgs.cs
- InstanceDataCollection.cs
- ReadWriteSpinLock.cs
- ToolStripRenderEventArgs.cs
- EventLogPermissionEntry.cs
- ModelPerspective.cs
- InstancePersistenceContext.cs
- HttpAsyncResult.cs
- CallbackHandler.cs
- ContextMarshalException.cs
- LogExtent.cs
- DrawingServices.cs
- Int32CAMarshaler.cs
- DirtyTextRange.cs
- _DisconnectOverlappedAsyncResult.cs
- ItemsControlAutomationPeer.cs
- TrustManagerMoreInformation.cs
- XmlNamespaceMappingCollection.cs
- RawTextInputReport.cs
- MexServiceChannelBuilder.cs
- MediaContext.cs
- TreeNodeCollectionEditor.cs
- HandleExceptionArgs.cs
- CompletionProxy.cs
- Shape.cs
- NameGenerator.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- XmlArrayItemAttributes.cs
- SourceFileBuildProvider.cs
- RunWorkerCompletedEventArgs.cs
- BindingsCollection.cs
- MimeParameterWriter.cs
- TableStyle.cs
- StyleBamlTreeBuilder.cs
- DataTableReaderListener.cs
- Enlistment.cs
- EmbossBitmapEffect.cs
- AffineTransform3D.cs
- Point4DValueSerializer.cs
- GradientSpreadMethodValidation.cs
- CodeAttributeArgument.cs
- KeyFrames.cs
- EntityStoreSchemaFilterEntry.cs
- SrgsText.cs
- StringBuilder.cs
- _UncName.cs
- ImageFormat.cs
- AccessKeyManager.cs
- Label.cs
- DataSourceViewSchemaConverter.cs
- SafeLocalMemHandle.cs
- TableCell.cs
- ConvertTextFrag.cs
- Semaphore.cs
- Types.cs