/// <summary> /// Register needed services and options for the Application Workflow Engine /// </summary> /// <param name="service"></param> /// <param name="workflowOptionsDelegate">Optional parameter</param> public static void AddApplicationWorkflowEngine( this IServiceCollection service, Action<ApplicationWorkflowEngineOptions> workflowOptionsDelegate = null) { // required by DI if (workflowOptionsDelegate != null) { service.Configure(workflowOptionsDelegate); } else { service.AddOptions<ApplicationWorkflowEngineOptions>() .Configure( workflowOptions => workflowOptions.XmlWorkflowConfigurationProviderOptions = new XmlWorkflowConfigurationProviderOptions { // folder placed on project level XmlWorkflowConfigurationFullPathToFile = "../../../../ApplicationWorkflowConfigurations/ApplicationWorkflowConfiguration.xml" }); } service.RegisterApplicationWorkflowEngineServices(); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter