Class MockTransportContext
- Namespace
- Kuestenlogik.Bowire.Mocking
- Assembly
- Kuestenlogik.Bowire.dll
Run-time context handed to every IBowireMockTransportHost at startup — host bind address, requested port, and the playback knobs (replay speed, loop) that affect proactive emission inside the transport. Per-transport-id; the mock server constructs a separate instance for each registered host.
public sealed record MockTransportContext : IEquatable<MockTransportContext>
- Inheritance
-
MockTransportContext
- Implements
- Inherited Members
Constructors
MockTransportContext(IPAddress, int, double, bool, ILogger, TimeSpan?)
Run-time context handed to every IBowireMockTransportHost at startup — host bind address, requested port, and the playback knobs (replay speed, loop) that affect proactive emission inside the transport. Per-transport-id; the mock server constructs a separate instance for each registered host.
public MockTransportContext(IPAddress Host, int RequestedPort, double ReplaySpeed, bool Loop, ILogger Logger, TimeSpan? LoopInterval = null)
Parameters
HostIPAddressIP address (parsed) the main HTTP listener bound to.
RequestedPortintPort the user asked for via CLI / options; 0 means OS-assigned.
ReplaySpeeddoublePlayback speed multiplier — 1.0 preserves cadence, 0 emits everything immediately.
LoopboolWhen
true, proactive transports replay their captured stream indefinitely.LoggerILoggerLogger scoped to the mock server; transports should log under it for unified output.
LoopIntervalTimeSpan?Explicit length of one loop cycle, or
nullto pace cycles by the recording's own duration;TimeSpan.Zeroasks for no pacing at all (#708).
Properties
Host
IP address (parsed) the main HTTP listener bound to.
public IPAddress Host { get; init; }
Property Value
Logger
Logger scoped to the mock server; transports should log under it for unified output.
public ILogger Logger { get; init; }
Property Value
Loop
When true, proactive transports replay their captured stream indefinitely.
public bool Loop { get; init; }
Property Value
LoopInterval
Explicit length of one loop cycle, or null to pace cycles by the recording's own duration; TimeSpan.Zero asks for no pacing at all (#708).
public TimeSpan? LoopInterval { get; init; }
Property Value
ReplaySpeed
Playback speed multiplier — 1.0 preserves cadence, 0 emits everything immediately.
public double ReplaySpeed { get; init; }
Property Value
RequestedPort
Port the user asked for via CLI / options; 0 means OS-assigned.
public int RequestedPort { get; init; }
Property Value
Methods
Deconstruct(out IPAddress, out int, out double, out bool, out ILogger, out TimeSpan?)
public void Deconstruct(out IPAddress Host, out int RequestedPort, out double ReplaySpeed, out bool Loop, out ILogger Logger, out TimeSpan? LoopInterval)
Parameters
Equals(MockTransportContext?)
public bool Equals(MockTransportContext? other)
Parameters
otherMockTransportContext
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(MockTransportContext?, MockTransportContext?)
public static bool operator ==(MockTransportContext? left, MockTransportContext? right)
Parameters
leftMockTransportContextrightMockTransportContext
Returns
operator !=(MockTransportContext?, MockTransportContext?)
public static bool operator !=(MockTransportContext? left, MockTransportContext? right)
Parameters
leftMockTransportContextrightMockTransportContext