Skip to content

Commit 6c3ca32

Browse files
Update/add examples in readme, pack readme.md into package (#45)
1 parent db2a440 commit 6c3ca32

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

Directory.Build.props

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
1414
<IncludeSymbols>true</IncludeSymbols>
1515
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
16+
<PackageReadmeFile>README.md</PackageReadmeFile>
1617
</PropertyGroup>
1718
<PropertyGroup>
1819
<LangVersion>10.0</LangVersion>
@@ -23,6 +24,7 @@
2324
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
2425
</PropertyGroup>
2526
<ItemGroup>
27+
<None Include="../README.md" Pack="true" PackagePath="\"/>
2628
<SourceRoot Include="$(MSBuildThisFileDirectory)"/>
2729
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
2830
<PrivateAssets>all</PrivateAssets>

IntelliTect.Multitool/RepositoryPaths.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
namespace IntelliTect.Multitool;
1+
namespace IntelliTect.Multitool;
22
/// <summary>
3-
/// Provides normalized paths.
3+
/// Provides consistent environment-independent normalized pathing within a repository.
44
/// </summary>
55
public static class RepositoryPaths
66
{
77
/// <summary>
88
/// Finds the root of the repository by looking for the .git folder.
99
/// </summary>
10-
/// <returns>Full path to repo root</returns>
10+
/// <returns>Full path to repo root.</returns>
1111
public static string GetDefaultRepoRoot()
1212
{
1313
DirectoryInfo? currentDirectory = new(Directory.GetCurrentDirectory());

README.md

+24-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,31 @@
22

33
## Namespaces within this library
44

5-
* IntelliTect.Multitool
6-
* AssemblyInfo: Gets an assembly's linker date/time as shown in [IntelliTect's Blog](https://intellitect.com/blog/displaying-deploymentbuild-date-web-pages/)
7-
* IntelliTect.Multitool.Security
8-
* ClaimsPrincipalExtensions: Extention methods to get a user ID and roles.
5+
-------
6+
7+
### IntelliTect.Multitool
8+
9+
* AssemblyInfo: Gets an assembly's linker date/time as shown in [IntelliTect's Blog](https://intellitect.com/blog/displaying-deploymentbuild-date-web-pages/).
10+
* Example Usage:
11+
12+
```csharp
13+
// This example is in cshtml
14+
@(AssemblyInfo.Date.ToString("yyyy-MM-dd HH-mm"))
15+
```
16+
17+
* RepositoryPaths: Provides consistent environment-independent normalized pathing within a repository.
18+
* Example Usage:
19+
20+
```csharp
21+
string fullPathToTheFile = Path.Combine(RepositoryPaths.GetDefaultRepoRoot(), "TheFile.txt");
22+
```
23+
24+
### IntelliTect.Multitool.Security
25+
26+
* ClaimsPrincipalExtensions: Extention methods to get a user ID and roles.
927

1028
## Contributing
1129

12-
------------
30+
-------
1331

14-
See the CONTRIBUTING.md file [here](https://raw.githubusercontent.com/IntelliTect/Multitool/main/CONTRIBUTING.md).
32+
See the CONTRIBUTING.md file [here](https://github.com/IntelliTect/Multitool/blob/main/CONTRIBUTING.md).

0 commit comments

Comments
 (0)