Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DLinq / Dlinq / SqlClient / Query / SqlAliaser.cs / 1305376 / SqlAliaser.cs
using System; using System.Collections.Generic; using System.Text; using System.Data.Linq; namespace System.Data.Linq.SqlClient { internal class SqlAliaser { Visitor visitor; internal SqlAliaser() { this.visitor = new Visitor(); } internal SqlNode AssociateColumnsWithAliases(SqlNode node) { return this.visitor.Visit(node); } class Visitor : SqlVisitor { SqlAlias alias; internal Visitor() { } internal override SqlAlias VisitAlias(SqlAlias sqlAlias) { SqlAlias save = this.alias; this.alias = sqlAlias; sqlAlias.Node = this.Visit(sqlAlias.Node); this.alias = save; return sqlAlias; } internal override SqlRow VisitRow(SqlRow row) { foreach (SqlColumn c in row.Columns) { c.Alias = alias; } return base.VisitRow(row); } internal override SqlTable VisitTable(SqlTable tab) { foreach (SqlColumn c in tab.Columns) { c.Alias = alias; } return base.VisitTable(tab); } internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { foreach (SqlColumn c in fc.Columns) { c.Alias = this.alias; } return base.VisitTableValuedFunctionCall(fc); } } } } // 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
- TreeView.cs
- CodeEntryPointMethod.cs
- XPathDocumentNavigator.cs
- DecimalFormatter.cs
- WindowPattern.cs
- Binding.cs
- EncryptedType.cs
- CounterSetInstanceCounterDataSet.cs
- ChannelManager.cs
- MsmqIntegrationReceiveParameters.cs
- Relationship.cs
- SpeechSeg.cs
- UnsafeNetInfoNativeMethods.cs
- SequentialUshortCollection.cs
- DateTimeParse.cs
- InputScopeAttribute.cs
- DeviceFilterEditorDialog.cs
- LineBreak.cs
- MarkupExtensionParser.cs
- Configuration.cs
- Literal.cs
- InheritanceAttribute.cs
- EntityContainer.cs
- _ProxyChain.cs
- XmlSchemaImport.cs
- HebrewCalendar.cs
- ActivitySurrogateSelector.cs
- DescriptionAttribute.cs
- GPRECTF.cs
- ContractBase.cs
- AccessDataSourceView.cs
- PageTheme.cs
- SrgsSemanticInterpretationTag.cs
- AutomationPatternInfo.cs
- SafeTimerHandle.cs
- IisTraceListener.cs
- EntityFunctions.cs
- WizardPanelChangingEventArgs.cs
- HighContrastHelper.cs
- ComponentDispatcher.cs
- EpmCustomContentWriterNodeData.cs
- AdRotatorDesigner.cs
- SqlDataSource.cs
- PrefixHandle.cs
- DashStyle.cs
- AesCryptoServiceProvider.cs
- ReaderOutput.cs
- DataMember.cs
- ProcessHostConfigUtils.cs
- ResourceExpressionBuilder.cs
- SoapReflectionImporter.cs
- AssemblyCollection.cs
- filewebrequest.cs
- Binding.cs
- BindingExpressionUncommonField.cs
- Int32CollectionValueSerializer.cs
- ServiceProviders.cs
- EmitterCache.cs
- Property.cs
- ProfileParameter.cs
- TextFormatterHost.cs
- WebPartDescriptionCollection.cs
- EnumBuilder.cs
- DataViewSetting.cs
- SQLInt64Storage.cs
- PrePrepareMethodAttribute.cs
- TableLayout.cs
- GeometryDrawing.cs
- XmlSchemaObject.cs
- CriticalHandle.cs
- MenuItemCollection.cs
- IdentityModelStringsVersion1.cs
- TokenCreationParameter.cs
- ProcessActivityTreeOptions.cs
- SqlUserDefinedAggregateAttribute.cs
- WebServiceReceive.cs
- InvalidCommandTreeException.cs
- ResourceReferenceExpression.cs
- EntityDataSourceWizardForm.cs
- UrlMappingsModule.cs
- FormatterServices.cs
- FileRecordSequenceCompletedAsyncResult.cs
- Pair.cs
- StyleXamlTreeBuilder.cs
- ScriptModule.cs
- TokenCreationParameter.cs
- MenuItem.cs
- TextAction.cs
- FormViewModeEventArgs.cs
- _ChunkParse.cs
- TextTreeInsertElementUndoUnit.cs
- UnescapedXmlDiagnosticData.cs
- EastAsianLunisolarCalendar.cs
- GroupItem.cs
- FixedNode.cs
- BevelBitmapEffect.cs
- OwnerDrawPropertyBag.cs
- _SslState.cs
- BaseProcessor.cs
- OracleDataAdapter.cs