Пример #1
0
 public DynamicMetaObject Invoke(TotemInvokeBinder totemInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args)
 {
     return new FunctionBinderHelper(totemInvoke, this, codeContext, args).MakeMetaObject();
 }
Пример #2
0
        internal TotemInvokeBinder Invoke(CallSignature signature)
        {
            if (_invokeBinders == null)
            {
                Interlocked.CompareExchange(
                    ref _invokeBinders,
                    new Dictionary<CallSignature, TotemInvokeBinder>(),
                    null
                );
            }

            lock (_invokeBinders)
            {
                TotemInvokeBinder res;
                if (!_invokeBinders.TryGetValue(signature, out res))
                    _invokeBinders[signature] = res = new TotemInvokeBinder(this, signature);

                return res;
            }
        }