SHOW.cs 1002 B

123456789101112131415161718192021222324252627282930313233343536
  1. namespace OpenVIII.Fields.Scripts.Instructions
  2. {
  3. internal sealed class SHOW : JsmInstruction
  4. {
  5. #region Constructors
  6. public SHOW()
  7. {
  8. }
  9. public SHOW(int parameter, IStack<IJsmExpression> stack)
  10. : this()
  11. {
  12. }
  13. #endregion Constructors
  14. #region Methods
  15. public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) => sw.Format(formatterContext, services)
  16. .Property(nameof(FieldObject.Model))
  17. .Method(nameof(FieldObjectModel.Show))
  18. .Comment(nameof(SHOW));
  19. public override IAwaitable TestExecute(IServices services)
  20. {
  21. var currentObject = ServiceId.Field[services].Engine.CurrentObject;
  22. currentObject.Model.Show();
  23. return DummyAwaitable.Instance;
  24. }
  25. public override string ToString() => $"{nameof(SHOW)}()";
  26. #endregion Methods
  27. }
  28. }