diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml new file mode 100644 index 0000000..4787882 --- /dev/null +++ b/.github/workflows/build-and-publish.yaml @@ -0,0 +1,85 @@ +name: CI/CD for Underscore.cs + +on: + pull_request: + branches: + - main + push: + tags: + - "v*" + +jobs: + test: + name: Run Unit Tests & Enforce Coverage + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '9.0.x' + + - name: Restore Dependencies + run: dotnet restore + + - name: Run Tests with Coverage + run: dotnet test --collect:"XPlat Code Coverage" --settings coverlet.runsettings + + - name: Check Code Coverage + uses: danielpalme/ReportGenerator-GitHub-Action@5.1.24 + with: + reports: "**/coverage.cobertura.xml" + targetdir: "coverage-results" + reporttypes: "Badges" + + - name: Enforce 90% Code Coverage + run: | + COVERAGE=$(grep -Po '(?<=)[0-9.]+' coverage-results/Cobertura.xml | awk '{sum+=$1} END {print sum/NR}') + echo "Code Coverage: $COVERAGE" + if (( $(echo "$COVERAGE < 0.90" | bc -l) )); then + echo "Coverage is below 90% - Failing" + exit 1 + fi + + check-version: + name: Check Version Bump + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Check Version Update + run: | + VERSION_CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }} | grep -E "Underscore\.csproj|.nuspec") + if [ -z "$VERSION_CHANGED" ]; then + echo "NuGet package version was not updated. Please bump the version before merging." + exit 1 + fi + + publish: + name: Publish NuGet Package + needs: [test, check-version] + if: github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + + - name: Restore Dependencies + run: dotnet restore + + - name: Build and Pack + run: dotnet pack --configuration Release --output nupkgs + + - name: Publish to NuGet + run: | + for file in nupkgs/*.nupkg; do + dotnet nuget push "$file" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate + done diff --git a/.gitignore b/.gitignore index 60a30c7..cbec6fe 100644 --- a/.gitignore +++ b/.gitignore @@ -170,3 +170,6 @@ obj/ #ignore project build and test dirs test/ build/ + +.vs/ +.idea/ \ No newline at end of file diff --git a/README.md b/README.md index 04c9bdc..dc39d5e 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,163 @@ -Underscore.cs -============= +Here's an improved version of your **README.md** with better documentation, additional usage examples, and details on how developers can contribute and extend the library. -Started out as a port of the open source JavaScript Library Underscore.js to C#, -but now is really a library (or helper object) inspired by [underscore.js] +--- +# **Underscore.cs** -Getting Started --------------- -Solution is available as a NuGet package +A functional programming utility library for C# inspired by [Underscore.js](http://underscorejs.org/). It provides a rich set of methods for working with collections, arrays, objects, and functions in a functional and expressive way. + +## **Getting Started** + +**Installation:** +Underscore.cs is available as a NuGet package. You can install it via the NuGet Package Manager: ```powershell Install-Package Underscore.cs ``` -An overview of the project's modules and capabilities can be found [here](https://github.com/konkked/Underscore.cs/blob/master/docs/Overview.md). +Or via .NET CLI: + +```sh +dotnet add package Underscore.cs +``` + +--- + +## **Modules Overview** + +The library is organized into multiple modules, each focusing on different functional programming utilities: + +- **Collections** - Functional operations on collections (`Map`, `Filter`, `Reduce`, etc.). +- **Functions** - Functional programming utilities (`Compose`, `Curry`, `Throttle`, `Debounce`). +- **Objects** - Object manipulation and reflection helpers. +- **Lists** - List processing utilities like chunking, partitioning, and shuffling. +- **Utility** - General utilities such as randomization and memoization. + +A complete module overview is available **[here](https://github.com/konkked/Underscore.cs/blob/master/docs/Overview.md)**. + +Full API documentation with detailed examples is available **[here](https://github.com/konkked/Underscore.cs/tree/master/docs/api)**. + +--- + +## **Usage Examples** + +### **1. Functional Programming with Collections** +Use `Map`, `Filter`, and `Reduce` to manipulate collections efficiently. + +```csharp +using Underscore; + +var numbers = new[] {1, 2, 3, 4, 5}; +var squared = _.Collection.Map(numbers, x => x * x); + +Console.WriteLine(string.Join(", ", squared)); +// Output: 1, 4, 9, 16, 25 +``` + +### **2. List Manipulation - Chunking & Zipping** +You can partition and zip lists easily. + +```csharp +var approvers = new[] { "Alice", "Bob", "Charlie" }; +var workers = new[] { "Dave", "Eve", "Frank", "Grace", "Hank" }; + +var chainOCommand = approvers.Zip( + _.List.Chunk(workers, _.Utility.Random(2, 3)), + (approver, workerChunk) => new + { + Approver = approver, + Workers = workerChunk + }) + .ToDictionary(a => a.Approver, a => a.Workers); + +foreach (var entry in chainOCommand) +{ + Console.WriteLine($"{entry.Key} approves: {string.Join(", ", entry.Value)}"); +} +``` + +### **3. Function Composition and Throttling** +Modify function execution with `Compose`, `Throttle`, and `Debounce`. -More specific API documentation with examples for each function can be found in the [documents here](https://github.com/konkked/Underscore.cs/tree/master/docs/api). +```csharp +Func doubleNum = x => x * 2; +Func addTen = x => x + 10; -Here is a simple example of using the library's list chunking and random: +// Compose functions +var doubleThenAddTen = _.Function.Compose(addTen, doubleNum); +Console.WriteLine(doubleThenAddTen(5)); // Output: 20 +// Throttle function calls +var throttledFunction = _.Function.Throttle(() => Console.WriteLine("Executing..."), 1000); +throttledFunction(); +throttledFunction(); // Won't execute immediately if called within 1 second. ``` - var chainOCommand = _approvers.Zip( - _.List.Chunk(_workers, - _.Utility.Random(2, 3) - ), - (approver, workerChunk) => new - { - Approver = approver, - Workers = workerChunk - }) - .ToDictionary( - a => a.Approver, - a => a.Workers - ); + +### **4. Object Reflection and Manipulation** +Work with object properties dynamically. + +```csharp +var person = new { Name = "Alice", Age = 30 }; +var age = _.Object.Get(person, "Age"); +Console.WriteLine(age); // Output: 30 ``` -[underscore.js]:http://underscorejs.org/ +--- + +## **Why Use Underscore.cs?** + +✅ **Functional Programming in C#** – Brings powerful FP patterns into .NET. +✅ **Concise & Readable Code** – Reduce boilerplate code while maintaining readability. +✅ **Well-Organized Modules** – Access utilities in an intuitive, modular way. +✅ **Inspired by Underscore.js** – If you're familiar with JavaScript's Underscore.js, you'll feel right at home. +✅ **Actively Maintained** – Continuous improvements and contributions are welcome. + +--- + +## **Installation and Compatibility** + +Underscore.cs moving forward will only support **.NET Core 8+**, ensuring broad usability across different .NET versions. + +| Framework | Supported | +|--------------|-----------| +| .NET Core 8 | ✅ Yes | +| .NET Core 9 | ✅ Yes | + + +--- + +## **Contributing** + +We welcome contributions! Here’s how you can help: + +1. **Clone the repo** + ```sh + git clone https://github.com/konkked/Underscore.cs.git + cd Underscore.cs + ``` + +2. **Run tests** + ```sh + dotnet test + ``` + +3. **Submit a pull request** with your changes. + +More details on contributing **[here](https://github.com/konkked/Underscore.cs/blob/master/CONTRIBUTING.md)**. + +--- + +## **License** + +Underscore.cs is released under the **MIT License**. See the full license **[here](https://github.com/konkked/Underscore.cs/blob/master/LICENSE)**. + +--- + +### **Need Help?** +- Check the **[API documentation](https://github.com/konkked/Underscore.cs/tree/master/docs/api)** +- Open an **[issue](https://github.com/konkked/Underscore.cs/issues)** on GitHub +- Contact the maintainer directly via **GitHub Discussions** + +--- + +This version provides **detailed documentation**, practical **examples**, and a **clear contribution guide**. Let me know if you'd like to highlight any **specific modules or features** in more depth! 🚀 \ No newline at end of file diff --git a/Underscore.Test/Collection/Partition/ChunkTest.cs b/Underscore.Test/Collection/Partition/ChunkTest.cs index 4724622..9bcc3a3 100644 --- a/Underscore.Test/Collection/Partition/ChunkTest.cs +++ b/Underscore.Test/Collection/Partition/ChunkTest.cs @@ -23,11 +23,11 @@ public void Collection_Partition_Chunk_IndexEvenDistribution() { var expected = new List> { - new List { 0, 1 }, - new List { 2, 3 }, - new List { 4, 5 }, - new List { 6, 7 }, - new List { 8, 9 } + new() { 0, 1 }, + new() { 2, 3 }, + new() { 4, 5 }, + new() { 6, 7 }, + new() { 8, 9 } }; var result = _.Collection.Chunk(target, 2).ToList(); @@ -47,10 +47,10 @@ public void Collection_Partition_Chunk_IndexUnevenDistribution() { var expected = new List> { - new List { 0, 1, 2 }, - new List { 3, 4, 5 }, - new List { 6, 7, 8 }, - new List { 9 } + new() { 0, 1, 2 }, + new() { 3, 4, 5 }, + new() { 6, 7, 8 }, + new() { 9 } }; var result = _.Collection.Chunk(target, 3).ToList(); @@ -70,7 +70,7 @@ public void Collection_Partition_Chunk_PredicateNoMatches() { var expected = new List> { - new List { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } + new() { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } }; var result = _.Collection.Chunk(target, n => n == 10).ToList(); @@ -90,11 +90,11 @@ public void Collection_Partition_Chunk_PredicateSomeMatches() { var expected = new List> { - new List { 0, 1 }, - new List { 2, 3 }, - new List { 4, 5 }, - new List { 6, 7 }, - new List { 8, 9 } + new() { 0, 1 }, + new() { 2, 3 }, + new() { 4, 5 }, + new() { 6, 7 }, + new() { 8, 9 } }; var result = _.Collection.Chunk(target, n => n % 2 == 0).ToList(); @@ -114,16 +114,16 @@ public void Collection_Partition_Chunk_PredicateAllMatches() { var expected = new List> { - new List { 0 }, - new List { 1 }, - new List { 2 }, - new List { 3 }, - new List { 4 }, - new List { 5 }, - new List { 6 }, - new List { 7 }, - new List { 8 }, - new List { 9 }, + new() { 0 }, + new() { 1 }, + new() { 2 }, + new() { 3 }, + new() { 4 }, + new() { 5 }, + new() { 6 }, + new() { 7 }, + new() { 8 }, + new() { 9 }, }; var result = _.Collection.Chunk(target, n => n % 1 == 0).ToList(); @@ -143,14 +143,14 @@ public void CollectionExtensions_Partition_Chunk_IndexEvenDistribution() { var expected = new List> { - new List { 0, 1 }, - new List { 2, 3 }, - new List { 4, 5 }, - new List { 6, 7 }, - new List { 8, 9 } + new() { 0, 1 }, + new() { 2, 3 }, + new() { 4, 5 }, + new() { 6, 7 }, + new() { 8, 9 } }; - var result = target.Chunk(2).ToList(); + var result = ExtensionsImpl.Chunk(target,2).ToList(); Assert.AreEqual(expected.Count, result.Count); @@ -167,13 +167,13 @@ public void CollectionExtensions_Partition_Chunk_IndexUnevenDistribution() { var expected = new List> { - new List { 0, 1, 2 }, - new List { 3, 4, 5 }, - new List { 6, 7, 8 }, - new List { 9 } + new() { 0, 1, 2 }, + new() { 3, 4, 5 }, + new() { 6, 7, 8 }, + new() { 9 } }; - var result = target.Chunk(3).ToList(); + var result = ExtensionsImpl.Chunk(target, 3).ToList(); Assert.AreEqual(expected.Count, result.Count); @@ -190,7 +190,7 @@ public void CollectionExtensions_Partition_Chunk_PredicateNoMatches() { var expected = new List> { - new List { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } + new() { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } }; var result = target.Chunk(n => n == 10).ToList(); @@ -210,11 +210,11 @@ public void CollectionExtensions_Partition_Chunk_PredicateSomeMatches() { var expected = new List> { - new List { 0, 1 }, - new List { 2, 3 }, - new List { 4, 5 }, - new List { 6, 7 }, - new List { 8, 9 } + new() { 0, 1 }, + new() { 2, 3 }, + new() { 4, 5 }, + new() { 6, 7 }, + new() { 8, 9 } }; var result = target.Chunk(n => n % 2 == 0).ToList(); @@ -234,16 +234,16 @@ public void CollectionExtensions_Partition_Chunk_PredicateAllMatches() { var expected = new List> { - new List { 0 }, - new List { 1 }, - new List { 2 }, - new List { 3 }, - new List { 4 }, - new List { 5 }, - new List { 6 }, - new List { 7 }, - new List { 8 }, - new List { 9 }, + new() { 0 }, + new() { 1 }, + new() { 2 }, + new() { 3 }, + new() { 4 }, + new() { 5 }, + new() { 6 }, + new() { 7 }, + new() { 8 }, + new() { 9 }, }; var result = target.Chunk(n => n % 1 == 0).ToList(); diff --git a/Underscore.Test/Collection/Partition/CombinationsTest.cs b/Underscore.Test/Collection/Partition/CombinationsTest.cs index 94eb269..b72529e 100644 --- a/Underscore.Test/Collection/Partition/CombinationsTest.cs +++ b/Underscore.Test/Collection/Partition/CombinationsTest.cs @@ -29,27 +29,27 @@ public void Collection_Partition_Combinations_Integration() private static void CollectionCombinationsImpl(Func, IEnumerable>> testing) { - int[] stuff = { 1, 2, 3, 4 }; + int[] stuff = [1, 2, 3, 4]; - int[][] expecting = new[] - { - new int[] {}, - new[] {1}, - new[] {1, 2}, - new[] {2}, - new[] {1, 2, 3}, - new[] {2, 3}, - new[] {1, 3}, - new[] {3}, - new[] {1, 2, 3, 4}, - new[] {1, 2, 4}, - new[] {1, 3, 4}, - new[] {2, 3, 4}, - new[] {3, 4}, - new[] {2, 4}, - new[] {1, 4}, - new[] {4} - }; + int[][] expecting = + [ + [], + [1], + [1, 2], + [2], + [1, 2, 3], + [2, 3], + [1, 3], + [3], + [1, 2, 3, 4], + [1, 2, 4], + [1, 3, 4], + [2, 3, 4], + [3, 4], + [2, 4], + [1, 4], + [4] + ]; var permutation = testing(stuff).Select(a => a.ToList()).ToList(); @@ -63,24 +63,24 @@ public void CollectionExtensions_Partition_Combinations() var stuff = new [] { 1, 2, 3, 4 }.Select(x => x); // to convert to IEnumerable int[][] expecting = - { - new int[] {}, - new[] {1}, - new[] {1, 2}, - new[] {2}, - new[] {1, 2, 3}, - new[] {2, 3}, - new[] {1, 3}, - new[] {3}, - new[] {1, 2, 3, 4}, - new[] {1, 2, 4}, - new[] {1, 3, 4}, - new[] {2, 3, 4}, - new[] {3, 4}, - new[] {2, 4}, - new[] {1, 4}, - new[] {4} - }; + [ + [], + [1], + [1, 2], + [2], + [1, 2, 3], + [2, 3], + [1, 3], + [3], + [1, 2, 3, 4], + [1, 2, 4], + [1, 3, 4], + [2, 3, 4], + [3, 4], + [2, 4], + [1, 4], + [4] + ]; var permutation = stuff.Combinations().Select(a => a.ToList()).ToList(); diff --git a/Underscore.Test/Collection/SetTest.cs b/Underscore.Test/Collection/SetTest.cs index c0d0158..53a6102 100644 --- a/Underscore.Test/Collection/SetTest.cs +++ b/Underscore.Test/Collection/SetTest.cs @@ -11,9 +11,9 @@ public class SetTest [Test] public void Collection_Set_Difference() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; - var expected = new[] { 1, 2, 3, 8, 9, 10 }; + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; + int[] expected = [1, 2, 3, 8, 9, 10]; var result = _.Collection.Difference(a, b); @@ -23,14 +23,12 @@ public void Collection_Set_Difference() [Test] public void Collection_Set_DifferenceBy() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; - Func transform = i => i.ToString(); + string[] expected = ["1", "2", "3", "8", "9", "10"]; - var expected = new[] { "1", "2", "3", "8", "9", "10" }; - - var result = _.Collection.DifferenceBy(a, b, transform); + var result = _.Collection.DifferenceBy(a, b, i => i.ToString()); Assert.IsTrue(expected.SequenceEqual(result)); } @@ -38,9 +36,9 @@ public void Collection_Set_DifferenceBy() [Test] public void Collection_Set_Intersection() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; - var expected = new[] { 4, 5, 6, 7 }; + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; + int[] expected = [4, 5, 6, 7]; var result = _.Collection.Intersection(a, b); @@ -50,13 +48,12 @@ public void Collection_Set_Intersection() [Test] public void Collection_Set_IntersectionBy() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; - Func transform = i => i.ToString(); + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; - var expected = new[] { "4", "5", "6", "7" }; + string[] expected = ["4", "5", "6", "7"]; - var result = _.Collection.IntersectionBy(a, b, transform); + var result = _.Collection.IntersectionBy(a, b, i => i.ToString()); Assert.IsTrue(expected.SequenceEqual(result)); } @@ -64,9 +61,9 @@ public void Collection_Set_IntersectionBy() [Test] public void Collection_Set_Union() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; - var expected = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; + int[] expected = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; var result = _.Collection.Union(a, b); @@ -76,13 +73,12 @@ public void Collection_Set_Union() [Test] public void Collection_Set_UnionBy() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; - Func transform = i => i.ToString(); + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; - var expected = new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }; + string[] expected = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]; - var result = _.Collection.UnionBy(a, b, transform); + var result = _.Collection.UnionBy(a, b, i => i.ToString()); Assert.IsTrue(expected.SequenceEqual(result)); } @@ -90,9 +86,9 @@ public void Collection_Set_UnionBy() [Test] public void CollectionExtensions_Set_Difference() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; - var expected = new[] { 1, 2, 3, 8, 9, 10 }; + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; + int[] expected = [1, 2, 3, 8, 9, 10]; var result = a.Difference(b); @@ -102,12 +98,12 @@ public void CollectionExtensions_Set_Difference() [Test] public void CollectionExtensions_Set_DifferenceBy() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; Func transform = i => i.ToString(); - var expected = new[] { "1", "2", "3", "8", "9", "10" }; + string[] expected = ["1", "2", "3", "8", "9", "10"]; var result = a.DifferenceBy(b, transform); @@ -117,9 +113,9 @@ public void CollectionExtensions_Set_DifferenceBy() [Test] public void CollectionExtensions_Set_Intersection() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; - var expected = new[] { 4, 5, 6, 7 }; + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; + int[] expected = [4, 5, 6, 7]; var result = a.Intersection(b); @@ -129,13 +125,12 @@ public void CollectionExtensions_Set_Intersection() [Test] public void CollectionExtensions_Set_IntersectionBy() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; - Func transform = i => i.ToString(); + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; - var expected = new[] { "4", "5", "6", "7" }; + string[] expected = ["4", "5", "6", "7"]; - var result = a.IntersectionBy(b, transform); + var result = a.IntersectionBy(b, i => i.ToString()); Assert.IsTrue(expected.SequenceEqual(result)); } @@ -143,13 +138,12 @@ public void CollectionExtensions_Set_IntersectionBy() [Test] public void CollectionExtensions_Set_UnionBy() { - var a = new[] { 1, 2, 3, 4, 5, 6, 7 }; - var b = new[] { 4, 5, 6, 7, 8, 9, 10 }; - Func transform = i => i.ToString(); + int[] a = [1, 2, 3, 4, 5, 6, 7]; + int[] b = [4, 5, 6, 7, 8, 9, 10]; - var expected = new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }; + string[] expected = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]; - var result = a.UnionBy(b, transform); + var result = ExtensionsImpl.UnionBy(a, b, i=>i.ToString()); Assert.IsTrue(expected.SequenceEqual(result)); } diff --git a/Underscore.Test/Function/CacheTest.cs b/Underscore.Test/Function/CacheTest.cs index 2522ba2..a45ff7f 100644 --- a/Underscore.Test/Function/CacheTest.cs +++ b/Underscore.Test/Function/CacheTest.cs @@ -606,5 +606,11 @@ public void Function_Cache_Memo_16Arguments() Assert.AreEqual(expected, result); Assert.AreEqual(2, callcount); } + + [Test] + public void Function_Cache_Memo_17Arguments() + { + + } } } diff --git a/Underscore.Test/Properties/AssemblyInfo.cs b/Underscore.Test/Properties/AssemblyInfo.cs index 4ddfbc0..ecfcd2d 100644 --- a/Underscore.Test/Properties/AssemblyInfo.cs +++ b/Underscore.Test/Properties/AssemblyInfo.cs @@ -4,8 +4,8 @@ [assembly: AssemblyTitle("Underscore.Test")] [assembly: AssemblyDescription("Tests for Underscore.cs")] [assembly: AssemblyProduct("Underscore.Test")] -[assembly: AssemblyCopyright("Copyright © 2014-2015 Chip Keyser")] +[assembly: AssemblyCopyright("Copyright © 2014-2025 Chip Keyser")] [assembly: ComVisible(false)] [assembly: Guid("0dec2916-27fa-4f16-a9f0-25efc3b1acc1")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("2.0.0")] +[assembly: AssemblyFileVersion("2.0.0")] diff --git a/Underscore.Test/Underscore.Test.csproj b/Underscore.Test/Underscore.Test.csproj index fa25904..1dfbbd6 100644 --- a/Underscore.Test/Underscore.Test.csproj +++ b/Underscore.Test/Underscore.Test.csproj @@ -1,198 +1,26 @@ - - - - Debug - AnyCPU - {D8C013CF-12B1-4743-9044-D92903510970} - Library - Properties + + + Underscore.Test Underscore.Test - v4.5.1 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - + false + false + net8.0;net9.0 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - ..\packages\NUnit3TestAdapter.3.4.0\lib\Mono.Cecil.dll - False - - - ..\packages\NUnit3TestAdapter.3.4.0\lib\Mono.Cecil.Mdb.dll - False - - - ..\packages\NUnit3TestAdapter.3.4.0\lib\Mono.Cecil.Pdb.dll - False - - - ..\packages\NUnit3TestAdapter.3.4.0\lib\Mono.Cecil.Rocks.dll - False - - - ..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll - - - ..\packages\NUnit3TestAdapter.3.4.0\lib\nunit.engine.dll - False - - - ..\packages\NUnit3TestAdapter.3.4.0\lib\nunit.engine.api.dll - False - - - ..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll - True - - - ..\packages\NUnit3TestAdapter.3.4.0\lib\NUnit3.TestAdapter.dll - False - - - - - - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + - - {946c4f0d-101a-46db-8c41-c102d0947e99} - Underscore.cs - + - - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file + + diff --git a/Underscore.Test/Util.cs b/Underscore.Test/Util.cs index a1f4212..3f67ded 100644 --- a/Underscore.Test/Util.cs +++ b/Underscore.Test/Util.cs @@ -1,5 +1,4 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; +using System; using System.Collections.Generic; using System.Dynamic; using System.Linq; @@ -132,17 +131,18 @@ public static Task Start(this Func function) public static class Util { - public static string[] LowercaseCharArray - { + public static string[] LowercaseCharArray => // we could do this programmatically // but this is simpler and faster - get { return new[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; } - } + ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" + ]; - public static string[] UppercaseCharArray - { - get { return new[] { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; } - } + public static string[] UppercaseCharArray => + [ + "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", + "V", "W", "X", "Y", "Z" + ]; + public static string Join(params string[] args) { @@ -151,24 +151,22 @@ public static string Join(params string[] args) public static class Compare { - public static void All(params Tuple[] tuples) + public static bool All(params Tuple[] tuples) { foreach (var tuple in tuples) { - if (tuple.Item1 == null) - Assert.IsNull(tuple.Item2); - else - { - Assert.AreEqual(tuple.Item1, tuple.Item2); - } + if (tuple.Item1 == null ^ tuple.Item2 == null) + throw new ArgumentException(nameof(tuples)); + if (!_.Object.AreEquivalent(tuple.Item1, tuple.Item2)) + return false; } - } - public static void All(object[] expected, object[] actual) - { - Assert.AreEqual(expected.Length, actual.Length); - All(expected.Zip(actual, Tuple.Create).ToArray()); + return true; } + + public static bool All(object[] expected, object[] actual) + => All(expected.Zip(actual, Tuple.Create).ToArray()); + } public static class Tasks diff --git a/Underscore.Test/Utility/String/CaseChangingTest.cs b/Underscore.Test/Utility/String/CaseChangingTest.cs index 62f1bfa..e1c7d25 100644 --- a/Underscore.Test/Utility/String/CaseChangingTest.cs +++ b/Underscore.Test/Utility/String/CaseChangingTest.cs @@ -1,12 +1,12 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; +using NUnit.Framework; using Underscore.Extensions; namespace Underscore.Test.Utility.String { - [TestClass] + [TestFixture] public class CaseChangingTest { - [TestMethod] + [Test] public void Capitalize_UncapitalizedString() { const string input = "hello, world!"; @@ -17,7 +17,7 @@ public void Capitalize_UncapitalizedString() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Capitalize_CapitalizedString() { const string input = "Hello, world!"; @@ -28,7 +28,7 @@ public void Capitalize_CapitalizedString() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToCamelCase_FromSnakeCase() { const string input = "camel_case"; @@ -39,7 +39,7 @@ public void Utility_String_ToCamelCase_FromSnakeCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToCamelCase_FromKebabCase() { const string input = "camel-case"; @@ -50,7 +50,7 @@ public void Utility_String_ToCamelCase_FromKebabCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToCamelCase_FromCamelCase() { const string input = "camelCase"; @@ -61,7 +61,7 @@ public void Utility_String_ToCamelCase_FromCamelCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToCamelCase_FromPascalCase() { const string input = "CamelCase"; @@ -72,7 +72,7 @@ public void Utility_String_ToCamelCase_FromPascalCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToCamelCase_FromOther() { const string input = "Camel,Case-This.Is Not"; @@ -83,7 +83,7 @@ public void Utility_String_ToCamelCase_FromOther() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToPascalCase_FromSnakeCase() { const string input = "pascal_case"; @@ -94,7 +94,7 @@ public void Utility_String_ToPascalCase_FromSnakeCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToPascalCase_FromKebabCase() { const string input = "pascal-case"; @@ -105,7 +105,7 @@ public void Utility_String_ToPascalCase_FromKebabCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToPascalCase_FromCamelCase() { const string input = "camelCase"; @@ -116,7 +116,7 @@ public void Utility_String_ToPascalCase_FromCamelCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToPascalCase_FromPascalCase() { const string input = "PascalCase"; @@ -127,7 +127,7 @@ public void Utility_String_ToPascalCase_FromPascalCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToPascalCase_FromOther() { const string input = "Pascal,Case-This.Is Not"; @@ -138,7 +138,7 @@ public void Utility_String_ToPascalCase_FromOther() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToSnakeCase_FromSnakeCase() { const string input = "snake_case"; @@ -149,7 +149,7 @@ public void Utility_String_ToSnakeCase_FromSnakeCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToSnakeCase_FromKebabCase() { const string input = "snake-case"; @@ -160,7 +160,7 @@ public void Utility_String_ToSnakeCase_FromKebabCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToSnakeCase_FromCamelCase() { const string input = "snakeCase"; @@ -171,7 +171,7 @@ public void Utility_String_ToSnakeCase_FromCamelCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToSnakeCase_FromPascalCase() { const string input = "SnakeCase"; @@ -182,7 +182,7 @@ public void Utility_String_ToSnakeCase_FromPascalCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToSnakeCase_FromOther() { const string input = "Snake,Case-This.Is Not"; @@ -193,7 +193,7 @@ public void Utility_String_ToSnakeCase_FromOther() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToKebabCase_FromSnakeCase() { const string input = "kebab_case"; @@ -204,7 +204,7 @@ public void Utility_String_ToKebabCase_FromSnakeCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToKebabCase_FromKebabCase() { const string input = "kebab-case"; @@ -215,7 +215,7 @@ public void Utility_String_ToKebabCase_FromKebabCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToKebabCase_FromCamelCase() { const string input = "kebabCase"; @@ -226,7 +226,7 @@ public void Utility_String_ToKebabCase_FromCamelCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToKebabCase_FromPascalCase() { const string input = "KebabCase"; @@ -237,7 +237,7 @@ public void Utility_String_ToKebabCase_FromPascalCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void Utility_String_ToKebabCase_FromOther() { const string input = "Kebab,Case-This.Is Not"; @@ -248,7 +248,7 @@ public void Utility_String_ToKebabCase_FromOther() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_Capitalize_UncapitalizedString() { const string input = "hello, world!"; @@ -259,7 +259,7 @@ public void UtilityExtensions_String_Capitalize_UncapitalizedString() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_Capitalize_CapitalizedString() { const string input = "Hello, world!"; @@ -270,7 +270,7 @@ public void UtilityExtensions_String_Capitalize_CapitalizedString() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToCamelCase_FromSnakeCase() { const string input = "camel_case"; @@ -281,7 +281,7 @@ public void UtilityExtensions_String_ToCamelCase_FromSnakeCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToCamelCase_FromKebabCase() { const string input = "camel-case"; @@ -292,7 +292,7 @@ public void UtilityExtensions_String_ToCamelCase_FromKebabCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToCamelCase_FromCamelCase() { const string input = "camelCase"; @@ -303,7 +303,7 @@ public void UtilityExtensions_String_ToCamelCase_FromCamelCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToCamelCase_FromPascalCase() { const string input = "CamelCase"; @@ -314,7 +314,7 @@ public void UtilityExtensions_String_ToCamelCase_FromPascalCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToCamelCase_FromOther() { const string input = "Camel,Case-This.Is Not"; @@ -325,7 +325,7 @@ public void UtilityExtensions_String_ToCamelCase_FromOther() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToPascalCase_FromSnakeCase() { const string input = "pascal_case"; @@ -336,7 +336,7 @@ public void UtilityExtensions_String_ToPascalCase_FromSnakeCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToPascalCase_FromKebabCase() { const string input = "pascal-case"; @@ -347,7 +347,7 @@ public void UtilityExtensions_String_ToPascalCase_FromKebabCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToPascalCase_FromCamelCase() { const string input = "camelCase"; @@ -358,7 +358,7 @@ public void UtilityExtensions_String_ToPascalCase_FromCamelCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToPascalCase_FromPascalCase() { const string input = "PascalCase"; @@ -369,7 +369,7 @@ public void UtilityExtensions_String_ToPascalCase_FromPascalCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToPascalCase_FromOther() { const string input = "Pascal,Case-This.Is Not"; @@ -380,7 +380,7 @@ public void UtilityExtensions_String_ToPascalCase_FromOther() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToSnakeCase_FromSnakeCase() { const string input = "snake_case"; @@ -391,7 +391,7 @@ public void UtilityExtensions_String_ToSnakeCase_FromSnakeCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToSnakeCase_FromKebabCase() { const string input = "snake-case"; @@ -402,7 +402,7 @@ public void UtilityExtensions_String_ToSnakeCase_FromKebabCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToSnakeCase_FromCamelCase() { const string input = "snakeCase"; @@ -413,7 +413,7 @@ public void UtilityExtensions_String_ToSnakeCase_FromCamelCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToSnakeCase_FromPascalCase() { const string input = "SnakeCase"; @@ -424,7 +424,7 @@ public void UtilityExtensions_String_ToSnakeCase_FromPascalCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToSnakeCase_FromOther() { const string input = "Snake,Case-This.Is Not"; @@ -435,7 +435,7 @@ public void UtilityExtensions_String_ToSnakeCase_FromOther() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToKebabCase_FromSnakeCase() { const string input = "kebab_case"; @@ -446,7 +446,7 @@ public void UtilityExtensions_String_ToKebabCase_FromSnakeCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToKebabCase_FromKebabCase() { const string input = "kebab-case"; @@ -457,7 +457,7 @@ public void UtilityExtensions_String_ToKebabCase_FromKebabCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToKebabCase_FromCamelCase() { const string input = "kebabCase"; @@ -468,7 +468,7 @@ public void UtilityExtensions_String_ToKebabCase_FromCamelCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToKebabCase_FromPascalCase() { const string input = "KebabCase"; @@ -479,7 +479,7 @@ public void UtilityExtensions_String_ToKebabCase_FromPascalCase() Assert.AreEqual(expected, result); } - [TestMethod] + [Test] public void UtilityExtensions_String_ToKebabCase_FromOther() { const string input = "Kebab,Case-This.Is Not"; diff --git a/Underscore.cs/Action/Contract/Bind/IBind.cs b/Underscore.cs/Action/Contract/Bind/IBind.cs index ef8699a..e06fb73 100644 --- a/Underscore.cs/Action/Contract/Bind/IBind.cs +++ b/Underscore.cs/Action/Contract/Bind/IBind.cs @@ -1,6 +1,6 @@ using System; -namespace Underscore.Action +namespace Underscore.Action.Contract.Bind { public interface IBindComponent { diff --git a/Underscore.cs/Action/Contract/Bind/IPartial.cs b/Underscore.cs/Action/Contract/Bind/IPartial.cs index be40277..d4bf937 100644 --- a/Underscore.cs/Action/Contract/Bind/IPartial.cs +++ b/Underscore.cs/Action/Contract/Bind/IPartial.cs @@ -1,607 +1,605 @@ -using System; - -namespace Underscore.Action +namespace Underscore.Action { public interface IPartialComponent { /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a); + System.Action Partial(System.Action action, T1 a); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b); + System.Action Partial(System.Action action, T1 a, T2 b); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n); /// /// Binds the action partially, from left to right /// - Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n, T15 o); + System.Action Partial(System.Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n, T15 o); } } diff --git a/Underscore.cs/Action/Contract/Compose/ICompose.cs b/Underscore.cs/Action/Contract/Compose/ICompose.cs index 27a5f4b..5769490 100644 --- a/Underscore.cs/Action/Contract/Compose/ICompose.cs +++ b/Underscore.cs/Action/Contract/Compose/ICompose.cs @@ -5,12 +5,12 @@ namespace Underscore.Action public interface IComposeComponent { /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// Action Compose(Func start, Action end); /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// Action Compose(Func start, Func mid, Action end); diff --git a/Underscore.cs/Action/Contract/Synch/IOnce.cs b/Underscore.cs/Action/Contract/Synch/IOnce.cs index ad319ec..10dd683 100644 --- a/Underscore.cs/Action/Contract/Synch/IOnce.cs +++ b/Underscore.cs/Action/Contract/Synch/IOnce.cs @@ -1,6 +1,4 @@ -using System; - -namespace Underscore.Action +namespace Underscore.Action.Contract.Synch { public interface IOnceComponent { @@ -14,96 +12,96 @@ public interface IOnceComponent /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); /// /// Creates a version of the function that only runs once, /// all subsequent runs will return the same value /// - Action Once(Action action); + System.Action Once(System.Action action); } } diff --git a/Underscore.cs/Action/Implementation/Bind/Bind.cs b/Underscore.cs/Action/Implementation/Bind/Bind.cs index ae6e812..3134e90 100644 --- a/Underscore.cs/Action/Implementation/Bind/Bind.cs +++ b/Underscore.cs/Action/Implementation/Bind/Bind.cs @@ -1,4 +1,4 @@ -using System; +using Underscore.Action.Contract.Bind; namespace Underscore.Action { diff --git a/Underscore.cs/Action/Implementation/Bind/Partial.cs b/Underscore.cs/Action/Implementation/Bind/Partial.cs index b7b439f..c52ecfe 100644 --- a/Underscore.cs/Action/Implementation/Bind/Partial.cs +++ b/Underscore.cs/Action/Implementation/Bind/Partial.cs @@ -1,6 +1,4 @@ -using System; - -namespace Underscore.Action +namespace Underscore.Action { public class PartialComponent : IPartialComponent { @@ -9,7 +7,7 @@ public class PartialComponent : IPartialComponent /// public Action Partial(Action action, T1 a) { - return (b) => action(a, b); + return b => action(a, b); } /// @@ -25,7 +23,7 @@ public Action Partial(Action action, T1 a) /// public Action Partial(Action action, T1 a, T2 b) { - return (c) => action(a, b, c); + return c => action(a, b, c); } /// @@ -49,7 +47,7 @@ public Action Partial(Action action, T1 /// public Action Partial(Action action, T1 a, T2 b, T3 c) { - return (d) => action(a, b, c, d); + return d => action(a, b, c, d); } /// @@ -81,7 +79,7 @@ public Action Partial(Action act /// public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d) { - return (e) => action(a, b, c, d, e); + return e => action(a, b, c, d, e); } /// @@ -121,7 +119,7 @@ public Action Partial(Action public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e) { - return (f) => action(a, b, c, d, e, f); + return f => action(a, b, c, d, e, f); } /// @@ -169,7 +167,7 @@ public Action Partial(Action public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f) { - return (g) => action(a, b, c, d, e, f, g); + return g => action(a, b, c, d, e, f, g); } /// @@ -225,7 +223,7 @@ public Action Partial(Action public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g) { - return (h) => action(a, b, c, d, e, f, g, h); + return h => action(a, b, c, d, e, f, g, h); } /// @@ -289,7 +287,7 @@ public Action Partial(Action public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h) { - return (i) => action(a, b, c, d, e, f, g, h, i); + return i => action(a, b, c, d, e, f, g, h, i); } /// @@ -361,7 +359,7 @@ public Action Partial(Action public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i) { - return (j) => action(a, b, c, d, e, f, g, h, i, j); + return j => action(a, b, c, d, e, f, g, h, i, j); } /// @@ -441,7 +439,7 @@ public Action Partial(Ac /// public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j) { - return (k) => action(a, b, c, d, e, f, g, h, i, j, k); + return k => action(a, b, c, d, e, f, g, h, i, j, k); } /// @@ -529,7 +527,7 @@ public Action Partial public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k) { - return (l) => action(a, b, c, d, e, f, g, h, i, j, k, l); + return l => action(a, b, c, d, e, f, g, h, i, j, k, l); } /// @@ -625,7 +623,7 @@ public Action Partial public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l) { - return (m) => action(a, b, c, d, e, f, g, h, i, j, k, l, m); + return m => action(a, b, c, d, e, f, g, h, i, j, k, l, m); } /// @@ -729,7 +727,7 @@ public Action Partial public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m) { - return (n) => action(a, b, c, d, e, f, g, h, i, j, k, l, m, n); + return n => action(a, b, c, d, e, f, g, h, i, j, k, l, m, n); } /// @@ -841,7 +839,7 @@ public Action Partial public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n) { - return (o) => action(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); + return o => action(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); } /// @@ -961,7 +959,7 @@ public Action Partial public Action Partial(Action action, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n, T15 o) { - return (p) => action(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p); + return p => action(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p); } } } diff --git a/Underscore.cs/Action/Implementation/Compose/Apply.cs b/Underscore.cs/Action/Implementation/Compose/Apply.cs index c663d4a..fed0c63 100644 --- a/Underscore.cs/Action/Implementation/Compose/Apply.cs +++ b/Underscore.cs/Action/Implementation/Compose/Apply.cs @@ -1,6 +1,4 @@ -using System; - -namespace Underscore.Action +namespace Underscore.Action { public class ApplyComponent : IApplyComponent { diff --git a/Underscore.cs/Action/Implementation/Split/Curry.cs b/Underscore.cs/Action/Implementation/Split/Curry.cs index 6d2b49a..42b6151 100644 --- a/Underscore.cs/Action/Implementation/Split/Curry.cs +++ b/Underscore.cs/Action/Implementation/Split/Curry.cs @@ -14,10 +14,10 @@ public Func (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => - (m) => (n) => (o) => (p) => + a => b => c => d => + e => f => g => h => + i => j => k => l => + m => n => o => p => action(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p); } @@ -30,10 +30,10 @@ public Func>>>>>>>>>>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => - (m) => (n) => (o) => + a => b => c => d => + e => f => g => h => + i => j => k => l => + m => n => o => action(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); } @@ -46,10 +46,10 @@ public Func>>>>>>>>>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => - (m) => (n) => + a => b => c => d => + e => f => g => h => + i => j => k => l => + m => n => action(a, b, c, d, e, f, g, h, i, j, k, l, m, n); } @@ -62,10 +62,10 @@ public Func>>>>>>>>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => - (m) => + a => b => c => d => + e => f => g => h => + i => j => k => l => + m => action(a, b, c, d, e, f, g, h, i, j, k, l, m); } @@ -78,9 +78,9 @@ public Func>>>>>>>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => + a => b => c => d => + e => f => g => h => + i => j => k => l => action(a, b, c, d, e, f, g, h, i, j, k, l); } @@ -93,9 +93,9 @@ public Func>>>>>>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => + a => b => c => d => + e => f => g => h => + i => j => k => action(a, b, c, d, e, f, g, h, i, j, k); } @@ -108,9 +108,9 @@ public Func>>>>>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => + a => b => c => d => + e => f => g => h => + i => j => action(a, b, c, d, e, f, g, h, i, j); } @@ -124,8 +124,8 @@ public Func>>>>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => (i) => + a => b => c => d => + e => f => g => h => i => action(a, b, c, d, e, f, g, h, i); } @@ -138,8 +138,8 @@ public Func>>>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => + a => b => c => d => + e => f => g => h => action(a, b, c, d, e, f, g, h); } @@ -152,8 +152,8 @@ public Func public Func>>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => (g) => + a => b => c => d => + e => f => g => action(a, b, c, d, e, f, g); } @@ -166,8 +166,8 @@ public Func>>>>>> Cu public Func>>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => (f) => + a => b => c => d => + e => f => action(a, b, c, d, e, f); } @@ -180,8 +180,8 @@ public Func>>>>> Curry>>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => - (e) => + a => b => c => d => + e => action(a, b, c, d, e); } @@ -194,7 +194,7 @@ public Func>>>> Curry>>> Curry(Action action) { return - (a) => (b) => (c) => (d) => + a => b => c => d => action(a, b, c, d); } @@ -207,7 +207,7 @@ public Func>>> Curry(Action>> Curry(Action action) { return - (a) => (b) => (c) => + a => b => c => action(a, b, c); } @@ -220,7 +220,7 @@ public Func>> Curry(Action actio public Func> Curry(Action action) { return - (a) => (b) => action(a, b); + a => b => action(a, b); } } } diff --git a/Underscore.cs/Action/Implementation/Split/Split.cs b/Underscore.cs/Action/Implementation/Split/Split.cs index 969d4ee..37531a5 100644 --- a/Underscore.cs/Action/Implementation/Split/Split.cs +++ b/Underscore.cs/Action/Implementation/Split/Split.cs @@ -10,8 +10,8 @@ public class SplitComponent : ISplitComponent public Func> Split(Action action) { return - (a) => - (b) => + a => + b => action(a, b); } diff --git a/Underscore.cs/Action/Implementation/Synch/Once.cs b/Underscore.cs/Action/Implementation/Synch/Once.cs index 609cf81..751fcdb 100644 --- a/Underscore.cs/Action/Implementation/Synch/Once.cs +++ b/Underscore.cs/Action/Implementation/Synch/Once.cs @@ -1,4 +1,4 @@ -using System; +using Underscore.Action.Contract.Synch; namespace Underscore.Action { diff --git a/Underscore.cs/Collection/Implementation/Creation.cs b/Underscore.cs/Collection/Implementation/Creation.cs index 67c2a13..83d09e2 100644 --- a/Underscore.cs/Collection/Implementation/Creation.cs +++ b/Underscore.cs/Collection/Implementation/Creation.cs @@ -23,63 +23,14 @@ public Func> Snapshot(IEnumerable collection) /// public IEnumerable Extend(IEnumerable collection, int length) { - using (var iter = collection.GetEnumerator()) - { - bool hasReset = true; - - try - { - // some IEnumerables (such as those returned by LINQ) - // don't have a reset method, so instead we need - // to default to using an array made from the enumerable - iter.Reset(); - } - catch(NotImplementedException) - { - hasReset = false; - } - - if (hasReset) - { - // make sure there's something to extend - if (!iter.MoveNext()) throw new ApplicationException("Cannot extend an empty collection"); - // return the first value - yield return iter.Current; - - //make i = 1 instead of zero to account for the first return. - for (int i = 1; i < length; i++) - { - // this check also moves to the next item - // if we haven't hit the end, - // so we can just yield right after - if (!iter.MoveNext()) - { - // restart the cycle if we hit the end of collection - iter.Reset(); - iter.MoveNext(); - } - - yield return iter.Current; - } - } - else - { - var arr = collection.ToArray(); - var count = 0; - var i = 0; - - while (count < length) - { - // reset index if necessary - if (i == arr.Length) i = 0; - - yield return arr[i]; - - i++; - count++; - } - } - } + var list = collection.ToList(); + while(length > 0) + foreach (var item in list) + if (length > 0) + { + length--; + yield return item; + } } /// @@ -87,60 +38,10 @@ public IEnumerable Extend(IEnumerable collection, int length) /// public IEnumerable Cycle(IEnumerable collection) { - using (var iter = collection.GetEnumerator()) - { - bool hasReset = true; - - try - { - // some IEnumerables (such as those returned by LINQ) - // don't have a reset method, so instead we need - // to default to using an array made from the enumerable - iter.Reset(); - } - catch (NotImplementedException) - { - hasReset = false; - } - - if (hasReset) - { - // make sure there's something to extend - if (!iter.MoveNext()) throw new ApplicationException("Cannot extend an empty collection"); - // return the first value - yield return iter.Current; - - while(true) - { - // this check also moves to the next item - // if we haven't hit the end, - // so we can just yield right after - if (!iter.MoveNext()) - { - // restart the cycle if we hit the end of collection - iter.Reset(); - iter.MoveNext(); - } - - yield return iter.Current; - } - } - else - { - var arr = collection.ToArray(); - var i = 0; - - while (true) - { - // reset index if necessary - if (i == arr.Length) i = 0; - - yield return arr[i]; - - i++; - } - } - } + var list = collection.ToList(); + while (true) + foreach (var item in list) + yield return item; } } } diff --git a/Underscore.cs/Collection/Implementation/Partition.cs b/Underscore.cs/Collection/Implementation/Partition.cs index 6168edc..f7f9110 100644 --- a/Underscore.cs/Collection/Implementation/Partition.cs +++ b/Underscore.cs/Collection/Implementation/Partition.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Underscore.Utility; namespace Underscore.Collection { diff --git a/Underscore.cs/Collection/Implementation/Zip/Zip.cs b/Underscore.cs/Collection/Implementation/Zip/Zip.cs index 4c4151f..4828fa7 100644 --- a/Underscore.cs/Collection/Implementation/Zip/Zip.cs +++ b/Underscore.cs/Collection/Implementation/Zip/Zip.cs @@ -1,7 +1,7 @@ using System; using System.Collections; -using System.Collections.Generic; using System.Linq; +using System.Collections.Generic; namespace Underscore.Collection { diff --git a/Underscore.cs/Extensions/Extensions.cs b/Underscore.cs/Extensions/ExtensionsImpl.cs similarity index 99% rename from Underscore.cs/Extensions/Extensions.cs rename to Underscore.cs/Extensions/ExtensionsImpl.cs index 0b7743e..3971b5e 100644 --- a/Underscore.cs/Extensions/Extensions.cs +++ b/Underscore.cs/Extensions/ExtensionsImpl.cs @@ -10,7 +10,7 @@ namespace Underscore.Extensions { - public static class Extensions + public static class ExtensionsImpl { private static readonly Module.Collection _collection = new Module.Collection( new CompareComponent(), diff --git a/Underscore.cs/Function/Contract/Compose/ICompose.cs b/Underscore.cs/Function/Contract/Compose/ICompose.cs index 50a5b5d..6900665 100644 --- a/Underscore.cs/Function/Contract/Compose/ICompose.cs +++ b/Underscore.cs/Function/Contract/Compose/ICompose.cs @@ -5,82 +5,82 @@ namespace Underscore.Function public interface IComposeComponent { /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func mid, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func i, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func i, Func j, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func i, Func j, Func k, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func i, Func j, Func k, Func l, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func i, Func j, Func k, Func l, Func m, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func i, Func j, Func k, Func l, Func m, Func n, Func end); /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func i, Func j, Func k, Func l, Func m, Func n, Func o, Func end); diff --git a/Underscore.cs/Function/Contract/ICache.cs b/Underscore.cs/Function/Contract/ICache.cs index 736dc6f..13e516f 100644 --- a/Underscore.cs/Function/Contract/ICache.cs +++ b/Underscore.cs/Function/Contract/ICache.cs @@ -1,9 +1,12 @@ -using System; + // This code has been automatically generated // if you want to make changes make them on // the corresponding the text template file // Cache.tt + +using System; + namespace Underscore.Function { diff --git a/Underscore.cs/Function/Contract/ICompact.cs b/Underscore.cs/Function/Contract/ICompact.cs index dd20cba..2697efe 100644 --- a/Underscore.cs/Function/Contract/ICompact.cs +++ b/Underscore.cs/Function/Contract/ICompact.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Underscore.Function { diff --git a/Underscore.cs/Function/Implementation/Bind/Partial.cs b/Underscore.cs/Function/Implementation/Bind/Partial.cs index 1dc0485..5f419a7 100644 --- a/Underscore.cs/Function/Implementation/Bind/Partial.cs +++ b/Underscore.cs/Function/Implementation/Bind/Partial.cs @@ -9,7 +9,7 @@ public class PartialComponent : IPartialComponent /// public Func Partial(Func function, T1 a) { - return (b) => function(a, b); + return b => function(a, b); } /// @@ -25,7 +25,7 @@ public Func Partial(Func public Func Partial(Func function, T1 a, T2 b) { - return (c) => function(a, b, c); + return c => function(a, b, c); } /// @@ -49,7 +49,7 @@ public Func Partial(Func public Func Partial(Func function, T1 a, T2 b, T3 c) { - return (d) => function(a, b, c, d); + return d => function(a, b, c, d); } /// @@ -81,7 +81,7 @@ public Func Partial(Func public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d) { - return (e) => function(a, b, c, d, e); + return e => function(a, b, c, d, e); } /// @@ -121,7 +121,7 @@ public Func Partial(Func public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e) { - return (f) => function(a, b, c, d, e, f); + return f => function(a, b, c, d, e, f); } /// @@ -169,7 +169,7 @@ public Func Partial(Func public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f) { - return (g) => function(a, b, c, d, e, f, g); + return g => function(a, b, c, d, e, f, g); } /// @@ -225,7 +225,7 @@ public Func Partial(Fu /// public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g) { - return (h) => function(a, b, c, d, e, f, g, h); + return h => function(a, b, c, d, e, f, g, h); } /// @@ -289,7 +289,7 @@ public Func Partial public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h) { - return (i) => function(a, b, c, d, e, f, g, h, i); + return i => function(a, b, c, d, e, f, g, h, i); } /// @@ -361,7 +361,7 @@ public Func Partial public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i) { - return (j) => function(a, b, c, d, e, f, g, h, i, j); + return j => function(a, b, c, d, e, f, g, h, i, j); } /// @@ -441,7 +441,7 @@ public Func Partial public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j) { - return (k) => function(a, b, c, d, e, f, g, h, i, j, k); + return k => function(a, b, c, d, e, f, g, h, i, j, k); } /// @@ -529,7 +529,7 @@ public Func Partial public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k) { - return (l) => function(a, b, c, d, e, f, g, h, i, j, k, l); + return l => function(a, b, c, d, e, f, g, h, i, j, k, l); } /// @@ -625,7 +625,7 @@ public Func Partial public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l) { - return (m) => function(a, b, c, d, e, f, g, h, i, j, k, l, m); + return m => function(a, b, c, d, e, f, g, h, i, j, k, l, m); } /// @@ -729,7 +729,7 @@ public Func Partial public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m) { - return (n) => function(a, b, c, d, e, f, g, h, i, j, k, l, m, n); + return n => function(a, b, c, d, e, f, g, h, i, j, k, l, m, n); } /// @@ -841,7 +841,7 @@ public Func Partial public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n) { - return (o) => function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); + return o => function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); } /// @@ -961,7 +961,7 @@ public Func Partial public Func Partial(Func function, T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, T7 g, T8 h, T9 i, T10 j, T11 k, T12 l, T13 m, T14 n, T15 o) { - return (p) => function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p); + return p => function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p); } } } \ No newline at end of file diff --git a/Underscore.cs/Function/Implementation/Boolean/And.cs b/Underscore.cs/Function/Implementation/Boolean/And.cs index ffdd2a5..e960984 100644 --- a/Underscore.cs/Function/Implementation/Boolean/And.cs +++ b/Underscore.cs/Function/Implementation/Boolean/And.cs @@ -18,7 +18,7 @@ public Func And(params Func[] fns) /// public Func And(params Func[] fns) { - return (a) => fns.Aggregate(true, (prev, current) => prev && current(a)); + return a => fns.Aggregate(true, (prev, current) => prev && current(a)); } /// diff --git a/Underscore.cs/Function/Implementation/Boolean/Negate.cs b/Underscore.cs/Function/Implementation/Boolean/Negate.cs index 5d7f632..b45eecd 100644 --- a/Underscore.cs/Function/Implementation/Boolean/Negate.cs +++ b/Underscore.cs/Function/Implementation/Boolean/Negate.cs @@ -17,7 +17,7 @@ public Func Negate(Func fn) /// public Func Negate(Func fn) { - return (a) => !fn(a); + return a => !fn(a); } /// diff --git a/Underscore.cs/Function/Implementation/Boolean/Or.cs b/Underscore.cs/Function/Implementation/Boolean/Or.cs index db77eeb..1ea263f 100644 --- a/Underscore.cs/Function/Implementation/Boolean/Or.cs +++ b/Underscore.cs/Function/Implementation/Boolean/Or.cs @@ -18,7 +18,7 @@ public Func Or(params Func[] fns) /// public Func Or(params Func[] fns) { - return (a) => fns.Aggregate(false, (prev, current) => prev || current(a)); + return a => fns.Aggregate(false, (prev, current) => prev || current(a)); } /// diff --git a/Underscore.cs/Function/Implementation/Cache.cs b/Underscore.cs/Function/Implementation/Cache.cs index f40b392..dc3c7f6 100644 --- a/Underscore.cs/Function/Implementation/Cache.cs +++ b/Underscore.cs/Function/Implementation/Cache.cs @@ -26,7 +26,7 @@ public Func Memoize(Func function) var localStore = new Dictionary(); var locking = new object(); var fn = function; - return (a) => + return a => { if (a == null) return fn(a); diff --git a/Underscore.cs/Function/Implementation/Compose/Compose.cs b/Underscore.cs/Function/Implementation/Compose/Compose.cs index ec7e381..9d5e584 100644 --- a/Underscore.cs/Function/Implementation/Compose/Compose.cs +++ b/Underscore.cs/Function/Implementation/Compose/Compose.cs @@ -178,7 +178,7 @@ public Func Compose(params Func[] functions) if (targs.Skip(1).FirstOrDefault() == null) return t => targs[0](t); - return (t) => targs.Aggregate(t, (curr, next) => next(curr)); + return t => targs.Aggregate(t, (curr, next) => next(curr)); } } } \ No newline at end of file diff --git a/Underscore.cs/Function/Implementation/Convert.cs b/Underscore.cs/Function/Implementation/Convert.cs index 0111dd6..2fbd1e2 100644 --- a/Underscore.cs/Function/Implementation/Convert.cs +++ b/Underscore.cs/Function/Implementation/Convert.cs @@ -12,7 +12,7 @@ public System.Action ToAction(Func function) public Action ToAction(Func function) { - return (a) => function(a); + return a => function(a); } public Action ToAction(Func function) diff --git a/Underscore.cs/Function/Implementation/Split/Curry.cs b/Underscore.cs/Function/Implementation/Split/Curry.cs index cc481c9..d367f66 100644 --- a/Underscore.cs/Function/Implementation/Split/Curry.cs +++ b/Underscore.cs/Function/Implementation/Split/Curry.cs @@ -9,10 +9,10 @@ public class CurryComponent : ICurryComponent /// public Func>>>>>>>>>>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => - (m) => (n) => (o) => (p) => + return a => b => c => d => + e => f => g => h => + i => j => k => l => + m => n => o => p => function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p); } @@ -21,10 +21,10 @@ public Func public Func>>>>>>>>>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => - (m) => (n) => (o) => + return a => b => c => d => + e => f => g => h => + i => j => k => l => + m => n => o => function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); } @@ -33,10 +33,10 @@ public Func public Func>>>>>>>>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => - (m) => (n) => + return a => b => c => d => + e => f => g => h => + i => j => k => l => + m => n => function(a, b, c, d, e, f, g, h, i, j, k, l, m, n); } @@ -45,10 +45,10 @@ public Func public Func>>>>>>>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => - (m) => + return a => b => c => d => + e => f => g => h => + i => j => k => l => + m => function(a, b, c, d, e, f, g, h, i, j, k, l, m); } @@ -57,9 +57,9 @@ public Func public Func>>>>>>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => (l) => + return a => b => c => d => + e => f => g => h => + i => j => k => l => function(a, b, c, d, e, f, g, h, i, j, k, l); } @@ -68,9 +68,9 @@ public Func public Func>>>>>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => (k) => + return a => b => c => d => + e => f => g => h => + i => j => k => function(a, b, c, d, e, f, g, h, i, j, k); } @@ -79,9 +79,9 @@ public Func public Func>>>>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => (j) => + return a => b => c => d => + e => f => g => h => + i => j => function(a, b, c, d, e, f, g, h, i, j); } @@ -90,9 +90,9 @@ public Func public Func>>>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => - (i) => + return a => b => c => d => + e => f => g => h => + i => function(a, b, c, d, e, f, g, h, i); } @@ -101,8 +101,8 @@ public Func public Func>>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => (h) => + return a => b => c => d => + e => f => g => h => function(a, b, c, d, e, f, g, h); } @@ -111,8 +111,8 @@ public Func public Func>>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => (g) => + return a => b => c => d => + e => f => g => function(a, b, c, d, e, f, g); } @@ -121,8 +121,8 @@ public Func>> /// public Func>>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => (f) => + return a => b => c => d => + e => f => function(a, b, c, d, e, f); } @@ -131,8 +131,8 @@ public Func>>>>> Curry /// public Func>>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => - (e) => + return a => b => c => d => + e => function(a, b, c, d, e); } @@ -141,7 +141,7 @@ public Func>>>> Curry public Func>>> Curry(Func function) { - return (a) => (b) => (c) => (d) => + return a => b => c => d => function(a, b, c, d); } @@ -151,7 +151,7 @@ public Func>>> Curry public Func>> Curry(Func function) { - return (a) => (b) => (c) => function(a, b, c); + return a => b => c => function(a, b, c); } @@ -160,7 +160,7 @@ public Func>> Curry(Func public Func> Curry(Func function) { - return (a) => (b) => function(a, b); + return a => b => function(a, b); } } } diff --git a/Underscore.cs/Function/Implementation/Split/Split.cs b/Underscore.cs/Function/Implementation/Split/Split.cs index 59aa6d7..617ecaf 100644 --- a/Underscore.cs/Function/Implementation/Split/Split.cs +++ b/Underscore.cs/Function/Implementation/Split/Split.cs @@ -87,8 +87,8 @@ public Func> Split(Func> Split(Func function) { return - (a) => - (b) => + a => + b => function(a, b); } } diff --git a/Underscore.cs/Function/Implementation/Synch/After.cs b/Underscore.cs/Function/Implementation/Synch/After.cs index 9b25da2..e657f46 100644 --- a/Underscore.cs/Function/Implementation/Synch/After.cs +++ b/Underscore.cs/Function/Implementation/Synch/After.cs @@ -47,7 +47,7 @@ public Func> After(Func function, int c var first = default(TResult); int doneChanging = 0; - return (a) => + return a => { try { diff --git a/Underscore.cs/Function/Implementation/Synch/Before.cs b/Underscore.cs/Function/Implementation/Synch/Before.cs index 7b1100f..736e8bf 100644 --- a/Underscore.cs/Function/Implementation/Synch/Before.cs +++ b/Underscore.cs/Function/Implementation/Synch/Before.cs @@ -40,7 +40,7 @@ public Func Before(Func function, int count) int counter = count; TResult tresult = default(TResult); - return (a) => + return a => { if (Interlocked.Decrement(ref counter) >= 0) return tresult = function(a); diff --git a/Underscore.cs/Function/Implementation/Synch/Debounce.cs b/Underscore.cs/Function/Implementation/Synch/Debounce.cs index 519828a..ea5adb9 100644 --- a/Underscore.cs/Function/Implementation/Synch/Debounce.cs +++ b/Underscore.cs/Function/Implementation/Synch/Debounce.cs @@ -41,7 +41,7 @@ public Func> Debounce(Func function, in int isready = 0; var retv = new { result = default(TResult) }; var fn = function; - return async (targ) => + return async targ => { var curr = Task.Delay(milliseconds); diff --git a/Underscore.cs/Function/Implementation/Synch/Delay.cs b/Underscore.cs/Function/Implementation/Synch/Delay.cs index 4ab6d9e..253673f 100644 --- a/Underscore.cs/Function/Implementation/Synch/Delay.cs +++ b/Underscore.cs/Function/Implementation/Synch/Delay.cs @@ -33,7 +33,7 @@ public Func> Delay(Func function, int millisecon /// public Func> Delay(Func function, int milliseconds) { - return async (t) => + return async t => { await Task.Delay(milliseconds); Thread.MemoryBarrier(); diff --git a/Underscore.cs/Function/Implementation/Synch/Once.cs b/Underscore.cs/Function/Implementation/Synch/Once.cs index f6fb91a..6e32b09 100644 --- a/Underscore.cs/Function/Implementation/Synch/Once.cs +++ b/Underscore.cs/Function/Implementation/Synch/Once.cs @@ -35,7 +35,7 @@ public Func Once(Func function) int ran = 0; TResult result = default(TResult); - return (targ) => + return targ => { if (Interlocked.CompareExchange(ref ran, 1, 0) == 0) result = function(targ); diff --git a/Underscore.cs/Module/Action.cs b/Underscore.cs/Module/Action.cs index 7362138..5e1d630 100644 --- a/Underscore.cs/Module/Action.cs +++ b/Underscore.cs/Module/Action.cs @@ -1,6 +1,8 @@ using System; using System.Threading.Tasks; using Underscore.Action; +using Underscore.Action.Contract.Bind; +using Underscore.Action.Contract.Synch; namespace Underscore.Module { @@ -1386,7 +1388,7 @@ public void Apply(Action acti } /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose(Func start, Action end) { @@ -1394,7 +1396,7 @@ public Action Compose(Func start, Action - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose(Func start, Func mid, Action end) @@ -1403,7 +1405,7 @@ public Action Compose(Func start, Func } /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose(Func start, Func a, Func b, Action end) @@ -1412,7 +1414,7 @@ public Action Compose(Func } /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose(Func start, Func a, Func b, Func c, Action end) @@ -1421,7 +1423,7 @@ public Action Compose(Func - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose(Func start, Func a, Func b, Func c, Func d, @@ -1431,7 +1433,7 @@ public Action Compose(Func } /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose(Func start, Func a, Func b, Func c, Func d, @@ -1442,7 +1444,7 @@ public Action Compose - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose( Func start, Func a, Func b, Func c, @@ -1453,7 +1455,7 @@ public Action Compose - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose( Func start, Func a, Func b, Func c, @@ -1464,7 +1466,7 @@ public Action Compose - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose( Func start, Func a, Func b, @@ -1475,7 +1477,7 @@ public Action Compose - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose ( @@ -1488,7 +1490,7 @@ public Action Compose } /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose ( @@ -1500,7 +1502,7 @@ public Action Compose } /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose ( @@ -1513,7 +1515,7 @@ public Action Compose } /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose Compose } /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose Compose } /// - /// Creates a sigle composite action from the passed functions + /// Creates a single composite action from the passed functions /// public Action Compose > Curry(Func } /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func end) @@ -1748,7 +1748,7 @@ public Func Compose - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func end) @@ -1757,7 +1757,7 @@ public Func Compose - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func end) @@ -1766,7 +1766,7 @@ public Func Compose - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func end) @@ -1775,7 +1775,7 @@ public Func Compose - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose( Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func i, Func end) @@ -1784,7 +1784,7 @@ public Func Compose - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose( Func start, Func a, Func b, Func c, Func d, Func e, Func f, Func g, Func h, Func i, Func j, Func end) @@ -1793,7 +1793,7 @@ public Func Compose - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose @@ -1803,7 +1803,7 @@ public Func Compose } /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose Compose } /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose Compose } /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose Compose } /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose Compose } /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(params Func[] args) { @@ -1983,7 +1983,7 @@ public TResult Apply(Func fn, T[] arguments) } /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(Func start, Func end) { @@ -1991,7 +1991,7 @@ public Func Compose(Func s } /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(Func start, Func mid, Func end) { @@ -1999,7 +1999,7 @@ public Func Compose(Func - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(Func start, Func a, Func b, Func end) { @@ -2007,7 +2007,7 @@ public Func Compose(Fu } /// - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(Func start, Func a, Func b, Func c, Func end) { @@ -2015,7 +2015,7 @@ public Func Compose - /// Creates a sigle composite function from the passed functions + /// Creates a single composite function from the passed functions /// public Func Compose(Func start, Func a, Func b, Func c, Func d, Func end) diff --git a/Underscore.cs/Object/Reflection/Implementation/Method.cs b/Underscore.cs/Object/Reflection/Implementation/Method.cs index 037cbe1..abb943d 100644 --- a/Underscore.cs/Object/Reflection/Implementation/Method.cs +++ b/Underscore.cs/Object/Reflection/Implementation/Method.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using Underscore.Function; namespace Underscore.Object.Reflection { diff --git a/Underscore.cs/Object/Reflection/MethodBase.cs b/Underscore.cs/Object/Reflection/MethodBase.cs index ef7458c..d305dea 100644 --- a/Underscore.cs/Object/Reflection/MethodBase.cs +++ b/Underscore.cs/Object/Reflection/MethodBase.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Reflection; using Underscore.Function; using Underscore.Utility; diff --git a/Underscore.cs/Object/Transformation/Contract/IDynamic.cs b/Underscore.cs/Object/Transformation/Contract/IDynamic.cs index a2117f1..c54816c 100644 --- a/Underscore.cs/Object/Transformation/Contract/IDynamic.cs +++ b/Underscore.cs/Object/Transformation/Contract/IDynamic.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Underscore.Object +namespace Underscore.Object { public interface IDynamicComponent { diff --git a/Underscore.cs/Object/Transformation/Implementation/Transpose.cs b/Underscore.cs/Object/Transformation/Implementation/Transpose.cs index efee9d3..3f29698 100644 --- a/Underscore.cs/Object/Transformation/Implementation/Transpose.cs +++ b/Underscore.cs/Object/Transformation/Implementation/Transpose.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Linq; using System.Reflection; using Underscore.Object.Reflection; diff --git a/Underscore.cs/Properties/AssemblyInfo.cs b/Underscore.cs/Properties/AssemblyInfo.cs index f513041..da90717 100644 --- a/Underscore.cs/Properties/AssemblyInfo.cs +++ b/Underscore.cs/Properties/AssemblyInfo.cs @@ -4,8 +4,9 @@ [assembly: AssemblyTitle("Underscore.cs")] [assembly: AssemblyDescription("Unified Utility Library Underscore.cs")] [assembly: AssemblyProduct("Underscore.cs")] -[assembly: AssemblyCopyright("Copyright © 2014-2016 Chip Keyser, Chris Keyser")] +[assembly: AssemblyCopyright("Copyright © 2014-2025 Chip Keyser, Chris Keyser")] [assembly: ComVisible(false)] [assembly: Guid("b96a9e7d-de48-4b0d-8397-d98a7a734880")] -[assembly: AssemblyVersion("1.0.0.1")] -[assembly: AssemblyFileVersion("1.0.0.1")] +[assembly: AssemblyVersion("2.0.0")] +[assembly: AssemblyFileVersion("2.0.0")] +[assembly: AssemblyInformationalVersion("2.0.0+02668b93aa59d44c103eb421f84e4c331b7f623f")] diff --git a/Underscore.cs/Setup/Action.cs b/Underscore.cs/Setup/Action.cs index 2539a8c..e72cd93 100644 --- a/Underscore.cs/Setup/Action.cs +++ b/Underscore.cs/Setup/Action.cs @@ -1,4 +1,6 @@ using Underscore.Action; +using Underscore.Action.Contract.Bind; +using Underscore.Action.Contract.Synch; using Underscore.Setup.Liteioc; namespace Underscore.Setup diff --git a/Underscore.cs/Underscore.cs.csproj b/Underscore.cs/Underscore.cs.csproj index 808f3a5..4eeefcb 100644 --- a/Underscore.cs/Underscore.cs.csproj +++ b/Underscore.cs/Underscore.cs.csproj @@ -1,201 +1,20 @@ - - - - - Release - AnyCPU - {946C4F0D-101A-46DB-8C41-C102D0947E99} - Library - Properties + + + Underscore Underscore.cs - v4.5 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - false - - - - + Library + enable + enable + default + false + net9.0;net8.0; + - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/Underscore.cs/Utility/Implementation/String.cs b/Underscore.cs/Utility/Implementation/String.cs index 79ca290..1fef155 100644 --- a/Underscore.cs/Utility/Implementation/String.cs +++ b/Underscore.cs/Utility/Implementation/String.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; diff --git a/global.json b/global.json new file mode 100644 index 0000000..dad2db5 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "8.0.0", + "rollForward": "latestMajor", + "allowPrerelease": true + } +} \ No newline at end of file