{"id":22800977,"url":"https://github.com/dailydevops/guard","last_synced_at":"2025-04-19T18:22:29.776Z","repository":{"id":142599819,"uuid":"584904740","full_name":"dailydevops/guard","owner":"dailydevops","description":"Basic input validation via the Requires class throws an ArgumentException, ArgumentNullException or other Exception types.","archived":false,"fork":false,"pushed_at":"2024-12-03T16:21:34.000Z","size":563,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-03T16:41:31.578Z","etag":null,"topics":["assertion-library","dotnet","dotnet5","dotnet6","dotnet7","input-validation","validation"],"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/dailydevops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["dailydevops"]}},"created_at":"2023-01-03T20:22:31.000Z","updated_at":"2024-12-03T16:17:06.000Z","dependencies_parsed_at":"2024-04-12T08:58:32.504Z","dependency_job_id":"3f43c084-2fae-48d1-90ef-adb77c5839ac","html_url":"https://github.com/dailydevops/guard","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":"dailydevops/dotnet-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dailydevops%2Fguard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dailydevops%2Fguard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dailydevops%2Fguard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dailydevops%2Fguard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dailydevops","download_url":"https://codeload.github.com/dailydevops/guard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229352429,"owners_count":18059492,"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":["assertion-library","dotnet","dotnet5","dotnet6","dotnet7","input-validation","validation"],"created_at":"2024-12-12T08:08:34.261Z","updated_at":"2024-12-12T08:08:34.712Z","avatar_url":"https://github.com/dailydevops.png","language":"C#","readme":"# NetEvolve.Guard\n\nThis library provides a set of guard clauses to validate method parameters and object states in a fluent manner. For this purpose, the library provides the `Ensure`-class, which is a static class with a set of extension methods.\nThe usage is very simple and intuitive. The following example shows the basic usage of the `Ensure`-class.\n\n```csharp\npublic static bool Execute(string? directoryFolder)\n{\n    string directory = Ensure.That(directoryFolder).IsNotNullOrWhiteSpace();\n    // or alternatively\n    string directory = Ensure.That(directoryFolder, nameof(directoryFolder)).IsNotNullOrWhiteSpace();\n\n    // Do some magic\n    ...\n}\n```\nAs you can see, the second parameter `parameterName` is optional and is automatically populated by .NET, based on the `CallerArgumentExpressionAttribute` functionality. This reduces the amount of code you have to write and makes the code more readable.\n\n## Compatibility\nThe following .NET TargetFrameworks are supported:\n- .NET Standard 2.0\n- .NET 5.0\n- .NET 6.0\n- .NET 7.0\n- .NET 8.0","funding_links":["https://github.com/sponsors/dailydevops"],"categories":["C\\#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdailydevops%2Fguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdailydevops%2Fguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdailydevops%2Fguard/lists"}