Browse Source

Wired the BFLib functions into the command-methods.

master
Craig Oates 4 years ago
parent
commit
7822f58ae3
5 changed files with 17 additions and 8 deletions
  1. +1
    -1
      BFLib/BFLib.fsproj
  2. +4
    -0
      BFLib/FunkyFish.fs
  3. +0
    -4
      BFLib/Library1.fs
  4. +3
    -3
      BFLib/Script.fsx
  5. +9
    -0
      BrittleFish/ConsoleCommands.fs

+ 1
- 1
BFLib/BFLib.fsproj View File

@ -52,7 +52,7 @@
<Import Project="$(FSharpTargetsPath)" />
<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="Library1.fs" />
<Compile Include="FunkyFish.fs" />
<None Include="Script.fsx" />
<Content Include="packages.config" />
</ItemGroup>


+ 4
- 0
BFLib/FunkyFish.fs View File

@ -0,0 +1,4 @@
module FunkyFish
let LibraryTest1 x y = x + y
let LibraryTest2 x y z = (x * y) * z
let LibraryTest3 name = "Hello " + name

+ 0
- 4
BFLib/Library1.fs View File

@ -1,4 +0,0 @@
namespace BFLib
type Class1() =
member this.X = "F#"

+ 3
- 3
BFLib/Script.fsx View File

@ -1,8 +1,8 @@
// Learn more about F# at http://fsharp.org
// See the 'F# Tutorial' project for more help.
#load "Library1.fs"
open BFLib
#load "FunkyFish.fs"
open FunkyFish
// Define your library scripting code here
// Feel free to add your own code in here...

+ 9
- 0
BrittleFish/ConsoleCommands.fs View File

@ -4,6 +4,7 @@
open System
open Console.Waterworks
open Console.Waterworks.Attributes
open FunkyFish // This is where the "LibraryTest" functions are -- in BFLib
[<ListCommand>]
[<Description "Display a message to the console signifying the program is running as intended.">]
@ -25,3 +26,11 @@
let liaison = CW_Liaison()
liaison.RequestHelpDocumentation("Commands")
let libtest1 x y = String.Format("Result: {0}" , LibraryTest1 x y)
let libtest2 x y z = String.Format("Result: {0}", (LibraryTest2 x y z))
let libtest3 name = String.Format("Result: {0}", LibraryTest3 name)

Loading…
Cancel
Save