Skip to content

Commit

Permalink
Generated markdown docs from the XML comments documentation file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsagara committed Sep 23, 2023
1 parent 34815b4 commit 4c45283
Show file tree
Hide file tree
Showing 23 changed files with 1,982 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"defaultdocumentation.console": {
"version": "0.8.2",
"commands": [
"defaultdocumentation"
]
}
}
}
12 changes: 12 additions & 0 deletions DefaultDocumentation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"LogLevel": "Warn",
"GeneratedPages": "Assembly,Types",
"NamespaceDocItem": {
"Sections": [
"Title",
"summary",
"TableOfContents"
],
"Markdown.TableOfContentsModes": "IncludeKind,IncludeSummary"
}
}
14 changes: 14 additions & 0 deletions make_docs.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo off

REM Generate markdown docs from the generated XML documentation file.
REM Mad props to DefaultDocumentation, which we have installed as a local tool.
REM See: https://github.com/Doraku/DefaultDocumentation

REM Sagara.Core
dotnet defaultDocumentation -a "src\Sagara.Core\bin\Debug\net8.0\Sagara.Core.dll" -o "src\Sagara.Core\docs" --ConfigurationFilePath ".\DefaultDocumentation.json"

REM Sagara.Core.Caching
dotnet defaultDocumentation -a "src\Sagara.Core.Caching\bin\Debug\net8.0\Sagara.Core.Caching.dll" -o "src\Sagara.Core.Caching\docs" --ConfigurationFilePath ".\DefaultDocumentation.json"

REM Sagara.Core.Logging.Serilog
dotnet defaultDocumentation -a "src\Sagara.Core.Logging.Serilog\bin\Debug\net8.0\Sagara.Core.Logging.Serilog.dll" -o "src\Sagara.Core.Logging.Serilog\docs" --ConfigurationFilePath ".\DefaultDocumentation.json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#### [Sagara.Core.Caching](index.md 'index')
### [Sagara.Core.Caching](index.md#Sagara.Core.Caching 'Sagara.Core.Caching')

## RedisAdminCache Class


!!! IMPORTANT !!! This class is only intended to be used as a singleton because we construct the
multiplexer in our constructor, and constructing multiplexers is expensive.

We have to use an instance created via DI instead of a static class because we need to be able
inject Configuration to have access to the connection string.

```csharp
public class RedisAdminCache : Sagara.Core.Caching.RedisCache
```

Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 [RedisCache](Sagara.Core.Caching.RedisCache.md 'Sagara.Core.Caching.RedisCache') 🡒 RedisAdminCache

### Remarks
NOTE: Be sure to set abortConnect=false in the connection string so that we gracefully handle connection failures.
### Constructors

<a name='Sagara.Core.Caching.RedisAdminCache.RedisAdminCache(Microsoft.Extensions.Logging.ILogger_Sagara.Core.Caching.RedisAdminCache_,string)'></a>

## RedisAdminCache(ILogger<RedisAdminCache>, string) Constructor


!!! IMPORTANT !!! This class is only intended to be used as a singleton because we construct the
multiplexer in our constructor, and constructing multiplexers is expensive.

We have to use an instance created via DI instead of a static class because we need to be able
inject Configuration to have access to the connection string.

```csharp
public RedisAdminCache(Microsoft.Extensions.Logging.ILogger<Sagara.Core.Caching.RedisAdminCache> logger, string connectionString);
```
#### Parameters

<a name='Sagara.Core.Caching.RedisAdminCache.RedisAdminCache(Microsoft.Extensions.Logging.ILogger_Sagara.Core.Caching.RedisAdminCache_,string).logger'></a>

`logger` [Microsoft.Extensions.Logging.ILogger&lt;](https://docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.Logging.ILogger-1 'Microsoft.Extensions.Logging.ILogger`1')[RedisAdminCache](Sagara.Core.Caching.RedisAdminCache.md 'Sagara.Core.Caching.RedisAdminCache')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.Logging.ILogger-1 'Microsoft.Extensions.Logging.ILogger`1')

<a name='Sagara.Core.Caching.RedisAdminCache.RedisAdminCache(Microsoft.Extensions.Logging.ILogger_Sagara.Core.Caching.RedisAdminCache_,string).connectionString'></a>

`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

### Remarks

Same as [RedisCache](Sagara.Core.Caching.RedisCache.md 'Sagara.Core.Caching.RedisCache'), but it supports protected operations, such as FLUSH.

NOTE: Be sure to set abortConnect=false in the connection string so that we gracefully handle connection failures.
### Methods

<a name='Sagara.Core.Caching.RedisAdminCache.FlushAllAsync()'></a>

## RedisAdminCache.FlushAllAsync() Method

Delete all the keys of all databases on the server.

```csharp
public System.Threading.Tasks.Task FlushAllAsync();
```

#### Returns
[System.Threading.Tasks.Task](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task 'System.Threading.Tasks.Task')
Loading

0 comments on commit 4c45283

Please sign in to comment.