Command line options class for parsing user options for DiningPhilosophers.
Inheritance Hierarchy
LaurelBridge.DCFExamples.DiningPhilosophersOptions
Namespace: LaurelBridge.DCFExamples.DiningPhilosophers
Assembly: DiningPhilosophers (in DiningPhilosophers.exe) Version: DCF34 r12431 DCF_3_4_38_20200923 NetFramework
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.
|
![]() | MaxSleep |
The maximum amount of time a philosopher will sleep in milliseconds. Default is 500ms.
|
![]() | 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