17 lines
542 B
C#
17 lines
542 B
C#
namespace Hawkeye.VisionBuilder.Workflow.Overrides;
|
|
|
|
public class OperationOverride
|
|
{
|
|
public string Name { get; set; }
|
|
public string Property { get; set; }
|
|
public object Value { get; set; }
|
|
|
|
public void Apply(WorkflowList workflowList)
|
|
{
|
|
var operation = workflowList.Operations.FirstOrDefault(o => o.Label == Name);
|
|
if (operation == null) return;
|
|
var property = operation.GetType().GetProperty(Property);
|
|
if (property == null) return;
|
|
property.SetValue(operation, Value);
|
|
}
|
|
} |