Browse Source

Ported the F# syntax command-methods from the full framework version.

Note the change in "test-2" between the frameworks.
master
Craig Oates 4 years ago
parent
commit
ae73eabccf
1 changed files with 31 additions and 0 deletions
  1. +31
    -0
      BrittleFishCore/ConsoleCommands.fs

+ 31
- 0
BrittleFishCore/ConsoleCommands.fs View File

@ -44,4 +44,35 @@
[<Usage "> libtest3 \"Craig Oates\"">]
let libtest3 name = String.Format("Result: {0}", LibraryTest3 name)
[<ListCommand>]
[<Description "Displays a message in the console, signfying the command-method is working.">]
[<Parameters "none">]
[<Usage "> test 1">]
let ``test 1``() = "Result: Test 1 working"
[<ListCommand>]
[<Description "Displays a message in the console, signfying the command-method is working. The command uses F#'s double back-tick notation -- hence the command name and usage example not matching up.">]
[<Parameters "none">]
[<Usage "> test 2 ... or ... > test-2">]
let ``test-2``() = "Result: Test 2 working"
(*This works when you enter "test 2" or "test-2".
THIS IS DIFFERENT THaN THE FULL DOT-NET FRAMEWORK VERSION.*)
[<ListCommand>]
[<Description "Displays a message in the console, signfying the command-method is working.">]
[<Parameters "none">]
[<Usage "> test 3">]
let """test 3""" = "Result: Test 3 working"
(*This is not displayed in the help section, regardless of the attributes.
It still works if you enter the command into the console, though.*)
[<ListCommand>]
[<Description "Displays a message in the console, signfying the command-method is working.">]
[<Parameters "none">]
[<Usage "> test 4">]
let """test-4""" = "Result: Test 4 working"
(* This only works when you type "test 4" not ideal but better then nothing.
This is not displayed in the help section, regardless of the attributes.
It still works if you enter the command in the console, though.*)

Loading…
Cancel
Save