< Summary

Information
Class: Elsa.Http.Bookmarks.HttpEndpointBookmarkPayload
Assembly: Elsa.Http
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Bookmarks/HttpEndpointBookmarkPayload.cs
Line coverage
100%
Covered lines: 18
Uncovered lines: 0
Coverable lines: 18
Total lines: 72
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_Path()100%11100%
set_Path(...)100%11100%
get_Method()100%11100%
set_Method(...)100%11100%
get_Policy()100%11100%
get_Authorize()100%11100%
get_RequestTimeout()100%11100%
get_RequestSizeLimit()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Bookmarks/HttpEndpointBookmarkPayload.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using Elsa.Workflows.Attributes;
 3
 4namespace Elsa.Http.Bookmarks;
 5
 6/// <summary>
 7/// A bookmark used by the <see cref="HttpEndpoint"/> activity.
 8/// </summary>
 9public record HttpEndpointBookmarkPayload
 10{
 11    private readonly string _path = default!;
 12    private readonly string _method = default!;
 13
 14    /// <summary>
 15    /// Initializes a new instance of the <see cref="HttpEndpointBookmarkPayload"/> class.
 16    /// </summary>
 17    [JsonConstructor]
 9218    public HttpEndpointBookmarkPayload()
 19    {
 9220    }
 21
 22    /// <summary>
 23    /// Initializes a new instance of the <see cref="HttpEndpointBookmarkPayload"/> class.
 24    /// </summary>
 27925    public HttpEndpointBookmarkPayload(string path, string method, bool? authorize = default, string? policy = default, 
 26    {
 27927        Path = path;
 27928        Method = method;
 27929        Authorize = authorize;
 27930        Policy = policy;
 27931        RequestTimeout = requestTimeout;
 27932        RequestSizeLimit = requestSizeLimit;
 27933    }
 34
 35    /// <summary>
 36    /// Gets or sets the path of the HTTP endpoint.
 37    /// </summary>
 38    public string Path
 39    {
 88240        get => _path;
 37141        init => _path = value.ToLowerInvariant();
 42    }
 43
 44    /// <summary>
 45    /// Gets or sets the HTTP method of the endpoint.
 46    /// </summary>
 47    public string Method
 48    {
 79049        get => _method;
 37150        init => _method = value.ToLowerInvariant();
 51    }
 52
 53    /// <summary>
 54    /// Gets or sets the policy to use for authorization.
 55    /// </summary>
 78456    [ExcludeFromHash] public string? Policy { get; set; }
 57
 58    /// <summary>
 59    /// Gets or sets a value indicating whether the endpoint requires authorization.
 60    /// </summary>
 109061    [ExcludeFromHash] public bool? Authorize { get; set; }
 62
 63    /// <summary>
 64    /// Gets or sets the request timeout.
 65    /// </summary>
 99866    [ExcludeFromHash] public TimeSpan? RequestTimeout { get; set; }
 67
 68    /// <summary>
 69    /// Gets or sets the max request size in bytes.
 70    /// </summary>
 78471    [ExcludeFromHash] public long? RequestSizeLimit { get; set; }
 72}