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
- CharacterBufferReference.cs
- BamlResourceDeserializer.cs
- TemplateInstanceAttribute.cs
- Literal.cs
- SqlProcedureAttribute.cs
- ToolStripScrollButton.cs
- StringAnimationBase.cs
- MimeMapping.cs
- CaretElement.cs
- LOSFormatter.cs
- IsolatedStoragePermission.cs
- RegexInterpreter.cs
- StylusPointProperties.cs
- GetPageNumberCompletedEventArgs.cs
- DataGridViewDataErrorEventArgs.cs
- RelationshipEndMember.cs
- WithStatement.cs
- SHA384Managed.cs
- AssemblyAttributes.cs
- SoapCodeExporter.cs
- HttpDebugHandler.cs
- Sorting.cs
- FrameworkRichTextComposition.cs
- AdCreatedEventArgs.cs
- MenuScrollingVisibilityConverter.cs
- EntityDataSourceReferenceGroup.cs
- DiscreteKeyFrames.cs
- TableLayoutPanelDesigner.cs
- EdmFunction.cs
- PrtCap_Public_Simple.cs
- ItemTypeToolStripMenuItem.cs
- LinqDataSourceView.cs
- StoryFragments.cs
- SqlCaseSimplifier.cs
- XPathAncestorQuery.cs
- RawStylusSystemGestureInputReport.cs
- HtmlMobileTextWriter.cs
- AsyncCallback.cs
- ProxyGenerator.cs
- UntypedNullExpression.cs
- MailDefinition.cs
- BuildProviderCollection.cs
- RootDesignerSerializerAttribute.cs
- GPStream.cs
- CopyAttributesAction.cs
- CreatingCookieEventArgs.cs
- CodeGeneratorOptions.cs
- DebugManager.cs
- Accessors.cs
- SocketInformation.cs
- CompositeFontInfo.cs
- ContractInferenceHelper.cs
- ByteStreamGeometryContext.cs
- DirectionalLight.cs
- ObjectNotFoundException.cs
- URL.cs
- ExecutedRoutedEventArgs.cs
- SqlTypesSchemaImporter.cs
- VirtualDirectoryMappingCollection.cs
- DebugView.cs
- DataObject.cs
- ContextActivityUtils.cs
- DependencySource.cs
- KnowledgeBase.cs
- SynchronizedPool.cs
- SingleSelectRootGridEntry.cs
- XmlValidatingReader.cs
- TextEditor.cs
- ConsoleCancelEventArgs.cs
- CodeSnippetExpression.cs
- Process.cs
- PropertyStore.cs
- ControlBuilderAttribute.cs
- SettingsPropertyValueCollection.cs
- XmlHierarchicalDataSourceView.cs
- Graph.cs
- XamlPathDataSerializer.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- PenThreadWorker.cs
- XomlCompilerResults.cs
- TypographyProperties.cs
- ProfileSection.cs
- XPathArrayIterator.cs
- XmlIlTypeHelper.cs
- ListBindingHelper.cs
- WorkflowTerminatedException.cs
- MachineKeyConverter.cs
- KeyGestureValueSerializer.cs
- AuthorizationRuleCollection.cs
- DesignTimeHTMLTextWriter.cs
- UnsafeCollabNativeMethods.cs
- RelationshipEndCollection.cs
- Error.cs
- IIS7UserPrincipal.cs
- ListBoxChrome.cs
- MetaModel.cs
- DbParameterCollectionHelper.cs
- PackWebRequest.cs
- InstanceStore.cs
- TextDecorationCollection.cs