docker(seed-handshake-demo): System.-qualify TimeSpan/StringComparison to match the sibling seed (#36 review)
Claude-Session: https://claude.ai/code/session_01XPsuy2ZZ5Gbyfpt8PrK5BV
This commit is contained in:
@@ -47,8 +47,8 @@ read -r -d '' HANDSHAKE_CODE <<'CS' || true
|
|||||||
// for Complete=true. Run this twice: the second run is the one the plain overload got wrong.
|
// for Complete=true. Run this twice: the second run is the one the plain overload got wrong.
|
||||||
var values = new Dictionary<string, object?> { ["Payload"] = 42.5 };
|
var values = new Dictionary<string, object?> { ["Payload"] = 42.5 };
|
||||||
var hs = await Attributes.WriteBatchAndWaitAsync(
|
var hs = await Attributes.WriteBatchAndWaitAsync(
|
||||||
values, "Trigger", true, "Complete", true, TimeSpan.FromSeconds(20),
|
values, "Trigger", true, "Complete", true, System.TimeSpan.FromSeconds(20),
|
||||||
"Complete", false, TimeSpan.FromSeconds(10));
|
"Complete", false, System.TimeSpan.FromSeconds(10));
|
||||||
Log.Info($"handshake matched={hs.Matched} phase={hs.Phase} timedOut={hs.TimedOut} resetFailed={hs.ResetFailed}");
|
Log.Info($"handshake matched={hs.Matched} phase={hs.Phase} timedOut={hs.TimedOut} resetFailed={hs.ResetFailed}");
|
||||||
return new { Matched = hs.Matched, Phase = hs.Phase.ToString(), TimedOut = hs.TimedOut, ResetFailed = hs.ResetFailed, Error = hs.ErrorMessage ?? "" };
|
return new { Matched = hs.Matched, Phase = hs.Phase.ToString(), TimedOut = hs.TimedOut, ResetFailed = hs.ResetFailed, Error = hs.ErrorMessage ?? "" };
|
||||||
CS
|
CS
|
||||||
@@ -63,7 +63,7 @@ read -r -d '' DEVICE_CODE <<'CS' || true
|
|||||||
// write re-triggers this script, which returns at the guard.
|
// write re-triggers this script, which returns at the guard.
|
||||||
var t = await Attributes.GetAsync("Trigger");
|
var t = await Attributes.GetAsync("Trigger");
|
||||||
var ts = t?.ToString();
|
var ts = t?.ToString();
|
||||||
if (!((t is bool b && b) || ts == "1" || string.Equals(ts, "true", StringComparison.OrdinalIgnoreCase))) return null;
|
if (!((t is bool b && b) || ts == "1" || string.Equals(ts, "true", System.StringComparison.OrdinalIgnoreCase))) return null;
|
||||||
await Attributes.SetAsync("Complete", true);
|
await Attributes.SetAsync("Complete", true);
|
||||||
await Attributes.SetAsync("Trigger", false);
|
await Attributes.SetAsync("Trigger", false);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user