Browse Source

Added end of session comments.

master
Craig Oates 6 years ago
parent
commit
bd1269f7a6
  1. 1
      WetPancake/DataServices.fs
  2. 9
      WetPancake/ProductServices.fs
  3. 4
      WetPancake/Script.fsx
  4. 7
      WetPancakeCLI/ConsoleCommands.cs

1
WetPancake/DataServices.fs

@ -73,6 +73,7 @@
}
result |> ConcatToString
// TODO: Write up comment for use of ReplaceArtifact.
let RemoveArtifactSentences noOfSentences text =
text
|> SplitText @"(?<=[\.\!\?]\s)"

9
WetPancake/ProductServices.fs

@ -1,6 +1,7 @@
namespace WetPancake
/// This module contains all the public functions in Wet Pancake NuGet package, which enables you to generate random text.
/// This module contains all the public functions in the Wet Pancake NuGet package,
/// which enables you to generate random text.
module Pancake =
open SystemServices
@ -152,6 +153,11 @@ module Pancake =
return files
}
// ============================================================================================
// DO NOT FORGET TO WRITE TESTS FOR THESE TWO FUNCTIONS -- OR THE CLEANING FUNCTION ABOVE --
// ============================================================================================
// TODO: Add XML comment for RequestCleanTextAsync.
let RequestCleanTextAsync (gibberishLevel: int) (sentences: int) =
async {
let! text = RequestTextAsync gibberishLevel sentences
@ -159,6 +165,7 @@ module Pancake =
return cleanText
}
// TODO: Add XML comment for RequestCleanTextFromFileAsync.
let RequestCleanTextFromFileAsync (gibberishLevel: int) (sentences: int) (filePath: string) =
async {
let! text = RequestTextFromFileAsync gibberishLevel sentences filePath

4
WetPancake/Script.fsx

@ -176,4 +176,6 @@ ps_result3 |> Async.RunSynchronously
ps_result4 |> Async.RunSynchronously
ps_result5 |> Async.RunSynchronously
ps_result6 |> Async.RunSynchronously
ps_files |> Async.RunSynchronously
ps_files |> Async.RunSynchronously
// TODO: Add code to play/test the "cleaning" functions.

7
WetPancakeCLI/ConsoleCommands.cs

@ -46,7 +46,8 @@ namespace WetPancakeCLI
{
try
{
return FSharpAsync.StartAsTask(RequestRandomTextAsync(), _taskCreationOptions, _cancellationToken).Result;
return FSharpAsync.StartAsTask
(RequestRandomTextAsync(), _taskCreationOptions, _cancellationToken).Result;
}
catch (Exception e)
{
@ -150,7 +151,7 @@ namespace WetPancakeCLI
}
}
//TODO: Add "HElp" attribute to GenerateCleanTextFromFile command-method.
//TODO: Add "Help" attribute to GenerateCleanTextFromFile command-method.
public static string GenerateCleanTextFromFile(int gibberishLevel, int sentences, string filePath)
{
try
@ -173,5 +174,7 @@ namespace WetPancakeCLI
throw;
}
}
// TODO: Write a "clean-test" command-method so the function can be called manually.
}
}

Loading…
Cancel
Save