Exemple #1
0
        //Calls the method
        object CallMethod()
        {
            if (args == null)
            {
                args = new object[inputs.Count];
            }

            for (var i = 0; i < inputs.Count; i++)
            {
                args[i] = inputs[i].value;
            }

            if (method.IsStatic)
            {
                return(returnValue = _method.Get().Invoke(null, args));
            }
            else
            {
                instance = instanceInput.value;
                if (instance == null || instance.Equals(null))
                {
                    return(returnValue = null);
                }
                return(returnValue = _method.Get().Invoke(instance, args));
            }
        }
 public override void OnValidate(ITaskSystem ownerSystem)
 {
     if (method != null && method.HasChanged())
     {
         SetMethod(method.Get());
     }
     if (method != null && method.Get() == null)
     {
         Error(string.Format("Missing Method '{0}'", method.GetMethodString()));
     }
 }
 public override void OnValidate(ITaskSystem ownerSystem)
 {
     if (method != null && method.HasChanged())
     {
         SetMethod(method.Get());
     }
 }
Exemple #4
0
 public MethodInfo GetMethod()
 {
     return(_targetMethod != null?_targetMethod.Get() : null);
 }