{"id":19208345,"url":"https://github.com/nurfarazi/pubsub","last_synced_at":"2025-11-14T10:02:52.819Z","repository":{"id":154784882,"uuid":"632423237","full_name":"nurfarazi/pubsub","owner":"nurfarazi","description":"Simple demonstration of pub-sub using just event and delegate","archived":false,"fork":false,"pushed_at":"2023-05-05T12:24:00.000Z","size":3850,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-04T15:47:17.182Z","etag":null,"topics":["pubsub"],"latest_commit_sha":null,"homepage":"","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/nurfarazi.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}},"created_at":"2023-04-25T11:30:32.000Z","updated_at":"2023-05-22T07:22:26.000Z","dependencies_parsed_at":"2023-06-25T22:52:06.788Z","dependency_job_id":null,"html_url":"https://github.com/nurfarazi/pubsub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurfarazi%2Fpubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurfarazi%2Fpubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurfarazi%2Fpubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurfarazi%2Fpubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nurfarazi","download_url":"https://codeload.github.com/nurfarazi/pubsub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240280987,"owners_count":19776418,"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","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":["pubsub"],"created_at":"2024-11-09T13:25:54.007Z","updated_at":"2025-11-14T10:02:52.694Z","avatar_url":"https://github.com/nurfarazi.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## simple demonstration of pub-sub using just event and delegate\n\nYou can use this example to understand the concept of event and delegate. It is a simple example of publisher and subscriber.\nIn this example, the publisher is a class called **`Publisher`** and the subscriber is a class called **`Subscriber`**. The publisher class\nexposes an event called **`OnPublish`** and the subscriber class has a method called **`Subscribe`** that is subscribed to the publisher's\nevent.\n\nWhen the publisher class invokes its event, all the subscribed methods are invoked.\n\n## How to run this example?\n\n1. Download the source code\n2. Open the solution file in Visual Studio\n3. Compile the solution\n4. Run the application\n5. run the API project for the API\n6. run the console project for the console application\n\nTry to understand the code and play with it. You can also add more subscribers to the publisher's event and see how it works.\n\n## Attention\n\nIt is not good for production. you can use this example for learning and understanding the concept of pub sub.\nI would prefer mediator pattern for production. you can find the mediator pattern example in other repository.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurfarazi%2Fpubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnurfarazi%2Fpubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurfarazi%2Fpubsub/lists"}