< Summary

Information
Class: Elsa.Workflows.Models.Bookmark
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/Bookmark.cs
Line coverage
100%
Covered lines: 27
Uncovered lines: 0
Coverable lines: 27
Total lines: 75
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
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()100%11100%
get_Id()100%11100%
get_Name()100%11100%
get_Hash()100%11100%
get_Payload()100%11100%
get_ActivityId()100%11100%
get_ActivityNodeId()100%11100%
get_ActivityInstanceId()100%11100%
get_CreatedAt()100%11100%
get_AutoBurn()100%11100%
get_CallbackMethodName()100%11100%
get_AutoComplete()100%11100%
get_Metadata()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/Bookmark.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Elsa.Workflows.Models;
 4
 5/// <summary>
 6/// A bookmark represents a location in a workflow where the workflow can be resumed at a later time.
 7/// </summary>
 8/// <param name="id">The ID of the bookmark.</param>
 9/// <param name="name">The name of the bookmark.</param>
 10/// <param name="hash">The hash of the bookmark.</param>
 11/// <param name="payload">The data associated with the bookmark.</param>
 12/// <param name="activityId">The ID of the activity associated with the bookmark.</param>
 13/// <param name="activityNodeId">The ID of the activity node associated with the bookmark.</param>
 14/// <param name="activityInstanceId">The ID of the activity instance associated with the bookmark.</param>
 15/// <param name="createdAt">The date and time the bookmark was created.</param>
 16/// <param name="autoBurn">Whether or not the bookmark should be automatically burned.</param>
 17/// <param name="callbackMethodName">The name of the method on the activity class to invoke when the bookmark is resumed
 18/// <param name="autoComplete">Whether or not the activity should be automatically completed when the bookmark is resume
 19/// <param name="metadata">Custom properties associated with the bookmark.</param>
 12920public class Bookmark(
 12921    string id,
 12922    string name,
 12923    string hash,
 12924    object? payload,
 12925    string activityId,
 12926    string activityNodeId,
 12927    string? activityInstanceId,
 12928    DateTimeOffset createdAt,
 12929    bool autoBurn = true,
 12930    string? callbackMethodName = null,
 12931    bool autoComplete = true,
 12932    IDictionary<string, string>? metadata = null)
 33{
 34    /// <inheritdoc />
 35    [JsonConstructor]
 5336    public Bookmark() : this("", "", "",  null, "", "", "", default, false)
 37    {
 5338    }
 39
 40    /// <summary>The ID of the bookmark.</summary>
 49141    public string Id { get; set; } = id;
 42
 43    /// <summary>The name of the bookmark.</summary>
 71844    public string Name { get; set; } = name;
 45
 46    /// <summary>The hash of the bookmark.</summary>
 27647    public string Hash { get; set; } = hash;
 48
 49    /// <summary>The data associated with the bookmark.</summary>
 31750    public object? Payload { get; set; } = payload;
 51
 52    /// <summary>The ID of the activity associated with the bookmark.</summary>
 23353    public string ActivityId { get; set; } = activityId;
 54
 55    /// <summary>The ID of the activity node associated with the bookmark.</summary>
 34856    public string ActivityNodeId { get; set; } = activityNodeId;
 57
 58    /// <summary>The ID of the activity instance associated with the bookmark.</summary>
 62259    public string? ActivityInstanceId { get; set; } = activityInstanceId;
 60
 61    /// <summary>The date and time the bookmark was created.</summary>
 27662    public DateTimeOffset CreatedAt { get; set; } = createdAt;
 63
 64    /// <summary>Whether the bookmark should be automatically burned.</summary>
 31365    public bool AutoBurn { get; set; } = autoBurn;
 66
 67    /// <summary>The name of the method on the activity class to invoke when the bookmark is resumed.</summary>
 26968    public string? CallbackMethodName { get; set; } = callbackMethodName;
 69
 70    /// <summary>Whether the activity should be automatically completed when the bookmark is resumed.</summary>
 24971    public bool AutoComplete { get; set; } = autoComplete;
 72
 73    /// <summary>Custom properties associated with the bookmark.</summary>
 22374    public IDictionary<string, string>? Metadata { get; set; } = metadata;
 75}