//
// 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;
using Amphora;
using System.Collections.Generic;
using System.Linq;
namespace Ariadne.UnitTests
{
partial class TutorialScript
{
[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.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 TutorialScript()
{
}
protected TutorialScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected TutorialScript(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::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 "intro": goto intro;
case "Act2": goto Act2;
case "Act3": goto Act3;
}
#line 49 "TestScripts.cs"
Log.Add("start");
#line hidden
intro:
#line 52 "TestScripts.cs"
while (!gates.Open.Contains("intro"))
#line hidden
{
#line 54 "TestScripts.cs"
__frame.Mark("intro"); return false;
#line hidden
}
#line 57 "TestScripts.cs"
Log.Add("after intro");
#line hidden
Act2:
#line 58 "TestScripts.cs"
using (__frame.Enter("Act2")) { if (!Act2__Passage(__frame, __time, gates)) { return false; } }
#line hidden
Act3:
#line 59 "TestScripts.cs"
using (__frame.Enter("Act3")) { if (!Act3__Passage(__frame, __time, gates)) { return false; } }
#line 60 "TestScripts.cs"
Log.Add("end");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Act2__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
switch (__frame.ResumeKey)
{
case "build": goto build;
case "connect": goto connect;
}
#line 19 "TestScripts.cs"
Log.Add("act2 start");
#line hidden
build:
#line 22 "TestScripts.cs"
while (!gates.Open.Contains("build"))
#line hidden
{
#line 24 "TestScripts.cs"
__frame.Mark("build"); return false;
#line hidden
}
#line 27 "TestScripts.cs"
Log.Add("built");
#line hidden
connect:
#line 30 "TestScripts.cs"
while (!gates.Open.Contains("connect"))
#line hidden
{
#line 32 "TestScripts.cs"
__frame.Mark("connect"); return false;
#line hidden
}
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Act3__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
switch (__frame.ResumeKey)
{
case "connect": goto connect;
}
#line 38 "TestScripts.cs"
Log.Add("act3 start");
#line hidden
connect:
#line 41 "TestScripts.cs"
while (!gates.Open.Contains("act3 connect"))
#line hidden
{
#line 43 "TestScripts.cs"
__frame.Mark("connect"); return false;
#line hidden
}
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class RepeatedPassageScript
{
[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.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 RepeatedPassageScript()
{
}
protected RepeatedPassageScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected RepeatedPassageScript(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::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 80 "TestScripts.cs"
using (__frame.Enter("first")) { if (!Briefing__Passage(__frame, __time, gates)) { return false; } }
#line hidden
second:
#line 82 "TestScripts.cs"
using (__frame.Enter("second")) { if (!Briefing__Passage(__frame, __time, gates)) { return false; } }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Briefing__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
switch (__frame.ResumeKey)
{
case "read": goto read;
}
#line hidden
read:
#line 69 "TestScripts.cs"
while (!gates.Open.Contains("read"))
#line hidden
{
#line 71 "TestScripts.cs"
__frame.Mark("read"); return false;
#line hidden
}
#line 74 "TestScripts.cs"
gates.Open.Remove("read");
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class TwoPausesInOneStepScript
{
[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.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 TwoPausesInOneStepScript()
{
}
protected TwoPausesInOneStepScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected TwoPausesInOneStepScript(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::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 "connect": goto connect;
case "connect#1": goto connect__1;
}
#line hidden
connect:
#line 91 "TestScripts.cs"
while (!gates.Open.Contains("breaker"))
#line hidden
{
#line 93 "TestScripts.cs"
__frame.Mark("connect"); return false;
#line hidden
}
#line hidden
connect__1:
#line 96 "TestScripts.cs"
while (!gates.Open.Contains("load"))
#line hidden
{
#line 98 "TestScripts.cs"
__frame.Mark("connect#1"); return false;
#line hidden
}
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class LoopedPassageScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__i;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.i");
}
}
[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 LoopedPassageScript()
{
}
protected LoopedPassageScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LoopedPassageScript(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.Local("Run.i");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.i":
#line 132 "TestScripts.cs"
writer.Local("Run.i", this.Run__i);
#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("Run.i", out int loaded)) { this.Run__i = 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 "Step": goto Step;
}
#line hidden
{
ref int i = ref __frame.Run__i;
#line 132 "TestScripts.cs"
i = 0;
#line hidden
}
#line hidden
__loopStart1:
#line hidden
{
ref int i = ref __frame.Run__i;
#line 132 "TestScripts.cs"
if (!(i < 2)) goto __loopEnd1;
#line hidden
}
#line hidden
Step:
#line hidden
{
#line 134 "TestScripts.cs"
using (__frame.Enter("Step")) { if (!Step__Passage(__frame, __time, gates)) { return false; } }
#line hidden
}
#line hidden
__loopCont1:
#line hidden
{
ref int i = ref __frame.Run__i;
#line 132 "TestScripts.cs"
i++;
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#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 "Step":
__frame.SaveLocal("Run.i", writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Step__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first;
case "second": goto second;
}
#line 113 "TestScripts.cs"
Log.Add("step begins");
#line hidden
first:
#line 115 "TestScripts.cs"
while (!gates.Open.Contains("A"))
#line hidden
{
#line 117 "TestScripts.cs"
__frame.Mark("first"); return false;
#line hidden
}
#line 120 "TestScripts.cs"
Log.Add("A seen");
#line hidden
second:
#line 122 "TestScripts.cs"
while (!gates.Open.Contains("B"))
#line hidden
{
#line 124 "TestScripts.cs"
__frame.Mark("second"); return false;
#line hidden
}
#line 127 "TestScripts.cs"
Log.Add("step ends");
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class LoopedEarlyReturnScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__i;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.i");
}
}
[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 LoopedEarlyReturnScript()
{
}
protected LoopedEarlyReturnScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LoopedEarlyReturnScript(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.Local("Run.i");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.i":
#line 166 "TestScripts.cs"
writer.Local("Run.i", this.Run__i);
#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("Run.i", out int loaded)) { this.Run__i = 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 "Step": goto Step;
}
#line hidden
{
ref int i = ref __frame.Run__i;
#line 166 "TestScripts.cs"
i = 0;
#line hidden
}
#line hidden
__loopStart1:
#line hidden
{
ref int i = ref __frame.Run__i;
#line 166 "TestScripts.cs"
if (!(i < 2)) goto __loopEnd1;
#line hidden
}
#line hidden
Step:
#line hidden
{
#line 168 "TestScripts.cs"
using (__frame.Enter("Step")) { if (!Step__Passage(__frame, __time, gates)) { return false; } }
#line hidden
}
#line hidden
__loopCont1:
#line hidden
{
ref int i = ref __frame.Run__i;
#line 166 "TestScripts.cs"
i++;
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#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 "Step":
__frame.SaveLocal("Run.i", writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Step__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 149 "TestScripts.cs"
Log.Add("step begins");
#line 150 "TestScripts.cs"
if (gates.Open.Contains("skip"))
{
{ __frame.Exit(); return true; }
}
#line hidden
wait:
#line 156 "TestScripts.cs"
while (!gates.Open.Contains("A"))
#line hidden
{
#line 158 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 161 "TestScripts.cs"
Log.Add("step ends");
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class EarlyReturnScript
{
[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.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 EarlyReturnScript()
{
}
protected EarlyReturnScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected EarlyReturnScript(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::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 "wait": goto wait;
}
#line 180 "TestScripts.cs"
if (gates.Open.Contains("skip"))
{
{ __frame.Exit(); return true; }
}
#line hidden
wait:
#line 186 "TestScripts.cs"
while (!gates.Open.Contains("wait"))
#line hidden
{
#line 188 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 191 "TestScripts.cs"
Log.Add("waited");
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class LocalsScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__waits;
public int Deliver__crates;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Deliver.crates");
lister.Local("Run.waits");
}
}
[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 LocalsScript()
{
}
protected LocalsScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LocalsScript(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.Local("Deliver.crates");
lister.Local("Run.waits");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Deliver.crates":
#line 212 "TestScripts.cs"
writer.Local("Deliver.crates", this.Deliver__crates);
#line hidden
return;
case "Run.waits":
#line 232 "TestScripts.cs"
writer.Local("Run.waits", this.Run__waits);
#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("Deliver.crates", out int loaded)) { this.Deliver__crates = loaded; } }
{ if (reader.TryLocal("Run.waits", out int loaded)) { this.Run__waits = 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
ref int waits = ref __frame.Run__waits;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
case "Deliver": goto Deliver;
}
#line 230 "TestScripts.cs"
string greeting = "hello";
#line 231 "TestScripts.cs"
Log.Add(greeting);
#line 232 "TestScripts.cs"
waits = 0;
#line hidden
wait:
#line 235 "TestScripts.cs"
while (!gates.Open.Contains("go"))
#line hidden
{
#line 237 "TestScripts.cs"
waits++;
#line 238 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 241 "TestScripts.cs"
Log.Add("waited " + waits);
#line hidden
Deliver:
#line 242 "TestScripts.cs"
using (__frame.Enter("Deliver")) { if (!Deliver__Passage(__frame, __time, gates, __frame.ResumeKey == null ? (Counted(2)) : 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 "wait":
__frame.SaveLocal("Run.waits", writer);
break;
case "Deliver":
Deliver__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Deliver__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, int crates__argument)
{
#line hidden
ref int crates = ref __frame.Deliver__crates;
if (__frame.ResumeKey == null)
{
crates = crates__argument;
}
switch (__frame.ResumeKey)
{
case "deliver": goto deliver;
}
#line hidden
deliver:
#line 215 "TestScripts.cs"
while (crates > 0)
#line hidden
{
#line 217 "TestScripts.cs"
if (gates.Open.Remove("crate"))
{
crates--;
}
#line 222 "TestScripts.cs"
__frame.Mark("deliver"); return false;
#line hidden
}
#line 225 "TestScripts.cs"
Log.Add("delivered");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Deliver__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "deliver":
__frame.SaveLocal("Deliver.crates", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class CapturedLocalScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public string Run__wanted;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.wanted");
}
}
[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 CapturedLocalScript()
{
}
protected CapturedLocalScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected CapturedLocalScript(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.Local("Run.wanted");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.wanted":
#line 250 "TestScripts.cs"
writer.Local("Run.wanted", this.Run__wanted);
#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("Run.wanted", out string loaded)) { this.Run__wanted = 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
ref string wanted = ref __frame.Run__wanted;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 250 "TestScripts.cs"
wanted = "go";
#line hidden
wait:
#line 253 "TestScripts.cs"
while (!gates.Open.Any(gate => gate == __frame.Run__wanted))
#line hidden
{
#line 255 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#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 "wait":
__frame.SaveLocal("Run.wanted", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class UserTypesScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.UnitTests.Point Run__start;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.start");
}
}
[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 UserTypesScript()
{
}
protected UserTypesScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Destination", out global::Ariadne.UnitTests.Waypoint loaded)) { this.Destination = loaded; } else if (!reader.HasField("Destination")) { throw new global::System.IO.InvalidDataException("UserTypesScript's save has no field 'Destination', which has no initializer to fall back on. Give it one."); } }
{ if (reader.TryField>("Visits", out global::System.Collections.Generic.IList loaded)) { this.Visits = loaded; } }
}
protected UserTypesScript(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("Destination");
lister.Field>("Visits");
lister.Local("Run.start");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 283 "TestScripts.cs"
writer.Field("Destination", this.Destination);
#line 285 "TestScripts.cs"
writer.Field>("Visits", this.Visits);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.start":
#line 289 "TestScripts.cs"
writer.Local("Run.start", this.Run__start);
#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("Run.start", out global::Ariadne.UnitTests.Point loaded)) { this.Run__start = 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
ref global::Ariadne.UnitTests.Point start = ref __frame.Run__start;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 289 "TestScripts.cs"
start = new Point(1.5, -2);
#line hidden
wait:
#line 292 "TestScripts.cs"
while (!gates.Open.Contains("go"))
#line hidden
{
#line 294 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 297 "TestScripts.cs"
Destination = new Waypoint { Name = "back to start", At = start };
#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 "wait":
__frame.SaveLocal("Run.start", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class MissionArc
{
[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();
}
protected MissionArc()
{
}
protected MissionArc(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Reward", out int loaded)) { this.Reward = loaded; } }
{ if (reader.TryField("Title", out string loaded)) { this.Title = loaded; } }
}
protected MissionArc(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("Reward");
lister.Field("Title");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 306 "TestScripts.cs"
writer.Field("Reward", this.Reward);
#line 308 "TestScripts.cs"
writer.Field("Title", this.Title);
#line default
}
#pragma warning disable
}
}
namespace Ariadne.UnitTests
{
partial class MissionScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.MissionArc.__Frame
{
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.MissionArc.__Frame.ListParts(lister);
}
}
[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);
}
public MissionScript()
{
}
protected MissionScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Stage", out int loaded)) { this.Stage = loaded; } else if (!reader.HasField("Stage")) { throw new global::System.IO.InvalidDataException("MissionScript's save has no field 'Stage', which has no initializer to fall back on. Give it one."); } }
}
protected MissionScript(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("Stage");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 316 "TestScripts.cs"
writer.Field("Stage", this.Stage);
#line default
}
#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 "wait": goto wait;
}
#line hidden
wait:
#line 321 "TestScripts.cs"
while (!gates.Open.Contains("go"))
#line hidden
{
#line 323 "TestScripts.cs"
Stage++;
#line 324 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class ThrowingScript
{
[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.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 ThrowingScript()
{
}
protected ThrowingScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected ThrowingScript(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::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 "explode": goto explode;
}
#line hidden
explode:
#line 334 "TestScripts.cs"
while (!gates.Open.Contains("never"))
#line hidden
{
#line 336 "TestScripts.cs"
if (gates.Open.Contains("explode"))
{
throw new InvalidOperationException("boom");
}
#line 341 "TestScripts.cs"
__frame.Mark("explode"); return false;
#line hidden
}
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class BranchingScript
{
[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.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 BranchingScript()
{
}
protected BranchingScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected BranchingScript(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::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__resume;
case "second": goto second__resume;
case "third": goto third__resume;
case "fourth": goto fourth__resume;
}
#line 356 "TestScripts.cs"
Log.Add("start");
#line hidden
first:
#line 359 "TestScripts.cs"
__frame.Mark("first"); return false;
#line hidden
first__resume:
#line 360 "TestScripts.cs"
Log.Add("after first");
#line hidden
{
#line 362 "TestScripts.cs"
if (!(gates.Open.Contains("left"))) goto __else1;
#line 364 "TestScripts.cs"
Log.Add("left");
#line hidden
}
#line hidden
second:
#line hidden
{
#line 366 "TestScripts.cs"
__frame.Mark("second"); return false;
#line hidden
}
#line hidden
second__resume:
#line hidden
{
#line 367 "TestScripts.cs"
Log.Add("left done");
#line hidden
goto __end1;
#line hidden
}
#line hidden
__else1:
#line hidden
{
#line 369 "TestScripts.cs"
if (!(gates.Open.Contains("middle"))) goto __else2;
#line 371 "TestScripts.cs"
Log.Add("middle");
#line hidden
}
#line hidden
third:
#line hidden
{
#line 373 "TestScripts.cs"
__frame.Mark("third"); return false;
#line hidden
}
#line hidden
third__resume:
#line hidden
{
#line 374 "TestScripts.cs"
Log.Add("middle done");
#line hidden
goto __end2;
#line hidden
}
#line hidden
__else2:
#line hidden
{
#line 378 "TestScripts.cs"
Log.Add("right");
#line hidden
}
#line hidden
fourth:
#line hidden
{
#line 380 "TestScripts.cs"
__frame.Mark("fourth"); return false;
#line hidden
}
#line hidden
fourth__resume:
#line hidden
{
#line 381 "TestScripts.cs"
Log.Add("right done");
#line hidden
}
#line hidden
__end2:
#line hidden
__end1:
#line 384 "TestScripts.cs"
Log.Add("end");
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class NestedBlocksScript
{
[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.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 NestedBlocksScript()
{
}
protected NestedBlocksScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected NestedBlocksScript(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::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 "deep": goto deep__resume;
case "after": goto after__resume;
}
#line hidden
{
#line 398 "TestScripts.cs"
if (!(gates.Open.Contains("outer"))) goto __end1;
#line 400 "TestScripts.cs"
Log.Add("outer");
#line 402 "TestScripts.cs"
Log.Add("inner");
#line hidden
}
#line hidden
deep:
#line hidden
{
#line 404 "TestScripts.cs"
__frame.Mark("deep"); return false;
#line hidden
}
#line hidden
deep__resume:
#line hidden
{
#line 405 "TestScripts.cs"
Log.Add("inner done");
#line 408 "TestScripts.cs"
Log.Add("outer done");
#line hidden
}
#line hidden
__end1:
#line hidden
after:
#line 412 "TestScripts.cs"
__frame.Mark("after"); return false;
#line hidden
after__resume:
#line 413 "TestScripts.cs"
Log.Add("end");
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class ConditionProbeScript
{
[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.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 ConditionProbeScript()
{
}
protected ConditionProbeScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected ConditionProbeScript(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::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 "inside": goto inside__resume;
}
#line hidden
{
#line 436 "TestScripts.cs"
if (!(Probe(gates))) goto __end1;
#line hidden
}
#line hidden
inside:
#line hidden
{
#line 439 "TestScripts.cs"
__frame.Mark("inside"); return false;
#line hidden
}
#line hidden
inside__resume:
#line hidden
{
#line 440 "TestScripts.cs"
Log.Add("inside");
#line hidden
}
#line hidden
__end1:
#line 443 "TestScripts.cs"
Log.Add("end");
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class BranchLocalsScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__total;
public int Run__total__1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.total");
lister.Local("Run.total#1");
}
}
[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 BranchLocalsScript()
{
}
protected BranchLocalsScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected BranchLocalsScript(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.Local("Run.total");
lister.Local("Run.total#1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.total":
#line 459 "TestScripts.cs"
writer.Local("Run.total", this.Run__total);
#line hidden
return;
case "Run.total#1":
#line 467 "TestScripts.cs"
writer.Local("Run.total#1", this.Run__total__1);
#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("Run.total", out int loaded)) { this.Run__total = loaded; } }
{ if (reader.TryLocal("Run.total#1", out int loaded)) { this.Run__total__1 = 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 "big": goto big__resume;
case "small": goto small__resume;
}
#line hidden
{
ref int total = ref __frame.Run__total;
#line 457 "TestScripts.cs"
if (!(gates.Open.Contains("big"))) goto __else1;
#line 459 "TestScripts.cs"
total = 10;
#line hidden
}
#line hidden
big:
#line hidden
{
#line 461 "TestScripts.cs"
__frame.Mark("big"); return false;
#line hidden
}
#line hidden
big__resume:
#line hidden
{
ref int total = ref __frame.Run__total;
#line 462 "TestScripts.cs"
total++;
#line 463 "TestScripts.cs"
Log.Add("big " + total);
#line hidden
goto __end1;
#line hidden
}
#line hidden
__else1:
#line hidden
{
ref int total = ref __frame.Run__total__1;
#line 467 "TestScripts.cs"
total = 1;
#line hidden
}
#line hidden
small:
#line hidden
{
#line 469 "TestScripts.cs"
__frame.Mark("small"); return false;
#line hidden
}
#line hidden
small__resume:
#line hidden
{
ref int total = ref __frame.Run__total__1;
#line 470 "TestScripts.cs"
total++;
#line 471 "TestScripts.cs"
Log.Add("small " + total);
#line hidden
}
#line hidden
__end1:
#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 "big":
__frame.SaveLocal("Run.total", writer);
break;
case "small":
__frame.SaveLocal("Run.total#1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class AcrossScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__doubled;
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.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 AcrossScript()
{
}
protected AcrossScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected AcrossScript(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::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 "mid": goto mid__resume;
}
#line hidden
{
ref int doubled = ref __frame.Run__doubled;
#line 486 "TestScripts.cs"
if (!(gates.Open.Contains("go"))) goto __end1;
#line hidden
}
#line hidden
mid:
#line hidden
{
#line 490 "TestScripts.cs"
__frame.Mark("mid"); return false;
#line hidden
}
#line hidden
mid__resume:
#line hidden
{
ref int doubled = ref __frame.Run__doubled;
#line 491 "TestScripts.cs"
doubled = gates.Open.Count * 2;
#line 492 "TestScripts.cs"
Log.Add("doubled " + doubled);
#line hidden
}
#line hidden
__end1:
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class NestedKindsScript
{
[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.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 NestedKindsScript()
{
}
protected NestedKindsScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected NestedKindsScript(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::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 "Briefing": goto Briefing;
case "wait": goto wait;
}
#line hidden
{
#line 518 "TestScripts.cs"
if (!(gates.Open.Contains("brief"))) goto __else1;
#line hidden
}
#line hidden
Briefing:
#line hidden
{
#line 520 "TestScripts.cs"
using (__frame.Enter("Briefing")) { if (!Briefing__Passage(__frame, __time, gates)) { return false; } }
#line 521 "TestScripts.cs"
Log.Add("after brief");
#line hidden
goto __end1;
#line hidden
}
#line hidden
__else1:
#line hidden
wait:
#line hidden
{
#line 526 "TestScripts.cs"
while (!gates.Open.Contains("go"))
#line hidden
{
#line 528 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 531 "TestScripts.cs"
Log.Add("went");
#line hidden
}
#line hidden
__end1:
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Briefing__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
switch (__frame.ResumeKey)
{
case "read": goto read;
}
#line hidden
read:
#line 508 "TestScripts.cs"
while (!gates.Open.Contains("read"))
#line hidden
{
#line 510 "TestScripts.cs"
__frame.Mark("read"); return false;
#line hidden
}
#line 513 "TestScripts.cs"
Log.Add("briefed");
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class SharedCounterScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__visits;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.visits");
}
}
[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 SharedCounterScript()
{
}
protected SharedCounterScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected SharedCounterScript(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.Local("Run.visits");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.visits":
#line 546 "TestScripts.cs"
writer.Local("Run.visits", this.Run__visits);
#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("Run.visits", out int loaded)) { this.Run__visits = 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
ref int visits = ref __frame.Run__visits;
switch (__frame.ResumeKey)
{
case "step": goto step__resume;
}
#line 546 "TestScripts.cs"
visits = 0;
#line hidden
{
#line 547 "TestScripts.cs"
if (!(gates.Open.Contains("go"))) goto __end1;
#line 549 "TestScripts.cs"
visits++;
#line hidden
}
#line hidden
step:
#line hidden
{
#line 551 "TestScripts.cs"
__frame.Mark("step"); return false;
#line hidden
}
#line hidden
step__resume:
#line hidden
{
#line 552 "TestScripts.cs"
visits++;
#line hidden
}
#line hidden
__end1:
#line 555 "TestScripts.cs"
Log.Add("visits " + visits);
#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 "step":
__frame.SaveLocal("Run.visits", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class WhileMiddleScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__round;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.round");
}
}
[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 WhileMiddleScript()
{
}
protected WhileMiddleScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected WhileMiddleScript(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.Local("Run.round");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.round":
#line 569 "TestScripts.cs"
writer.Local("Run.round", this.Run__round);
#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("Run.round", out int loaded)) { this.Run__round = 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
ref int round = ref __frame.Run__round;
switch (__frame.ResumeKey)
{
case "wait": goto wait__resume;
}
#line 569 "TestScripts.cs"
round = 0;
#line hidden
__loopStart1:
#line hidden
{
#line 572 "TestScripts.cs"
if (!(round < 4)) goto __loopEnd1;
#line 574 "TestScripts.cs"
round++;
#line 575 "TestScripts.cs"
if (gates.Open.Contains("skip" + round))
{
goto __loopStart1;
}
#line 580 "TestScripts.cs"
if (gates.Open.Contains("stop" + round))
{
goto __loopEnd1;
}
#line 585 "TestScripts.cs"
Log.Add("before " + round);
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 586 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
{
#line 587 "TestScripts.cs"
Log.Add("after " + round);
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 590 "TestScripts.cs"
Log.Add("done " + round);
#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 "wait":
__frame.SaveLocal("Run.round", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class ForPauseScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__i;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.i");
}
}
[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 ForPauseScript()
{
}
protected ForPauseScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected ForPauseScript(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.Local("Run.i");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.i":
#line 605 "TestScripts.cs"
writer.Local("Run.i", this.Run__i);
#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("Run.i", out int loaded)) { this.Run__i = 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 "wait": goto wait__resume;
}
#line hidden
{
ref int i = ref __frame.Run__i;
#line 605 "TestScripts.cs"
i = 0;
#line hidden
}
#line hidden
__loopStart1:
#line hidden
{
ref int i = ref __frame.Run__i;
#line 605 "TestScripts.cs"
if (!(i < 3)) goto __loopEnd1;
#line 607 "TestScripts.cs"
Log.Add("i " + i);
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 608 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
__loopCont1:
#line hidden
{
ref int i = ref __frame.Run__i;
#line 605 "TestScripts.cs"
i++;
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 611 "TestScripts.cs"
Log.Add("end");
#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 "wait":
__frame.SaveLocal("Run.i", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class DoPauseScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__count;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.count");
}
}
[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 DoPauseScript()
{
}
protected DoPauseScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected DoPauseScript(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.Local("Run.count");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.count":
#line 622 "TestScripts.cs"
writer.Local("Run.count", this.Run__count);
#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("Run.count", out int loaded)) { this.Run__count = 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
ref int count = ref __frame.Run__count;
switch (__frame.ResumeKey)
{
case "wait": goto wait__resume;
}
#line 622 "TestScripts.cs"
count = 0;
#line hidden
__loopStart1:
#line hidden
{
#line 627 "TestScripts.cs"
Log.Add("do " + count);
#line 628 "TestScripts.cs"
count++;
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 629 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
__loopCont1:
#line hidden
{
#line 631 "TestScripts.cs"
if (count < 3) goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 633 "TestScripts.cs"
Log.Add("done");
#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 "wait":
__frame.SaveLocal("Run.count", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class NestedLoopsScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__j;
public int Run__k;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.j");
lister.Local("Run.k");
}
}
[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 NestedLoopsScript()
{
}
protected NestedLoopsScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected NestedLoopsScript(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.Local("Run.j");
lister.Local("Run.k");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.j":
#line 648 "TestScripts.cs"
writer.Local("Run.j", this.Run__j);
#line hidden
return;
case "Run.k":
#line 650 "TestScripts.cs"
writer.Local("Run.k", this.Run__k);
#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("Run.j", out int loaded)) { this.Run__j = loaded; } }
{ if (reader.TryLocal("Run.k", out int loaded)) { this.Run__k = 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 "row": goto row;
}
#line hidden
{
ref int j = ref __frame.Run__j;
#line 648 "TestScripts.cs"
j = 0;
#line hidden
}
#line hidden
__loopStart1:
#line hidden
{
ref int j = ref __frame.Run__j;
ref int k = ref __frame.Run__k;
#line 648 "TestScripts.cs"
if (!(j < 2)) goto __loopEnd1;
#line 650 "TestScripts.cs"
k = 0;
#line hidden
}
#line hidden
row:
#line hidden
{
ref int j = ref __frame.Run__j;
ref int k = ref __frame.Run__k;
#line 651 "TestScripts.cs"
while (k < 2)
#line hidden
{
#line 653 "TestScripts.cs"
Log.Add("j" + j + "k" + k);
#line 654 "TestScripts.cs"
k++;
#line 655 "TestScripts.cs"
__frame.Mark("row"); return false;
#line hidden
}
#line 658 "TestScripts.cs"
Log.Add("row " + j);
#line hidden
}
#line hidden
__loopCont1:
#line hidden
{
ref int j = ref __frame.Run__j;
#line 648 "TestScripts.cs"
j++;
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#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 "row":
__frame.SaveLocal("Run.j", writer);
__frame.SaveLocal("Run.k", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class LoopBodyLocalsScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__count;
public int Run__seen;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.count");
lister.Local("Run.seen");
}
}
[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 LoopBodyLocalsScript()
{
}
protected LoopBodyLocalsScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LoopBodyLocalsScript(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.Local("Run.count");
lister.Local("Run.seen");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.count":
#line 673 "TestScripts.cs"
writer.Local("Run.count", this.Run__count);
#line hidden
return;
case "Run.seen":
#line 685 "TestScripts.cs"
writer.Local("Run.seen", this.Run__seen);
#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("Run.count", out int loaded)) { this.Run__count = loaded; } }
{ if (reader.TryLocal("Run.seen", out int loaded)) { this.Run__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
ref int count = ref __frame.Run__count;
switch (__frame.ResumeKey)
{
case "wait": goto wait__resume;
}
#line 673 "TestScripts.cs"
count = 0;
#line hidden
__loopStart1:
#line hidden
{
ref int seen = ref __frame.Run__seen;
#line 676 "TestScripts.cs"
if (!(count < 3)) goto __loopEnd1;
#line 678 "TestScripts.cs"
count++;
#line 679 "TestScripts.cs"
switch (count)
{
case 2:
goto __loopStart1;
}
#line 685 "TestScripts.cs"
seen = gates.Open.Count;
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 686 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
{
ref int seen = ref __frame.Run__seen;
#line 687 "TestScripts.cs"
Log.Add("count " + count + " seen " + seen);
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 690 "TestScripts.cs"
Log.Add("end");
#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 "wait":
__frame.SaveLocal("Run.count", writer);
__frame.SaveLocal("Run.seen", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class ForContinueScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__i;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.i");
}
}
[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 ForContinueScript()
{
}
protected ForContinueScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected ForContinueScript(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.Local("Run.i");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.i":
#line 705 "TestScripts.cs"
writer.Local("Run.i", this.Run__i);
#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("Run.i", out int loaded)) { this.Run__i = 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 "wait": goto wait__resume;
}
#line hidden
{
ref int i = ref __frame.Run__i;
#line 705 "TestScripts.cs"
i = 0;
#line hidden
}
#line hidden
__loopStart1:
#line hidden
{
ref int i = ref __frame.Run__i;
#line 705 "TestScripts.cs"
if (!(i < 4)) goto __loopEnd1;
#line 707 "TestScripts.cs"
if (i == 1)
{
goto __loopCont1;
}
#line 712 "TestScripts.cs"
Log.Add("i " + i);
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 713 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
__loopCont1:
#line hidden
{
ref int i = ref __frame.Run__i;
#line 705 "TestScripts.cs"
i++;
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 716 "TestScripts.cs"
Log.Add("end");
#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 "wait":
__frame.SaveLocal("Run.i", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class DoContinueScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__n;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.n");
}
}
[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 DoContinueScript()
{
}
protected DoContinueScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected DoContinueScript(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.Local("Run.n");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.n":
#line 730 "TestScripts.cs"
writer.Local("Run.n", this.Run__n);
#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("Run.n", out int loaded)) { this.Run__n = 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
ref int n = ref __frame.Run__n;
switch (__frame.ResumeKey)
{
case "wait": goto wait__resume;
}
#line 730 "TestScripts.cs"
n = 0;
#line hidden
__loopStart1:
#line hidden
{
#line 735 "TestScripts.cs"
n++;
#line 736 "TestScripts.cs"
if (n == 2)
{
goto __loopCont1;
}
#line 741 "TestScripts.cs"
Log.Add("n " + n);
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 742 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
__loopCont1:
#line hidden
{
#line 744 "TestScripts.cs"
if (n < 3) goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 746 "TestScripts.cs"
Log.Add("end");
#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 "wait":
__frame.SaveLocal("Run.n", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class SwitchPauseScript
{
[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.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 SwitchPauseScript()
{
}
protected SwitchPauseScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected SwitchPauseScript(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::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__resume;
case "second": goto second__resume;
}
#line 760 "TestScripts.cs"
int choice = 0;
#line 761 "TestScripts.cs"
if (gates.Open.Contains("a"))
{
choice = 1;
}
else if (gates.Open.Contains("b"))
{
choice = 2;
}
#line hidden
{
#line 770 "TestScripts.cs"
switch (choice)
#line hidden
{
#line 772 "TestScripts.cs"
case 1: goto __switch1_0;
#line 778 "TestScripts.cs"
case 2:
#line 779 "TestScripts.cs"
case 3: goto __switch1_1;
#line 785 "TestScripts.cs"
default: goto __switch1_2;
#line hidden
}
#line hidden
}
#line hidden
__switch1_0:
#line hidden
{
#line 773 "TestScripts.cs"
Log.Add("one");
#line hidden
}
#line hidden
first:
#line hidden
{
#line 775 "TestScripts.cs"
__frame.Mark("first"); return false;
#line hidden
}
#line hidden
first__resume:
#line hidden
{
#line 776 "TestScripts.cs"
Log.Add("one done");
#line 777 "TestScripts.cs"
goto __switchEnd1;
#line hidden
}
#line hidden
__switch1_1:
#line hidden
{
#line 780 "TestScripts.cs"
Log.Add("two or three");
#line hidden
}
#line hidden
second:
#line hidden
{
#line 782 "TestScripts.cs"
__frame.Mark("second"); return false;
#line hidden
}
#line hidden
second__resume:
#line hidden
{
#line 783 "TestScripts.cs"
Log.Add("two or three done");
#line 784 "TestScripts.cs"
goto __switchEnd1;
#line hidden
}
#line hidden
__switch1_2:
#line hidden
{
#line 786 "TestScripts.cs"
Log.Add("other");
#line 787 "TestScripts.cs"
goto __switchEnd1;
#line hidden
}
#line hidden
__switchEnd1:
#line 790 "TestScripts.cs"
Log.Add("end");
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class SwitchLoopScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__n;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.n");
}
}
[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 SwitchLoopScript()
{
}
protected SwitchLoopScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected SwitchLoopScript(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.Local("Run.n");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.n":
#line 804 "TestScripts.cs"
writer.Local("Run.n", this.Run__n);
#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("Run.n", out int loaded)) { this.Run__n = 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
ref int n = ref __frame.Run__n;
switch (__frame.ResumeKey)
{
case "wait": goto wait__resume;
}
#line 804 "TestScripts.cs"
n = 0;
#line hidden
__loopStart1:
#line hidden
{
#line 807 "TestScripts.cs"
if (!(n < 3)) goto __loopEnd1;
#line 809 "TestScripts.cs"
n++;
#line 810 "TestScripts.cs"
switch (n)
#line hidden
{
#line 812 "TestScripts.cs"
case 2: goto __switch1_0;
#line 814 "TestScripts.cs"
case 3: goto __switch1_1;
#line 818 "TestScripts.cs"
default: goto __switch1_2;
#line hidden
}
#line hidden
}
#line hidden
__switch1_0:
#line hidden
{
#line 813 "TestScripts.cs"
goto __loopStart1;
#line hidden
}
#line hidden
__switch1_1:
#line hidden
{
#line 815 "TestScripts.cs"
Log.Add("three");
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 816 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
{
#line 817 "TestScripts.cs"
goto __switchEnd1;
#line hidden
}
#line hidden
__switch1_2:
#line hidden
{
#line 819 "TestScripts.cs"
Log.Add("other " + n);
#line 820 "TestScripts.cs"
goto __switchEnd1;
#line hidden
}
#line hidden
__switchEnd1:
#line hidden
{
#line 823 "TestScripts.cs"
Log.Add("after " + n);
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 826 "TestScripts.cs"
Log.Add("end");
#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 "wait":
__frame.SaveLocal("Run.n", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class GotoCaseScript
{
[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.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 GotoCaseScript()
{
}
protected GotoCaseScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected GotoCaseScript(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::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 "step": goto step__resume;
}
#line 837 "TestScripts.cs"
int state = gates.Open.Count + 1;
#line hidden
{
#line 838 "TestScripts.cs"
switch (state)
#line hidden
{
#line 840 "TestScripts.cs"
case 1: goto __switch1_0;
#line 843 "TestScripts.cs"
case 2: goto __switch1_1;
#line hidden
}
#line hidden
goto __switchEnd1;
#line hidden
}
#line hidden
__switch1_0:
#line hidden
{
#line 841 "TestScripts.cs"
Log.Add("one");
#line 842 "TestScripts.cs"
goto __switch1_1;
#line hidden
}
#line hidden
__switch1_1:
#line hidden
{
#line 844 "TestScripts.cs"
Log.Add("two");
#line hidden
}
#line hidden
step:
#line hidden
{
#line 846 "TestScripts.cs"
__frame.Mark("step"); return false;
#line hidden
}
#line hidden
step__resume:
#line hidden
{
#line 847 "TestScripts.cs"
Log.Add("after");
#line 848 "TestScripts.cs"
goto __switchEnd1;
#line hidden
}
#line hidden
__switchEnd1:
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class GuardClauseScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__count;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.count");
}
}
[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 GuardClauseScript()
{
}
protected GuardClauseScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected GuardClauseScript(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.Local("Run.count");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.count":
#line 866 "TestScripts.cs"
writer.Local("Run.count", this.Run__count);
#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("Run.count", out int loaded)) { this.Run__count = 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
ref int count = ref __frame.Run__count;
switch (__frame.ResumeKey)
{
case "wait": goto wait__resume;
}
#line 866 "TestScripts.cs"
if (!int.TryParse(Text, out count))
{
Log.Add("bad");
{ __frame.Exit(); return true; }
}
#line hidden
wait:
#line 873 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
wait__resume:
#line 874 "TestScripts.cs"
Log.Add("count " + count);
#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 "wait":
__frame.SaveLocal("Run.count", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class PatternIfScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public string Run__text;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.text");
}
}
[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 PatternIfScript()
{
}
protected PatternIfScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected PatternIfScript(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.Local("Run.text");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.text":
#line 891 "TestScripts.cs"
writer.Local("Run.text", this.Run__text);
#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("Run.text", out string loaded)) { this.Run__text = 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 "wait": goto wait__resume;
}
#line hidden
{
ref string text = ref __frame.Run__text;
#line 891 "TestScripts.cs"
if (!((Thing is string text__pattern && ((text = text__pattern) is var _)) && text.Length > 0)) goto __else1;
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 894 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
{
ref string text = ref __frame.Run__text;
#line 895 "TestScripts.cs"
Log.Add("text " + text);
#line hidden
goto __end1;
#line hidden
}
#line hidden
__else1:
#line hidden
{
#line 898 "TestScripts.cs"
{
Log.Add("none");
}
#line hidden
}
#line hidden
__end1:
#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 "wait":
__frame.SaveLocal("Run.text", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class OutLoopScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__item;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.item");
}
}
[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 OutLoopScript()
{
}
protected OutLoopScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Remaining", out int loaded)) { this.Remaining = loaded; } }
}
protected OutLoopScript(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("Remaining");
lister.Local("Run.item");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 912 "TestScripts.cs"
writer.Field("Remaining", this.Remaining);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.item":
#line 923 "TestScripts.cs"
writer.Local("Run.item", this.Run__item);
#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("Run.item", out int loaded)) { this.Run__item = 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 "wait": goto wait__resume;
}
#line hidden
__loopStart1:
#line hidden
{
ref int item = ref __frame.Run__item;
#line 923 "TestScripts.cs"
if (!(Next(out item))) goto __loopEnd1;
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 925 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
{
ref int item = ref __frame.Run__item;
#line 926 "TestScripts.cs"
Log.Add("item " + item);
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 929 "TestScripts.cs"
Log.Add("end");
#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 "wait":
__frame.SaveLocal("Run.item", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class PatternCaseScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public string Run__text;
public int Run__number;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.text");
}
}
[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 PatternCaseScript()
{
}
protected PatternCaseScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected PatternCaseScript(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.Local("Run.text");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.text":
#line 948 "TestScripts.cs"
writer.Local("Run.text", this.Run__text);
#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("Run.text", out string loaded)) { this.Run__text = 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 "found": goto found__resume;
}
#line hidden
{
ref string text = ref __frame.Run__text;
ref int number = ref __frame.Run__number;
#line 946 "TestScripts.cs"
switch (Thing)
#line hidden
{
#line 948 "TestScripts.cs"
case string text__pattern when ((text = text__pattern) is var _) && (text.Length > 0): goto __switch1_0;
#line 954 "TestScripts.cs"
case int number__pattern when ((number = number__pattern) is var _): goto __switch1_1;
#line 957 "TestScripts.cs"
default: goto __switch1_2;
#line hidden
}
#line hidden
}
#line hidden
__switch1_0:
#line hidden
{
ref string text = ref __frame.Run__text;
#line 949 "TestScripts.cs"
Log.Add("string " + text);
#line hidden
}
#line hidden
found:
#line hidden
{
#line 951 "TestScripts.cs"
__frame.Mark("found"); return false;
#line hidden
}
#line hidden
found__resume:
#line hidden
{
ref string text = ref __frame.Run__text;
#line 952 "TestScripts.cs"
Log.Add("done " + text);
#line 953 "TestScripts.cs"
goto __switchEnd1;
#line hidden
}
#line hidden
__switch1_1:
#line hidden
{
ref int number = ref __frame.Run__number;
#line 955 "TestScripts.cs"
Log.Add("int " + number);
#line 956 "TestScripts.cs"
goto __switchEnd1;
#line hidden
}
#line hidden
__switch1_2:
#line hidden
{
#line 958 "TestScripts.cs"
Log.Add("other");
#line 959 "TestScripts.cs"
goto __switchEnd1;
#line hidden
}
#line hidden
__switchEnd1:
#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 "found":
__frame.SaveLocal("Run.text", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class DeconstructionScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__low;
public int Run__high;
public int Run__inner;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.high");
lister.Local("Run.inner");
lister.Local("Run.low");
}
}
[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 DeconstructionScript()
{
}
protected DeconstructionScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected DeconstructionScript(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.Local("Run.high");
lister.Local("Run.inner");
lister.Local("Run.low");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.high":
#line 977 "TestScripts.cs"
writer.Local("Run.high", this.Run__high);
#line hidden
return;
case "Run.inner":
#line 978 "TestScripts.cs"
writer.Local("Run.inner", this.Run__inner);
#line hidden
return;
case "Run.low":
#line 977 "TestScripts.cs"
writer.Local("Run.low", this.Run__low);
#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("Run.high", out int loaded)) { this.Run__high = loaded; } }
{ if (reader.TryLocal("Run.inner", out int loaded)) { this.Run__inner = loaded; } }
{ if (reader.TryLocal("Run.low", out int loaded)) { this.Run__low = 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
ref int low = ref __frame.Run__low;
ref int high = ref __frame.Run__high;
ref int inner = ref __frame.Run__inner;
switch (__frame.ResumeKey)
{
case "wait": goto wait__resume;
}
#line 977 "TestScripts.cs"
(low, high) = Bounds;
#line 978 "TestScripts.cs"
(var spare, (inner, _)) = (low + 1, (high + 1, 0));
#line hidden
wait:
#line 981 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
wait__resume:
#line 982 "TestScripts.cs"
Log.Add(low + "-" + high + " " + inner);
#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 "wait":
__frame.SaveLocal("Run.low", writer);
__frame.SaveLocal("Run.high", writer);
__frame.SaveLocal("Run.inner", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class AskScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
}
}
[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 AskScript()
{
}
protected AskScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected AskScript(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.Local("Ask.waited");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 996 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#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("Ask.waited", out int loaded)) { this.Ask__waited = 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 1011 "TestScripts.cs"
int choice; { int __value; using (__frame.Enter("first")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } choice = __value; }
#line 1012 "TestScripts.cs"
Log.Add("choice " + choice);
#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":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 996 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 999 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1001 "TestScripts.cs"
waited++;
#line 1002 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1005 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class ValueChainScript
{
[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.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 ValueChainScript()
{
}
protected ValueChainScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected ValueChainScript(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::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 "Outer": goto Outer;
}
#line hidden
Outer:
#line 1042 "TestScripts.cs"
int result; { int __value; using (__frame.Enter("Outer")) { if (!Outer__Passage(__frame, __time, gates, __result: out __value)) { return false; } } result = __value; }
#line 1043 "TestScripts.cs"
Log.Add("result " + result);
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Inner__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line hidden
wait:
#line 1027 "TestScripts.cs"
while (!gates.Open.Contains("inner"))
#line hidden
{
#line 1029 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1032 "TestScripts.cs"
{ __result = 7; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Outer__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
switch (__frame.ResumeKey)
{
case "Inner": goto Inner;
}
#line hidden
Inner:
#line 1037 "TestScripts.cs"
{ int __value; using (__frame.Enter("Inner")) { if (!Inner__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __result = __value; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class KeptResultScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__first;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Run.first");
}
}
[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 KeptResultScript()
{
}
protected KeptResultScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected KeptResultScript(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.Local("Ask.waited");
lister.Local("Run.first");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1057 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Run.first":
#line 1071 "TestScripts.cs"
writer.Local("Run.first", this.Run__first);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Run.first", out int loaded)) { this.Run__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
ref int first = ref __frame.Run__first;
switch (__frame.ResumeKey)
{
case "Ask": goto Ask;
case "second": goto second__resume;
}
#line hidden
Ask:
#line 1071 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } first = __value; }
#line hidden
second:
#line 1074 "TestScripts.cs"
__frame.Mark("second"); return false;
#line hidden
second__resume:
#line 1075 "TestScripts.cs"
Log.Add("first " + first);
#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 "Ask":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
case "second":
__frame.SaveLocal("Run.first", writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1057 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1060 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1062 "TestScripts.cs"
waited++;
#line 1063 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1066 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class AssignedValuesScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
}
}
[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 AssignedValuesScript()
{
}
protected AssignedValuesScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Total", out int loaded)) { this.Total = loaded; } else if (!reader.HasField("Total")) { throw new global::System.IO.InvalidDataException("AssignedValuesScript's save has no field 'Total', which has no initializer to fall back on. Give it one."); } }
}
protected AssignedValuesScript(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("Total");
lister.Local("Ask.waited");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 1087 "TestScripts.cs"
writer.Field("Total", this.Total);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1091 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#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("Ask.waited", out int loaded)) { this.Ask__waited = 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 "one": goto one;
case "two": goto two;
}
#line hidden
one:
#line 1106 "TestScripts.cs"
{ int __value; using (__frame.Enter("one")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } Total = __value; }
#line hidden
two:
#line 1108 "TestScripts.cs"
{ int __value; using (__frame.Enter("two")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } _ = __value; }
#line 1109 "TestScripts.cs"
Log.Add("total " + Total);
#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 "one":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
case "two":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1091 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1094 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1096 "TestScripts.cs"
waited++;
#line 1097 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1100 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class BranchingValueScript
{
[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.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 BranchingValueScript()
{
}
protected BranchingValueScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected BranchingValueScript(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::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 1135 "TestScripts.cs"
string picked; { string __value; using (__frame.Enter("Pick")) { if (!Pick__Passage(__frame, __time, gates, __result: out __value)) { return false; } } picked = __value; }
#line 1136 "TestScripts.cs"
Log.Add(picked);
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Pick__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out string __result)
{
#line hidden
__result = default(string);
switch (__frame.ResumeKey)
{
case "wait": goto wait__resume;
}
#line hidden
{
#line 1123 "TestScripts.cs"
if (!(gates.Open.Contains("left"))) goto __end1;
#line hidden
}
#line hidden
wait:
#line hidden
{
#line 1126 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line hidden
wait__resume:
#line hidden
{
#line 1127 "TestScripts.cs"
{ __result = "left done"; __frame.Exit(); return true; }
#line hidden
}
#line hidden
__end1:
#line 1130 "TestScripts.cs"
{ __result = "right"; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class SpillOrderScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run____spill1;
public int Run____spill2;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Run.__spill1");
}
}
[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 SpillOrderScript()
{
}
protected SpillOrderScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Offset", out int loaded)) { this.Offset = loaded; } }
}
protected SpillOrderScript(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("Offset");
lister.Local("Ask.waited");
lister.Local("Run.__spill1");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 1148 "TestScripts.cs"
writer.Field("Offset", this.Offset);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1152 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Run.__spill1":
#line 1166 "TestScripts.cs"
writer.Local("Run.__spill1", this.Run____spill1);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Run.__spill1", out int loaded)) { this.Run____spill1 = 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 "Ask": goto Ask;
}
#line 1166 "TestScripts.cs"
__frame.Run____spill1 = Offset;
#line hidden
Ask:
#line 1166 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill2 = __value; }
#line 1166 "TestScripts.cs"
int result = __frame.Run____spill1 + __frame.Run____spill2;
#line 1167 "TestScripts.cs"
Log.Add("result " + result);
#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 "Ask":
__frame.SaveLocal("Run.__spill1", writer);
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1152 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1155 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1157 "TestScripts.cs"
waited++;
#line 1158 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1161 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class TwoCallsScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run____spill1;
public int Run____spill2;
public int Run____spill3;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Run.__spill2");
}
}
[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 TwoCallsScript()
{
}
protected TwoCallsScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected TwoCallsScript(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.Local("Ask.waited");
lister.Local("Run.__spill2");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1181 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Run.__spill2":
#line 1206 "TestScripts.cs"
writer.Local("Run.__spill2", this.Run____spill2);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Run.__spill2", out int loaded)) { this.Run____spill2 = 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 "Ask": goto Ask;
case "AskLater": goto AskLater;
}
#line hidden
Ask:
#line 1206 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill1 = __value; }
#line 1206 "TestScripts.cs"
__frame.Run____spill2 = __frame.Run____spill1 * 100;
#line hidden
AskLater:
#line 1206 "TestScripts.cs"
{ int __value; using (__frame.Enter("AskLater")) { if (!AskLater__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill3 = __value; }
#line 1206 "TestScripts.cs"
int sum = __frame.Run____spill2 + __frame.Run____spill3;
#line 1207 "TestScripts.cs"
Log.Add("sum " + sum);
#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 "Ask":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
case "AskLater":
__frame.SaveLocal("Run.__spill2", writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1181 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1184 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1186 "TestScripts.cs"
waited++;
#line 1187 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1190 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool AskLater__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
switch (__frame.ResumeKey)
{
case "later": goto later;
}
#line hidden
later:
#line 1196 "TestScripts.cs"
while (!gates.Open.Contains("later"))
#line hidden
{
#line 1198 "TestScripts.cs"
__frame.Mark("later"); return false;
#line hidden
}
#line 1201 "TestScripts.cs"
{ __result = 7; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class SpillReturnScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Ask__waited;
public int Doubled____spill1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
}
}
[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 SpillReturnScript()
{
}
protected SpillReturnScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected SpillReturnScript(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.Local("Ask.waited");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1221 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#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("Ask.waited", out int loaded)) { this.Ask__waited = 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 "Doubled": goto Doubled;
}
#line hidden
Doubled:
#line 1240 "TestScripts.cs"
int doubled; { int __value; using (__frame.Enter("Doubled")) { if (!Doubled__Passage(__frame, __time, gates, __result: out __value)) { return false; } } doubled = __value; }
#line 1241 "TestScripts.cs"
Log.Add("doubled " + doubled);
#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 "Doubled":
Doubled__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1221 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1224 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1226 "TestScripts.cs"
waited++;
#line 1227 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1230 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Doubled__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
switch (__frame.ResumeKey)
{
case "Ask": goto Ask;
}
#line hidden
Ask:
#line 1235 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Doubled____spill1 = __value; }
#line 1235 "TestScripts.cs"
{ __result = __frame.Doubled____spill1 * 2; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Doubled__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "Ask":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class SpillReceiverScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run____spill1;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
}
}
[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 SpillReceiverScript()
{
}
protected SpillReceiverScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected SpillReceiverScript(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.Local("Ask.waited");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1252 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#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("Ask.waited", out int loaded)) { this.Ask__waited = 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 "Ask": goto Ask;
}
#line hidden
Ask:
#line 1266 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill1 = __value; }
#line 1266 "TestScripts.cs"
Log.Add("got " + __frame.Run____spill1.ToString());
#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 "Ask":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1252 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1255 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1257 "TestScripts.cs"
waited++;
#line 1258 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1261 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class RememberScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run____spill1;
public int Ask__waited;
public int Remember__value;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Remember.value");
lister.Local("Run.__spill1");
}
}
[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 RememberScript()
{
}
protected RememberScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected RememberScript(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.Local("Ask.waited");
lister.Local("Remember.value");
lister.Local("Run.__spill1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1280 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Remember.value":
#line 1292 "TestScripts.cs"
writer.Local("Remember.value", this.Remember__value);
#line hidden
return;
case "Run.__spill1":
#line 1305 "TestScripts.cs"
writer.Local("Run.__spill1", this.Run____spill1);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Remember.value", out int loaded)) { this.Remember__value = loaded; } }
{ if (reader.TryLocal("Run.__spill1", out int loaded)) { this.Run____spill1 = 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 "Ask": goto Ask;
case "Remember": goto Remember;
}
#line hidden
Ask:
#line 1305 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill1 = __value; }
#line hidden
Remember:
#line 1305 "TestScripts.cs"
using (__frame.Enter("Remember")) { if (!Remember__Passage(__frame, __time, gates, __frame.ResumeKey == null ? (__frame.Run____spill1) : 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 "Ask":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
case "Remember":
__frame.SaveLocal("Run.__spill1", writer);
Remember__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1280 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1283 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1285 "TestScripts.cs"
waited++;
#line 1286 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1289 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Remember__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, int value__argument)
{
#line hidden
ref int value = ref __frame.Remember__value;
if (__frame.ResumeKey == null)
{
value = value__argument;
}
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line hidden
wait:
#line 1295 "TestScripts.cs"
while (!gates.Open.Contains("remember"))
#line hidden
{
#line 1297 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1300 "TestScripts.cs"
Log.Add("remembered " + value);
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Remember__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Remember.value", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class AndAskScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public bool Run____spill1;
public int Run____spill2;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Run.__spill1");
}
}
[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 AndAskScript()
{
}
protected AndAskScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected AndAskScript(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.Local("Ask.waited");
lister.Local("Run.__spill1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1319 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Run.__spill1":
#line 1333 "TestScripts.cs"
writer.Local("Run.__spill1", this.Run____spill1);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Run.__spill1", out bool loaded)) { this.Run____spill1 = 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 "Ask": goto Ask;
}
#line 1333 "TestScripts.cs"
__frame.Run____spill1 = gates.Open.Contains("flag");
#line hidden
{
#line 1333 "TestScripts.cs"
if (!(__frame.Run____spill1)) goto __cond1End;
#line hidden
}
#line hidden
Ask:
#line 1333 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill2 = __value; }
#line hidden
__cond1End:
#line 1333 "TestScripts.cs"
bool ok = __frame.Run____spill1 && __frame.Run____spill2 > 15;
#line 1334 "TestScripts.cs"
Log.Add("ok " + ok);
#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 "Ask":
__frame.SaveLocal("Run.__spill1", writer);
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1319 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1322 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1324 "TestScripts.cs"
waited++;
#line 1325 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1328 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class OrAskScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public bool Run____spill1;
public int Run____spill2;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Run.__spill1");
}
}
[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 OrAskScript()
{
}
protected OrAskScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected OrAskScript(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.Local("Ask.waited");
lister.Local("Run.__spill1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1348 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Run.__spill1":
#line 1362 "TestScripts.cs"
writer.Local("Run.__spill1", this.Run____spill1);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Run.__spill1", out bool loaded)) { this.Run____spill1 = 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 "Ask": goto Ask;
}
#line 1362 "TestScripts.cs"
__frame.Run____spill1 = gates.Open.Contains("flag");
#line hidden
{
#line 1362 "TestScripts.cs"
if (__frame.Run____spill1) goto __cond1End;
#line hidden
}
#line hidden
Ask:
#line 1362 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill2 = __value; }
#line hidden
__cond1End:
#line 1362 "TestScripts.cs"
bool ok = __frame.Run____spill1 || __frame.Run____spill2 > 15;
#line 1363 "TestScripts.cs"
Log.Add("ok " + ok);
#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 "Ask":
__frame.SaveLocal("Run.__spill1", writer);
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1348 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1351 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1353 "TestScripts.cs"
waited++;
#line 1354 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1357 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class CoalesceAskScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int? Run____spill1;
public int Run____spill2;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Run.__spill1");
}
}
[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 CoalesceAskScript()
{
}
protected CoalesceAskScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Cached", out int? loaded)) { this.Cached = loaded; } else if (!reader.HasField("Cached")) { throw new global::System.IO.InvalidDataException("CoalesceAskScript's save has no field 'Cached', which has no initializer to fall back on. Give it one."); } }
}
protected CoalesceAskScript(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("Cached");
lister.Local("Ask.waited");
lister.Local("Run.__spill1");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 1375 "TestScripts.cs"
writer.Field("Cached", this.Cached);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1379 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Run.__spill1":
#line 1393 "TestScripts.cs"
writer.Local("Run.__spill1", this.Run____spill1);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Run.__spill1", out int? loaded)) { this.Run____spill1 = 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 "Ask": goto Ask;
}
#line 1393 "TestScripts.cs"
__frame.Run____spill1 = Cached;
#line hidden
{
#line 1393 "TestScripts.cs"
if ((__frame.Run____spill1) != null) goto __cond1End;
#line hidden
}
#line hidden
Ask:
#line 1393 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill2 = __value; }
#line hidden
__cond1End:
#line 1393 "TestScripts.cs"
int value = __frame.Run____spill1 ?? __frame.Run____spill2;
#line 1394 "TestScripts.cs"
Log.Add("value " + value);
#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 "Ask":
__frame.SaveLocal("Run.__spill1", writer);
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1379 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1382 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1384 "TestScripts.cs"
waited++;
#line 1385 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1388 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class TernaryAskScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public bool Run____spill1;
public string Run____spill2;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__spill1");
}
}
[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 TernaryAskScript()
{
}
protected TernaryAskScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected TernaryAskScript(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.Local("Run.__spill1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__spill1":
#line 1419 "TestScripts.cs"
writer.Local("Run.__spill1", this.Run____spill1);
#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("Run.__spill1", out bool loaded)) { this.Run____spill1 = 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 "Describe": goto Describe;
}
#line 1419 "TestScripts.cs"
__frame.Run____spill1 = gates.Open.Contains("fast");
#line hidden
{
#line 1419 "TestScripts.cs"
if (!(__frame.Run____spill1)) goto __cond1Else;
#line hidden
goto __cond1End;
#line hidden
}
#line hidden
__cond1Else:
#line hidden
Describe:
#line 1419 "TestScripts.cs"
{ string __value; using (__frame.Enter("Describe")) { if (!Describe__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill2 = __value; }
#line hidden
__cond1End:
#line 1419 "TestScripts.cs"
string how = __frame.Run____spill1 ? "quick" : __frame.Run____spill2;
#line 1420 "TestScripts.cs"
Log.Add("how " + how);
#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 "Describe":
__frame.SaveLocal("Run.__spill1", writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Describe__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out string __result)
{
#line hidden
__result = default(string);
switch (__frame.ResumeKey)
{
case "describe": goto describe;
}
#line hidden
describe:
#line 1409 "TestScripts.cs"
while (!gates.Open.Contains("describe"))
#line hidden
{
#line 1411 "TestScripts.cs"
__frame.Mark("describe"); return false;
#line hidden
}
#line 1414 "TestScripts.cs"
{ __result = "slow"; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
}
}
namespace Ariadne.UnitTests
{
partial class MaybeRecordScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run____spill1;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
}
}
[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 MaybeRecordScript()
{
}
protected MaybeRecordScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Helper", out global::Ariadne.UnitTests.Recorder loaded)) { this.Helper = loaded; } else if (!reader.HasField("Helper")) { throw new global::System.IO.InvalidDataException("MaybeRecordScript's save has no field 'Helper', which has no initializer to fall back on. Give it one."); } }
}
protected MaybeRecordScript(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("Helper");
lister.Local("Ask.waited");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 1439 "TestScripts.cs"
writer.Field("Helper", this.Helper);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1443 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#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("Ask.waited", out int loaded)) { this.Ask__waited = 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 "Ask": goto Ask;
}
#line hidden
{
#line 1457 "TestScripts.cs"
if ((Helper) == null) goto __cond1End;
#line hidden
}
#line hidden
Ask:
#line 1457 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill1 = __value; }
#line hidden
__cond1End:
#line 1457 "TestScripts.cs"
Helper?.Record(__frame.Run____spill1);
#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 "Ask":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1443 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1446 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1448 "TestScripts.cs"
waited++;
#line 1449 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1452 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class OrderThroughBranchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run____spill1;
public bool Run____spill2;
public int Run____spill3;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Run.__spill1");
lister.Local("Run.__spill2");
}
}
[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 OrderThroughBranchScript()
{
}
protected OrderThroughBranchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Offset", out int loaded)) { this.Offset = loaded; } }
}
protected OrderThroughBranchScript(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("Offset");
lister.Local("Ask.waited");
lister.Local("Run.__spill1");
lister.Local("Run.__spill2");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 1469 "TestScripts.cs"
writer.Field("Offset", this.Offset);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1473 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Run.__spill1":
#line 1487 "TestScripts.cs"
writer.Local("Run.__spill1", this.Run____spill1);
#line hidden
return;
case "Run.__spill2":
#line 1487 "TestScripts.cs"
writer.Local("Run.__spill2", this.Run____spill2);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Run.__spill1", out int loaded)) { this.Run____spill1 = loaded; } }
{ if (reader.TryLocal("Run.__spill2", out bool loaded)) { this.Run____spill2 = 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 "Ask": goto Ask;
}
#line 1487 "TestScripts.cs"
__frame.Run____spill1 = Offset;
#line 1487 "TestScripts.cs"
__frame.Run____spill2 = gates.Open.Contains("flag");
#line hidden
{
#line 1487 "TestScripts.cs"
if (!(__frame.Run____spill2)) goto __cond1Else;
#line hidden
}
#line hidden
Ask:
#line 1487 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill3 = __value; }
#line hidden
{
#line hidden
goto __cond1End;
#line hidden
}
#line hidden
__cond1Else:
#line hidden
__cond1End:
#line 1487 "TestScripts.cs"
int total = __frame.Run____spill1 + (__frame.Run____spill2 ? __frame.Run____spill3 : 0);
#line 1488 "TestScripts.cs"
Log.Add("total " + total);
#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 "Ask":
__frame.SaveLocal("Run.__spill1", writer);
__frame.SaveLocal("Run.__spill2", writer);
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1473 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1476 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1478 "TestScripts.cs"
waited++;
#line 1479 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1482 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class IfAskScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run____spill1;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
}
}
[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 IfAskScript()
{
}
protected IfAskScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected IfAskScript(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.Local("Ask.waited");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1502 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#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("Ask.waited", out int loaded)) { this.Ask__waited = 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 "Ask": goto Ask;
}
#line hidden
Ask:
#line hidden
{
#line 1516 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill1 = __value; }
#line 1516 "TestScripts.cs"
if (!(__frame.Run____spill1 > 15)) goto __else1;
#line 1517 "TestScripts.cs"
{
Log.Add("big");
}
#line hidden
goto __end1;
#line hidden
}
#line hidden
__else1:
#line hidden
{
#line 1521 "TestScripts.cs"
{
Log.Add("small");
}
#line hidden
}
#line hidden
__end1:
#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 "Ask":
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1502 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1505 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1507 "TestScripts.cs"
waited++;
#line 1508 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1511 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class WhileAskScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__trips;
public int Run____spill1;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Run.trips");
}
}
[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 WhileAskScript()
{
}
protected WhileAskScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected WhileAskScript(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.Local("Ask.waited");
lister.Local("Run.trips");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1537 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Run.trips":
#line 1551 "TestScripts.cs"
writer.Local("Run.trips", this.Run__trips);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Run.trips", out int loaded)) { this.Run__trips = 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
ref int trips = ref __frame.Run__trips;
switch (__frame.ResumeKey)
{
case "Ask": goto Ask;
}
#line 1551 "TestScripts.cs"
trips = 0;
#line hidden
__loopStart1:
#line hidden
Ask:
#line hidden
{
#line 1552 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill1 = __value; }
#line 1552 "TestScripts.cs"
if (!(__frame.Run____spill1 < 25)) goto __loopEnd1;
#line 1553 "TestScripts.cs"
{
trips++;
gates.Open.Add("trip" + trips);
}
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 1558 "TestScripts.cs"
Log.Add("trips " + trips);
#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 "Ask":
__frame.SaveLocal("Run.trips", writer);
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1537 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1540 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1542 "TestScripts.cs"
waited++;
#line 1543 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1546 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class DoAskScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__trips;
public int Run____spill1;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Ask.waited");
lister.Local("Run.trips");
}
}
[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 DoAskScript()
{
}
protected DoAskScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected DoAskScript(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.Local("Ask.waited");
lister.Local("Run.trips");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Ask.waited":
#line 1572 "TestScripts.cs"
writer.Local("Ask.waited", this.Ask__waited);
#line hidden
return;
case "Run.trips":
#line 1586 "TestScripts.cs"
writer.Local("Run.trips", this.Run__trips);
#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("Ask.waited", out int loaded)) { this.Ask__waited = loaded; } }
{ if (reader.TryLocal("Run.trips", out int loaded)) { this.Run__trips = 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
ref int trips = ref __frame.Run__trips;
switch (__frame.ResumeKey)
{
case "Ask": goto Ask;
}
#line 1586 "TestScripts.cs"
trips = 0;
#line hidden
__loopStart1:
#line hidden
{
#line 1588 "TestScripts.cs"
{
trips++;
gates.Open.Add("trip" + trips);
}
#line hidden
}
#line hidden
__loopCont1:
#line hidden
Ask:
#line hidden
{
#line 1592 "TestScripts.cs"
{ int __value; using (__frame.Enter("Ask")) { if (!Ask__Passage(__frame, __time, gates, __result: out __value)) { return false; } } __frame.Run____spill1 = __value; }
#line 1592 "TestScripts.cs"
if (__frame.Run____spill1 < 25) goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line 1594 "TestScripts.cs"
Log.Add("trips " + trips);
#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 "Ask":
__frame.SaveLocal("Run.trips", writer);
Ask__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Ask__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, out int __result)
{
#line hidden
__result = default(int);
ref int waited = ref __frame.Ask__waited;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 1572 "TestScripts.cs"
waited = 0;
#line hidden
wait:
#line 1575 "TestScripts.cs"
while (!gates.Open.Contains("answer"))
#line hidden
{
#line 1577 "TestScripts.cs"
waited++;
#line 1578 "TestScripts.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 1581 "TestScripts.cs"
{ __result = gates.Open.Count * 10 + waited; __frame.Exit(); return true; }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Ask__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Ask.waited", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class ForInitAskScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__i;
public int Run____spill1;
public int Ask__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local