Skip to content

Commit

Permalink
Update/add examples in readme, pack readme.md into package (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminMichaelis authored Sep 6, 2022
1 parent db2a440 commit 6c3ca32
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<PropertyGroup>
<LangVersion>10.0</LangVersion>
Expand All @@ -23,6 +24,7 @@
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<None Include="../README.md" Pack="true" PackagePath="\"/>
<SourceRoot Include="$(MSBuildThisFileDirectory)"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
6 changes: 3 additions & 3 deletions IntelliTect.Multitool/RepositoryPaths.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
namespace IntelliTect.Multitool;
namespace IntelliTect.Multitool;
/// <summary>
/// Provides normalized paths.
/// Provides consistent environment-independent normalized pathing within a repository.
/// </summary>
public static class RepositoryPaths
{
/// <summary>
/// Finds the root of the repository by looking for the .git folder.
/// </summary>
/// <returns>Full path to repo root</returns>
/// <returns>Full path to repo root.</returns>
public static string GetDefaultRepoRoot()
{
DirectoryInfo? currentDirectory = new(Directory.GetCurrentDirectory());
Expand Down
30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,31 @@

## Namespaces within this library

* IntelliTect.Multitool
* AssemblyInfo: Gets an assembly's linker date/time as shown in [IntelliTect's Blog](https://intellitect.com/blog/displaying-deploymentbuild-date-web-pages/)
* IntelliTect.Multitool.Security
* ClaimsPrincipalExtensions: Extention methods to get a user ID and roles.
-------

### IntelliTect.Multitool

* AssemblyInfo: Gets an assembly's linker date/time as shown in [IntelliTect's Blog](https://intellitect.com/blog/displaying-deploymentbuild-date-web-pages/).
* Example Usage:

```csharp
// This example is in cshtml
@(AssemblyInfo.Date.ToString("yyyy-MM-dd HH-mm"))
```

* RepositoryPaths: Provides consistent environment-independent normalized pathing within a repository.
* Example Usage:

```csharp
string fullPathToTheFile = Path.Combine(RepositoryPaths.GetDefaultRepoRoot(), "TheFile.txt");
```

### IntelliTect.Multitool.Security

* ClaimsPrincipalExtensions: Extention methods to get a user ID and roles.

## Contributing

------------
-------

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

0 comments on commit 6c3ca32

Please sign in to comment.