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