< Summary - AsyncResponse (Release / net8.0+net10.0 / unit+integration)

Information
Class: AsyncResponse.AsyncResponseReplyTarget
Assembly: AsyncResponse.Abstractions
File(s): /home/runner/work/AsyncResponse/AsyncResponse/src/AsyncResponse.Abstractions/AsyncResponseReplyTarget.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 48
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%

File(s)

/home/runner/work/AsyncResponse/AsyncResponse/src/AsyncResponse.Abstractions/AsyncResponseReplyTarget.cs

#LineLine coverage
 1namespace AsyncResponse;
 2
 3/// <summary>
 4/// Transport-neutral description of where a remote system should publish an async response.
 5/// Transport packages translate their native reply destinations (for example Pub/Sub topics or
 6/// broker exchanges) into this shape so application flows can pass reply metadata without taking
 7/// a dependency on a specific transport package.
 8/// </summary>
 9public sealed class AsyncResponseReplyTarget
 10{
 11    /// <summary>A stable logical name for this target, such as <c>default</c> or <c>regional-us</c>.</summary>
 12    public required string Name { get; init; }
 13
 14    /// <summary>The transport that owns the target, such as <c>google-pubsub</c>.</summary>
 15    public required string Transport { get; init; }
 16
 17    /// <summary>
 18    /// The transport-native address, such as a canonical topic, queue, exchange, or URL.
 19    /// Consumers that need structured values should read <see cref="Properties"/>.
 20    /// </summary>
 21    public required string Address { get; init; }
 22
 23    /// <summary>Additional transport-specific values, for example <c>projectId</c> and <c>topicId</c>.</summary>
 324    public Dictionary<string, string> Properties { get; init; } = new(StringComparer.Ordinal);
 25}
 26
 27/// <summary>
 28/// Context passed to triggers that need both the generated correlation id and the selected reply
 29/// target. The same values are also available ambiently through <see cref="AsyncResponseContext"/>
 30/// while the trigger executes.
 31/// </summary>
 32public sealed record AsyncResponseRequestContext(
 33    string CorrelationId,
 34    AsyncResponseReplyTarget? ReplyTarget);
 35
 36/// <summary>
 37/// Optional capability registered by transport packages that can provide async-response reply
 38/// targets. Core uses this only when application code explicitly calls
 39/// <c>WithReplyTarget(...)</c> on a waiter builder.
 40/// </summary>
 41public interface IAsyncResponseReplyTargetProvider
 42{
 43    /// <summary>
 44    /// Resolves a reply target by logical name. Passing <c>null</c> asks for the provider's
 45    /// default target.
 46    /// </summary>
 47    AsyncResponseReplyTarget GetReplyTarget(string? name = null);
 48}

Methods/Properties

.ctor()