Fallback action for performing an invoke from Python. We translate the CallSignature which supports splatting position and keyword args into their expanded form.
Inheritance: InvokeBinder, IPythonSite
コード例 #1
0
        public override bool Equals(object obj)
        {
            CompatibilityInvokeBinder ob = obj as CompatibilityInvokeBinder;

            if (ob == null)
            {
                return(false);
            }

            return(ob._context.Binder == _context.Binder && base.Equals(obj));
        }
コード例 #2
0
 public CreateFallback(CompatibilityInvokeBinder/*!*/ realFallback, CallInfo /*!*/ callInfo)
     : base(callInfo) {
     _fallback = realFallback;
 }
コード例 #3
0
 public CreateFallback(CompatibilityInvokeBinder /*!*/ realFallback, CallInfo /*!*/ callInfo)
     : base(callInfo)
 {
     _fallback = realFallback;
 }
コード例 #4
0
 public CreateFallback(CompatibilityInvokeBinder/*!*/ realFallback, IEnumerable<ArgumentInfo/*!*/>/*!*/ arguments)
     : base(arguments) {
     _fallback = realFallback;
 }
コード例 #5
0
ファイル: BinderState.cs プロジェクト: jxnmaomao/ironruby
        internal CompatibilityInvokeBinder/*!*/ CompatInvoke(CallInfo /*!*/ callInfo) {
            if (_compatInvokeBinders == null) {
                Interlocked.CompareExchange(
                    ref _compatInvokeBinders,
                    new Dictionary<CallSignature, CompatibilityInvokeBinder>(),
                    null
                );
            }

            lock (_compatInvokeBinders) {
                CallSignature sig = BindingHelpers.CallInfoToSignature(callInfo);
                CompatibilityInvokeBinder res;
                if (!_compatInvokeBinders.TryGetValue(sig, out res)) {
                    _compatInvokeBinders[sig] = res = new CompatibilityInvokeBinder(this, callInfo);
                }

                return res;
            }
        }
コード例 #6
0
ファイル: BinderState.cs プロジェクト: jxnmaomao/ironruby
        internal CreateFallback/*!*/ Create(CompatibilityInvokeBinder/*!*/ realFallback, CallInfo /*!*/ callInfo) {
            if (_createBinders == null) {
                Interlocked.CompareExchange(
                    ref _createBinders,
                    new Dictionary<CallSignature, CreateFallback>(),
                    null
                );
            }

            lock (_createBinders) {
                CallSignature sig = BindingHelpers.CallInfoToSignature(callInfo);
                CreateFallback res;
                if (!_createBinders.TryGetValue(sig, out res)) {
                    _createBinders[sig] = res = new CreateFallback(realFallback, callInfo);
                }

                return res;
            }
        }