// // Ariadne.Generator's copy of the scripts in this file: the code that actually runs. Edits here are overwritten. // In the copy beside the script, #line paths are relative to it; the compiled code uses full paths. #pragma warning disable using System.Collections.Generic; namespace Ariadne.UnitTests { partial class DualHolder { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class __Frame : global::Ariadne.Frame { public global::Ariadne.UnitTests.DualHolder.Hold__Frame Run____call_numbers_frame; public global::Ariadne.UnitTests.DualHolder.Hold__Frame Run____call_words_frame; public static void ListParts(global::Ariadne.IArcPartLister lister) { { global::Ariadne.IArcPartLister scope = lister.Scope("Run.numbers/", typeof(global::Ariadne.UnitTests.DualHolder.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.DualHolder.Hold__Frame.ListParts(scope); } } { global::Ariadne.IArcPartLister scope = lister.Scope("Run.words/", typeof(global::Ariadne.UnitTests.DualHolder.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.DualHolder.Hold__Frame.ListParts(scope); } } } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected override global::Ariadne.Frame __CreateFrame() { return new __Frame(); } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class Hold__Frame : global::Ariadne.Frame { public string Hold__gate; public X Hold__held; public global::System.Collections.Generic.List Hold__seen; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Hold.gate"); lister.Local("Hold.held"); lister.Local>("Hold.seen"); } } [global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")] protected override bool __Resume(global::Ariadne.UnitTests.ArcTests.Gates context, global::Ariadne.TickTime __time) { return Run__Passage((__Frame)__CurrentFrame, __time, context); } protected override void __SaveLocals(global::Ariadne.IArcWriter writer) { Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer); } public DualHolder() { } protected DualHolder(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader) { { if (reader.TryField("Report", out string loaded)) { this.Report = loaded; } } } protected DualHolder(global::Ariadne.IArcReader reader) : this(reader, default(global::Ariadne.AutoLoadEveryField)) { } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private static void __ListParts(global::Ariadne.IArcPartLister lister) { lister.Field("Report"); { global::Ariadne.IArcPartLister scope = lister.Scope("Run.numbers/", typeof(global::Ariadne.UnitTests.DualHolder.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.DualHolder.Hold__Frame.ListParts(scope); } } { global::Ariadne.IArcPartLister scope = lister.Scope("Run.words/", typeof(global::Ariadne.UnitTests.DualHolder.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.DualHolder.Hold__Frame.ListParts(scope); } } } #pragma warning restore protected override void __SaveFields(global::Ariadne.IArcWriter writer) { base.__SaveFields(writer); #line 10 "GenericPassages.cs" writer.Field("Report", this.Report); #line default } #pragma warning disable public partial class __Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.LoadLocals(reader); { if (reader.TryScope("Run.numbers/", out global::Ariadne.IArcReader scope)) { this.Run____call_numbers_frame = new global::Ariadne.UnitTests.DualHolder.Hold__Frame(); this.Run____call_numbers_frame.LoadLocals(scope); } } { if (reader.TryScope("Run.words/", out global::Ariadne.IArcReader scope)) { this.Run____call_words_frame = new global::Ariadne.UnitTests.DualHolder.Hold__Frame(); this.Run____call_words_frame.LoadLocals(scope); } } } public override void AttachWaits(global::Ariadne.WakeSlot slot) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.AttachWaits(slot); if (this.Run____call_numbers_frame != null) { this.Run____call_numbers_frame.AttachWaits(slot); } if (this.Run____call_words_frame != null) { this.Run____call_words_frame.AttachWaits(slot); } } public override void EndWaits() { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.EndWaits(); if (this.Run____call_numbers_frame != null) { this.Run____call_numbers_frame.EndWaits(); } if (this.Run____call_words_frame != null) { this.Run____call_words_frame.EndWaits(); } } } #pragma warning restore public partial class Hold__Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Hold.gate": #line 12 "GenericPassages.cs" writer.Local("Hold.gate", this.Hold__gate); #line hidden return; case "Hold.held": #line 14 "GenericPassages.cs" writer.Local("Hold.held", this.Hold__held); #line hidden return; case "Hold.seen": #line 15 "GenericPassages.cs" writer.Local>("Hold.seen", this.Hold__seen); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class Hold__Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { base.LoadLocals(reader); { if (reader.TryLocal("Hold.gate", out string loaded)) { this.Hold__gate = loaded; } } { if (reader.TryLocal("Hold.held", out X loaded)) { this.Hold__held = loaded; } } { if (reader.TryLocal>("Hold.seen", out global::System.Collections.Generic.List loaded)) { this.Hold__seen = loaded; } } } } #pragma warning disable [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates) { #line hidden switch (__frame.ResumeKey) { case "numbers": goto numbers; case "words": goto words; } #line hidden numbers: #line 30 "GenericPassages.cs" using (__frame.Enter("numbers")) { if (__frame.Run____call_numbers_frame == null) { __frame.Run____call_numbers_frame = new global::Ariadne.UnitTests.DualHolder.Hold__Frame(); } if (!Hold__Passage(__frame.Lend(__frame.Run____call_numbers_frame), __frame, __time, gates, __frame.ResumeKey == null ? (7) : default(int), __frame.ResumeKey == null ? ("go1") : default(string))) { return false; } } #line hidden words: #line 33 "GenericPassages.cs" using (__frame.Enter("words")) { if (__frame.Run____call_words_frame == null) { __frame.Run____call_words_frame = new global::Ariadne.UnitTests.DualHolder.Hold__Frame(); } if (!Hold__Passage(__frame.Lend(__frame.Run____call_words_frame), __frame, __time, gates, __frame.ResumeKey == null ? ("seven") : default(string), __frame.ResumeKey == null ? ("go2") : default(string))) { return false; } } #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "numbers": { global::Ariadne.IArcWriter scope = writer.Scope("Run.numbers/"); Hold__LocalsToSave(__frame.Lend(__frame.Run____call_numbers_frame), __frame, depth + 1, scope, writer); } break; case "words": { global::Ariadne.IArcWriter scope = writer.Scope("Run.words/"); Hold__LocalsToSave(__frame.Lend(__frame.Run____call_words_frame), __frame, depth + 1, scope, writer); } break; } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private bool Hold__Passage(Hold__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, X item, string gate__argument) { #line hidden ref string gate = ref __frame.Hold__gate; if (__frame.ResumeKey == null) { gate = gate__argument; } ref X held = ref __frame.Hold__held; ref global::System.Collections.Generic.List seen = ref __frame.Hold__seen; switch (__frame.ResumeKey) { case "hold": goto hold; } #line 14 "GenericPassages.cs" held = item; #line 15 "GenericPassages.cs" seen = new List(); #line hidden hold: #line 18 "GenericPassages.cs" while (!gates.Open.Contains(gate)) #line hidden { #line 20 "GenericPassages.cs" seen.Add(held); #line 21 "GenericPassages.cs" __frame.Mark("hold"); return false; #line hidden } #line 24 "GenericPassages.cs" Report += held + "x" + seen.Count + ";"; #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private void Hold__LocalsToSave(Hold__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "hold": __frame.SaveLocal("Hold.gate", writer); __frame.SaveLocal("Hold.held", writer); __frame.SaveLocal("Hold.seen", writer); break; } } } } namespace Ariadne.UnitTests { partial class Relayer { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class __Frame : global::Ariadne.Frame { public global::Ariadne.UnitTests.Relayer.Outer__Frame Run____call_start_frame; public string Step__gate; public int Step__spins; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Step.gate"); lister.Local("Step.spins"); { global::Ariadne.IArcPartLister scope = lister.Scope("Run.start/", typeof(global::Ariadne.UnitTests.Relayer.Outer__Frame)); if (scope != null) { global::Ariadne.UnitTests.Relayer.Outer__Frame.ListParts(scope); } } } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected override global::Ariadne.Frame __CreateFrame() { return new __Frame(); } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class Inner__Frame : global::Ariadne.Frame { public string Inner__gate; public Y Inner__deep; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Inner.deep"); lister.Local("Inner.gate"); } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class Outer__Frame : global::Ariadne.Frame { public X Outer__held; public global::Ariadne.UnitTests.Relayer.Inner__Frame Outer____call_second_frame; public global::Ariadne.UnitTests.Relayer.Inner__Frame Outer____call_third_frame; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Outer.held"); { global::Ariadne.IArcPartLister scope = lister.Scope("Outer.second/", typeof(global::Ariadne.UnitTests.Relayer.Inner__Frame)); if (scope != null) { global::Ariadne.UnitTests.Relayer.Inner__Frame.ListParts(scope); } } { global::Ariadne.IArcPartLister scope = lister.Scope("Outer.third/", typeof(global::Ariadne.UnitTests.Relayer.Inner__Frame)); if (scope != null) { global::Ariadne.UnitTests.Relayer.Inner__Frame.ListParts(scope); } } } } [global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")] protected override bool __Resume(global::Ariadne.UnitTests.ArcTests.Gates context, global::Ariadne.TickTime __time) { return Run__Passage((__Frame)__CurrentFrame, __time, context); } protected override void __SaveLocals(global::Ariadne.IArcWriter writer) { Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer); } public Relayer() { } protected Relayer(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader) { { if (reader.TryField("Log", out string loaded)) { this.Log = loaded; } } } protected Relayer(global::Ariadne.IArcReader reader) : this(reader, default(global::Ariadne.AutoLoadEveryField)) { } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private static void __ListParts(global::Ariadne.IArcPartLister lister) { lister.Field("Log"); lister.Local("Step.gate"); lister.Local("Step.spins"); { global::Ariadne.IArcPartLister scope = lister.Scope("Run.start/", typeof(global::Ariadne.UnitTests.Relayer.Outer__Frame)); if (scope != null) { global::Ariadne.UnitTests.Relayer.Outer__Frame.ListParts(scope); } } } #pragma warning restore protected override void __SaveFields(global::Ariadne.IArcWriter writer) { base.__SaveFields(writer); #line 43 "GenericPassages.cs" writer.Field("Log", this.Log); #line default } public partial class __Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Step.gate": #line 45 "GenericPassages.cs" writer.Local("Step.gate", this.Step__gate); #line hidden return; case "Step.spins": #line 47 "GenericPassages.cs" writer.Local("Step.spins", this.Step__spins); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class __Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.LoadLocals(reader); { if (reader.TryLocal("Step.gate", out string loaded)) { this.Step__gate = loaded; } } { if (reader.TryLocal("Step.spins", out int loaded)) { this.Step__spins = loaded; } } { if (reader.TryScope("Run.start/", out global::Ariadne.IArcReader scope)) { this.Run____call_start_frame = new global::Ariadne.UnitTests.Relayer.Outer__Frame(); this.Run____call_start_frame.LoadLocals(scope); } } } public override void AttachWaits(global::Ariadne.WakeSlot slot) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.AttachWaits(slot); if (this.Run____call_start_frame != null) { this.Run____call_start_frame.AttachWaits(slot); } } public override void EndWaits() { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.EndWaits(); if (this.Run____call_start_frame != null) { this.Run____call_start_frame.EndWaits(); } } } #pragma warning restore public partial class Inner__Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Inner.deep": #line 61 "GenericPassages.cs" writer.Local("Inner.deep", this.Inner__deep); #line hidden return; case "Inner.gate": #line 59 "GenericPassages.cs" writer.Local("Inner.gate", this.Inner__gate); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class Inner__Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { base.LoadLocals(reader); { if (reader.TryLocal("Inner.deep", out Y loaded)) { this.Inner__deep = loaded; } } { if (reader.TryLocal("Inner.gate", out string loaded)) { this.Inner__gate = loaded; } } } } #pragma warning restore public partial class Outer__Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Outer.held": #line 74 "GenericPassages.cs" writer.Local("Outer.held", this.Outer__held); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class Outer__Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.LoadLocals(reader); { if (reader.TryLocal("Outer.held", out X loaded)) { this.Outer__held = loaded; } } { if (reader.TryScope("Outer.second/", out global::Ariadne.IArcReader scope)) { this.Outer____call_second_frame = new global::Ariadne.UnitTests.Relayer.Inner__Frame(); this.Outer____call_second_frame.LoadLocals(scope); } } { if (reader.TryScope("Outer.third/", out global::Ariadne.IArcReader scope)) { this.Outer____call_third_frame = new global::Ariadne.UnitTests.Relayer.Inner__Frame(); this.Outer____call_third_frame.LoadLocals(scope); } } } public override void AttachWaits(global::Ariadne.WakeSlot slot) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.AttachWaits(slot); if (this.Outer____call_second_frame != null) { this.Outer____call_second_frame.AttachWaits(slot); } if (this.Outer____call_third_frame != null) { this.Outer____call_third_frame.AttachWaits(slot); } } public override void EndWaits() { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.EndWaits(); if (this.Outer____call_second_frame != null) { this.Outer____call_second_frame.EndWaits(); } if (this.Outer____call_third_frame != null) { this.Outer____call_third_frame.EndWaits(); } } } #pragma warning disable [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates) { #line hidden switch (__frame.ResumeKey) { case "start": goto start; case "end": goto end; } #line hidden start: #line 92 "GenericPassages.cs" using (__frame.Enter("start")) { if (__frame.Run____call_start_frame == null) { __frame.Run____call_start_frame = new global::Ariadne.UnitTests.Relayer.Outer__Frame(); } if (!Outer__Passage(__frame.Lend(__frame.Run____call_start_frame), __frame, __time, gates, __frame.ResumeKey == null ? (5) : default(int))) { return false; } } #line hidden end: #line 95 "GenericPassages.cs" using (__frame.Enter("end")) { if (!Step__Passage(__frame, __time, gates, __frame.ResumeKey == null ? ("e") : default(string))) { return false; } } #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "start": { global::Ariadne.IArcWriter scope = writer.Scope("Run.start/"); Outer__LocalsToSave(__frame.Lend(__frame.Run____call_start_frame), __frame, depth + 1, scope, writer); } break; case "end": Step__LocalsToSave(__frame, depth + 1, writer); break; } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private bool Step__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, string gate__argument) { #line hidden ref string gate = ref __frame.Step__gate; if (__frame.ResumeKey == null) { gate = gate__argument; } ref int spins = ref __frame.Step__spins; switch (__frame.ResumeKey) { case "step": goto step; } #line 47 "GenericPassages.cs" spins = 0; #line hidden step: #line 50 "GenericPassages.cs" while (!gates.Open.Contains(gate)) #line hidden { #line 52 "GenericPassages.cs" ++spins; #line 53 "GenericPassages.cs" __frame.Mark("step"); return false; #line hidden } #line 56 "GenericPassages.cs" Log += "step" + spins + ";"; #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private void Step__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "step": __frame.SaveLocal("Step.gate", writer); __frame.SaveLocal("Step.spins", writer); break; } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private bool Inner__Passage(Inner__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, Y item, string gate__argument) { #line hidden ref string gate = ref __frame.Inner__gate; if (__frame.ResumeKey == null) { gate = gate__argument; } ref Y deep = ref __frame.Inner__deep; switch (__frame.ResumeKey) { case "inner": goto inner; } #line 61 "GenericPassages.cs" deep = item; #line hidden inner: #line 64 "GenericPassages.cs" while (!gates.Open.Contains(gate)) #line hidden { #line 66 "GenericPassages.cs" __frame.Mark("inner"); return false; #line hidden } #line 69 "GenericPassages.cs" Log += "inner" + deep + ";"; #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private void Inner__LocalsToSave(Inner__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "inner": __frame.SaveLocal("Inner.gate", writer); __frame.SaveLocal("Inner.deep", writer); break; } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private bool Outer__Passage(Outer__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, X item) { #line hidden ref X held = ref __frame.Outer__held; switch (__frame.ResumeKey) { case "first": goto first; case "second": goto second; case "third": goto third; case "fourth": goto fourth; } #line 74 "GenericPassages.cs" held = item; #line hidden first: #line 77 "GenericPassages.cs" using (__frame.Enter("first")) { int __depth = __arcFrame.Depth; bool __done = Step__Passage(__frame.Lend(__arcFrame), __time, gates, __frame.ResumeKey == null ? ("a") : default(string)); __arcFrame.Depth = __depth; if (!__done) { return false; } } #line hidden second: #line 80 "GenericPassages.cs" using (__frame.Enter("second")) { if (__frame.Outer____call_second_frame == null) { __frame.Outer____call_second_frame = new global::Ariadne.UnitTests.Relayer.Inner__Frame(); } if (!Inner__Passage(__frame.Lend(__frame.Outer____call_second_frame), __arcFrame, __time, gates, __frame.ResumeKey == null ? (held) : default(X), __frame.ResumeKey == null ? ("b") : default(string))) { return false; } } #line hidden third: #line 83 "GenericPassages.cs" using (__frame.Enter("third")) { if (__frame.Outer____call_third_frame == null) { __frame.Outer____call_third_frame = new global::Ariadne.UnitTests.Relayer.Inner__Frame(); } if (!Inner__Passage(__frame.Lend(__frame.Outer____call_third_frame), __arcFrame, __time, gates, __frame.ResumeKey == null ? ("word") : default(string), __frame.ResumeKey == null ? ("c") : default(string))) { return false; } } #line hidden fourth: #line 86 "GenericPassages.cs" using (__frame.Enter("fourth")) { int __depth = __arcFrame.Depth; bool __done = Step__Passage(__frame.Lend(__arcFrame), __time, gates, __frame.ResumeKey == null ? ("d") : default(string)); __arcFrame.Depth = __depth; if (!__done) { return false; } } #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private void Outer__LocalsToSave(Outer__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "first": __frame.SaveLocal("Outer.held", writer); Step__LocalsToSave(__arcFrame, depth + 1, arcWriter); break; case "second": __frame.SaveLocal("Outer.held", writer); { global::Ariadne.IArcWriter scope = writer.Scope("Outer.second/"); Inner__LocalsToSave(__frame.Lend(__frame.Outer____call_second_frame), __arcFrame, depth + 1, scope, arcWriter); } break; case "third": { global::Ariadne.IArcWriter scope = writer.Scope("Outer.third/"); Inner__LocalsToSave(__frame.Lend(__frame.Outer____call_third_frame), __arcFrame, depth + 1, scope, arcWriter); } break; case "fourth": Step__LocalsToSave(__arcFrame, depth + 1, arcWriter); break; } } } } namespace Ariadne.UnitTests { partial class SteadyHolder { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class __Frame : global::Ariadne.Frame { public global::Ariadne.UnitTests.SteadyHolder.Hold__Frame Run____call_first_frame; public static void ListParts(global::Ariadne.IArcPartLister lister) { { global::Ariadne.IArcPartLister scope = lister.Scope("Run.first/", typeof(global::Ariadne.UnitTests.SteadyHolder.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.SteadyHolder.Hold__Frame.ListParts(scope); } } } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected override global::Ariadne.Frame __CreateFrame() { return new __Frame(); } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class Hold__Frame : global::Ariadne.Frame { public X Hold__held; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Hold.held"); } } [global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")] protected override bool __Resume(global::Ariadne.UnitTests.ArcTests.Gates context, global::Ariadne.TickTime __time) { return Run__Passage((__Frame)__CurrentFrame, __time, context); } protected override void __SaveLocals(global::Ariadne.IArcWriter writer) { Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer); } public SteadyHolder() { } protected SteadyHolder(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader) { { if (reader.TryField("Spins", out int loaded)) { this.Spins = loaded; } else if (!reader.HasField("Spins")) { throw new global::System.IO.InvalidDataException("SteadyHolder's save has no field 'Spins', which has no initializer to fall back on. Give it one."); } } } protected SteadyHolder(global::Ariadne.IArcReader reader) : this(reader, default(global::Ariadne.AutoLoadEveryField)) { } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private static void __ListParts(global::Ariadne.IArcPartLister lister) { lister.Field("Spins"); { global::Ariadne.IArcPartLister scope = lister.Scope("Run.first/", typeof(global::Ariadne.UnitTests.SteadyHolder.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.SteadyHolder.Hold__Frame.ListParts(scope); } } } #pragma warning restore protected override void __SaveFields(global::Ariadne.IArcWriter writer) { base.__SaveFields(writer); #line 104 "GenericPassages.cs" writer.Field("Spins", this.Spins); #line default } #pragma warning disable public partial class __Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.LoadLocals(reader); { if (reader.TryScope("Run.first/", out global::Ariadne.IArcReader scope)) { this.Run____call_first_frame = new global::Ariadne.UnitTests.SteadyHolder.Hold__Frame(); this.Run____call_first_frame.LoadLocals(scope); } } } public override void AttachWaits(global::Ariadne.WakeSlot slot) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.AttachWaits(slot); if (this.Run____call_first_frame != null) { this.Run____call_first_frame.AttachWaits(slot); } } public override void EndWaits() { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.EndWaits(); if (this.Run____call_first_frame != null) { this.Run____call_first_frame.EndWaits(); } } } #pragma warning restore public partial class Hold__Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Hold.held": #line 108 "GenericPassages.cs" writer.Local("Hold.held", this.Hold__held); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class Hold__Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { base.LoadLocals(reader); { if (reader.TryLocal("Hold.held", out X loaded)) { this.Hold__held = loaded; } } } } #pragma warning disable [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates) { #line hidden switch (__frame.ResumeKey) { case "first": goto first; } #line hidden first: #line 123 "GenericPassages.cs" using (__frame.Enter("first")) { if (__frame.Run____call_first_frame == null) { __frame.Run____call_first_frame = new global::Ariadne.UnitTests.SteadyHolder.Hold__Frame(); } if (!Hold__Passage(__frame.Lend(__frame.Run____call_first_frame), __frame, __time, gates, __frame.ResumeKey == null ? (7) : default(int))) { return false; } } #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "first": { global::Ariadne.IArcWriter scope = writer.Scope("Run.first/"); Hold__LocalsToSave(__frame.Lend(__frame.Run____call_first_frame), __frame, depth + 1, scope, writer); } break; } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private bool Hold__Passage(Hold__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, X item) { #line hidden ref X held = ref __frame.Hold__held; switch (__frame.ResumeKey) { case "hold": goto hold; } #line 108 "GenericPassages.cs" held = item; #line hidden hold: #line 111 "GenericPassages.cs" while (!gates.Open.Contains("go")) #line hidden { #line 113 "GenericPassages.cs" ++Spins; #line 114 "GenericPassages.cs" __frame.Mark("hold"); return false; #line hidden } #line 117 "GenericPassages.cs" Spins += held.GetHashCode(); #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private void Hold__LocalsToSave(Hold__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "hold": __frame.SaveLocal("Hold.held", writer); break; } } } } namespace Ariadne.UnitTests { partial class Chooser { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class __Frame : global::Ariadne.Frame { public int Run____spill1; public global::Ariadne.UnitTests.Chooser.Choose__Frame Run____call_pick_frame; public static void ListParts(global::Ariadne.IArcPartLister lister) { { global::Ariadne.IArcPartLister scope = lister.Scope("Run.pick/", typeof(global::Ariadne.UnitTests.Chooser.Choose__Frame)); if (scope != null) { global::Ariadne.UnitTests.Chooser.Choose__Frame.ListParts(scope); } } } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected override global::Ariadne.Frame __CreateFrame() { return new __Frame(); } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class Choose__Frame : global::Ariadne.Frame where X : class where Y : struct { public X Choose__kept; public Y Choose__other; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Choose.kept"); lister.Local("Choose.other"); } } [global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")] protected override bool __Resume(global::Ariadne.UnitTests.ArcTests.Gates context, global::Ariadne.TickTime __time) { return Run__Passage((__Frame)__CurrentFrame, __time, context); } protected override void __SaveLocals(global::Ariadne.IArcWriter writer) { Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer); } public Chooser() { } protected Chooser(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader) { { if (reader.TryField("Chosen", out int loaded)) { this.Chosen = loaded; } else if (!reader.HasField("Chosen")) { throw new global::System.IO.InvalidDataException("Chooser's save has no field 'Chosen', which has no initializer to fall back on. Give it one."); } } { if (reader.TryField("Said", out string loaded)) { this.Said = loaded; } } } protected Chooser(global::Ariadne.IArcReader reader) : this(reader, default(global::Ariadne.AutoLoadEveryField)) { } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private static void __ListParts(global::Ariadne.IArcPartLister lister) { lister.Field("Chosen"); lister.Field("Said"); { global::Ariadne.IArcPartLister scope = lister.Scope("Run.pick/", typeof(global::Ariadne.UnitTests.Chooser.Choose__Frame)); if (scope != null) { global::Ariadne.UnitTests.Chooser.Choose__Frame.ListParts(scope); } } } #pragma warning restore protected override void __SaveFields(global::Ariadne.IArcWriter writer) { base.__SaveFields(writer); #line 132 "GenericPassages.cs" writer.Field("Chosen", this.Chosen); #line 134 "GenericPassages.cs" writer.Field("Said", this.Said); #line default } #pragma warning disable public partial class __Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.LoadLocals(reader); { if (reader.TryScope("Run.pick/", out global::Ariadne.IArcReader scope)) { this.Run____call_pick_frame = new global::Ariadne.UnitTests.Chooser.Choose__Frame(); this.Run____call_pick_frame.LoadLocals(scope); } } } public override void AttachWaits(global::Ariadne.WakeSlot slot) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.AttachWaits(slot); if (this.Run____call_pick_frame != null) { this.Run____call_pick_frame.AttachWaits(slot); } } public override void EndWaits() { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.EndWaits(); if (this.Run____call_pick_frame != null) { this.Run____call_pick_frame.EndWaits(); } } } #pragma warning restore public partial class Choose__Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Choose.kept": #line 140 "GenericPassages.cs" writer.Local("Choose.kept", this.Choose__kept); #line hidden return; case "Choose.other": #line 141 "GenericPassages.cs" writer.Local("Choose.other", this.Choose__other); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class Choose__Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { base.LoadLocals(reader); { if (reader.TryLocal("Choose.kept", out X loaded)) { this.Choose__kept = loaded; } } { if (reader.TryLocal("Choose.other", out Y loaded)) { this.Choose__other = loaded; } } } } #pragma warning disable [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates) { #line hidden switch (__frame.ResumeKey) { case "pick": goto pick; } #line hidden pick: #line 156 "GenericPassages.cs" { int __value; using (__frame.Enter("pick")) { if (__frame.Run____call_pick_frame == null) { __frame.Run____call_pick_frame = new global::Ariadne.UnitTests.Chooser.Choose__Frame(); } if (!Choose__Passage(__frame.Lend(__frame.Run____call_pick_frame), __frame, __time, gates, __frame.ResumeKey == null ? ("left") : default(string), __frame.ResumeKey == null ? (41) : default(int), __result: out __value)) { return false; } } __frame.Run____spill1 = __value; } #line 156 "GenericPassages.cs" Chosen = __frame.Run____spill1 + 1; #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "pick": { global::Ariadne.IArcWriter scope = writer.Scope("Run.pick/"); Choose__LocalsToSave(__frame.Lend(__frame.Run____call_pick_frame), __frame, depth + 1, scope, writer); } break; } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private bool Choose__Passage(Choose__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, X first, Y second, out Y __result) where X : class where Y : struct { #line hidden __result = default(Y); ref X kept = ref __frame.Choose__kept; ref Y other = ref __frame.Choose__other; switch (__frame.ResumeKey) { case "choose": goto choose; } #line 140 "GenericPassages.cs" kept = first; #line 141 "GenericPassages.cs" other = second; #line hidden choose: #line 144 "GenericPassages.cs" while (!gates.Open.Contains("go")) #line hidden { #line 146 "GenericPassages.cs" __frame.Mark("choose"); return false; #line hidden } #line 149 "GenericPassages.cs" Said = kept + "/" + other; #line 150 "GenericPassages.cs" { __result = other; __frame.Exit(); return true; } #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private void Choose__LocalsToSave(Choose__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter) where X : class where Y : struct { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "choose": __frame.SaveLocal("Choose.kept", writer); __frame.SaveLocal("Choose.other", writer); break; } } } } namespace Ariadne.UnitTests { partial class Greenhouse { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class __Frame : global::Ariadne.Frame { public string Step__gate; public int Step__spins; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Step.gate"); lister.Local("Step.spins"); } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected override global::Ariadne.Frame __CreateFrame() { return new __Frame(); } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class Grow__Frame : global::Ariadne.Frame { public string Grow__gate; public X Grow__kept; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Grow.gate"); lister.Local("Grow.kept"); } } [global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")] protected override bool __Resume(global::Ariadne.UnitTests.ArcTests.Gates context, global::Ariadne.TickTime __time) { return Run__Passage((__Frame)__CurrentFrame, __time, context); } public Greenhouse() { } protected Greenhouse(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader) { { if (reader.TryField("Grown", out int loaded)) { this.Grown = loaded; } else if (!reader.HasField("Grown")) { throw new global::System.IO.InvalidDataException("Greenhouse's save has no field 'Grown', which has no initializer to fall back on. Give it one."); } } { if (reader.TryField("Note", out string loaded)) { this.Note = loaded; } } } protected Greenhouse(global::Ariadne.IArcReader reader) : this(reader, default(global::Ariadne.AutoLoadEveryField)) { } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private static void __ListParts(global::Ariadne.IArcPartLister lister) { lister.Field("Grown"); lister.Field("Note"); lister.Local("Step.gate"); lister.Local("Step.spins"); } #pragma warning restore protected override void __SaveFields(global::Ariadne.IArcWriter writer) { base.__SaveFields(writer); #line 165 "GenericPassages.cs" writer.Field("Grown", this.Grown); #line 167 "GenericPassages.cs" writer.Field("Note", this.Note); #line default } public partial class __Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Step.gate": #line 169 "GenericPassages.cs" writer.Local("Step.gate", this.Step__gate); #line hidden return; case "Step.spins": #line 171 "GenericPassages.cs" writer.Local("Step.spins", this.Step__spins); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class __Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { base.LoadLocals(reader); { if (reader.TryLocal("Step.gate", out string loaded)) { this.Step__gate = loaded; } } { if (reader.TryLocal("Step.spins", out int loaded)) { this.Step__spins = loaded; } } } } #pragma warning restore public partial class Grow__Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Grow.gate": #line 183 "GenericPassages.cs" writer.Local("Grow.gate", this.Grow__gate); #line hidden return; case "Grow.kept": #line 185 "GenericPassages.cs" writer.Local("Grow.kept", this.Grow__kept); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class Grow__Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { base.LoadLocals(reader); { if (reader.TryLocal("Grow.gate", out string loaded)) { this.Grow__gate = loaded; } } { if (reader.TryLocal("Grow.kept", out X loaded)) { this.Grow__kept = loaded; } } } } #pragma warning disable [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates) { #line hidden switch (__frame.ResumeKey) { } #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private bool Step__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, string gate__argument) { #line hidden ref string gate = ref __frame.Step__gate; if (__frame.ResumeKey == null) { gate = gate__argument; } ref int spins = ref __frame.Step__spins; switch (__frame.ResumeKey) { case "step": goto step; } #line 171 "GenericPassages.cs" spins = 0; #line hidden step: #line 174 "GenericPassages.cs" while (!gates.Open.Contains(gate)) #line hidden { #line 176 "GenericPassages.cs" ++spins; #line 177 "GenericPassages.cs" __frame.Mark("step"); return false; #line hidden } #line 180 "GenericPassages.cs" Note += "step" + spins + ";"; #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private void Step__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "step": __frame.SaveLocal("Step.gate", writer); __frame.SaveLocal("Step.spins", writer); break; } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public bool Grow__Passage(Grow__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, X seed, string gate__argument) { #line hidden ref string gate = ref __frame.Grow__gate; if (__frame.ResumeKey == null) { gate = gate__argument; } ref X kept = ref __frame.Grow__kept; switch (__frame.ResumeKey) { case "grow": goto grow; case "wait": goto wait; } #line 185 "GenericPassages.cs" kept = seed; #line hidden grow: #line 188 "GenericPassages.cs" using (__frame.Enter("grow")) { int __depth = __arcFrame.Depth; bool __done = Step__Passage(__frame.Lend(__arcFrame), __time, gates, __frame.ResumeKey == null ? ("s") : default(string)); __arcFrame.Depth = __depth; if (!__done) { return false; } } #line hidden wait: #line 191 "GenericPassages.cs" while (!gates.Open.Contains(gate)) #line hidden { #line 193 "GenericPassages.cs" __frame.Mark("wait"); return false; #line hidden } #line 196 "GenericPassages.cs" Note += "grew" + kept + ";"; #line 197 "GenericPassages.cs" ++Grown; #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public void Grow__LocalsToSave(Grow__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "grow": __frame.SaveLocal("Grow.gate", writer); __frame.SaveLocal("Grow.kept", writer); Step__LocalsToSave(__arcFrame, depth + 1, arcWriter); break; case "wait": __frame.SaveLocal("Grow.gate", writer); __frame.SaveLocal("Grow.kept", writer); break; } } } } namespace Ariadne.UnitTests { partial class Farmer { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class __Frame : global::Ariadne.Frame { public global::Ariadne.UnitTests.Greenhouse Run____call_first_receiver; public global::Ariadne.UnitTests.Greenhouse.__Frame Run____call_first_frame; public global::Ariadne.UnitTests.Greenhouse.Grow__Frame Run____call_first_ownedFrame; public global::Ariadne.UnitTests.Greenhouse Run____call_second_receiver; public global::Ariadne.UnitTests.Greenhouse.__Frame Run____call_second_frame; public global::Ariadne.UnitTests.Greenhouse.Grow__Frame Run____call_second_ownedFrame; public static void ListParts(global::Ariadne.IArcPartLister lister) { { global::Ariadne.IArcPartLister scope = lister.Scope("Run.first/", typeof(global::Ariadne.UnitTests.Greenhouse.__Frame), typeof(global::Ariadne.UnitTests.Greenhouse.Grow__Frame)); if (scope != null) { scope.Local("receiver"); global::Ariadne.UnitTests.Greenhouse.__Frame.ListParts(scope); global::Ariadne.UnitTests.Greenhouse.Grow__Frame.ListParts(scope); } } { global::Ariadne.IArcPartLister scope = lister.Scope("Run.second/", typeof(global::Ariadne.UnitTests.Greenhouse.__Frame), typeof(global::Ariadne.UnitTests.Greenhouse.Grow__Frame)); if (scope != null) { scope.Local("receiver"); global::Ariadne.UnitTests.Greenhouse.__Frame.ListParts(scope); global::Ariadne.UnitTests.Greenhouse.Grow__Frame.ListParts(scope); } } } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected override global::Ariadne.Frame __CreateFrame() { return new __Frame(); } [global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")] protected override bool __Resume(global::Ariadne.UnitTests.ArcTests.Gates context, global::Ariadne.TickTime __time) { return Run__Passage((__Frame)__CurrentFrame, __time, context); } protected override void __SaveLocals(global::Ariadne.IArcWriter writer) { Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer); } public Farmer() { } protected Farmer(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader) { { if (reader.TryField("House", out global::Ariadne.UnitTests.Greenhouse loaded)) { this.House = loaded; } else if (!reader.HasField("House")) { throw new global::System.IO.InvalidDataException("Farmer's save has no field 'House', which has no initializer to fall back on. Give it one."); } } } protected Farmer(global::Ariadne.IArcReader reader) : this(reader, default(global::Ariadne.AutoLoadEveryField)) { } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private static void __ListParts(global::Ariadne.IArcPartLister lister) { lister.Field("House"); { global::Ariadne.IArcPartLister scope = lister.Scope("Run.first/", typeof(global::Ariadne.UnitTests.Greenhouse.__Frame), typeof(global::Ariadne.UnitTests.Greenhouse.Grow__Frame)); if (scope != null) { scope.Local("receiver"); global::Ariadne.UnitTests.Greenhouse.__Frame.ListParts(scope); global::Ariadne.UnitTests.Greenhouse.Grow__Frame.ListParts(scope); } } { global::Ariadne.IArcPartLister scope = lister.Scope("Run.second/", typeof(global::Ariadne.UnitTests.Greenhouse.__Frame), typeof(global::Ariadne.UnitTests.Greenhouse.Grow__Frame)); if (scope != null) { scope.Local("receiver"); global::Ariadne.UnitTests.Greenhouse.__Frame.ListParts(scope); global::Ariadne.UnitTests.Greenhouse.Grow__Frame.ListParts(scope); } } } #pragma warning restore protected override void __SaveFields(global::Ariadne.IArcWriter writer) { base.__SaveFields(writer); #line 210 "GenericPassages.cs" writer.Field("House", this.House); #line default } public partial class __Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Run.first/receiver": #line 215 "GenericPassages.cs" writer.Local("receiver", this.Run____call_first_receiver); #line hidden return; case "Run.second/receiver": #line 218 "GenericPassages.cs" writer.Local("receiver", this.Run____call_second_receiver); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class __Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.LoadLocals(reader); { if (reader.TryScope("Run.first/", out global::Ariadne.IArcReader scope)) { { if (scope.TryLocal("receiver", out global::Ariadne.UnitTests.Greenhouse loaded)) { this.Run____call_first_receiver = loaded; } } if (this.Run____call_first_receiver != null) { this.Run____call_first_frame = (global::Ariadne.UnitTests.Greenhouse.__Frame)this.Run____call_first_receiver.NewFrame(); this.Run____call_first_frame.LoadLocals(scope); this.Run____call_first_ownedFrame = new global::Ariadne.UnitTests.Greenhouse.Grow__Frame(); this.Run____call_first_ownedFrame.LoadLocals(scope); } } } { if (reader.TryScope("Run.second/", out global::Ariadne.IArcReader scope)) { { if (scope.TryLocal("receiver", out global::Ariadne.UnitTests.Greenhouse loaded)) { this.Run____call_second_receiver = loaded; } } if (this.Run____call_second_receiver != null) { this.Run____call_second_frame = (global::Ariadne.UnitTests.Greenhouse.__Frame)this.Run____call_second_receiver.NewFrame(); this.Run____call_second_frame.LoadLocals(scope); this.Run____call_second_ownedFrame = new global::Ariadne.UnitTests.Greenhouse.Grow__Frame(); this.Run____call_second_ownedFrame.LoadLocals(scope); } } } } public override void AttachWaits(global::Ariadne.WakeSlot slot) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.AttachWaits(slot); if (this.Run____call_first_frame != null) { this.Run____call_first_frame.AttachWaits(slot); } if (this.Run____call_first_ownedFrame != null) { this.Run____call_first_ownedFrame.AttachWaits(slot); } if (this.Run____call_second_frame != null) { this.Run____call_second_frame.AttachWaits(slot); } if (this.Run____call_second_ownedFrame != null) { this.Run____call_second_ownedFrame.AttachWaits(slot); } } public override void EndWaits() { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.EndWaits(); if (this.Run____call_first_frame != null) { this.Run____call_first_frame.EndWaits(); } if (this.Run____call_first_ownedFrame != null) { this.Run____call_first_ownedFrame.EndWaits(); } if (this.Run____call_second_frame != null) { this.Run____call_second_frame.EndWaits(); } if (this.Run____call_second_ownedFrame != null) { this.Run____call_second_ownedFrame.EndWaits(); } } } #pragma warning disable [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates) { #line hidden switch (__frame.ResumeKey) { case "first": goto first; case "second": goto second; } #line hidden first: #line 215 "GenericPassages.cs" using (__frame.Enter("first")) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); if (__frame.ResumeKey == null) { __frame.Run____call_first_receiver = (House); __frame.Run____call_first_frame = null; __frame.Run____call_first_ownedFrame = null; } if (__frame.Run____call_first_frame == null) { __frame.Run____call_first_frame = (global::Ariadne.UnitTests.Greenhouse.__Frame)__frame.Run____call_first_receiver.NewFrame(); } if (__frame.Run____call_first_ownedFrame == null) { __frame.Run____call_first_ownedFrame = new global::Ariadne.UnitTests.Greenhouse.Grow__Frame(); } if (!__frame.Run____call_first_receiver.Grow__Passage(__frame.Lend(__frame.Run____call_first_ownedFrame), __frame.Lend(__frame.Run____call_first_frame), __time, gates, __frame.ResumeKey == null ? (4) : default(int), __frame.ResumeKey == null ? ("g1") : default(string))) { return false; } } #line hidden second: #line 218 "GenericPassages.cs" using (__frame.Enter("second")) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); if (__frame.ResumeKey == null) { __frame.Run____call_second_receiver = (House); __frame.Run____call_second_frame = null; __frame.Run____call_second_ownedFrame = null; } if (__frame.Run____call_second_frame == null) { __frame.Run____call_second_frame = (global::Ariadne.UnitTests.Greenhouse.__Frame)__frame.Run____call_second_receiver.NewFrame(); } if (__frame.Run____call_second_ownedFrame == null) { __frame.Run____call_second_ownedFrame = new global::Ariadne.UnitTests.Greenhouse.Grow__Frame(); } if (!__frame.Run____call_second_receiver.Grow__Passage(__frame.Lend(__frame.Run____call_second_ownedFrame), __frame.Lend(__frame.Run____call_second_frame), __time, gates, __frame.ResumeKey == null ? ("x") : default(string), __frame.ResumeKey == null ? ("g2") : default(string))) { return false; } } #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "first": { global::Ariadne.IArcWriter scope = writer.Scope("Run.first/"); __frame.SaveLocal("Run.first/receiver", scope); if (__frame.Run____call_first_receiver != null) { __frame.Run____call_first_receiver.Grow__LocalsToSave(__frame.Lend(__frame.Run____call_first_ownedFrame), __frame.Lend(__frame.Run____call_first_frame), depth + 1, scope, scope); } } break; case "second": { global::Ariadne.IArcWriter scope = writer.Scope("Run.second/"); __frame.SaveLocal("Run.second/receiver", scope); if (__frame.Run____call_second_receiver != null) { __frame.Run____call_second_receiver.Grow__LocalsToSave(__frame.Lend(__frame.Run____call_second_ownedFrame), __frame.Lend(__frame.Run____call_second_frame), depth + 1, scope, scope); } } break; } } } } namespace Ariadne.UnitTests { partial class Swapper { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class __Frame : global::Ariadne.Frame { public global::Ariadne.UnitTests.Swapper.Swap__Frame Run____call_swap_frame; public static void ListParts(global::Ariadne.IArcPartLister lister) { { global::Ariadne.IArcPartLister scope = lister.Scope("Run.swap/", typeof(global::Ariadne.UnitTests.Swapper.Swap__Frame)); if (scope != null) { global::Ariadne.UnitTests.Swapper.Swap__Frame.ListParts(scope); } } } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected override global::Ariadne.Frame __CreateFrame() { return new __Frame(); } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class Swap__Frame : global::Ariadne.Frame { public X Swap__right; public X Swap__first; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Swap.first"); } } [global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")] protected override bool __Resume(global::Ariadne.UnitTests.ArcTests.Gates context, global::Ariadne.TickTime __time) { return Run__Passage((__Frame)__CurrentFrame, __time, context); } protected override void __SaveLocals(global::Ariadne.IArcWriter writer) { Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer); } public Swapper() { } protected Swapper(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader) { { if (reader.TryField("Left", out int loaded)) { this.Left = loaded; } } { if (reader.TryField("Right", out int loaded)) { this.Right = loaded; } else if (!reader.HasField("Right")) { throw new global::System.IO.InvalidDataException("Swapper's save has no field 'Right', which has no initializer to fall back on. Give it one."); } } { if (reader.TryField("Total", out int loaded)) { this.Total = loaded; } else if (!reader.HasField("Total")) { throw new global::System.IO.InvalidDataException("Swapper's save has no field 'Total', which has no initializer to fall back on. Give it one."); } } } protected Swapper(global::Ariadne.IArcReader reader) : this(reader, default(global::Ariadne.AutoLoadEveryField)) { } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private static void __ListParts(global::Ariadne.IArcPartLister lister) { lister.Field("Left"); lister.Field("Right"); lister.Field("Total"); { global::Ariadne.IArcPartLister scope = lister.Scope("Run.swap/", typeof(global::Ariadne.UnitTests.Swapper.Swap__Frame)); if (scope != null) { global::Ariadne.UnitTests.Swapper.Swap__Frame.ListParts(scope); } } } #pragma warning restore protected override void __SaveFields(global::Ariadne.IArcWriter writer) { base.__SaveFields(writer); #line 227 "GenericPassages.cs" writer.Field("Left", this.Left); #line 229 "GenericPassages.cs" writer.Field("Right", this.Right); #line 231 "GenericPassages.cs" writer.Field("Total", this.Total); #line default } #pragma warning disable public partial class __Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.LoadLocals(reader); { if (reader.TryScope("Run.swap/", out global::Ariadne.IArcReader scope)) { this.Run____call_swap_frame = new global::Ariadne.UnitTests.Swapper.Swap__Frame(); this.Run____call_swap_frame.LoadLocals(scope); } } } public override void AttachWaits(global::Ariadne.WakeSlot slot) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.AttachWaits(slot); if (this.Run____call_swap_frame != null) { this.Run____call_swap_frame.AttachWaits(slot); } } public override void EndWaits() { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.EndWaits(); if (this.Run____call_swap_frame != null) { this.Run____call_swap_frame.EndWaits(); } } } #pragma warning restore public partial class Swap__Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Swap.first": #line 235 "GenericPassages.cs" writer.Local("Swap.first", this.Swap__first); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class Swap__Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { base.LoadLocals(reader); { if (reader.TryLocal("Swap.first", out X loaded)) { this.Swap__first = loaded; } } } } #pragma warning disable [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates) { #line hidden switch (__frame.ResumeKey) { case "swap": goto swap; } #line hidden swap: #line 251 "GenericPassages.cs" using (__frame.Enter("swap")) { if (__frame.Run____call_swap_frame == null) { __frame.Run____call_swap_frame = new global::Ariadne.UnitTests.Swapper.Swap__Frame(); } if (!Swap__Passage(__frame.Lend(__frame.Run____call_swap_frame), __frame, __time, gates, ref Left, out Right, __frame.ResumeKey == null ? (5) : default(int))) { return false; } } #line 252 "GenericPassages.cs" Total = Left + Right; #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "swap": { global::Ariadne.IArcWriter scope = writer.Scope("Run.swap/"); Swap__LocalsToSave(__frame.Lend(__frame.Run____call_swap_frame), __frame, depth + 1, scope, writer); } break; } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private bool Swap__Passage(Swap__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, ref X left, out X right__argument, X start) { #line hidden right__argument = default(X); ref X right = ref __frame.Swap__right; if (__frame.ResumeKey == null) { right = default(X); } ref X first = ref __frame.Swap__first; switch (__frame.ResumeKey) { case "wait": goto wait; } #line 235 "GenericPassages.cs" first = start; #line 236 "GenericPassages.cs" right = left; #line hidden wait: #line 239 "GenericPassages.cs" while (!gates.Open.Contains("go")) #line hidden { #line 241 "GenericPassages.cs" __frame.Mark("wait"); return false; #line hidden } #line 244 "GenericPassages.cs" right = first; #line 245 "GenericPassages.cs" left = first; #line hidden right__argument = __frame.Swap__right; __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private void Swap__LocalsToSave(Swap__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "wait": __frame.SaveLocal("Swap.first", writer); break; } } } } namespace Ariadne.UnitTests { partial class GenericSteps { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class __Frame : global::Ariadne.Frame { public static void ListParts(global::Ariadne.IArcPartLister lister) { } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected override global::Ariadne.Frame __CreateFrame() { return new __Frame(); } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class Hold__Frame : global::Ariadne.Frame { public T Hold__kept; public X Hold__carried; public static void ListParts(global::Ariadne.IArcPartLister lister) { lister.Local("Hold.carried"); lister.Local("Hold.kept"); } } protected GenericSteps() { } protected GenericSteps(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader) { { if (reader.TryField("Last", out T loaded)) { this.Last = loaded; } else if (!reader.HasField("Last")) { throw new global::System.IO.InvalidDataException("GenericSteps's save has no field 'Last', which has no initializer to fall back on. Give it one."); } } { if (reader.TryField("Log", out string loaded)) { this.Log = loaded; } } } protected GenericSteps(global::Ariadne.IArcReader reader) : this(reader, default(global::Ariadne.AutoLoadEveryField)) { } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private static void __ListParts(global::Ariadne.IArcPartLister lister) { lister.Field("Last"); lister.Field("Log"); } #pragma warning restore protected override void __SaveFields(global::Ariadne.IArcWriter writer) { base.__SaveFields(writer); #line 261 "GenericPassages.cs" writer.Field("Last", this.Last); #line 263 "GenericPassages.cs" writer.Field("Log", this.Log); #line default } #pragma warning restore public partial class Hold__Frame { public override void SaveLocal(string key, global::Ariadne.IArcWriter writer) { switch (key) { case "Hold.carried": #line 268 "GenericPassages.cs" writer.Local("Hold.carried", this.Hold__carried); #line hidden return; case "Hold.kept": #line 267 "GenericPassages.cs" writer.Local("Hold.kept", this.Hold__kept); #line hidden return; } #line default base.SaveLocal(key, writer); } } #pragma warning disable public partial class Hold__Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { base.LoadLocals(reader); { if (reader.TryLocal("Hold.carried", out X loaded)) { this.Hold__carried = loaded; } } { if (reader.TryLocal("Hold.kept", out T loaded)) { this.Hold__kept = loaded; } } } } #pragma warning disable [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected bool Hold__Passage(Hold__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, T tag, X item) { #line hidden ref T kept = ref __frame.Hold__kept; ref X carried = ref __frame.Hold__carried; switch (__frame.ResumeKey) { case "hold": goto hold; } #line 267 "GenericPassages.cs" kept = tag; #line 268 "GenericPassages.cs" carried = item; #line hidden hold: #line 271 "GenericPassages.cs" while (!gates.Open.Contains("go")) #line hidden { #line 273 "GenericPassages.cs" __frame.Mark("hold"); return false; #line hidden } #line 276 "GenericPassages.cs" Last = kept; #line 277 "GenericPassages.cs" Log += carried + ";"; #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected void Hold__LocalsToSave(Hold__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "hold": __frame.SaveLocal("Hold.kept", writer); __frame.SaveLocal("Hold.carried", writer); break; } } } } namespace Ariadne.UnitTests { partial class IntSteps { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public partial class __Frame : global::Ariadne.UnitTests.GenericSteps.__Frame { public global::Ariadne.UnitTests.GenericSteps.Hold__Frame Run____call_first_frame; public global::Ariadne.UnitTests.GenericSteps.Hold__Frame Run____call_second_frame; public static void ListParts(global::Ariadne.IArcPartLister lister) { global::Ariadne.UnitTests.GenericSteps.__Frame.ListParts(lister); { global::Ariadne.IArcPartLister scope = lister.Scope("Run.first/", typeof(global::Ariadne.UnitTests.GenericSteps.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.GenericSteps.Hold__Frame.ListParts(scope); } } { global::Ariadne.IArcPartLister scope = lister.Scope("Run.second/", typeof(global::Ariadne.UnitTests.GenericSteps.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.GenericSteps.Hold__Frame.ListParts(scope); } } } } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected override global::Ariadne.Frame __CreateFrame() { return new __Frame(); } [global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")] protected override bool __Resume(global::Ariadne.UnitTests.ArcTests.Gates context, global::Ariadne.TickTime __time) { return Run__Passage((__Frame)__CurrentFrame, __time, context); } protected override void __SaveLocals(global::Ariadne.IArcWriter writer) { Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer); } public IntSteps() { } protected IntSteps(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader) { } protected IntSteps(global::Ariadne.IArcReader reader) : this(reader, default(global::Ariadne.AutoLoadEveryField)) { } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] private static void __ListParts(global::Ariadne.IArcPartLister lister) { { global::Ariadne.IArcPartLister scope = lister.Scope("Run.first/", typeof(global::Ariadne.UnitTests.GenericSteps.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.GenericSteps.Hold__Frame.ListParts(scope); } } { global::Ariadne.IArcPartLister scope = lister.Scope("Run.second/", typeof(global::Ariadne.UnitTests.GenericSteps.Hold__Frame)); if (scope != null) { global::Ariadne.UnitTests.GenericSteps.Hold__Frame.ListParts(scope); } } } #pragma warning restore #pragma warning disable public partial class __Frame { public override void LoadLocals(global::Ariadne.IArcReader reader) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.LoadLocals(reader); { if (reader.TryScope("Run.first/", out global::Ariadne.IArcReader scope)) { this.Run____call_first_frame = new global::Ariadne.UnitTests.GenericSteps.Hold__Frame(); this.Run____call_first_frame.LoadLocals(scope); } } { if (reader.TryScope("Run.second/", out global::Ariadne.IArcReader scope)) { this.Run____call_second_frame = new global::Ariadne.UnitTests.GenericSteps.Hold__Frame(); this.Run____call_second_frame.LoadLocals(scope); } } } public override void AttachWaits(global::Ariadne.WakeSlot slot) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.AttachWaits(slot); if (this.Run____call_first_frame != null) { this.Run____call_first_frame.AttachWaits(slot); } if (this.Run____call_second_frame != null) { this.Run____call_second_frame.AttachWaits(slot); } } public override void EndWaits() { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); base.EndWaits(); if (this.Run____call_first_frame != null) { this.Run____call_first_frame.EndWaits(); } if (this.Run____call_second_frame != null) { this.Run____call_second_frame.EndWaits(); } } } #pragma warning disable [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates) { #line hidden switch (__frame.ResumeKey) { case "first": goto first; case "second": goto second; } #line hidden first: #line 286 "GenericPassages.cs" using (__frame.Enter("first")) { if (__frame.Run____call_first_frame == null) { __frame.Run____call_first_frame = new global::Ariadne.UnitTests.GenericSteps.Hold__Frame(); } if (!Hold__Passage(__frame.Lend(__frame.Run____call_first_frame), __frame, __time, gates, __frame.ResumeKey == null ? (3) : default(int), __frame.ResumeKey == null ? ("a") : default(string))) { return false; } } #line hidden second: #line 289 "GenericPassages.cs" using (__frame.Enter("second")) { if (__frame.Run____call_second_frame == null) { __frame.Run____call_second_frame = new global::Ariadne.UnitTests.GenericSteps.Hold__Frame(); } if (!Hold__Passage(__frame.Lend(__frame.Run____call_second_frame), __frame, __time, gates, __frame.ResumeKey == null ? (4) : default(int), __frame.ResumeKey == null ? (7L) : default(long))) { return false; } } #line hidden __frame.Exit(); return true; #line default } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer) { if (depth >= __frame.Cursor.Count) { return; } switch (__frame.Cursor[depth]) { case "first": { global::Ariadne.IArcWriter scope = writer.Scope("Run.first/"); Hold__LocalsToSave(__frame.Lend(__frame.Run____call_first_frame), __frame, depth + 1, scope, writer); } break; case "second": { global::Ariadne.IArcWriter scope = writer.Scope("Run.second/"); Hold__LocalsToSave(__frame.Lend(__frame.Run____call_second_frame), __frame, depth + 1, scope, writer); } break; } } } }