/* * Process Hacker - * ProcessHacker Restart and Recovery Extensions * * Copyright (C) 2009 dmex * * This file is part of Process Hacker. * * Process Hacker is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Process Hacker is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Process Hacker. If not, see . * */ using System; namespace ProcessHackerRestartRecovery { /// /// Specifies the options for an application to be automatically restarted by Windows Error Reporting. /// /// Regardless of these settings, the application will not be restarted if it executed for /// less than 60 seconds beforeterminating. public class RestartSettings { private string command; private RestartRestrictions restrictions; /// /// Creates a new instance of the RestartSettings class. /// /// The command line arguments used to restart the application. /// A bitwise combination of the RestartRestrictions /// values that specify when the application should not be restarted. /// public RestartSettings(string commandLine, RestartRestrictions restrict) { command = commandLine; restrictions = restrict; } /// /// Gets the command line arguments used to restart the application. /// /// A String object. public string Command { get { return command; } } /// /// Gets the set of conditions when the application should not be restarted. /// /// A set of RestartRestrictions values. public RestartRestrictions Restrictions { get { return restrictions; } } /// /// Returns a string representation of the current state of this object. /// /// A String that displays the command line arguments and restrictions for restarting the application. public override string ToString() { return String.Format("Command: {0} Restrictions: {1}", command, restrictions.ToString()); } } }