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
Ejemplo n.º 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));
        }
Ejemplo n.º 2
0
 public CreateFallback(CompatibilityInvokeBinder/*!*/ realFallback, CallInfo /*!*/ callInfo)
     : base(callInfo) {
     _fallback = realFallback;
 }
Ejemplo n.º 3
0
 public CreateFallback(CompatibilityInvokeBinder /*!*/ realFallback, CallInfo /*!*/ callInfo)
     : base(callInfo)
 {
     _fallback = realFallback;
 }
Ejemplo n.º 4
0
 public CreateFallback(CompatibilityInvokeBinder/*!*/ realFallback, IEnumerable<ArgumentInfo/*!*/>/*!*/ arguments)
     : base(arguments) {
     _fallback = realFallback;
 }
Ejemplo n.º 5
0
        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;
            }
        }
Ejemplo n.º 6
0
        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;
            }
        }