protected override void OnMessage(MessageEventArgs e) { CleanOptions options = JsonConvert.DeserializeObject <CleanOptions>(e.Data); if (options.Opcode == CleanerOpcode.StartCleaner) { if (_cleaner == null || _cleaner.Finished) { _cleaner = new Cleaner(options); _cleaner.StartAsync(); } } }
public Cleaner(CleanOptions options) { _options = options; }