aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/VirusTestCommands.cs
blob: f0fec9649780f0f832286e06c1917e95feb554e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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);
        }
        [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);
        }
    }
#endif
}