This repository has been archived on 2025-01-01. You can view files and clone it, but cannot push or open issues or pull requests.
ShiftOS_TheReturn/ShiftOS.WinForms/VirusTestCommands.cs

33 lines
978 B
C#
Raw Normal View History

2017-06-28 16:33:07 -04:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ShiftOS.Engine;
namespace ShiftOS.WinForms
{
#if DEBUG
public static class VirusTestCommands
{
[Command("infect", description = "DEBUG: Infect the system with a virus.")]
[RequiresArgument("id")]
[RequiresArgument("threatlevel")]
public static void Infect(Dictionary<string, object> args)
{
var id = args["id"].ToString();
var threatlevel = Convert.ToInt32(args["threatlevel"].ToString());
VirusManager.Infect(id, threatlevel);
}
2017-06-29 09:14:39 -04:00
[Command("disinfect", description = "DEBUG: Disinfect the system, removing the specified virus.")]
[RequiresArgument("id")]
public static void Disinfect(Dictionary<string, object> args)
{
var id = args["id"].ToString();
VirusManager.Disinfect(id);
}
2017-06-28 16:33:07 -04:00
}
#endif
}