Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ScriptContinueLoopException.cs
2
4{
9 {
10 //private static readonly ChunkedList<ScriptContinueLoopException> reused = new ChunkedList<ScriptContinueLoopException>();
11
12 private readonly IElement loopValue;
13 private readonly bool hasLoopValue;
14
20 : base(string.Empty)
21 {
22 this.loopValue = LoopValue;
23 this.hasLoopValue = true;
24 }
25
30 : base(string.Empty)
31 {
32 this.loopValue = null;
33 this.hasLoopValue = false;
34 }
35
39 public IElement LoopValue => this.loopValue;
40
44 public bool HasLoopValue => this.hasLoopValue;
45
49 //public override string StackTrace => string.Empty;
50 //
55 //public static bool TryThrowReused()
56 //{
57 // lock (reused)
58 // {
59 // if (reused.First is null)
60 // return false;
61 //
62 // ScriptContinueLoopException ex = reused.First.Value;
63 // reused.RemoveFirst();
64 //
65 // ex.loopValue = null;
66 // ex.hasLoopValue = false;
67 //
68 // ExceptionDispatchInfo.Capture(ex).Throw();
69 // return true;
70 // }
71 //}
72 //
78 //public static bool TryThrowReused(IElement LoopValue)
79 //{
80 // lock (reused)
81 // {
82 // if (reused.First is null)
83 // return false;
84 //
85 // ScriptContinueLoopException ex = reused.First.Value;
86 // reused.RemoveFirst();
87 //
88 // ex.loopValue = LoopValue;
89 // ex.hasLoopValue = true;
90 //
91 // ExceptionDispatchInfo.Capture(ex).Throw();
92 // return true;
93 // }
94 //}
95 //
100 //public static void Reuse(ScriptContinueLoopException ex)
101 //{
102 // lock (reused)
103 // {
104 // reused.AddFirst(ex);
105 // }
106 //}
107 }
108}
bool HasLoopValue
If LoopValue contains a value that should be included in the loop's result.
ScriptContinueLoopException()
Exception used to continue a loop.
ScriptContinueLoopException(IElement LoopValue)
Exception used to continue a loop.
IElement LoopValue
Value to include in the loop's result.
Base class for script exceptions.
Basic interface for all types of elements.
Definition: IElement.cs:21