From 01bb68200d97e93eafd9d20ecadfd95debb562d9 Mon Sep 17 00:00:00 2001 From: "HOT-ROD\\craig" Date: Tue, 29 May 2018 23:00:36 +0100 Subject: [PATCH] Created console commands file in core version. --- BrittleFishCore/BrittleFishCore.fsproj | 5 +++ BrittleFishCore/ConsoleCommands.fs | 48 ++++++++++++++++++++++++++ BrittleFishCore/Program.fs | 11 +++--- 3 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 BrittleFishCore/ConsoleCommands.fs diff --git a/BrittleFishCore/BrittleFishCore.fsproj b/BrittleFishCore/BrittleFishCore.fsproj index cb3376b..2e9ae89 100644 --- a/BrittleFishCore/BrittleFishCore.fsproj +++ b/BrittleFishCore/BrittleFishCore.fsproj @@ -6,7 +6,12 @@ + + + + + diff --git a/BrittleFishCore/ConsoleCommands.fs b/BrittleFishCore/ConsoleCommands.fs new file mode 100644 index 0000000..fd70b8f --- /dev/null +++ b/BrittleFishCore/ConsoleCommands.fs @@ -0,0 +1,48 @@ +namespace Commands + module ConsoleCommands = + + open System + open Console.Waterworks.Core + open Console.Waterworks.Core.Attributes + open FunkyFish // This is where the "LibraryTest" functions are -- in BFLib + + [] + [] + [] + [ test">] + let test() = "The console is working" + + [] + [] + [] + [ exit">] + let exit() = System.Environment.Exit(Environment.ExitCode) + + [] + [] + [] + [ help">] + let help() = + let liaison = CW_Liaison() + liaison.RequestHelpDocumentation("Commands") +(* + [] + [] + [] + [ libtest1 5 10">] + let libtest1 x y = String.Format("Result: {0}" , LibraryTest1 x y) + + [] + [] + [] + [ libtest2 5 10 2">] + let libtest2 x y z = String.Format("Result: {0}", (LibraryTest2 x y z)) + + [] + [] + [] + [ libtest3 \"Craig Oates\"">] + let libtest3 name = String.Format("Result: {0}", LibraryTest3 name) +*) + + diff --git a/BrittleFishCore/Program.fs b/BrittleFishCore/Program.fs index a7458f5..07fc686 100644 --- a/BrittleFishCore/Program.fs +++ b/BrittleFishCore/Program.fs @@ -1,8 +1,7 @@ -// Learn more about F# at http://fsharp.org - -open System +open Console.Waterworks.Core [] -let main argv = - printfn "Hello World from F#!" - 0 // return an integer exit code +let main argv = + let liaison = CW_Liaison() + liaison.Run("Commands", true) + 0 \ No newline at end of file