//
// 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
namespace Ariadne.UnitTests
{
partial class Greeter
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public string Greet__word;
public object Greet__active;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Greet.word");
}
}
[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);
}
protected Greeter()
{
}
protected Greeter(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Log", out string loaded)) { this.Log = loaded; } }
}
protected Greeter(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Log");
lister.Local("Greet.word");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 9 "VirtualPassages.cs"
writer.Field("Log", this.Log);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Greet.word":
#line 13 "VirtualPassages.cs"
writer.Local("Greet.word", this.Greet__word);
#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("Greet.word", out string loaded)) { this.Greet__word = 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 "Greet": goto Greet;
}
#line hidden
Greet:
#line 26 "VirtualPassages.cs"
using (__frame.Enter("Greet")) { if (!Greet__Passage(__frame, __time, gates)) { return false; } }
#line 27 "VirtualPassages.cs"
Log += "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 "Greet":
Greet__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected virtual bool Greet__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
if (__frame.ResumeKey == null && object.ReferenceEquals(__frame.Greet__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Greet started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__frame.Greet__active = __frame.Cursor;
ref string word = ref __frame.Greet__word;
switch (__frame.ResumeKey)
{
case "hello": goto hello;
}
#line 13 "VirtualPassages.cs"
word = "hello";
#line hidden
hello:
#line 16 "VirtualPassages.cs"
while (!gates.Open.Contains("hello"))
#line hidden
{
#line 18 "VirtualPassages.cs"
__frame.Mark("hello"); return false;
#line hidden
}
#line 21 "VirtualPassages.cs"
Log += word + ";";
#line hidden
__frame.Greet__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected virtual void Greet__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "hello":
__frame.SaveLocal("Greet.word", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class PlainGreeter
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Greeter.__Frame
{
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Greeter.__Frame.ListParts(lister);
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public PlainGreeter()
{
}
protected PlainGreeter(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected PlainGreeter(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)
{
}
}
}
namespace Ariadne.UnitTests
{
partial class LoudGreeter
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Greeter.__Frame
{
public int Greet__volume;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Greeter.__Frame.ListParts(lister);
lister.Local("LoudGreeter.Greet.volume");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public LoudGreeter()
{
}
protected LoudGreeter(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LoudGreeter(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("LoudGreeter.Greet.volume");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "LoudGreeter.Greet.volume":
#line 45 "VirtualPassages.cs"
writer.Local("LoudGreeter.Greet.volume", this.Greet__volume);
#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("LoudGreeter.Greet.volume", out int loaded)) { this.Greet__volume = loaded; } }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool Greet__Passage(global::Ariadne.UnitTests.Greeter.__Frame __rootFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
var __frame = (__Frame)__rootFrame;
if (__frame.ResumeKey == null && object.ReferenceEquals(__rootFrame.Greet__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Greet started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__rootFrame.Greet__active = __frame.Cursor;
ref int volume = ref __frame.Greet__volume;
switch (__frame.ResumeKey)
{
case "shout": goto shout;
}
#line 45 "VirtualPassages.cs"
volume = 3;
#line hidden
shout:
#line 48 "VirtualPassages.cs"
while (!gates.Open.Contains("shout"))
#line hidden
{
#line 50 "VirtualPassages.cs"
__frame.Mark("shout"); return false;
#line hidden
}
#line 53 "VirtualPassages.cs"
Log += "LOUD" + volume + ";";
#line hidden
__rootFrame.Greet__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void Greet__LocalsToSave(global::Ariadne.UnitTests.Greeter.__Frame __rootFrame, int depth, global::Ariadne.IArcWriter writer)
{
var __frame = (__Frame)__rootFrame;
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "shout":
__frame.SaveLocal("LoudGreeter.Greet.volume", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class LoudestGreeter
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.LoudGreeter.__Frame
{
public string Greet__volume;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.LoudGreeter.__Frame.ListParts(lister);
lister.Local("LoudestGreeter.Greet.volume");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public LoudestGreeter()
{
}
protected LoudestGreeter(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LoudestGreeter(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("LoudestGreeter.Greet.volume");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "LoudestGreeter.Greet.volume":
#line 64 "VirtualPassages.cs"
writer.Local("LoudestGreeter.Greet.volume", this.Greet__volume);
#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("LoudestGreeter.Greet.volume", out string loaded)) { this.Greet__volume = loaded; } }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool Greet__Passage(global::Ariadne.UnitTests.Greeter.__Frame __rootFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
var __frame = (__Frame)__rootFrame;
if (__frame.ResumeKey == null && object.ReferenceEquals(__rootFrame.Greet__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Greet started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__rootFrame.Greet__active = __frame.Cursor;
ref string volume = ref __frame.Greet__volume;
switch (__frame.ResumeKey)
{
case "bellow": goto bellow;
}
#line 64 "VirtualPassages.cs"
volume = "max";
#line hidden
bellow:
#line 67 "VirtualPassages.cs"
while (!gates.Open.Contains("bellow"))
#line hidden
{
#line 69 "VirtualPassages.cs"
__frame.Mark("bellow"); return false;
#line hidden
}
#line 72 "VirtualPassages.cs"
Log += "LOUDEST " + volume + ";";
#line hidden
__rootFrame.Greet__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void Greet__LocalsToSave(global::Ariadne.UnitTests.Greeter.__Frame __rootFrame, int depth, global::Ariadne.IArcWriter writer)
{
var __frame = (__Frame)__rootFrame;
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "bellow":
__frame.SaveLocal("LoudestGreeter.Greet.volume", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class Escalator
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Greeter.__Frame
{
public int Greet__word;
public global::Ariadne.UnitTests.Greeter.__Frame Greet____call_Greet_frame;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Greeter.__Frame.ListParts(lister);
lister.Local("Escalator.Greet.word");
{
global::Ariadne.IArcPartLister scope = lister.Scope("Greet.Greet/", typeof(global::Ariadne.UnitTests.Greeter.__Frame));
if (scope != null)
{
global::Ariadne.UnitTests.Greeter.__Frame.ListParts(scope);
}
}
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public Escalator()
{
}
protected Escalator(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected Escalator(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("Escalator.Greet.word");
{
global::Ariadne.IArcPartLister scope = lister.Scope("Greet.Greet/", typeof(global::Ariadne.UnitTests.Greeter.__Frame));
if (scope != null)
{
global::Ariadne.UnitTests.Greeter.__Frame.ListParts(scope);
}
}
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Escalator.Greet.word":
#line 84 "VirtualPassages.cs"
writer.Local("Escalator.Greet.word", this.Greet__word);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.LoadLocals(reader);
{ if (reader.TryLocal("Escalator.Greet.word", out int loaded)) { this.Greet__word = loaded; } }
{
if (reader.TryScope("Greet.Greet/", out global::Ariadne.IArcReader scope))
{
this.Greet____call_Greet_frame = new global::Ariadne.UnitTests.Greeter.__Frame();
this.Greet____call_Greet_frame.LoadLocals(scope);
}
}
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.AttachWaits(slot);
if (this.Greet____call_Greet_frame != null) { this.Greet____call_Greet_frame.AttachWaits(slot); }
}
public override void EndWaits()
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.EndWaits();
if (this.Greet____call_Greet_frame != null) { this.Greet____call_Greet_frame.EndWaits(); }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool Greet__Passage(global::Ariadne.UnitTests.Greeter.__Frame __rootFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
var __frame = (__Frame)__rootFrame;
if (__frame.ResumeKey == null && object.ReferenceEquals(__rootFrame.Greet__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Greet started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__rootFrame.Greet__active = __frame.Cursor;
ref int word = ref __frame.Greet__word;
switch (__frame.ResumeKey)
{
case "before": goto before;
case "Greet": goto Greet;
}
#line 84 "VirtualPassages.cs"
word = 5;
#line hidden
before:
#line 87 "VirtualPassages.cs"
while (!gates.Open.Contains("before"))
#line hidden
{
#line 89 "VirtualPassages.cs"
__frame.Mark("before"); return false;
#line hidden
}
#line hidden
Greet:
#line 92 "VirtualPassages.cs"
using (__frame.Enter("Greet")) { if (__frame.Greet____call_Greet_frame == null) { __frame.Greet____call_Greet_frame = new global::Ariadne.UnitTests.Greeter.__Frame(); } if (!base.Greet__Passage(__frame.Lend(__frame.Greet____call_Greet_frame), __time, gates)) { return false; } }
#line 93 "VirtualPassages.cs"
Log += "after " + word + ";";
#line hidden
__rootFrame.Greet__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void Greet__LocalsToSave(global::Ariadne.UnitTests.Greeter.__Frame __rootFrame, int depth, global::Ariadne.IArcWriter writer)
{
var __frame = (__Frame)__rootFrame;
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "before":
__frame.SaveLocal("Escalator.Greet.word", writer);
break;
case "Greet":
__frame.SaveLocal("Escalator.Greet.word", writer);
{ global::Ariadne.IArcWriter scope = writer.Scope("Greet.Greet/"); base.Greet__LocalsToSave(__frame.Lend(__frame.Greet____call_Greet_frame), depth + 1, scope); }
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class SilentGreeter
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Greeter.__Frame
{
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Greeter.__Frame.ListParts(lister);
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public SilentGreeter()
{
}
protected SilentGreeter(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected SilentGreeter(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 override bool Greet__Passage(global::Ariadne.UnitTests.Greeter.__Frame __rootFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
var __frame = (__Frame)__rootFrame;
if (__frame.ResumeKey == null && object.ReferenceEquals(__rootFrame.Greet__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Greet started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__rootFrame.Greet__active = __frame.Cursor;
switch (__frame.ResumeKey)
{
}
#line 104 "VirtualPassages.cs"
Log += "silence;";
#line hidden
__rootFrame.Greet__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void Greet__LocalsToSave(global::Ariadne.UnitTests.Greeter.__Frame __rootFrame, int depth, global::Ariadne.IArcWriter writer)
{
var __frame = (__Frame)__rootFrame;
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
}
}
}
}
namespace Ariadne.UnitTests
{
partial class Appraiser
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__first;
public object Cost__active;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
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);
}
protected Appraiser()
{
}
protected Appraiser(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("Appraiser's save has no field 'Total', which has no initializer to fall back on. Give it one."); } }
}
protected Appraiser(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("Run.first");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 113 "VirtualPassages.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 "Run.first":
#line 123 "VirtualPassages.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("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 "one": goto one;
case "two": goto two;
}
#line hidden
one:
#line 123 "VirtualPassages.cs"
{ int __value; using (__frame.Enter("one")) { if (!Cost__Passage(__frame, __time, gates, __frame.ResumeKey == null ? (2) : default(int), __result: out __value)) { return false; } } first = __value; }
#line hidden
two:
#line 126 "VirtualPassages.cs"
int second; { int __value; using (__frame.Enter("two")) { if (!Cost__Passage(__frame, __time, gates, __frame.ResumeKey == null ? (3) : default(int), __result: out __value)) { return false; } } second = __value; }
#line 127 "VirtualPassages.cs"
Total = first * 100 + second;
#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":
Cost__LocalsToSave(__frame, depth + 1, writer);
break;
case "two":
__frame.SaveLocal("Run.first", writer);
Cost__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected virtual bool Cost__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, int quantity, out int __result)
{
#line hidden
if (__frame.ResumeKey == null && object.ReferenceEquals(__frame.Cost__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Cost started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__frame.Cost__active = __frame.Cursor;
__result = default(int);
switch (__frame.ResumeKey)
{
}
#line 117 "VirtualPassages.cs"
{ __result = quantity; __frame.Cost__active = null; __frame.Exit(); return true; }
#line hidden
__frame.Cost__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected virtual void Cost__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
}
}
}
}
namespace Ariadne.UnitTests
{
partial class PlainAppraiser
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Appraiser.__Frame
{
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Appraiser.__Frame.ListParts(lister);
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public PlainAppraiser()
{
}
protected PlainAppraiser(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected PlainAppraiser(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)
{
}
}
}
namespace Ariadne.UnitTests
{
partial class Haggler
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Appraiser.__Frame
{
public int Cost__quantity;
public int Cost__price;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Appraiser.__Frame.ListParts(lister);
lister.Local("Haggler.Cost.price");
lister.Local("Haggler.Cost.quantity");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public Haggler()
{
}
protected Haggler(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected Haggler(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("Haggler.Cost.price");
lister.Local("Haggler.Cost.quantity");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Haggler.Cost.price":
#line 145 "VirtualPassages.cs"
writer.Local("Haggler.Cost.price", this.Cost__price);
#line hidden
return;
case "Haggler.Cost.quantity":
#line 143 "VirtualPassages.cs"
writer.Local("Haggler.Cost.quantity", this.Cost__quantity);
#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("Haggler.Cost.price", out int loaded)) { this.Cost__price = loaded; } }
{ if (reader.TryLocal("Haggler.Cost.quantity", out int loaded)) { this.Cost__quantity = loaded; } }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool Cost__Passage(global::Ariadne.UnitTests.Appraiser.__Frame __rootFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, int quantity__argument, out int __result)
{
#line hidden
var __frame = (__Frame)__rootFrame;
if (__frame.ResumeKey == null && object.ReferenceEquals(__rootFrame.Cost__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Cost started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__rootFrame.Cost__active = __frame.Cursor;
__result = default(int);
ref int quantity = ref __frame.Cost__quantity;
if (__frame.ResumeKey == null)
{
quantity = quantity__argument;
}
ref int price = ref __frame.Cost__price;
switch (__frame.ResumeKey)
{
case "haggle": goto haggle;
}
#line 145 "VirtualPassages.cs"
price = 10;
#line hidden
haggle:
#line 148 "VirtualPassages.cs"
while (!gates.Open.Contains("haggle" + quantity))
#line hidden
{
#line 150 "VirtualPassages.cs"
__frame.Mark("haggle"); return false;
#line hidden
}
#line 153 "VirtualPassages.cs"
{ __result = price * quantity; __rootFrame.Cost__active = null; __frame.Exit(); return true; }
#line hidden
__rootFrame.Cost__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void Cost__LocalsToSave(global::Ariadne.UnitTests.Appraiser.__Frame __rootFrame, int depth, global::Ariadne.IArcWriter writer)
{
var __frame = (__Frame)__rootFrame;
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "haggle":
__frame.SaveLocal("Haggler.Cost.quantity", writer);
__frame.SaveLocal("Haggler.Cost.price", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class Merchant
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public object Barter__active;
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);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
protected Merchant()
{
}
protected Merchant(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Log", out string loaded)) { this.Log = loaded; } }
}
protected Merchant(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Log");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 162 "VirtualPassages.cs"
writer.Field("Log", this.Log);
#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 "Barter": goto Barter;
}
#line hidden
Barter:
#line 168 "VirtualPassages.cs"
using (__frame.Enter("Barter")) { if (!Barter__Passage(__frame, __time, gates, __frame.ResumeKey == null ? (7) : default(int))) { return false; } }
#line 169 "VirtualPassages.cs"
Log += "closed;";
#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 "Barter":
Barter__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected abstract bool Barter__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, int offer);
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected abstract void Barter__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer);
}
}
namespace Ariadne.UnitTests
{
partial class Stubborn
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Merchant.__Frame
{
public int Barter__asked;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Merchant.__Frame.ListParts(lister);
lister.Local("Stubborn.Barter.asked");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public Stubborn()
{
}
protected Stubborn(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected Stubborn(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("Stubborn.Barter.asked");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Stubborn.Barter.asked":
#line 180 "VirtualPassages.cs"
writer.Local("Stubborn.Barter.asked", this.Barter__asked);
#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("Stubborn.Barter.asked", out int loaded)) { this.Barter__asked = loaded; } }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool Barter__Passage(global::Ariadne.UnitTests.Merchant.__Frame __rootFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, int offer)
{
#line hidden
var __frame = (__Frame)__rootFrame;
if (__frame.ResumeKey == null && object.ReferenceEquals(__rootFrame.Barter__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Barter started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__rootFrame.Barter__active = __frame.Cursor;
ref int asked = ref __frame.Barter__asked;
switch (__frame.ResumeKey)
{
case "deal": goto deal;
}
#line 180 "VirtualPassages.cs"
asked = offer * 2;
#line hidden
deal:
#line 183 "VirtualPassages.cs"
while (!gates.Open.Contains("deal"))
#line hidden
{
#line 185 "VirtualPassages.cs"
__frame.Mark("deal"); return false;
#line hidden
}
#line 188 "VirtualPassages.cs"
Log += "asked " + asked + ";";
#line hidden
__rootFrame.Barter__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void Barter__LocalsToSave(global::Ariadne.UnitTests.Merchant.__Frame __rootFrame, int depth, global::Ariadne.IArcWriter writer)
{
var __frame = (__Frame)__rootFrame;
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "deal":
__frame.SaveLocal("Stubborn.Barter.asked", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class Surveyor
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.UnitTests.Surveyor.Descend__Frame Run____call_start_frame;
public object Inspect__active;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
{
global::Ariadne.IArcPartLister scope = lister.Scope("Run.start/", typeof(global::Ariadne.UnitTests.Surveyor.Descend__Frame));
if (scope != null)
{
global::Ariadne.UnitTests.Surveyor.Descend__Frame.ListParts(scope);
}
}
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class Descend__Frame : global::Ariadne.Frame
{
public int Descend__depth;
public global::Ariadne.UnitTests.Surveyor.Descend__Frame Descend____call_deeper_frame;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Descend.depth");
{
global::Ariadne.IArcPartLister scope = lister.Scope("Descend.deeper/", typeof(global::Ariadne.UnitTests.Surveyor.Descend__Frame));
if (scope != null)
{
global::Ariadne.UnitTests.Surveyor.Descend__Frame.ListParts(scope);
}
}
}
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.ArcTests.Gates context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
protected Surveyor()
{
}
protected Surveyor(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Log", out string loaded)) { this.Log = loaded; } }
}
protected Surveyor(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Log");
{
global::Ariadne.IArcPartLister scope = lister.Scope("Run.start/", typeof(global::Ariadne.UnitTests.Surveyor.Descend__Frame));
if (scope != null)
{
global::Ariadne.UnitTests.Surveyor.Descend__Frame.ListParts(scope);
}
}
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 197 "VirtualPassages.cs"
writer.Field("Log", this.Log);
#line default
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.LoadLocals(reader);
{
if (reader.TryScope("Run.start/", out global::Ariadne.IArcReader scope))
{
this.Run____call_start_frame = new global::Ariadne.UnitTests.Surveyor.Descend__Frame();
this.Run____call_start_frame.LoadLocals(scope);
}
}
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.AttachWaits(slot);
if (this.Run____call_start_frame != null) { this.Run____call_start_frame.AttachWaits(slot); }
}
public override void EndWaits()
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.EndWaits();
if (this.Run____call_start_frame != null) { this.Run____call_start_frame.EndWaits(); }
}
}
#pragma warning restore
public partial class Descend__Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Descend.depth":
#line 201 "VirtualPassages.cs"
writer.Local("Descend.depth", this.Descend__depth);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class Descend__Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.LoadLocals(reader);
{ if (reader.TryLocal("Descend.depth", out int loaded)) { this.Descend__depth = loaded; } }
{
if (reader.TryScope("Descend.deeper/", out global::Ariadne.IArcReader scope))
{
this.Descend____call_deeper_frame = new global::Ariadne.UnitTests.Surveyor.Descend__Frame();
this.Descend____call_deeper_frame.LoadLocals(scope);
}
}
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.AttachWaits(slot);
if (this.Descend____call_deeper_frame != null) { this.Descend____call_deeper_frame.AttachWaits(slot); }
}
public override void EndWaits()
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.EndWaits();
if (this.Descend____call_deeper_frame != null) { this.Descend____call_deeper_frame.EndWaits(); }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
switch (__frame.ResumeKey)
{
case "start": goto start;
}
#line hidden
start:
#line 216 "VirtualPassages.cs"
using (__frame.Enter("start")) { if (__frame.Run____call_start_frame == null) { __frame.Run____call_start_frame = new global::Ariadne.UnitTests.Surveyor.Descend__Frame(); } if (!Descend__Passage(__frame.Lend(__frame.Run____call_start_frame), __frame, __time, gates, __frame.ResumeKey == null ? (0) : 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 "start":
{ global::Ariadne.IArcWriter scope = writer.Scope("Run.start/"); Descend__LocalsToSave(__frame.Lend(__frame.Run____call_start_frame), __frame, depth + 1, scope, writer); }
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected abstract bool Inspect__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates, int depth);
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected abstract void Inspect__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer);
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Descend__Passage(Descend__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, int depth__argument)
{
#line hidden
ref int depth = ref __frame.Descend__depth;
if (__frame.ResumeKey == null)
{
depth = depth__argument;
}
switch (__frame.ResumeKey)
{
case "inspect": goto inspect;
case "deeper": goto deeper;
}
#line hidden
inspect:
#line 204 "VirtualPassages.cs"
using (__frame.Enter("inspect")) { int __depth = __arcFrame.Depth; bool __done = Inspect__Passage(__frame.Lend(__arcFrame), __time, gates, __frame.ResumeKey == null ? (depth) : default(int)); __arcFrame.Depth = __depth; if (!__done) { return false; } }
#line hidden
{
#line 206 "VirtualPassages.cs"
if (!(depth < 2)) goto __end1;
#line hidden
}
#line hidden
deeper:
#line hidden
{
#line 209 "VirtualPassages.cs"
using (__frame.Enter("deeper")) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); if (__frame.Descend____call_deeper_frame == null) { __frame.Descend____call_deeper_frame = new global::Ariadne.UnitTests.Surveyor.Descend__Frame(); } if (!Descend__Passage(__frame.Lend(__frame.Descend____call_deeper_frame), __arcFrame, __time, gates, __frame.ResumeKey == null ? (depth + 1) : default(int))) { return false; } }
#line hidden
}
#line hidden
__end1:
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Descend__LocalsToSave(Descend__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "inspect":
__frame.SaveLocal("Descend.depth", writer);
Inspect__LocalsToSave(__arcFrame, depth + 1, arcWriter);
break;
case "deeper":
__frame.SaveLocal("Descend.depth", writer);
{ global::Ariadne.IArcWriter scope = writer.Scope("Descend.deeper/"); Descend__LocalsToSave(__frame.Lend(__frame.Descend____call_deeper_frame), __arcFrame, depth + 1, scope, arcWriter); }
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class PausingSurveyor
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Surveyor.__Frame
{
public int Inspect__depth;
public int Inspect__seen;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Surveyor.__Frame.ListParts(lister);
lister.Local("PausingSurveyor.Inspect.depth");
lister.Local("PausingSurveyor.Inspect.seen");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public PausingSurveyor()
{
}
protected PausingSurveyor(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected PausingSurveyor(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("PausingSurveyor.Inspect.depth");
lister.Local("PausingSurveyor.Inspect.seen");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "PausingSurveyor.Inspect.depth":
#line 225 "VirtualPassages.cs"
writer.Local("PausingSurveyor.Inspect.depth", this.Inspect__depth);
#line hidden
return;
case "PausingSurveyor.Inspect.seen":
#line 227 "VirtualPassages.cs"
writer.Local("PausingSurveyor.Inspect.seen", this.Inspect__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("PausingSurveyor.Inspect.depth", out int loaded)) { this.Inspect__depth = loaded; } }
{ if (reader.TryLocal("PausingSurveyor.Inspect.seen", out int loaded)) { this.Inspect__seen = loaded; } }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool Inspect__Passage(global::Ariadne.UnitTests.Surveyor.__Frame __rootFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates, int depth__argument)
{
#line hidden
var __frame = (__Frame)__rootFrame;
if (__frame.ResumeKey == null && object.ReferenceEquals(__rootFrame.Inspect__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Inspect started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__rootFrame.Inspect__active = __frame.Cursor;
ref int depth = ref __frame.Inspect__depth;
if (__frame.ResumeKey == null)
{
depth = depth__argument;
}
ref int seen = ref __frame.Inspect__seen;
switch (__frame.ResumeKey)
{
case "look": goto look;
}
#line 227 "VirtualPassages.cs"
seen = depth * 10;
#line hidden
look:
#line 230 "VirtualPassages.cs"
while (!gates.Open.Contains("look" + depth))
#line hidden
{
#line 232 "VirtualPassages.cs"
__frame.Mark("look"); return false;
#line hidden
}
#line 235 "VirtualPassages.cs"
Log += seen + ";";
#line hidden
__rootFrame.Inspect__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void Inspect__LocalsToSave(global::Ariadne.UnitTests.Surveyor.__Frame __rootFrame, int depth, global::Ariadne.IArcWriter writer)
{
var __frame = (__Frame)__rootFrame;
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "look":
__frame.SaveLocal("PausingSurveyor.Inspect.depth", writer);
__frame.SaveLocal("PausingSurveyor.Inspect.seen", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class Walker
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public object Next__active;
public object Visit__active;
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);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
protected Walker()
{
}
protected Walker(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Log", out string loaded)) { this.Log = loaded; } }
}
protected Walker(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Log");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 244 "VirtualPassages.cs"
writer.Field("Log", this.Log);
#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 "Visit": goto Visit;
}
#line hidden
Visit:
#line 258 "VirtualPassages.cs"
using (__frame.Enter("Visit")) { if (!Visit__Passage(__frame, __time, gates)) { 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 "Visit":
Visit__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected virtual bool Next__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
if (__frame.ResumeKey == null && object.ReferenceEquals(__frame.Next__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Next started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__frame.Next__active = __frame.Cursor;
switch (__frame.ResumeKey)
{
}
#line hidden
__frame.Next__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected virtual void Next__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected virtual bool Visit__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
if (__frame.ResumeKey == null && object.ReferenceEquals(__frame.Visit__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Visit started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__frame.Visit__active = __frame.Cursor;
switch (__frame.ResumeKey)
{
case "Next": goto Next;
}
#line 252 "VirtualPassages.cs"
Log += "visit;";
#line hidden
Next:
#line 253 "VirtualPassages.cs"
using (__frame.Enter("Next")) { if (!Next__Passage(__frame, __time, gates)) { return false; } }
#line hidden
__frame.Visit__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected virtual void Visit__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "Next":
Next__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class PlainWalker
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Walker.__Frame
{
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Walker.__Frame.ListParts(lister);
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public PlainWalker()
{
}
protected PlainWalker(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected PlainWalker(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)
{
}
}
}
namespace Ariadne.UnitTests
{
partial class LoopingWalker
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.UnitTests.Walker.__Frame
{
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
global::Ariadne.UnitTests.Walker.__Frame.ListParts(lister);
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
public LoopingWalker()
{
}
protected LoopingWalker(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LoopingWalker(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 override bool Next__Passage(global::Ariadne.UnitTests.Walker.__Frame __rootFrame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
var __frame = (__Frame)__rootFrame;
if (__frame.ResumeKey == null && object.ReferenceEquals(__rootFrame.Next__active, __frame.Cursor))
{
throw new global::System.InvalidOperationException("The virtual passage Next started again before it finished. A virtual passage can't be called from itself, even through an override.");
}
__rootFrame.Next__active = __frame.Cursor;
switch (__frame.ResumeKey)
{
case "Visit": goto Visit;
}
#line hidden
Visit:
#line 276 "VirtualPassages.cs"
using (__frame.Enter("Visit")) { if (!Visit__Passage(__frame, __time, gates)) { return false; } }
#line hidden
__rootFrame.Next__active = null; __frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void Next__LocalsToSave(global::Ariadne.UnitTests.Walker.__Frame __rootFrame, int depth, global::Ariadne.IArcWriter writer)
{
var __frame = (__Frame)__rootFrame;
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "Visit":
Visit__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
}
}