14 #region Normal task methods
21 $
"My enabled property {(mJitChecker(this, "Enabled
") ? "will be
set by a JIT expression
" : "has an ordinary value
")}",
"JobInspectionDemo");
32 var prevTask = mJobInspector.CompleteSchedule
36 prevTask.Enabled =
false;
55 var sb =
new StringBuilder();
59 sb.AppendLine($
"Task {i++}");
60 sb.AppendFormat(
"Class {0}, {1} properties\r\n",
61 someTaskInfo.Task.GetType().Name,
62 someTaskInfo.PropertyAccessInfos.Count());
63 foreach (var somePropInfo
in someTaskInfo.PropertyAccessInfos)
65 sb.AppendFormat(
"Property {0}: {1}, jit? {2}\r\n",
66 somePropInfo.PropInfo.Name,
67 somePropInfo.PropInfo.GetValue(somePropInfo.BaseObject,
null),
72 System.Windows.Forms.MessageBox.Show(
Helpers.
Gui.
MainWindow, sb.ToString(),
"Checked other tasks");
77 return "Snooping around";
80 #endregion Normal task methods
82 #region Job inspection
91 #endregion Job inspection
Classes and interfaces that are meant for plugins. The classes and interfaces below this namespace ar...
delegate bool JITCheckerDelegate(object task, string propertyPath)
The delegate that does the check for you.
Example task implementations. Since there are lots of things that can be done from a task,...
IWin32Window MainWindow
If you need to set the owner window yourself or want to show message boxes.
Static instance for access to utility functions and resources.
static IGuiHelper Gui
Utility functions for window handling.
To be implemented by the "task" part of a Chronos plugin. Public properties of the implementing type ...
void Execute()
Do whatever you have to do with your parameters.
void PostValidate()
Called after the schedule construction is completed.
string GetTaskAction()
Description of the tasks's action (for hints/time table)
void PreValidate()
Called before the schedule construction is completed.
Gives full access to other tasks's properties.
string FullPath
Full path, as must be given in property reference expressions.
Gives access to a task's implementation and to all user visible properties.
object Task
Task object, Chronos internal type.
ITask PluginTask
Gets the unwrapped ITask implementation if this is a plugin task, else null.
Allows to get information about other tasks within our task's job and about other jobs.
IEnumerable< ITaskInfo > JobsTasks
Enumerate the tasks in your task's job.
ITaskInfo CurrentTask
Gets the current Jobs current Task.
Implement this interface if you have to access other tasks within the schedule.
Implement this interface if you have to know (usually for validation) if a certain property of a give...
Shows how to get information about other tasks in the schedule.
void DisablePreviousTwin()
Shows how you can disable other tasks in the schedule creation phase. If there's a previous JobInspec...
JITCheckerDelegate JITChecker
Chronos will provide a function that you can use to check for JIT expressions in properties.
string GetJitInfo(ITaskInfo someTaskInfo, IAccessProperty somePropInfo)
JITCheckerDelegate mJitChecker
IInspectJob mJobInspector