You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@@ -38,7 +38,8 @@ namespace System.Linq.Expressions {
|
||||
#if !SILVERLIGHT
|
||||
[DebuggerTypeProxy(typeof(Expression.DynamicExpressionProxy))]
|
||||
#endif
|
||||
public class DynamicExpression : Expression, IArgumentProvider {
|
||||
public class DynamicExpression : Expression, IDynamicExpression
|
||||
{
|
||||
private readonly CallSiteBinder _binder;
|
||||
private readonly Type _delegateType;
|
||||
|
||||
@@ -413,6 +414,16 @@ namespace System.Linq.Expressions {
|
||||
}
|
||||
#endif // !SILVERLIGHT || FEATURE_NETCORE
|
||||
#endregion
|
||||
|
||||
Expression IDynamicExpression.Rewrite(Expression[] args)
|
||||
{
|
||||
return this.Rewrite(args);
|
||||
}
|
||||
|
||||
object IDynamicExpression.CreateCallSite()
|
||||
{
|
||||
return CallSite.Create(this.DelegateType, this.Binder);
|
||||
}
|
||||
}
|
||||
|
||||
#region Specialized Subclasses
|
||||
|
@@ -55,7 +55,7 @@ namespace System.Linq.Expressions {
|
||||
/// an overloaded field enables us to both reduce memory usage as well as maintain compatibility and an
|
||||
/// easy to use external API.
|
||||
/// </summary>
|
||||
internal interface IArgumentProvider {
|
||||
public interface IArgumentProvider {
|
||||
Expression GetArgument(int index);
|
||||
int ArgumentCount {
|
||||
get;
|
||||
|
49
external/referencesource/System.Core/Microsoft/Scripting/Ast/IDynamicExpression.cs
vendored
Normal file
49
external/referencesource/System.Core/Microsoft/Scripting/Ast/IDynamicExpression.cs
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/* ****************************************************************************
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A
|
||||
* copy of the license can be found in the License.html file at the root of this distribution. If
|
||||
* you cannot locate the Apache License, Version 2.0, please send an email to
|
||||
* dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
|
||||
* by the terms of the Apache License, Version 2.0.
|
||||
*
|
||||
* You must not remove this notice, or any other, from this software.
|
||||
*
|
||||
*
|
||||
* ***************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
#if CLR2
|
||||
namespace Microsoft.Scripting.Ast {
|
||||
using Microsoft.Scripting.Utils;
|
||||
#else
|
||||
namespace System.Linq.Expressions
|
||||
{
|
||||
#endif
|
||||
|
||||
public interface IDynamicExpression : IArgumentProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the type of the delegate used by the CallSite />.
|
||||
/// </summary>
|
||||
Type DelegateType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Rewrite this node replacing the args with the provided values. The
|
||||
/// number of the args needs to match the number of the current block.
|
||||
///
|
||||
/// This helper is provided to allow re-writing of nodes to not depend on the specific
|
||||
/// class of DynamicExpression which is being used.
|
||||
/// </summary>
|
||||
Expression Rewrite(Expression[] args);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a CallSite for the node.
|
||||
/// </summary>
|
||||
object CreateCallSite();
|
||||
}
|
||||
}
|
@@ -209,4 +209,4 @@ namespace System {
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
Reference in New Issue
Block a user