public object invokeMetavalueForParameters(object[] args, object target) { object m0 = getMethodForParameters(ref args, null); if (m0 is MethodInfo) { var m1 = (MethodInfo)m0; var name = m1.Name; var invoker1 = new invoker(); if (m1.ReturnType == typeof(void)) { invoker1.invokeMethodVoid(target, name, args); return(null); } var value = invoker1.invokeMethod(target, name, args); if (null == value) { return(null); } return(metaObject.getFromObject(value, target)); } else { var c1 = (ConstructorInfo)m0; var value = c1.Invoke(args); if (null == value) { return(null); } return(metaObject.getFromObject(value, target)); } }
public object setPropertyMetavalueForParameters(object[] args, object target, object value) { var p = getPropertyForParameters(ref args); var name = p.Name; var invoker1 = new invoker(); invoker1.invokePropertySet(target, name, value, args); return(null); }
public object getPropertyMetavalueForParameters(object[] args, object target) { var p = getPropertyForParameters(ref args); var name = p.Name; var invoker1 = new invoker(); var value = invoker1.invokeProperty(target, name, args); return(metaObject.getFromObject(value, target)); }
public override void dispose() { disposed = true; // try call destroy try { invoker inv = new invoker(); inv.invokeMethod(__internalTarget, "destroy", new object[0]); } catch (Exception) { } this.__internalTarget = null; wrappedObject = null; }
public object invokeMetavalueGenericForParameters(Type[] gargs, object[] args, object target) { var m1 = (MethodInfo)getMethodForParameters(ref args, gargs); var name = m1.Name; var invoker1 = new invoker(); if (m1.ReturnType == typeof(void)) { invoker1.invokeMethodVoid(target, name, args); return(null); } var value = invoker1.invokeMethod(target, name, args); if (null == value) { return(null); } return(metaObject.getFromObject(value, target)); }