{"id":23015743,"url":"https://github.com/lsantoss/lscode.notifications","last_synced_at":"2025-04-02T17:45:11.152Z","repository":{"id":68219364,"uuid":"604251450","full_name":"lsantoss/LSCode.Notifications","owner":"lsantoss","description":"Offers codes to facilitate creation and handling of inconsistency notifications in projects produced by LSCode.","archived":false,"fork":false,"pushed_at":"2023-02-22T22:12:02.000Z","size":311,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-27T08:21:45.253Z","etag":null,"topics":["csharp","netstandard21","notifiable","notification","nuget-package"],"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/lsantoss.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-02-20T16:50:34.000Z","updated_at":"2023-02-22T13:13:38.000Z","dependencies_parsed_at":"2023-06-03T03:45:55.114Z","dependency_job_id":null,"html_url":"https://github.com/lsantoss/LSCode.Notifications","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"20b8e4690490894f78aed645a636ad5a7d0107fd"},"previous_names":["lsantoss/lscode.notifiable"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsantoss%2FLSCode.Notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsantoss%2FLSCode.Notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsantoss%2FLSCode.Notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsantoss%2FLSCode.Notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsantoss","download_url":"https://codeload.github.com/lsantoss/LSCode.Notifications/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246864125,"owners_count":20846381,"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":["csharp","netstandard21","notifiable","notification","nuget-package"],"created_at":"2024-12-15T11:13:06.864Z","updated_at":"2025-04-02T17:45:10.770Z","avatar_url":"https://github.com/lsantoss.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LSCode.Notifications\n\n[![NuGet version (LSCode.Notifications)](https://img.shields.io/nuget/v/LSCode.Notifications.svg?style=flat-square)](https://www.nuget.org/packages/LSCode.Notifications)\n\n## Application:\n\nLSCode.Notifications is a library created to facilitate the management and handling of notifications of inconsistencies in projects.\n\nIt allows you to identify and consolidate failures or error messages in an organized way, useful for systems that require consistent and clear validations.\n\nType: Class Library.\n\n## Framework:\n\n- .Net 9\n\n## Dependencies:\n\n- N/A\n\n## How to install:\n\n- Click on the following link and see here some ways to install: [click here](https://www.nuget.org/packages/LSCode.Notifications \"LSCode.Notifications page on nuget.org\").\n\n## How to use the Notification class:\n\nIn the file that you want to use the class, you must import the following namespace:\n\n```c#\nusing LSCode.Notifications.Models;\n```\n\nIt is composed with 2 properties:\n  - Property\n\t- Type: string\n\t- Description: Validated property that has the inconsistency\n  - Message\n\t- Type: string\n\t- Description: Detailed description of the inconsistency found\n\nThen you can create an instance of notification, passing by parameter: \n  - Property\n  - Message\n\n## How to use Notifiable class:\n\nIn the file that you want to use the class, you must import the following namespace:\n\n```c#\nusing LSCode.Notifications.Models;\n```\n\nThen it will be possible to inherit the notifiable class. \n\nIt is not possible to create an instance of the class, it is only possible to inherit it.\n\nIt is composed with 3 properties:\n  - Valid\n\t- Type: boolean\n\t- Description: Returns `true` if there are no notifications and `false` otherwise it happens\n  - Invalid\n\t- Type: boolean\n\t- Description: Returns `true` if there is at least one notification and `false` otherwise it happens\n  - Notifications \n\t- Type: IReadOnlyCollection\\\u003cNotification\u003e\n\t- Description: List containing all inconsistency notifications\n\nThe values ​​of these properties are modified only through the AddNotification() methods and ClearNotifications() method.\n\nIt is possible to add notifications through the **AddNotification()** method, which has 5 overloads:\n\n```c#\nvoid AddNotification(string property, string message);\nvoid AddNotification(Notification notification);\nvoid AddNotification(IEnumerable\u003cNotification\u003e notifications);\nvoid AddNotification(Notifiable notifiable);\nvoid AddNotification(IEnumerable\u003cNotifiable\u003e notifiableList);\n```\n\nIt is possible to clear the list of notifications and return to the initial state of all properties with the **ClearNotifications()** method:\n\n```c#\nvoid ClearNotifications();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsantoss%2Flscode.notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsantoss%2Flscode.notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsantoss%2Flscode.notifications/lists"}