protected void WriteXml(XmlWriter writer) { writer.WriteStartElement("PreLoop"); writer.WriteValue(PreLoop.ToString()); writer.WriteEndElement(); writer.WriteStartElement("PostLoop"); writer.WriteValue(PostLoop.ToString()); writer.WriteEndElement(); writer.WriteStartElement("CurveKeys"); writer.WriteStartAttribute("Count"); writer.WriteValue(Count); writer.WriteEndAttribute(); foreach (TCurveKey curveKey in this) { Type type = curveKey.GetType(); writer.WriteStartElement("CurveKey"); writer.WriteStartAttribute("Type"); writer.WriteValue(type.AssemblyQualifiedName); writer.WriteEndAttribute(); XmlSerializer serializer = new XmlSerializer(type); serializer.Serialize(writer, curveKey); writer.WriteEndElement(); } writer.WriteEndElement(); }
private void ThreadLoop() { PreLoop(); while (Loop(_actionsQueue)) { } PostLoop?.Invoke(); }
public override void Emit(ILRunner pRunner) { Declaration.Emit(pRunner); Label start = pRunner.Emitter.DefineLabel(); pRunner.Emitter.MarkLabel(start); Condition.Emit(pRunner); Label end = pRunner.Emitter.DefineLabel(); pRunner.Emitter.Emit(OpCodes.Brfalse, end); Body.Emit(pRunner); PostLoop.Emit(pRunner); pRunner.Emitter.Emit(OpCodes.Br, start); pRunner.Emitter.MarkLabel(end); }