Command line options class for parsing user options for DiningPhilosophers.
Inheritance Hierarchy
LaurelBridge.DCF.Examples.DiningPhilosophersOptions
Namespace: LaurelBridge.DCF.Examples.DiningPhilosophers
Assembly: DiningPhilosophers (in DiningPhilosophers.exe) Version: DCF34 r11538 DCF_3_4_24_20190319
Syntax
C#
public class Options
The Options type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Options | Initializes a new instance of the Options class |
Properties
Name | Description | |
---|---|---|
AmountToEat |
The amount of food a given philosopher will eat at a given time. Default is 5.
| |
LogDirectory |
The directory where output from the script will be written. Defaults to the user ApplicationData folder.
| |
MaxSleep |
The maximum possible amount of time a philosopher will sleep at a given time. Default is 3000.
| |
PhilosophersCount |
The total number of philosophers. Default is 5.
| |
TotalFood |
The total amount of food to consume. Default is 35.
|
Methods
Name | Description | |
---|---|---|
TryParse |
Try to create an instance of the Options class using the specified commandLine parameter.
For an invalid command line, a failure message is written to the console.
|
See Also