//store the method info on init for performance
        protected override string OnInit()
        {
            if (targetMethod == null)
            {
                return("Missing Property");
            }

            try {
                functionWrapper.Init(targetMethod.IsStatic ? null : agent);
                return(null);
            }
            catch { return("SetProperty Error"); }
        }
        //store the method info on init for performance
        protected override string OnInit()
        {
            if (functionWrapper == null)
            {
                return("No Property selected");
            }
            if (targetMethod == null)
            {
                return(string.Format("Missing Property '{0}'", functionWrapper.GetMethodString()));
            }

            try {
                functionWrapper.Init(targetMethod.IsStatic ? null : agent);
                return(null);
            }
            catch { return("SetProperty Error"); }
        }
Exemple #3
0
        //store the method info on init for performance
        protected override string OnInit()
        {
            if (functionWrapper == null)
            {
                return("No Property selected");
            }
            if (targetMethod == null)
            {
                return(string.Format("Missing Property '{0}'", functionWrapper.GetMethodString()));
            }

            try
            {
                object instance = targetMethod.IsStatic ? default(T) : target.value;
                functionWrapper.Init(instance);
                return(null);
            }
            catch { return("SetProperty Error"); }
        }