{"id":18397214,"url":"https://github.com/intellitect/multitool","last_synced_at":"2025-04-07T04:33:06.077Z","repository":{"id":44674819,"uuid":"83612123","full_name":"IntelliTect/Multitool","owner":"IntelliTect","description":"Library of useful additions to your C# application","archived":false,"fork":false,"pushed_at":"2025-03-10T16:50:45.000Z","size":244,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-20T17:19:17.097Z","etag":null,"topics":["hacktoberfest","intellitect","library","nuget"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/IntelliTect.Multitool","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/IntelliTect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2017-03-01T23:28:08.000Z","updated_at":"2025-03-10T16:50:50.000Z","dependencies_parsed_at":"2025-01-18T10:01:08.741Z","dependency_job_id":null,"html_url":"https://github.com/IntelliTect/Multitool","commit_stats":{"total_commits":68,"total_committers":10,"mean_commits":6.8,"dds":0.6323529411764706,"last_synced_commit":"34aa3006f1ec9f5a31b35619aa6a4dacfd8a4ff3"},"previous_names":["intellitect/intellitect"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelliTect%2FMultitool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelliTect%2FMultitool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelliTect%2FMultitool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelliTect%2FMultitool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IntelliTect","download_url":"https://codeload.github.com/IntelliTect/Multitool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595325,"owners_count":20963939,"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":["hacktoberfest","intellitect","library","nuget"],"created_at":"2024-11-06T02:16:18.215Z","updated_at":"2025-04-07T04:33:01.055Z","avatar_url":"https://github.com/IntelliTect.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [IntelliTect.Multitool](https://www.nuget.org/packages/IntelliTect.Multitool/): [![NuGet](https://img.shields.io/nuget/v/IntelliTect.Multitool.svg)](https://www.nuget.org/packages/IntelliTect.Multitool/)\n\n## Install Instructions\n\n1. Add package to project from [nuget.org](https://www.nuget.org/packages/IntelliTect.Multitool/). More instructions to get started with consuming nuget packages can be found on [learn.microsoft.com](https://learn.microsoft.com/nuget/install-nuget-client-tools)\n2. All tools are under the `IntelliTect.Multitool` namespace.\n3. That's it! Please open an issue if you have any problems with any of these steps or have other questions.\n\n## ReleaseDateAttribute - Gets an UTC DateTime of compile time. Allows us to determine the build date/time\n\n### Blog Post/Additional Information: [How To Display the Build Date of a .NET Application](https://intellitect.com/blog/build-date-net-application/)\n\n### Samples:\n\n- Assignment of GetReleaseDate() to a local variable\n\n  ```cs\n  DateTime? date = IntelliTect.Multitool.ReleaseDateAttribute.GetReleaseDate(); // Returns a datetime in UTC to date\n  ```\n  \n- Displaying GetReleaseDate() on a cshtml page\n\n  ```cshtml\n  // This example is in cshtml.\n  @IntelliTect.Multitool.ReleaseDateAttribute.GetReleaseDate() // Returns a datetime in UTC\n  ```\n  \n- Converting and displaying GetReleaseDate() on a cshtml page\n\n  ```cshtml\n  // convert this UTC DateTime object into one for my local timezone that is formatted in a “d MMM, yyyy h:mm:ss tt” (ex: 8 Feb, 2023 11:36:31 AM).\n  // The following code will format the date and convert it to my local time zone of Pacific Standard Time. \n  Build: @if (IntelliTect.Multitool.ReleaseDateAttribute.GetReleaseDate() is DateTime date)\n  {\n    @TimeZoneInfo.ConvertTimeFromUtc(date, TimeZoneInfo.FindSystemTimeZoneById(\"Pacific Standard Time\")).ToString(\"d MMM, yyyy h:mm:ss tt\", CultureInfo.InvariantCulture)\n  }\n  // Result is \"Build: 8 Feb, 2023 11:36:31 AM\"\n  ```\n\n### Miscellaneous Information:\n\n- To help [hot reload in visual studio work properly](https://github.com/IntelliTect/Multitool/issues/125), the release date attribute will be automatically be generated during compilation on a CI runner, but it won’t generate locally by default. If you want it to generate locally, set the `ReleaseDateAttribute` to true within a property group in your project file. (`\u003cReleaseDateAttribute\u003etrue\u003c/ReleaseDateAttribute\u003e`)\n\n## RepositoryPaths - Provides consistent environment-independent normalized pathing within a git repository\n\n### Samples:\n\n- Get file path from the root of a repository\n\n  ```csharp\n  // In this case, the GetDefaultRepoRoot() method can be used to get the root of a repository.\n  string fullPathToTheFile = Path.Combine(IntelliTect.Multitool.RepositoryPaths.GetDefaultRepoRoot(), \"TheFile.txt\");\n  ```\n\n## Security\n\n- ClaimsPrincipalExtensions: Extension methods to get a user ID and roles.\n  - `GetUserId`\n  - `GetRoles`\n\n## Extensions\n\n- StringExtensions: Extension methods for `System.String`\n  - `ValidateUrlString`: Extension method to validate a URL string by checking to make sure the string is formatted correctly.\n  - `CreateUrlSlug`: Extension method modify a string so that it is URL compatible\n- HttpExtensions: Extension methods for `System.Net.Http.HttpClient`\n  `ValidateUri`: Extension methods to validate a Uri by attempting to make a GET request to it.\n- SystemLinqExtensions\n  - `WhereNotNull`: Extension method to allow return of non-null value from a null object.\n    - Sample:\n\n      ```csharp\n      List\u003cstring?\u003e listWithSomeNullValues = [\"this\", null, \"is\", null, \"my\", null, \"favorite\", null];\n      List\u003cstring\u003e listWithoutNullValues = listWithSomeNullValues.WhereNotNull().ToList();\n      // returns [\"this\", \"is\", \"my\", \"favorite\"]\n      ```\n\n    - On:\n      - `System.Linq.Generic.IEnumerable\u003cT\u003e`\n\n## Contributing\n\nSee the CONTRIBUTING.md file [here](https://github.com/IntelliTect/Multitool/blob/main/CONTRIBUTING.md).\n\nIf you have any problems, please feel free to check for existing [issues](https://github.com/IntelliTect/Multitool/issues) or open a [new issue](https://github.com/IntelliTect/Multitool/issues/new).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintellitect%2Fmultitool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintellitect%2Fmultitool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintellitect%2Fmultitool/lists"}