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
54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
namespace System.Web.UI.WebControls.Expressions {
|
|
using System;
|
|
using System.Collections.ObjectModel;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Linq;
|
|
using System.Linq.Expressions;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
|
|
[
|
|
ParseChildren(true, "Expressions"),
|
|
PersistChildren(false)
|
|
]
|
|
public class QueryExpression {
|
|
private HttpContext _context;
|
|
private Control _owner;
|
|
private IQueryableDataSource _dataSource;
|
|
private DataSourceExpressionCollection _expressions;
|
|
|
|
[
|
|
PersistenceMode(PersistenceMode.InnerDefaultProperty)
|
|
]
|
|
public DataSourceExpressionCollection Expressions {
|
|
get {
|
|
if (_expressions == null) {
|
|
_expressions = new DataSourceExpressionCollection();
|
|
}
|
|
return _expressions;
|
|
}
|
|
}
|
|
|
|
public void Initialize(Control owner, HttpContext context, IQueryableDataSource dataSource) {
|
|
_owner = owner;
|
|
_context = context;
|
|
_dataSource = dataSource;
|
|
|
|
Expressions.SetContext(owner, context, dataSource);
|
|
}
|
|
|
|
public virtual IQueryable GetQueryable(IQueryable source) {
|
|
if (source == null) {
|
|
return null;
|
|
}
|
|
|
|
foreach (DataSourceExpression e in Expressions) {
|
|
source = e.GetQueryable(source) ?? source;
|
|
}
|
|
|
|
return source;
|
|
}
|
|
}
|
|
}
|