Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DLinq / Dlinq / SqlClient / Query / SqlGatherConsumedAliases.cs / 1 / 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
- ParameterBuilder.cs
- EnumConverter.cs
- MembershipValidatePasswordEventArgs.cs
- ListControlBuilder.cs
- NegationPusher.cs
- returneventsaver.cs
- MultilineStringConverter.cs
- _LoggingObject.cs
- CapabilitiesUse.cs
- _HTTPDateParse.cs
- TemplateControlParser.cs
- QueueProcessor.cs
- DataGridViewRowHeaderCell.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- MouseEventArgs.cs
- RotateTransform3D.cs
- SafeArrayRankMismatchException.cs
- ProjectionCamera.cs
- FormsIdentity.cs
- AdapterUtil.cs
- DataGridViewSelectedCellCollection.cs
- MetadataPropertyCollection.cs
- TheQuery.cs
- ResourceWriter.cs
- Stack.cs
- MonthChangedEventArgs.cs
- DataReceivedEventArgs.cs
- DescendentsWalker.cs
- OleDbReferenceCollection.cs
- Point.cs
- _FtpDataStream.cs
- Formatter.cs
- VirtualPathData.cs
- CodeIndexerExpression.cs
- LineProperties.cs
- PropertyDescriptor.cs
- baseaxisquery.cs
- BackgroundFormatInfo.cs
- Group.cs
- XmlProcessingInstruction.cs
- FileSecurity.cs
- HyperLinkField.cs
- SerializableAttribute.cs
- XPathNodeInfoAtom.cs
- ReverseInheritProperty.cs
- AttributeProviderAttribute.cs
- EncodingNLS.cs
- ItemMap.cs
- SessionIDManager.cs
- XPathNodeList.cs
- RequestCache.cs
- ExtentCqlBlock.cs
- Vector3DCollectionConverter.cs
- StrongTypingException.cs
- RegexFCD.cs
- StreamGeometry.cs
- ControlCodeDomSerializer.cs
- ConstraintManager.cs
- ForceCopyBuildProvider.cs
- EdmError.cs
- CodeDomConfigurationHandler.cs
- ProviderIncompatibleException.cs
- SpecialFolderEnumConverter.cs
- pingexception.cs
- ScriptRef.cs
- CustomWebEventKey.cs
- ToolStripDropDownButton.cs
- ServiceModelConfigurationSection.cs
- EventData.cs
- PolicyLevel.cs
- ExtensionDataObject.cs
- InkCanvasSelectionAdorner.cs
- ContentElement.cs
- DocumentOrderQuery.cs
- ShapeTypeface.cs
- ControlAdapter.cs
- _NegoStream.cs
- SecureStringHasher.cs
- MessageBodyMemberAttribute.cs
- MimeFormatter.cs
- XomlCompilerError.cs
- DigitShape.cs
- ServiceHostingEnvironment.cs
- ReaderContextStackData.cs
- PrivilegedConfigurationManager.cs
- DateTimeConstantAttribute.cs
- DataErrorValidationRule.cs
- TypeExtensionConverter.cs
- ActivityCollectionMarkupSerializer.cs
- StreamInfo.cs
- StylusCollection.cs
- TreeWalker.cs
- DetailsViewUpdatedEventArgs.cs
- XmlSchemaSimpleType.cs
- GlyphManager.cs
- TCPListener.cs
- StrokeCollectionConverter.cs
- XsltSettings.cs
- EntityUtil.cs
- XmlnsCache.cs