diff --git a/NuGet/NuGet.exe b/NuGet/NuGet.exe deleted file mode 100755 index cb3ed03..0000000 Binary files a/NuGet/NuGet.exe and /dev/null differ diff --git a/NuGet/NuGetPack.cmd b/NuGet/NuGetPack.cmd deleted file mode 100644 index c14427a..0000000 --- a/NuGet/NuGetPack.cmd +++ /dev/null @@ -1 +0,0 @@ -nuget pack "Option\Option.nuspec" -symbols diff --git a/NuGet/Option/Option.nuspec b/NuGet/Option/Option.nuspec deleted file mode 100755 index 9addcd6..0000000 --- a/NuGet/Option/Option.nuspec +++ /dev/null @@ -1,51 +0,0 @@ - - - - Option - 3.0.1 - Option - Tom Jacques - Tom Jacques - https://github.com/tejacques/Option/blob/master/LICENSE - https://github.com/tejacques/Option/ - false - - Binaries for the Option type. - Visit https://github.com/tejacques/Option for an overview and usage examples. - - - An open source Option type for C#. - - - Version Release Notes: - - Version 3.0.1: - - Fix target to .NET 3.5 - - Version 3.0.0: - - Breaking Changes: - - Option is now a struct (value type). - - Option now no longer has subclasses None and Some (since it is a struct) - - Namespace changed from System.Option to Functional.Option - - Implicit Conversion from Option<T> to <T> has been removed. - - Option now implements IEnumerable<T> - - ToOption() extension method added for regular and Nullable types. - - Pattern matching is now a function call in the form: - option.Match( - None: () => { /* Action when the Option is None */ }, - Some: value => { /* Action when the Option is Some<T> */ }); - - var result = option.Match( - None: () => "None", - Some: value => value.ToString()); - - - - Copyright 2013 - Option Some None Maybe Functional - - - - - - diff --git a/lib/Option.XML b/lib/Option.XML deleted file mode 100755 index 9a877bf..0000000 --- a/lib/Option.XML +++ /dev/null @@ -1,608 +0,0 @@ - - - - Option - - - - - Extension methods for turning values into options - - - - - Converts a value to an Option<T>. - - The value to convert. - - Option<T>.None if value is null, otherwise an - Option<T> whose value is set to . - - - - - Converts a value to an Option<T>. - - The type of the elements. - The value to convert. - - Option<T>.None if value is null, otherwise an - Option<T> whose value is set to . - - - - - Flattens a sequence of Option<T> into one sequence of T - elements where the value of the Option<T> was Some<T> - - The type of the elements. - A sequence of Option<T>. - - A sequence of T elements where the value of the Option<T> - was Some<T>. - - - - - A generic Option type that allows for an explicit difference - between an intentionally set value, and a default value of None. - - The type to create an option for. - - - - The value of the option. - - - - - The bool indicating whether the option has a value. - - - - - Creates a new option from a specified value. - - The value to create an option for. - - A new Option<T> whose value is - set to . - - - - - Gets the value of the option if present, - and the provided value otherwise. - - The provided value - The Option's value or val - - - - Gets the value of the option if present, - and the provided value from the funcion otherwise. - - The provided value function - The Option's value or val() - - - - Tries to get the value of an option and place - it in the referenced result. - - - The location to store the option's value. - - true if the option has a value, false otherwise. - - - - Creates and returns an OptionPatternMatcher<T> - made from the current option. - - - An OptionPatternMatcher<T> made from the current option. - - - - - Runs the appropriate action on the option depending on - whether or not the option has a value. - - - The action to run if the option doesn't have a value. - - - The action to run if the option does have a value. - - - - - Runs the appropriate function on the option depending on - whether or not the option has a value. - - - The function to run if the option doesn't have a value. - - - The function to run if the option does have a value. - - - - - Creates and returns an OptionPatternMatcher<T>. - - - An OptionPatternMatcher<T>. - - - - - Creates and returns an OptionPatternMatcher<T,TOut> - made from the current option. - - - The type which the OptionPatternMatcher<T,TOut> will return. - - - An OptionPatternMatcher<T,TOut> made from the current option. - - - - - Creates and returns an OptionPatternMatcher<T,TOut>. - - - The type which the OptionPatternMatcher<T,TOut> will return. - - - An OptionPatternMatcher<T,TOut>. - - - - - Implicitly converts an Option to an Option<T>. - - The option to convert. - Option<T>.None - - - - Implicitly converts a value to an Option<T>. - - The value to convert. - - Option<T>.None if value is null, otherwise an - Option<T> whose value is set to . - - - - - Comapares two options for equality. - - The option on the left hand side. - The option on the right hand side. - - true if the options' values are equal - or both options are Option<T>.None, - and false if the options' values are not - equal or only one option is Option<T>.None - - - - - Comapares two options for inequality. - - The option on the left hand side. - The option on the right hand side. - - true if the options' values are not - equal or only one option is Option<T>.None, - and false if the options' values are equal - or both options are Option<T>.None. - - - - - Copies the elements of the Option to a new array. - - - An array containing the elements of the Option. - - - - - Performs the specified action on the value of the Option - if it holds a value. - - - The action to perform on the value of the Option - if it holds a value - - - - - Projects each element of a sequence into a new form. - - - The type of the value returned by the selector. - - - A transform function to apply to each element; - the second parameter of the function represents - the index of the source element. - - - An Option<TResult> whose elements are the result of invoking - the transform function on each element of source. - - - - - Projects each element of a sequence into a new form. - - - The type of the value returned by the selector. - - - A transform function to apply to each element. - - - An Option<TResult> whose elements are the result of invoking - the transform function on each element of source. - - - - - Filters a sequence of values based on a predicate. - - - A function to test the value of the Option; the second parameter - of the function represents the index of the source element. - - - An Option<T> that contains elements from the value from the - Option if it satisfies the condition. - - - - - Filters a sequence of values based on a predicate. - - - A function to test the value of the Option. - - - An Option<T> that contains elements from the value from the - Option if it satisfies the condition. - - - - - Compares the option to another option for equality. - - The option to compare to. - - true if the options' values are equal - or both options are Option<T>.None, - and false if the options' values are not - equal or only one option is Option<T>.None - - - - - Returns an enumerator that iterates through the Option - - - An iterator that will yield a value of there is one. - - - - - Returns an enumerator that iterates through the Option - - - An iterator that will yield a value of there is one. - - - - - Compares the option to another object for equality. - - The object to compare to. - - true if the object is an Option<T> and - the options' values are equal - or both options are Option<T>.None, - and false if the object is not an Option<T> or - the options' values are not equal - or only one option is Option<T>.None - - - - - Gets the HashCode for the Option<T>. - - - 0 if the Option is Option.None, otherwise - returns the hash code of the value. - - - - - The Option indication there is no value. - - - - - True if the option has a value, false otherwise. - - - - - Gets the value of the option - - - Thrown if the option does not have a value. - - - - - Gets the value of the option if present, - and the default value otherwise. - - - - - An Option type that allows the use of Option.None - as well as the creation of Options. - - - - - Private constructor so that nobody can make an instance - - - - - Creates an Option<T> from a value. - - The value to convert. - - Option<T>.None if value is null, otherwise an - Option<T> whose value is set to . - - - - - Creates an Option<T> from a Nullable value. - - The value to convert. - - Option<T>.None if HasValue is false, otherwise an - Option<T> whose value is set to . - - - - - Creates a new option from a specified value. - - The type to create an option for. - The value to create an option for. - - A new Option<T> whose value is - set to . - - - - - Creates a new option from a specified value. - - The type to create an option for. - The value to create an option for. - - A new Option<T> whose value is - set to . - - - - - The default Option type specifying there is no value. - - - - - A class to help with pattern matching on Option types. - This should only be used if you want to match on specific - values of the option, otherwise use the default Match - method on the Option. - - The type of the option. - - - - Creates a new OptionPatternMatcher. - - - - - Creates a new OptionPatternMatcher with the supplied option. - - The option to match on. - - - - Sets the action to run when the option matches Some<T>. - - - The action to run if the pattern matches. - - The current OptionPatternMatcher<T> - - - - Sets the action to run when the option matches the provided value. - - The value to pattern match on. - - The action to run if the pattern matches. - - The current OptionPatternMatcher<T> - - - - Sets the action to run when the option matches None<T>. - - - The action to run if the pattern matches. - - The current OptionPatternMatcher<T> - - - - Runs the action whose pattern matches the option. - - - - - Runs the action whose pattern matches the supplied option. - - The option to match on. - - - - Functional style of passing lambdas to the pattern matcher. - - The pattern matcher. - - The action to take if the result is none. - The pattern matcher. - - - - Functional style of passing lambdas to the pattern matcher. - - The pattern matcher. - - The action to take if the result is some. - The pattern matcher. - - - - A class to help with pattern matching on Option types. - - The type of option. - - The result type of running the pattern matcher on the option. - - - - - Creates a new OptionPatternMatcher. - - - - - Sets the func to run when the option matches Some<T>. - - - The func to run if the pattern matches. - - The current OptionPatternMatcher<TIn,TOut> - - - - Sets the func to run when the option matches Some<T>. - - The value to pattern match on. - - The func to run if the pattern matches. - - The current OptionPatternMatcher<TIn,TOut> - - - - Sets the func to run when the option matches None<T>. - - - The func to run if the pattern matches. - - The current OptionPatternMatcher<TIn,TOut> - - - - Runs the func whose pattern matches the option - and returns the result or default(TOut) if there - was no match. - - - - - Runs the func whose pattern matches the option - and returns the result or the defaultValue if - there was no match. - - - The default value to return if there was no match. - - - The result of running the func matching the option's value, or - defaultValue if there was no match. - - - - - Runs the func whose pattern matches the option - and returns the result or the defaultValue if - there was no match. - - The option to match on. - - The result of running the func matching the option's value, or - defaultValue if there was no match. - - - - - Runs the func whose pattern matches the option - and returns the result or the defaultValue if - there was no match. - - The option to match on. - - The default value to return if there was no match. - - - The result of running the func matching the option's value, or - defaultValue if there was no match. - - - - - Functional style of passing lambdas to the pattern matcher. - - The pattern matcher. - - The result to return if the result is none. - The pattern matcher. - - - - Functional style of passing lambdas to the pattern matcher. - - The pattern matcher. - - The result to return if the result is some. - The pattern matcher. - - - - Implicitly converts an OptionPatternMatcher to a TOut. - - The pattern matcher. - - The TOut obtained by running pm.Result() - - - - diff --git a/lib/Option.dll b/lib/Option.dll deleted file mode 100755 index 1801845..0000000 Binary files a/lib/Option.dll and /dev/null differ diff --git a/lib/Option.pdb b/lib/Option.pdb deleted file mode 100755 index d2307f2..0000000 Binary files a/lib/Option.pdb and /dev/null differ diff --git a/src/Option/.nuget/NuGet.Config b/src/Option/.nuget/NuGet.Config deleted file mode 100755 index 6a318ad..0000000 --- a/src/Option/.nuget/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/Option/.nuget/NuGet.exe b/src/Option/.nuget/NuGet.exe deleted file mode 100755 index 2c93698..0000000 Binary files a/src/Option/.nuget/NuGet.exe and /dev/null differ diff --git a/src/Option/.nuget/NuGet.targets b/src/Option/.nuget/NuGet.targets deleted file mode 100755 index d0ebc75..0000000 --- a/src/Option/.nuget/NuGet.targets +++ /dev/null @@ -1,136 +0,0 @@ - - - - $(MSBuildProjectDirectory)\..\ - - - false - - - false - - - true - - - false - - - - - - - - - - - $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) - $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) - - - - - $(SolutionDir).nuget - packages.config - - - - - $(NuGetToolsPath)\NuGet.exe - @(PackageSource) - - "$(NuGetExePath)" - mono --runtime=v4.0.30319 $(NuGetExePath) - - $(TargetDir.Trim('\\')) - - -RequireConsent - -NonInteractive - - "$(SolutionDir) " - "$(SolutionDir)" - - - $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir) - $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols - - - - RestorePackages; - $(BuildDependsOn); - - - - - $(BuildDependsOn); - BuildPackage; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Option/Option.csproj b/src/Option/Option.csproj index ea3fdc2..6db6a2e 100755 --- a/src/Option/Option.csproj +++ b/src/Option/Option.csproj @@ -1,60 +1,60 @@ - - - + + - Debug - AnyCPU - {CF04262A-A434-4F8F-B164-4F1D47D2542C} - Library - Properties - Option - Option - v3.5 - 512 - + net45;netstandard1.0;netstandard2.0; + netstandard1.0;netstandard2.0; + true + 3.0.2 + Tom Jacques + https://github.com/tejacques/Option/blob/master/LICENSE + https://github.com/tejacques/Option/ + Binaries for the Option type. + Visit https://github.com/tejacques/Option for an overview and usage examples. + Copyright 2018 + Option Some None Maybe Functional + Version Release Notes: + + Version 3.0.2: + - Now target .NET Standard 1.0 + + Version 3.0.1: + - Fix target to .NET 3.5 + + Version 3.0.0: + - Breaking Changes: + - Option is now a struct (value type). + - Option now no longer has subclasses None and Some (since it is a struct) + - Namespace changed from System.Option to Functional.Option + - Implicit Conversion from Option&lt;T&gt; to &lt;T&gt; has been removed. + - Option now implements IEnumerable&lt;T&gt; + - ToOption() extension method added for regular and Nullable types. + - Pattern matching is now a function call in the form: + option.Match( + None: () => { /* Action when the Option is None */ }, + Some: value => { /* Action when the Option is Some&lt;T&gt; */ }); + + var result = option.Match( + None: () => "None", + Some: value => value.ToString()); + 3.0.2.0 + 3.0.2.0 + false - - true - full - false + + + bin\Debug\Option.xml bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - bin\Debug\Option.XML - - pdbonly - true + + bin\Release\ - TRACE - prompt - 4 - bin\Release\Option.XML - false + bin\Release\Option.xml + - - - - - - + + + - - - - - - - - - - \ No newline at end of file + + diff --git a/src/Option/Option.sln b/src/Option/Option.sln index 1b22d39..dff446e 100755 --- a/src/Option/Option.sln +++ b/src/Option/Option.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30110.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.136 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Option", "Option.csproj", "{CF04262A-A434-4F8F-B164-4F1D47D2542C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Option", "Option.csproj", "{05B7917E-ADAB-493A-8E4C-9C3614848065}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Option.Tests", "..\..\tests\Option.Tests\Option.Tests.csproj", "{701FF69B-E4B9-431D-96D2-599B28CE6599}" EndProject @@ -13,10 +13,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CF04262A-A434-4F8F-B164-4F1D47D2542C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CF04262A-A434-4F8F-B164-4F1D47D2542C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CF04262A-A434-4F8F-B164-4F1D47D2542C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CF04262A-A434-4F8F-B164-4F1D47D2542C}.Release|Any CPU.Build.0 = Release|Any CPU + {05B7917E-ADAB-493A-8E4C-9C3614848065}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05B7917E-ADAB-493A-8E4C-9C3614848065}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05B7917E-ADAB-493A-8E4C-9C3614848065}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05B7917E-ADAB-493A-8E4C-9C3614848065}.Release|Any CPU.Build.0 = Release|Any CPU {701FF69B-E4B9-431D-96D2-599B28CE6599}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {701FF69B-E4B9-431D-96D2-599B28CE6599}.Debug|Any CPU.Build.0 = Debug|Any CPU {701FF69B-E4B9-431D-96D2-599B28CE6599}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -25,4 +25,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {049D711C-0A05-4AE2-A421-3E0779B419C3} + EndGlobalSection EndGlobal diff --git a/src/Option/Properties/AssemblyInfo.cs b/src/Option/Properties/AssemblyInfo.cs deleted file mode 100755 index 53aea1c..0000000 --- a/src/Option/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Option")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Option")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("65309ded-7fa0-4411-9db3-3aaf7fd961b3")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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")]