Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharpGetIndexBinder" />.
 /// </summary>
 /// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param>
 /// <param name="argumentInfo">The sequence of <see cref="CSharpArgumentInfo"/> instances for the arguments to this operation.</param>
 public CSharpGetIndexBinder(
     Type callingContext,
     IEnumerable <CSharpArgumentInfo> argumentInfo) :
     base(BinderHelper.CreateCallInfo(ref argumentInfo, 1)) // discard 1 argument: the target object
 {
     _argumentInfo = argumentInfo as CSharpArgumentInfo[];
     _binder       = new RuntimeBinder(callingContext);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharpGetIndexBinder" />.
 /// </summary>
 /// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param>
 /// <param name="argumentInfo">The sequence of <see cref="CSharpArgumentInfo"/> instances for the arguments to this operation.</param>
 public CSharpGetIndexBinder(
     Type callingContext,
     IEnumerable <CSharpArgumentInfo> argumentInfo) :
     base(BinderHelper.CreateCallInfo(argumentInfo, 1)) // discard 1 argument: the target object
 {
     CallingContext = callingContext;
     _argumentInfo  = BinderHelper.ToList(argumentInfo);
     _binder        = RuntimeBinder.GetInstance();
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharpInvokeBinder" />.
 /// </summary>
 /// <param name="flags">Extra information about this operation that is not specific to any particular argument.</param>
 /// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param>
 /// <param name="argumentInfo">The sequence of <see cref="CSharpArgumentInfo"/> instances for the arguments to this operation.</param>
 public CSharpInvokeBinder(
     CSharpCallFlags flags,
     Type callingContext,
     IEnumerable <CSharpArgumentInfo> argumentInfo) :
     base(BinderHelper.CreateCallInfo(ref argumentInfo, 1)) // discard 1 argument: the target object (even if static, arg is type)
 {
     _flags        = flags;
     _argumentInfo = argumentInfo as CSharpArgumentInfo[];
     _binder       = new RuntimeBinder(callingContext);
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharpInvokeBinder" />.
 /// </summary>
 /// <param name="flags">Extra information about this operation that is not specific to any particular argument.</param>
 /// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param>
 /// <param name="argumentInfo">The sequence of <see cref="CSharpArgumentInfo"/> instances for the arguments to this operation.</param>
 public CSharpInvokeBinder(
     CSharpCallFlags flags,
     Type callingContext,
     IEnumerable <CSharpArgumentInfo> argumentInfo) :
     base(BinderHelper.CreateCallInfo(argumentInfo, 1)) // discard 1 argument: the target object (even if static, arg is type)
 {
     _flags         = flags;
     CallingContext = callingContext;
     _argumentInfo  = BinderHelper.ToList(argumentInfo);
     _binder        = RuntimeBinder.GetInstance();
 }
Esempio n. 5
0
        //////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Initializes a new instance of the <see cref="CSharpSetIndexBinder" />.
        /// </summary>
        /// <param name="isCompoundAssignment">True if the assignment comes from a compound assignment in source.</param>
        /// <param name="isChecked">True if the operation is defined in a checked context; otherwise, false.</param>
        /// <param name="callingContext">The <see cref="Type"/> that indicates where this operation is defined.</param>
        /// <param name="argumentInfo">The sequence of <see cref="CSharpArgumentInfo"/> instances for the arguments to this operation.</param>
        public CSharpSetIndexBinder(
            bool isCompoundAssignment,
            bool isChecked,
            Type callingContext,
            IEnumerable <CSharpArgumentInfo> argumentInfo) :
            base(BinderHelper.CreateCallInfo(ref argumentInfo, 2)) // discard 2 arguments: the target object and the value
        {
            IsCompoundAssignment = isCompoundAssignment;
            _argumentInfo        = argumentInfo as CSharpArgumentInfo[];
            _binder = new RuntimeBinder(callingContext, isChecked);
        }
Esempio n. 6
0
        //////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Initializes a new instance of the <see cref="CSharpSetIndexBinder" />.
        /// </summary>
        /// <param name="isCompoundAssignment">True if the assignment comes from a compound assignment in source.</param>
        /// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param>
        /// <param name="argumentInfo">The sequence of <see cref="CSharpArgumentInfo"/> instances for the arguments to this operation.</param>
        public CSharpSetIndexBinder(
            bool isCompoundAssignment,
            bool isChecked,
            Type callingContext,
            IEnumerable <CSharpArgumentInfo> argumentInfo) :
            base(BinderHelper.CreateCallInfo(argumentInfo, 2)) // discard 2 arguments: the target object and the value
        {
            _bIsCompoundAssignment = isCompoundAssignment;
            _isChecked             = isChecked;
            _callingContext        = callingContext;
            _argumentInfo          = BinderHelper.ToList(argumentInfo);
            _binder = RuntimeBinder.GetInstance();
        }
Esempio n. 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharpInvokeMemberBinder" />.
 /// </summary>
 /// <param name="flags">Extra information about this operation that is not specific to any particular argument.</param>
 /// <param name="name">The name of the member to invoke.</param>
 /// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param>
 /// <param name="typeArguments">The list of user-specified type arguments to this call.</param>
 /// <param name="argumentInfo">The sequence of <see cref="CSharpArgumentInfo"/> instances for the arguments to this operation.</param>
 public CSharpInvokeMemberBinder(
     CSharpCallFlags flags,
     string name,
     Type callingContext,
     IEnumerable <Type> typeArguments,
     IEnumerable <CSharpArgumentInfo> argumentInfo) :
     base(name, false, BinderHelper.CreateCallInfo(argumentInfo, 1)) // discard 1 argument: the target object (even if static, arg is type)
 {
     Flags          = flags;
     CallingContext = callingContext;
     _typeArguments = BinderHelper.ToList(typeArguments);
     _argumentInfo  = BinderHelper.ToList(argumentInfo);
     _binder        = RuntimeBinder.GetInstance();
 }