{"id":15039338,"url":"https://github.com/rchanlatte95/orderedevents","last_synced_at":"2026-02-10T06:33:49.407Z","repository":{"id":185465886,"uuid":"673546802","full_name":"rchanlatte95/OrderedEvents","owner":"rchanlatte95","description":"A library that lets you order the execution of your event functions. There is a special focus on conciseness and small file footprint.","archived":false,"fork":false,"pushed_at":"2024-05-03T03:21:34.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T15:16:59.416Z","etag":null,"topics":["c-sharp","csharp","csharp-code","csharp-library","dot-net","dotnet","event-driven-architecture","event-management","single-file"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rchanlatte95.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-08-01T22:07:13.000Z","updated_at":"2024-05-03T03:21:37.000Z","dependencies_parsed_at":"2024-03-27T20:33:07.852Z","dependency_job_id":"9c94d1fd-50d2-4061-80ae-95683572a946","html_url":"https://github.com/rchanlatte95/OrderedEvents","commit_stats":null,"previous_names":["rchanlatte95/orderedevents"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rchanlatte95/OrderedEvents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rchanlatte95%2FOrderedEvents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rchanlatte95%2FOrderedEvents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rchanlatte95%2FOrderedEvents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rchanlatte95%2FOrderedEvents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rchanlatte95","download_url":"https://codeload.github.com/rchanlatte95/OrderedEvents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rchanlatte95%2FOrderedEvents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271680421,"owners_count":24802074,"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-08-22T02:00:08.480Z","response_time":65,"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":["c-sharp","csharp","csharp-code","csharp-library","dot-net","dotnet","event-driven-architecture","event-management","single-file"],"created_at":"2024-09-24T20:42:29.563Z","updated_at":"2026-02-10T06:33:49.349Z","avatar_url":"https://github.com/rchanlatte95.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OrderedEvents\n\nSingle-file library that allows you to order event function execution. Currently\nat 190 LOC.\n\n### Dependencies\n\nNone from what I can tell. \nHere are some caveats:\n\n1. Compiled and tested for .NET 6, no implicit usings, targeting x86 Windows platform\n2. Have not compiled for/with any .NET Framework version\n3. Have not included or used any external packages or dependencies\n4. Does not use any unsafe code blocks\n\n### Quick Start\n\n1. Download OrderedEvents.cs file\n2. Place it into your solution/project\n3. Compile and Build\n4. Done\n\n### Quick Example\n\n```cs\n\nTextBox OutputTxtBox = new();\nButton TestOrderedEventBtn = new();\nOrderedEvent\u003cRoutedEventArgs\u003e OrderedClick = new();\n\npublic void TestMethod0(object sender, RoutedEventArgs e) =\u003e OutputTxtBox.Text += $\"0\\n\";\npublic void TestMethod1(object sender, RoutedEventArgs e) =\u003e OutputTxtBox.Text += $\"1\\n\";\npublic void TestMethod2(object sender, RoutedEventArgs e) =\u003e OutputTxtBox.Text += $\"2\\n\";\npublic void TestMethod3(object sender, RoutedEventArgs e) =\u003e OutputTxtBox.Text += $\"3\\n\";\npublic void TestMethod4(object sender, RoutedEventArgs e) =\u003e OutputTxtBox.Text += $\"4\\n\";\npublic void TestMethod5(object sender, RoutedEventArgs e) =\u003e OutputTxtBox.Text += $\"5\\n\";\npublic void ResetTextBox(object sender, RoutedEventArgs e) =\u003e OutputTxtBox.Text = string.Empty;\n\npublic void Main()\n{\n\t// Attach our OrderedEvent object to execute when the event is raised.\n\tTestOrderedEventBtn.Click += OrderedClick.Raise;\n\t\n\t// Subscribe some methods to executed when the button is pressed.\n\t// NOTE: Methods will generally execute at the order they were assigned.\n\tOrderedClick += TestMethod0;\n\tOrderedClick += TestMethod1;\n\tOrderedClick += TestMethod2;\n\tOrderedClick += TestMethod3;\n\tOrderedClick += TestMethod4;\n\tOrderedClick += TestMethod5;\n\tOrderedClick += ResetTextBox;\n\t\n\t// Supports removal\n\tOrderedClick -= TestMethod1;\n\tOrderedClick -= TestMethod2;\n\t\n\t// Decide I want the text box reset to be at the very start.\n\tvar modifiedAct = OrderedClick.GetOrderedAction(ResetTextBox);\n\tif (modifiedAct != null) modifiedAct.ExecutionOrder = -100;\n\t\n\t// I'd also like the first method subscribed to execute at the very end instead.\n\tmodifiedAct = OrderedClick.GetOrderedAction(TestMethod0);\n\tif (modifiedAct != null) modifiedAct.ExecutionOrder = 100;\n\t\n\t/*\n\t\n\tWhen TestOrderedEventBtn's Click event is raised, it will show the following\n\toutput:\n\t\n\t\t3\n\t\t4\n\t\t5\n\t\t0\n\t*/\n}\n\n```\n\n### License\nMIT © [Ryan Chanlatte](https://github.com/rchanlatte95) 2023 ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frchanlatte95%2Forderedevents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frchanlatte95%2Forderedevents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frchanlatte95%2Forderedevents/lists"}