feat(central-ui): Test Run sandbox mirrors the reset-aware WriteBatchAndWaitAsync (#36)
Claude-Session: https://claude.ai/code/session_01XPsuy2ZZ5Gbyfpt8PrK5BV
This commit is contained in:
@@ -464,6 +464,27 @@ public class SandboxAttributeAccessor
|
||||
string responseKey, object? responseValue, TimeSpan timeout)
|
||||
=> throw NotInSandbox(nameof(WriteBatchAndWaitAsync));
|
||||
|
||||
/// <summary>
|
||||
/// Sandbox stand-in for the reset-aware <c>AttributeAccessor.WriteBatchAndWaitAsync</c>
|
||||
/// overload (Gitea #36): present for editor/compile parity, throws
|
||||
/// <see cref="ScriptSandboxException"/> when run in Test Run (no device batch-write transport).
|
||||
/// </summary>
|
||||
/// <param name="values">The attribute values to write as a batch.</param>
|
||||
/// <param name="flagKey">The flag attribute key to set to signal completion.</param>
|
||||
/// <param name="flagValue">The value to set on the flag attribute.</param>
|
||||
/// <param name="responseKey">The attribute key to observe for the device's response.</param>
|
||||
/// <param name="responseValue">The response value to wait for.</param>
|
||||
/// <param name="timeout">The maximum time to wait for the response.</param>
|
||||
/// <param name="resetKey">The attribute written first and waited on before the batch.</param>
|
||||
/// <param name="resetValue">The reset value the device must echo before the batch is written.</param>
|
||||
/// <param name="resetTimeout">The maximum time to wait for the reset echo; <c>null</c> means <paramref name="timeout"/>.</param>
|
||||
/// <returns>Never returns; always throws <see cref="ScriptSandboxException"/> in the sandbox.</returns>
|
||||
public Task<HandshakeResult> WriteBatchAndWaitAsync(
|
||||
IReadOnlyDictionary<string, object?> values, string flagKey, object? flagValue,
|
||||
string responseKey, object? responseValue, TimeSpan timeout,
|
||||
string resetKey, object? resetValue, TimeSpan? resetTimeout = null)
|
||||
=> throw NotInSandbox(nameof(WriteBatchAndWaitAsync));
|
||||
|
||||
/// <summary>
|
||||
/// Value-equality attribute wait — routed to the bound deployed instance cross-site
|
||||
/// (the same real event-driven waiter a site uses). Needs a bound instance; throws
|
||||
|
||||
Reference in New Issue
Block a user