상속: EasyNested
예제 #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;
 }
예제 #2
0
 public EasyCallable CreateCallable(ReturnReferenceExpression returnType,
     params ArgumentReference[] args)
 {
     EasyCallable nested = new EasyCallable(this, IncrementAndGetCounterValue,
         returnType, args);
     _nested.Add(nested);
     return nested;
 }
예제 #3
0
 public CallableField(FieldReference field, EasyCallable callable,
     MethodInfo callback, int sourceArgIndex)
 {
     _field = field;
     _callable = callable;
     _callback = callback;
     _sourceArgIndex = sourceArgIndex;
 }
예제 #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));
        }
예제 #5
0
        protected FieldReference ObtainCallableFieldBuilderDelegate(EasyCallable builder)
        {
            foreach(CallableField field in _cachedFields)
            {
                if (field.Callable == builder)
                {
                    return field.Field;
                }
            }

            return null;
        }