< 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>
 3390620public class Bookmark(
 3390621    string id,
 3390622    string name,
 3390623    string hash,
 3390624    object? payload,
 3390625    string activityId,
 3390626    string activityNodeId,
 3390627    string? activityInstanceId,
 3390628    DateTimeOffset createdAt,
 3390629    bool autoBurn = true,
 3390630    string? callbackMethodName = null,
 3390631    bool autoComplete = true,
 3390632    IDictionary<string, string>? metadata = null)
 33{
 34    /// <inheritdoc />
 35    [JsonConstructor]
 3383336    public Bookmark() : this("", "", "",  null, "", "", "", default, false)
 37    {
 3383338    }
 39
 40    /// <summary>The ID of the bookmark.</summary>
 6804841    public string Id { get; set; } = id;
 42
 43    /// <summary>The name of the bookmark.</summary>
 6827544    public string Name { get; set; } = name;
 45
 46    /// <summary>The hash of the bookmark.</summary>
 6783347    public string Hash { get; set; } = hash;
 48
 49    /// <summary>The data associated with the bookmark.</summary>
 6787450    public object? Payload { get; set; } = payload;
 51
 52    /// <summary>The ID of the activity associated with the bookmark.</summary>
 6779053    public string ActivityId { get; set; } = activityId;
 54
 55    /// <summary>The ID of the activity node associated with the bookmark.</summary>
 6790556    public string ActivityNodeId { get; set; } = activityNodeId;
 57
 58    /// <summary>The ID of the activity instance associated with the bookmark.</summary>
 6817959    public string? ActivityInstanceId { get; set; } = activityInstanceId;
 60
 61    /// <summary>The date and time the bookmark was created.</summary>
 6783362    public DateTimeOffset CreatedAt { get; set; } = createdAt;
 63
 64    /// <summary>Whether the bookmark should be automatically burned.</summary>
 6787065    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>
 6782668    public string? CallbackMethodName { get; set; } = callbackMethodName;
 69
 70    /// <summary>Whether the activity should be automatically completed when the bookmark is resumed.</summary>
 6780671    public bool AutoComplete { get; set; } = autoComplete;
 72
 73    /// <summary>Custom properties associated with the bookmark.</summary>
 3400074    public IDictionary<string, string>? Metadata { get; set; } = metadata;
 75}