mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
Adding reference source for System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.SqlXml System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Xml System.Xml.Linq
53 lines
1.6 KiB
C#
53 lines
1.6 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|