public void HandleProcess(ProcessStartedEventArgs eventArgs) { LogProcess(eventArgs); if (IsValidProcess(eventArgs)) { AddBoxToRepository(eventArgs); } }
public bool ValidateProcess(ProcessStartedEventArgs eventArgs) { // TODO: Consider making Notepad.exe a constant pulled from configuration. return(string.Equals(eventArgs.Name, "notepad", StringComparison.InvariantCultureIgnoreCase)); }
private void LogProcess(ProcessStartedEventArgs eventArgs) { Console.WriteLine(eventArgs.MainWindowHandle); }
private bool IsValidProcess(ProcessStartedEventArgs eventArgs) { return(processValidator.ValidateProcess(eventArgs)); }
private void AddBoxToRepository(ProcessStartedEventArgs eventArgs) { boxRepository.AddBoxToCache(eventArgs); }