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
- WebPartMovingEventArgs.cs
- DefaultValueTypeConverter.cs
- BamlLocalizableResourceKey.cs
- WebContext.cs
- OleDbConnectionFactory.cs
- Menu.cs
- InnerItemCollectionView.cs
- Win32.cs
- RandomDelaySendsAsyncResult.cs
- HtmlElement.cs
- Merger.cs
- LineServicesCallbacks.cs
- ItemsChangedEventArgs.cs
- SimpleLine.cs
- ReflectEventDescriptor.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- StrokeCollection2.cs
- PasswordBoxAutomationPeer.cs
- ScriptIgnoreAttribute.cs
- WebServiceReceiveDesigner.cs
- RuntimeHandles.cs
- RequestResizeEvent.cs
- IncrementalCompileAnalyzer.cs
- SQLString.cs
- FullTextState.cs
- DataGridViewCellEventArgs.cs
- AdapterUtil.cs
- BinaryNegotiation.cs
- SimplePropertyEntry.cs
- RunClient.cs
- ComponentConverter.cs
- XmlCharCheckingReader.cs
- PeerDuplexChannel.cs
- RadioButton.cs
- DSASignatureDeformatter.cs
- EntityParameterCollection.cs
- SpanIndex.cs
- PlatformNotSupportedException.cs
- CatchBlock.cs
- SafeRightsManagementSessionHandle.cs
- PolyBezierSegment.cs
- DbReferenceCollection.cs
- DependencyObjectValidator.cs
- EventLogHandle.cs
- ServiceSecurityContext.cs
- ToolboxComponentsCreatingEventArgs.cs
- XmlElementAttribute.cs
- MergeFailedEvent.cs
- OperationAbortedException.cs
- HttpTransportBindingElement.cs
- ObfuscateAssemblyAttribute.cs
- FormsAuthenticationUser.cs
- XPathExpr.cs
- GridViewAutomationPeer.cs
- RsaKeyIdentifierClause.cs
- MarginsConverter.cs
- HttpMethodAttribute.cs
- ConfigurationException.cs
- RulePatternOps.cs
- Attribute.cs
- LinqDataSourceHelper.cs
- MenuItem.cs
- SafeFileMappingHandle.cs
- StructuralCache.cs
- WmpBitmapDecoder.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- DataServiceResponse.cs
- TextRangeEditTables.cs
- TrackingStringDictionary.cs
- ResourcesGenerator.cs
- FileLevelControlBuilderAttribute.cs
- ObjectListGeneralPage.cs
- LiteralText.cs
- BufferModeSettings.cs
- SHA512.cs
- GroupDescription.cs
- DataErrorValidationRule.cs
- ScriptComponentDescriptor.cs
- EventListenerClientSide.cs
- BinaryKeyIdentifierClause.cs
- ProtocolElementCollection.cs
- XsltCompileContext.cs
- XslCompiledTransform.cs
- login.cs
- OptimisticConcurrencyException.cs
- TokenBasedSetEnumerator.cs
- HyperLinkStyle.cs
- OrderByLifter.cs
- TemplateInstanceAttribute.cs
- UnsafeNetInfoNativeMethods.cs
- PictureBox.cs
- MarkerProperties.cs
- DataSetMappper.cs
- XPathMessageContext.cs
- InternalConfigEventArgs.cs
- Visitor.cs
- TypeNameConverter.cs
- ContextStaticAttribute.cs
- DesignerWebPartChrome.cs
- MessageBox.cs