|
1 | 1 | # [IntelliTect.Multitool](https://www.nuget.org/packages/IntelliTect.Multitool/): [](https://www.nuget.org/packages/IntelliTect.Multitool/) |
2 | 2 |
|
3 | | -## Namespaces within this library |
| 3 | +## ReleaseDateAttribute - Gets an UTC DateTime of compile time. Allows us to determine the build date/time |
4 | 4 |
|
5 | | -------- |
| 5 | +### Samples: |
6 | 6 |
|
7 | | -### IntelliTect.Multitool |
| 7 | +- Assignment of GetReleaseDate() to a local variable |
8 | 8 |
|
9 | | -* ReleaseDateAttribute: Gets an UTC DateTime from compile time. Allows us to determine the build date/time. |
10 | | - * Example Usage: |
11 | | - |
12 | 9 | ```cs |
13 | | - // Simple assignment of GetReleaseDate() to a local variable |
14 | 10 | DateTime? date = IntelliTect.Multitool.ReleaseDateAttribute.GetReleaseDate(); // Returns a datetime in UTC to date |
15 | 11 | ``` |
16 | 12 |
|
| 13 | +- Displaying GetReleaseDate() on a cshtml page |
| 14 | + |
17 | 15 | ```cshtml |
18 | 16 | // This example is in cshtml. |
19 | | - @ReleaseDateAttribute.GetReleaseDate() // Returns a datetime in UTC |
| 17 | + @IntelliTect.Multitool.ReleaseDateAttribute.GetReleaseDate() // Returns a datetime in UTC |
20 | 18 | ``` |
21 | 19 |
|
| 20 | +- Converting and displaying GetReleaseDate() on a cshtml page |
| 21 | + |
22 | 22 | ```cshtml |
23 | 23 | // 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). |
24 | 24 | // The following code will format the date and convert it to my local time zone of Pacific Standard Time. |
|
27 | 27 | @TimeZoneInfo.ConvertTimeFromUtc(date, TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time")).ToString("d MMM, yyyy h:mm:ss tt", CultureInfo.InvariantCulture) |
28 | 28 | } |
29 | 29 | // Result is "Build: 8 Feb, 2023 11:36:31 AM" |
30 | | - ``` |
| 30 | + ``` |
| 31 | + |
| 32 | +## RepositoryPaths - Provides consistent environment-independent normalized pathing within a git repository |
| 33 | + |
| 34 | +### Samples: |
31 | 35 |
|
32 | | -* RepositoryPaths: Provides consistent environment-independent normalized pathing within a repository. |
33 | | - * Example Usage: |
| 36 | +- Get file path from the root of a repository |
34 | 37 |
|
35 | 38 | ```csharp |
36 | 39 | // In this case, the GetDefaultRepoRoot() method can be used to get the root of a repository. |
37 | 40 | string fullPathToTheFile = Path.Combine(IntelliTect.Multitool.RepositoryPaths.GetDefaultRepoRoot(), "TheFile.txt"); |
38 | 41 | ``` |
39 | 42 |
|
40 | | -### IntelliTect.Multitool.Security |
| 43 | +## Security |
41 | 44 |
|
42 | | -* ClaimsPrincipalExtensions: Extention methods to get a user ID and roles. |
| 45 | +- ClaimsPrincipalExtensions: Extension methods to get a user ID and roles. |
43 | 46 |
|
44 | 47 | ## Contributing |
45 | 48 |
|
|
0 commit comments