Class MethodScheduledTaskAddIn
- Namespace
- Dynamicweb.Scheduling.ScheduledTaskAddIns
- Assembly
- Dynamicweb.Core.dll
Scheduled task provider MethodScheduledTaskAddIn makes it possible to execute method from Assembly
[AddInName("Dynamicweb.Scheduling.MethodAddIn.MethodAddIn")]
[AddInLabel("Execute method from Assembly")]
[AddInDescription("Executes method from Assembly")]
public class MethodScheduledTaskAddIn : BaseScheduledTaskAddIn, IParameterOptions, IDynamicParameterOptions
- Inheritance
-
MethodScheduledTaskAddIn
- Implements
- Inherited Members
Properties
Assembly
[AddInParameter("Assembly")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "Info=Required;NewGUI=true;reloadOnChange=true;")]
public string? Assembly { get; set; }
Property Value
Class
[AddInParameter("Class")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "Info=Required;NewGUI=true;DynamicOptions=true;reloadOnChange=true;")]
public string? Class { get; set; }
Property Value
Method
[AddInParameter("Method")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "Info=Required;NewGUI=true;DynamicOptions=true;")]
public string? Method { get; set; }
Property Value
Namespace
[AddInParameter("Namespace")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "Info=Required;NewGUI=true;DynamicOptions=true;reloadOnChange=true;")]
public string? Namespace { get; set; }
Property Value
Parameters
[AddInParameter("Parameters")]
[AddInParameterEditor(typeof(TextParameterEditor), "inputClass=NewUIinput;")]
public string? Parameters { get; set; }
Property Value
Methods
GetAssemblies()
public static HashSet<string> GetAssemblies()
Returns
GetClasses(string, string)
public HashSet<string> GetClasses(string assemblyName, string assemblyNamespace)
Parameters
Returns
GetMethodsFromClass(string, string, string)
public IEnumerable<string> GetMethodsFromClass(string assemblyName, string assemblyNamespace, string className)
Parameters
Returns
GetNameSpaces(string)
public HashSet<string> GetNameSpaces(string assemblyName)
Parameters
assemblyNamestring
Returns
GetParameterOptions(string, Func<string, object?>)
public IEnumerable<ParameterOption> GetParameterOptions(string parameterName, Func<string, object?> parameterValueLookup)
Parameters
Returns
Run()
Performs the work of the scheduled task. Called once per task run, after the framework has populated the context properties and loaded the saved parameter values.
public override bool Run()
Returns
- bool
truewhen the work succeeded; otherwisefalse. The value is logged and stored as the task's last result. Exceptions that escape this method are caught by the framework, logged, and recorded as a failed run.