Chronos Plugins 5.9.0
This documentation covers the plugin interfaces definitions and an example implementation.
Loading...
Searching...
No Matches
TaskListAttribute.cs
Go to the documentation of this file.
1using System.Collections;
4
5namespace MockPlugin.Tasks
6{
12 {
13 public override IEnumerable GetStandardValues(ITask theTask)
14 {
15 if (theTask is IPluginTaskAdapter adapter && adapter.Plugin is MockMethodEditorSnoopingTask snooper)
16 {
17 var theSnooper = snooper.MethodEditorSnooper;
18 if (theSnooper != null)
19 {
20 foreach (var editedTask in snooper.MethodEditorSnooper.EditedTasks)
21 {
22 if (editedTask.Task == theTask)
23 {
24 yield return $"This task: {editedTask}";
25 }
26 else
27 {
28 yield return $"{editedTask}{GetCaffeineInfo(editedTask)}";
29 }
30 }
31 }
32 }
33 }
34
42 private string GetCaffeineInfo(ITaskInEditorInfo editedTask)
43 {
44 if (editedTask.Task is IPluginTaskAdapter adapter && adapter.Plugin is BrewFrappuccino brewer)
45 {
46 return $", {(brewer.Composition.DeCaffeinated ? "" : "not ")} decaffeinated";
47 }
48 return "";
49 }
50 }
51}
Classes and interfaces that are meant for plugins. The classes and interfaces below this namespace ar...
Auxiliary functions that can improve the usablility of the method editor for your task types.
Example task implementations. Since there are lots of things that can be done from a task,...
Access to the method editor's view of the task.
TPluginInterface Plugin
Get the inner, plugin defined part of the object.
To be implemented by the "task" part of a Chronos plugin. Public properties of the implementing type ...
Do not implement this interface.
object Task
Task object, Chronos internal type.
If your standard value list cannot be provided without knowing the actual task's details,...
This task just shows how you can react on the method editor contents and provide context sensitive pr...
A task working on a complex parameter set.
This attribute uses the task to which it is applied to query for other tasks in the method editor....
string GetCaffeineInfo(ITaskInEditorInfo editedTask)
If this is a BrewFrappuccino task, we'll find out if it uses decaf coffee.
override IEnumerable GetStandardValues(ITask theTask)