Browse Source

Update project to F# 4.5.

Replace "generate" with "make" in ConsoleCommands.
master
Craig Oates 6 years ago
parent
commit
ce8325dd83
  1. 22
      TestCentre/TestCentre.fsproj
  2. 16
      TestCentre/packages.config
  3. 4
      WetPancake/AssemblyInfo.fs
  4. 1
      WetPancake/WetPancake.fsproj
  5. 59
      WetPancakeCLI/ConsoleCommands.cs
  6. 2
      WetPancakeCLI/WetPancakeCLI.csproj

22
TestCentre/TestCentre.fsproj

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props')" />
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.props')" />
<Import Project="..\packages\xunit.runner.visualstudio.2.4.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.4.0\build\net20\xunit.runner.visualstudio.props')" />
<Import Project="..\packages\xunit.core.2.4.0\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.4.0\build\xunit.core.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -85,7 +85,7 @@
<HintPath>..\packages\FsCheck.Xunit.2.11.0\lib\net452\FsCheck.Xunit.dll</HintPath>
</Reference>
<Reference Include="FSharp.Core">
<HintPath>..\packages\FSharp.Core.4.5.0\lib\net45\FSharp.Core.dll</HintPath>
<HintPath>..\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System" />
@ -95,16 +95,16 @@
<Private>True</Private>
</Reference>
<Reference Include="xunit.abstractions">
<HintPath>..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll</HintPath>
<HintPath>..\packages\xunit.abstractions.2.0.3\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
<Reference Include="xunit.assert">
<HintPath>..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll</HintPath>
<HintPath>..\packages\xunit.assert.2.4.0\lib\netstandard2.0\xunit.assert.dll</HintPath>
</Reference>
<Reference Include="xunit.core">
<HintPath>..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll</HintPath>
<HintPath>..\packages\xunit.extensibility.core.2.4.0\lib\net452\xunit.core.dll</HintPath>
</Reference>
<Reference Include="xunit.execution.desktop">
<HintPath>..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll</HintPath>
<HintPath>..\packages\xunit.extensibility.execution.2.4.0\lib\net452\xunit.execution.desktop.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -118,11 +118,11 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\xunit.core.2.3.1\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.3.1\build\xunit.core.props'))" />
<Error Condition="!Exists('..\packages\xunit.core.2.3.1\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.3.1\build\xunit.core.targets'))" />
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props'))" />
<Error Condition="!Exists('..\packages\xunit.core.2.4.0\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.4.0\build\xunit.core.props'))" />
<Error Condition="!Exists('..\packages\xunit.core.2.4.0\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.4.0\build\xunit.core.targets'))" />
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.4.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.4.0\build\net20\xunit.runner.visualstudio.props'))" />
</Target>
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.targets')" />
<Import Project="..\packages\xunit.core.2.4.0\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.4.0\build\xunit.core.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

16
TestCentre/packages.config

@ -2,14 +2,14 @@
<packages>
<package id="FsCheck" version="2.11.0" targetFramework="net471" />
<package id="FsCheck.Xunit" version="2.11.0" targetFramework="net471" />
<package id="FSharp.Core" version="4.5.0" targetFramework="net471" />
<package id="FSharp.Core" version="4.5.2" targetFramework="net471" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net471" />
<package id="xunit" version="2.3.1" targetFramework="net471" />
<package id="xunit.abstractions" version="2.0.1" targetFramework="net471" />
<package id="xunit" version="2.4.0" targetFramework="net471" />
<package id="xunit.abstractions" version="2.0.3" targetFramework="net471" />
<package id="xunit.analyzers" version="0.10.0" targetFramework="net471" />
<package id="xunit.assert" version="2.3.1" targetFramework="net471" />
<package id="xunit.core" version="2.3.1" targetFramework="net471" />
<package id="xunit.extensibility.core" version="2.3.1" targetFramework="net471" />
<package id="xunit.extensibility.execution" version="2.3.1" targetFramework="net471" />
<package id="xunit.runner.visualstudio" version="2.3.1" targetFramework="net471" developmentDependency="true" />
<package id="xunit.assert" version="2.4.0" targetFramework="net471" />
<package id="xunit.core" version="2.4.0" targetFramework="net471" />
<package id="xunit.extensibility.core" version="2.4.0" targetFramework="net471" />
<package id="xunit.extensibility.execution" version="2.4.0" targetFramework="net471" />
<package id="xunit.runner.visualstudio" version="2.4.0" targetFramework="net471" developmentDependency="true" />
</packages>

4
WetPancake/AssemblyInfo.fs

@ -33,8 +33,8 @@ open System.Runtime.InteropServices
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [<assembly: AssemblyVersion("1.0.*")>]
[<assembly: AssemblyVersion("1.0.0.0")>]
[<assembly: AssemblyFileVersion("1.0.0.0")>]
[<assembly: AssemblyVersion("0.9.0.0")>]
[<assembly: AssemblyFileVersion("0.9.0.0")>]
do
()

1
WetPancake/WetPancake.fsproj

@ -14,6 +14,7 @@
<TargetFSharpCoreVersion>4.4.3.0</TargetFSharpCoreVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Name>WetPancake</Name>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

59
WetPancakeCLI/ConsoleCommands.cs

@ -166,19 +166,19 @@ namespace WetPancakeCLI
[ListCommand]
[Parameters("gibberish-level: int, sentences: int, copy-to-clipboard: bool")]
[Description(
"Generates text using the gibberish-level and number of sentences specified by the user.\n" +
"Makes text using the gibberish-level and number of sentences specified by the user.\n" +
"The result goes through an extra \"cleaning\" process to remove any artefact sentences.\n" +
"Use this if you cannot tolerate the odd extra sentence.\n" +
"With that said, it does mean it is slower than its GenerateText counterpart.\n" +
"With that said, it does mean it is slower than its MakeText counterpart.\n" +
"Gibberish-level must be between 2 and 20.\n" +
"Sentences must be greater than 0.\n" +
"Pass in \"true\" to copy the result straight to the clipboard.\n" +
"Pass in \"false\" or leave blank to not copy the result.")]
[Usage("\n" + // Added because Console.Waterworks' rendering makes it look weird.
"> GenerateCleanText 5 10 true\n" +
"> GenerateCleanText 3 7 false \n" +
"> GenerateCleanText 9 12")]
public static string GenerateCleanText(int gibberishLevel, int sentences, bool copyToClipboard = false)
"> MakeCleanText 5 10 true\n" +
"> MakeCleanText 3 7 false \n" +
"> MakeCleanText 9 12")]
public static string MakeCleanText(int gibberishLevel, int sentences, bool copyToClipboard = false)
{
try
{
@ -204,20 +204,20 @@ namespace WetPancakeCLI
[ListCommand]
[Parameters("gibberish-level: int, sentences: int, file path: string, copy-to-clipboard: bool")]
[Description("\n" +
"Loads the specified .txt file and generates text based on it,\n" +
"Loads the specified .txt file and makes text based on it,\n" +
"using the gibberish-level and number of sentences specified by the user.\n" +
"The result goes through an extra \"cleaning\" process to remove any artefact sentences.\n" +
"Use this if you cannot tolerate the odd extra sentence.\n" +
"With that said, it does mean it is slower than its GenerateTextFromFile counterpart.\n" +
"With that said, it does mean it is slower than its MakeTextFromFile counterpart.\n" +
"Gibberish-level must be between 2 and 20.\n" +
"Sentences must be greater than 0.\n" +
"Pass in \"true\" to copy the result straight to the clipboard.\n" +
"Pass in \"false\" or leave blank to not copy the result.")]
[Usage("\n" + // Added because Console.Waterworks' rendering makes it look weird.
"> GenerateCleanTextFromFile 3 6 C:/yourfile.txt true \n" +
"> GenerateCleanTextFromFile 5 9 C:/yourfile.txt false\n" +
"> GenerateCleanTextFromFile 7 15 C:/ yourfile.txt")]
public static string GenerateCleanTextFromFile(
"> MakeCleanTextFromFile 3 6 C:/yourfile.txt true \n" +
"> MakeCleanTextFromFile 5 9 C:/yourfile.txt false\n" +
"> MakeCleanTextFromFile 7 15 C:/ yourfile.txt")]
public static string MakeCleanTextFromFile(
int gibberishLevel, int sentences, string filePath, bool copyToClipboard = false)
{
try
@ -249,14 +249,14 @@ namespace WetPancakeCLI
[ListCommand]
[Parameters("copy-to-clipboard: bool")]
[Description(
"Generates random text, the number of sentences generated is randomly determined.\n" +
"Makes random text, the number of sentences Maked is randomly determined.\n" +
"Pass in true to copy result straight to clipboard.\n" +
"Pass in \"false\" or leave blank to not copy the result.")]
[Usage("\n" + // Added because Console.Waterworks' rendering makes it look weird.
"> GenerateRandomText true\n" +
"> GenerateRandomText false\n" +
"> GenerateRandomText")]
public static string GenerateRandomText(bool copyToClipboard = false)
"> MakeRandomText true\n" +
"> MakeRandomText false\n" +
"> MakeRandomText")]
public static string MakeRandomText(bool copyToClipboard = false)
{
try
{
@ -275,8 +275,8 @@ namespace WetPancakeCLI
[ListCommand]
[Parameters("gibberish-level: int, sentences: int, copy-to-clipboard: bool")]
[Description(
"Generates text using the gibberish-level and number of sentences specified by the user.\n" +
"This command does not run the result through the extra \"cleaning\" process like GenerateCleanText.\n" +
"Makes text using the gibberish-level and number of sentences specified by the user.\n" +
"This command does not run the result through the extra \"cleaning\" process like MakeCleanText.\n" +
"This means this command is faster but it might produce an extra sentence on the odd occasion.\n" +
"Use this if you prefer speed over accuracy.\n" +
"Gibberish-level must be between 2 and 20.\n" +
@ -284,10 +284,10 @@ namespace WetPancakeCLI
"Pass in \"true\" to copy the result straight to the clipboard.\n" +
"Pass in \"false\" or leave blank to not copy the result.")]
[Usage("\n" + // Added because Console.Waterworks' rendering makes it look weird.
"> GenerateText 5 10 true\n" +
"> GenerateText 7 15 false\n" +
"> GenerateText 10 5")]
public static string GenerateText(int gibberishLevel, int sentences, bool copyToClipboard = false)
"> MakeText 5 10 true\n" +
"> MakeText 7 15 false\n" +
"> MakeText 10 5")]
public static string MakeText(int gibberishLevel, int sentences, bool copyToClipboard = false)
{
try
{
@ -312,9 +312,9 @@ namespace WetPancakeCLI
[ListCommand]
[Parameters("gibberish-level: int, sentences: int, file path: string")]
[Description(
"Loads the specified .txt file and generates text based on it,\n" +
"Loads the specified .txt file and makes text based on it,\n" +
"using the gibberish-level and number of sentencesspecifiedby the user.\n" +
"This command does not run the result through the extra \"cleaning\" process like GenerateCleanTextFromFile.\n" +
"This command does not run the result through the extra \"cleaning\" process like MakeCleanTextFromFile.\n" +
"This means this command is faster but it might produce an extra sentence on the odd occasion.\n" +
"Use this if you prefer speed over accuracy.\n" +
"Gibberish-level must be between 2 and 20.\n" +
@ -322,10 +322,11 @@ namespace WetPancakeCLI
"Pass in \"true\" to copy the result straight to the clipboard.\n" +
"Pass in \"false\" or leave blank to not copy the result.")]
[Usage("\n" + // Added because Console.Waterworks' rendering makes it look weird.
"> GenerateTextFromFile 3 6 C:/yourfile.txt true\n" +
"> GenerateTextFromFile 6 13 C:/yourfile.txt false \n" +
"> GenerateTextFromFile 12 8 C:/yourfile.txt")]
public static string GenerateTextFromFile(int gibberishLevel, int sentences, string filePath, bool copyToClipboard = false)
"> MakeTextFromFile 3 6 C:/yourfile.txt true\n" +
"> MakeTextFromFile 6 13 C:/yourfile.txt false \n" +
"> MakeTextFromFile 12 8 C:/yourfile.txt")]
public static string MakeTextFromFile
(int gibberishLevel, int sentences, string filePath, bool copyToClipboard = false)
{
try
{

2
WetPancakeCLI/WetPancakeCLI.csproj

@ -73,7 +73,7 @@
<Reference Include="Console.Waterworks, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Console.Waterworks.0.1.0.0-alpha1\lib\Console.Waterworks.dll</HintPath>
</Reference>
<Reference Include="FSharp.Core, Version=4.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="FSharp.Core, Version=4.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">

Loading…
Cancel
Save