{"id":28274020,"url":"https://github.com/condef5/redux-poc-in-c-","last_synced_at":"2025-11-17T14:36:09.903Z","repository":{"id":292264814,"uuid":"980336519","full_name":"condef5/redux-poc-in-c-","owner":"condef5","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-09T01:05:35.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T01:16:18.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/condef5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-09T01:02:22.000Z","updated_at":"2025-05-09T01:05:38.000Z","dependencies_parsed_at":"2025-05-09T02:24:39.583Z","dependency_job_id":"4f8941b0-668b-4007-af63-f975fb42e6bf","html_url":"https://github.com/condef5/redux-poc-in-c-","commit_stats":null,"previous_names":["condef5/redux-poc-in-c-"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/condef5/redux-poc-in-c-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/condef5%2Fredux-poc-in-c-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/condef5%2Fredux-poc-in-c-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/condef5%2Fredux-poc-in-c-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/condef5%2Fredux-poc-in-c-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/condef5","download_url":"https://codeload.github.com/condef5/redux-poc-in-c-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/condef5%2Fredux-poc-in-c-/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284900267,"owners_count":27081662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-17T02:00:06.431Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-21T01:16:07.487Z","updated_at":"2025-11-17T14:36:09.898Z","avatar_url":"https://github.com/condef5.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redux Toolkit Example in C# (.NET)\n\nThis project is a Proof of Concept (POC) demonstrating a Redux-like state management pattern in C# using .NET. It is inspired by the Redux Toolkit commonly used in JavaScript/TypeScript, but implemented with C# idioms such as records, immutability, and delegates.\n\n## Features\n- Immutable state management\n- Actions and reducers\n- Store with subscription support\n- Example domain: Battle state with players and turn management\n\n## Project Structure\n```\n/ReduxToolkitExample.sln          # Solution file\n/App/\n  App.csproj                     # Project file\n  Program.cs                     # Main entry point and usage example\n  BattleStore.cs                 # Battle state, actions, and reducer\n  /Lib/\n    Action.cs                    # Action interface\n    Reducer.cs                   # Reducer builder/creator\n    Store.cs                     # Store implementation\n```\n\n## How to Run\n\n1. **Ensure you have [.NET 6.0 SDK](https://dotnet.microsoft.com/download) or later installed.**\n\n2. **Restore dependencies (if any):**\n   ```sh\n   dotnet restore App/App.csproj\n   ```\n\n3. **Build the project:**\n   ```sh\n   dotnet build App/App.csproj\n   ```\n\n4. **Run the example:**\n   ```sh\n   dotnet run --project App/App.csproj\n   ```\n\nYou should see output in the console showing the state changes as actions are dispatched to the store.\n\n## Example Output\n```\nCurrent state =\u003e Turns: 1, Players: []\nCurrent state =\u003e Turns: 6, Players: []\nCurrent state =\u003e Turns: 9, Players: []\nCurrent state =\u003e Turns: 9, Players: [Alice]\nCurrent state =\u003e Turns: 9, Players: [Alice, Bob]\nCurrent state =\u003e Turns: 8, Players: [Alice, Bob]\nLast state =\u003e Turns: 8, Players: [Alice, Bob]\n```\n\n## How It Works\n- **Actions**: Represent state changes (e.g., `IncreaseTurnAction`, `AddPlayerAction`).\n- **Reducer**: Pure functions that calculate the new state based on the current state and an action.\n- **Store**: Holds the state, allows dispatching actions, and supports subscriptions to state changes.\n- **BattleStore**: Example implementation for managing turns and players.\n\n## Customization\nYou can add new actions, state fields, and reducer logic by following the patterns in `BattleStore.cs` and the `Lib` folder.\n\n## License\nThis POC is for demonstration purposes only. Feel free to use or modify it as needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcondef5%2Fredux-poc-in-c-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcondef5%2Fredux-poc-in-c-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcondef5%2Fredux-poc-in-c-/lists"}