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"); } } }
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; }
public static void ToString(WFDefinition obj, MethodReturnEventArgs <string> e) { e.Result = obj.Name; }