<PackageReference Include="Microsoft.CSharp" Version="4.6.0" />

CSharpInvokeConstructorBinder

using System; using System.Collections.Generic; using System.Dynamic; namespace Microsoft.CSharp.RuntimeBinder { internal sealed class CSharpInvokeConstructorBinder : DynamicMetaObjectBinder, ICSharpInvokeOrInvokeMemberBinder { private CSharpCallFlags _flags; private Type _callingContext; private List<CSharpArgumentInfo> _argumentInfo; private RuntimeBinder _binder; public CSharpCallFlags Flags => _flags; public Type CallingContext => _callingContext; public IList<CSharpArgumentInfo> ArgumentInfo => _argumentInfo.AsReadOnly(); public bool StaticCall => true; public IList<Type> TypeArguments => Array.Empty<Type>(); public string Name => ".ctor"; bool ICSharpInvokeOrInvokeMemberBinder.ResultDiscarded { get { return false; } } public CSharpInvokeConstructorBinder(CSharpCallFlags flags, Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo) { _flags = flags; _callingContext = callingContext; _argumentInfo = BinderHelper.ToList(argumentInfo); _binder = RuntimeBinder.GetInstance(); } public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args) { return BinderHelper.Bind(this, _binder, BinderHelper.Cons(target, args), _argumentInfo, null); } } }