Inheritance: EasyNested
Ejemplo n.º 1
0
 public EasyCallable CreateCallable(Type returnType, params ParameterInfo[] args)
 {
     EasyCallable nested = new EasyCallable(this, IncrementAndGetCounterValue,
         new ReturnReferenceExpression(returnType), ArgumentsUtil.ConvertToArgumentReference(args));
     _nested.Add(nested);
     return nested;
 }
Ejemplo n.º 2
0
 public EasyCallable CreateCallable(ReturnReferenceExpression returnType,
     params ArgumentReference[] args)
 {
     EasyCallable nested = new EasyCallable(this, IncrementAndGetCounterValue,
         returnType, args);
     _nested.Add(nested);
     return nested;
 }
Ejemplo n.º 3
0
 public CallableField(FieldReference field, EasyCallable callable,
     MethodInfo callback, int sourceArgIndex)
 {
     _field = field;
     _callable = callable;
     _callback = callback;
     _sourceArgIndex = sourceArgIndex;
 }
Ejemplo n.º 4
0
        protected void RegisterDelegateFieldToBeInitialized(
            MethodInfo method, FieldReference field,
            EasyCallable builder, MethodInfo callbackMethod)
        {
            int sourceArgIndex = CallableField.EmptyIndex;

            if (Context.HasMixins && _interface2mixinIndex.Contains(method.DeclaringType))
            {
                sourceArgIndex = ((int) _interface2mixinIndex[method.DeclaringType]);
            }

            _cachedFields.Add(new CallableField(field, builder, callbackMethod, sourceArgIndex));
        }
Ejemplo n.º 5
0
        protected FieldReference ObtainCallableFieldBuilderDelegate(EasyCallable builder)
        {
            foreach(CallableField field in _cachedFields)
            {
                if (field.Callable == builder)
                {
                    return field.Field;
                }
            }

            return null;
        }