Esempio n. 1
0
 public static void ObjectIsValid(WFDefinition obj, ObjectIsValidEventArgs e)
 {
     // Check if start states are present
     if (obj.StateDefinitions.Count > 0)
     {
         e.IsValid = obj.StateDefinitions.Any(sd => sd.IsStartState);
         if (!e.IsValid)
         {
             e.Errors.Add("No start state was defined");
         }
     }
 }
Esempio n. 2
0
 public static void GetName(WFDefinition obj, MethodReturnEventArgs <string> e)
 {
     e.Result = obj.Module != null?string.Format("Workflow.WFDefinitions.{0}.{1}", obj.Module.Namespace, Regex.Replace(obj.Name, "\\W", "_")) : null;
 }
Esempio n. 3
0
 public static void ToString(WFDefinition obj, MethodReturnEventArgs <string> e)
 {
     e.Result = obj.Name;
 }