< Summary

Information
Class: Elsa.Workflows.Runtime.Requests.RefreshWorkflowDefinitionsRequest
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Requests/RefreshWorkflowDefinitionsRequest.cs
Line coverage
50%
Covered lines: 4
Uncovered lines: 4
Coverable lines: 8
Total lines: 35
Line coverage: 50%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
.ctor(...)0%620%
get_BatchSize()100%11100%
get_DefinitionIds()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Requests/RefreshWorkflowDefinitionsRequest.cs

#LineLine coverage
 1namespace Elsa.Workflows.Runtime.Requests;
 2
 3/// <summary>
 4/// Represents a request to refresh workflow definitions by re-indexing their triggers.
 5/// </summary>
 6public class RefreshWorkflowDefinitionsRequest
 7{
 8    /// <summary>
 9    /// Initializes a new instance of <see cref="RefreshWorkflowDefinitionsRequest"/>.
 10    /// </summary>
 111    public RefreshWorkflowDefinitionsRequest()
 12    {
 113    }
 14
 15    /// <summary>
 16    /// Initializes a new instance of <see cref="RefreshWorkflowDefinitionsRequest"/>.
 17    /// </summary>
 018    public RefreshWorkflowDefinitionsRequest(IEnumerable<string>? definitionIds, int batchSize)
 19    {
 020        BatchSize = batchSize;
 021        DefinitionIds = definitionIds?.ToList();
 022    }
 23
 24    /// <summary>
 25    /// Gets or sets the batch size for refreshing workflow definitions.
 26    /// The batch size determines the number of definitions to be processed at a time during the refresh process.
 27    /// </summary>
 228    public int BatchSize { get; set; } = 10;
 29
 30    /// <summary>
 31    /// Gets or sets the collection of definition IDs for workflow definitions to be refreshed.
 32    /// If not specified, all workflows will be refreshed.
 33    /// </summary>
 334    public ICollection<string>? DefinitionIds { get; set; }
 35}