Exemplo n.º 1
0
 /// <summary>
 /// Gets the default value from the function that has been specified as the DefaultValueFunction.
 /// </summary>
 /// <param name="functionName"></param>
 /// <param name="iteratorObject"></param>
 /// <returns></returns>
 public static object GetDefaultOptionValueFromFunction(string functionName, object iteratorObject)
 {
     try
     {
         object[] parameters = new[] { iteratorObject };
         return(CurrentProject.CallTemplateFunction(functionName, ref parameters));
     }
     catch (MissingMethodException)
     {
         object[] parameters = new object[0];
         return(CurrentProject.CallTemplateFunction(functionName, ref parameters));
     }
 }