Created
November 8, 2020 16:33
-
-
Save chrisnas/3f566611832ecb8c77907dc158cde729 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class TaskStateCommand : ExtensionCommandBase | |
| { | |
| [Argument(Help = "The Task instance address.")] | |
| public string Address { get; set; } | |
| public override void Invoke() | |
| { | |
| if (string.IsNullOrEmpty(Address) && !Value.HasValue) | |
| { | |
| WriteLine("Missing Task reference address or state value..." + Environment.NewLine); | |
| return; | |
| } | |
| ... | |
| if (!TryParseAddress(Address, out var address)) | |
| { | |
| WriteLine("Numeric value expected: either a task address or -v <state value>..." + Environment.NewLine); | |
| return; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment