This commit is contained in:
HueByte
2026-02-24 21:03:14 +00:00
parent bd22be4181
commit 5031bf0e11
56 changed files with 8746 additions and 374 deletions
@@ -221,6 +221,42 @@ Class JwtTokenService <a class="header-action link-secondary" title="View sourc
</h2>
<a id="EchoHub_Server_Auth_JwtTokenService_GenerateAccessToken_" data-uid="EchoHub.Server.Auth.JwtTokenService.GenerateAccessToken*"></a>
<h3 id="EchoHub_Server_Auth_JwtTokenService_GenerateAccessToken_EchoHub_Core_DTOs_UserProfileDto_" data-uid="EchoHub.Server.Auth.JwtTokenService.GenerateAccessToken(EchoHub.Core.DTOs.UserProfileDto)">
GenerateAccessToken(UserProfileDto)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Auth/JwtTokenService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public (string Token, DateTimeOffset ExpiresAt) GenerateAccessToken(UserProfileDto profile)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>profile</code> <a class="xref" href="../core/EchoHub.Core.DTOs.UserProfileDto.html">UserProfileDto</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt>(<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-system.string,system.datetimeoffset-.token">Token</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetimeoffset">DateTimeOffset</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-system.string,system.datetimeoffset-.expiresat">ExpiresAt</a>)</dt>
<dd></dd>
</dl>
<a id="EchoHub_Server_Auth_JwtTokenService_GenerateAccessToken_" data-uid="EchoHub.Server.Auth.JwtTokenService.GenerateAccessToken*"></a>
<h3 id="EchoHub_Server_Auth_JwtTokenService_GenerateAccessToken_EchoHub_Core_Models_User_" data-uid="EchoHub.Server.Auth.JwtTokenService.GenerateAccessToken(EchoHub.Core.Models.User)">
@@ -158,8 +158,8 @@ public class AuthController : ControllerBase</code></pre>
<a id="EchoHub_Server_Controllers_AuthController__ctor_" data-uid="EchoHub.Server.Controllers.AuthController.#ctor*"></a>
<h3 id="EchoHub_Server_Controllers_AuthController__ctor_EchoHub_Server_Data_EchoHubDbContext_EchoHub_Server_Auth_JwtTokenService_" data-uid="EchoHub.Server.Controllers.AuthController.#ctor(EchoHub.Server.Data.EchoHubDbContext,EchoHub.Server.Auth.JwtTokenService)">
AuthController(EchoHubDbContext, JwtTokenService)
<h3 id="EchoHub_Server_Controllers_AuthController__ctor_EchoHub_Server_Data_EchoHubDbContext_EchoHub_Server_Auth_JwtTokenService_EchoHub_Core_Contracts_IUserService_" data-uid="EchoHub.Server.Controllers.AuthController.#ctor(EchoHub.Server.Data.EchoHubDbContext,EchoHub.Server.Auth.JwtTokenService,EchoHub.Core.Contracts.IUserService)">
AuthController(EchoHubDbContext, JwtTokenService, IUserService)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/AuthController.cs"><i class="bi bi-code-slash"></i></a>
</h3>
@@ -167,7 +167,7 @@ public class AuthController : ControllerBase</code></pre>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public AuthController(EchoHubDbContext db, JwtTokenService jwt)</code></pre>
<pre><code class="lang-csharp hljs">public AuthController(EchoHubDbContext db, JwtTokenService jwt, IUserService userService)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -176,6 +176,8 @@ public class AuthController : ControllerBase</code></pre>
<dd></dd>
<dt><code>jwt</code> <a class="xref" href="EchoHub.Server.Auth.JwtTokenService.html">JwtTokenService</a></dt>
<dd></dd>
<dt><code>userService</code> <a class="xref" href="../core/EchoHub.Core.Contracts.IUserService.html">IUserService</a></dt>
<dd></dd>
</dl>
@@ -159,8 +159,8 @@ public class UsersController : ControllerBase</code></pre>
<a id="EchoHub_Server_Controllers_UsersController__ctor_" data-uid="EchoHub.Server.Controllers.UsersController.#ctor*"></a>
<h3 id="EchoHub_Server_Controllers_UsersController__ctor_EchoHub_Server_Data_EchoHubDbContext_EchoHub_Server_Services_ImageToAsciiService_" data-uid="EchoHub.Server.Controllers.UsersController.#ctor(EchoHub.Server.Data.EchoHubDbContext,EchoHub.Server.Services.ImageToAsciiService)">
UsersController(EchoHubDbContext, ImageToAsciiService)
<h3 id="EchoHub_Server_Controllers_UsersController__ctor_EchoHub_Core_Contracts_IUserService_EchoHub_Server_Services_ImageToAsciiService_" data-uid="EchoHub.Server.Controllers.UsersController.#ctor(EchoHub.Core.Contracts.IUserService,EchoHub.Server.Services.ImageToAsciiService)">
UsersController(IUserService, ImageToAsciiService)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/UsersController.cs"><i class="bi bi-code-slash"></i></a>
</h3>
@@ -168,12 +168,12 @@ public class UsersController : ControllerBase</code></pre>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public UsersController(EchoHubDbContext db, ImageToAsciiService asciiService)</code></pre>
<pre><code class="lang-csharp hljs">public UsersController(IUserService userService, ImageToAsciiService asciiService)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>db</code> <a class="xref" href="EchoHub.Server.Data.EchoHubDbContext.html">EchoHubDbContext</a></dt>
<dt><code>userService</code> <a class="xref" href="../core/EchoHub.Core.Contracts.IUserService.html">IUserService</a></dt>
<dd></dd>
<dt><code>asciiService</code> <a class="xref" href="EchoHub.Server.Services.ImageToAsciiService.html">ImageToAsciiService</a></dt>
<dd></dd>
+2 -2
View File
@@ -283,7 +283,7 @@ public class ChatHub : Hub&lt;IEchoHubClient&gt;, IDisposable</code></pre>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;List&lt;MessageDto&gt;&gt; JoinChannel(string channelName)</code></pre>
<pre><code class="lang-csharp hljs">public Task&lt;JoinChannelResult&gt; JoinChannel(string channelName)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -294,7 +294,7 @@ public class ChatHub : Hub&lt;IEchoHubClient&gt;, IDisposable</code></pre>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span>&lt;<span class="xref">List</span>&lt;<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/ChatDtos.cs">MessageDto</a>&gt;&gt;</dt>
<dt><span class="xref">Task</span>&lt;<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/ChatDtos.cs">JoinChannelResult</a>&gt;</dt>
<dd></dd>
</dl>
@@ -205,44 +205,6 @@ Class ChatService <a class="header-action link-secondary" title="View source" h
</h2>
<a id="EchoHub_Server_Services_ChatService_AuthenticateUserAsync_" data-uid="EchoHub.Server.Services.ChatService.AuthenticateUserAsync*"></a>
<h3 id="EchoHub_Server_Services_ChatService_AuthenticateUserAsync_System_String_System_String_" data-uid="EchoHub.Server.Services.ChatService.AuthenticateUserAsync(System.String,System.String)">
AuthenticateUserAsync(string, string)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/ChatService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;(Guid UserId, string Username)?&gt; AuthenticateUserAsync(string username, string password)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>username</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>password</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span>&lt;(<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-system.guid,system.string-.userid">UserId</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-system.guid,system.string-.username">Username</a>)?&gt;</dt>
<dd></dd>
</dl>
<a id="EchoHub_Server_Services_ChatService_BroadcastChannelUpdatedAsync_" data-uid="EchoHub.Server.Services.ChatService.BroadcastChannelUpdatedAsync*"></a>
<h3 id="EchoHub_Server_Services_ChatService_BroadcastChannelUpdatedAsync_EchoHub_Core_DTOs_ChannelDto_System_String_" data-uid="EchoHub.Server.Services.ChatService.BroadcastChannelUpdatedAsync(EchoHub.Core.DTOs.ChannelDto,System.String)">
@@ -429,42 +391,6 @@ Class ChatService <a class="header-action link-secondary" title="View source" h
<a id="EchoHub_Server_Services_ChatService_GetUserProfileAsync_" data-uid="EchoHub.Server.Services.ChatService.GetUserProfileAsync*"></a>
<h3 id="EchoHub_Server_Services_ChatService_GetUserProfileAsync_System_String_" data-uid="EchoHub.Server.Services.ChatService.GetUserProfileAsync(System.String)">
GetUserProfileAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/ChatService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;UserProfileDto?&gt; GetUserProfileAsync(string username)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>username</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span>&lt;<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/ProfileDtos.cs">UserProfileDto</a>&gt;</dt>
<dd></dd>
</dl>
<a id="EchoHub_Server_Services_ChatService_JoinChannelAsync_" data-uid="EchoHub.Server.Services.ChatService.JoinChannelAsync*"></a>
<h3 id="EchoHub_Server_Services_ChatService_JoinChannelAsync_System_String_System_Guid_System_String_System_String_" data-uid="EchoHub.Server.Services.ChatService.JoinChannelAsync(System.String,System.Guid,System.String,System.String)">
@@ -0,0 +1,258 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MuteExpirationService | EchoHub Documentation </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MuteExpirationService | EchoHub Documentation ">
<meta name="description" content="Background service that periodically unmutes users whose timed mute has expired.">
<link rel="icon" href="../../images/hue_icon.svg">
<link rel="stylesheet" href="../../public/docfx.min.css">
<link rel="stylesheet" href="../../public/main.css">
<meta name="docfx:navrel" content="../../toc.html">
<meta name="docfx:tocrel" content="../toc.html">
<meta name="docfx:rel" content="../../">
<meta name="docfx:docurl" content="https://github.com/HueByte/EchoHub/new/master/apiSpec/new?filename=EchoHub_Server_Services_MuteExpirationService.md&amp;value=---%0Auid%3A%20EchoHub.Server.Services.MuteExpirationService%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../images/hue_icon.svg" alt="EchoHub">
EchoHub
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="EchoHub.Server.Services.MuteExpirationService">
<h1 id="EchoHub_Server_Services_MuteExpirationService" data-uid="EchoHub.Server.Services.MuteExpirationService" class="text-break">
Class MuteExpirationService <a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/MuteExpirationService.cs"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="EchoHub.html">EchoHub</a>.<a class="xref" href="EchoHub.Server.html">Server</a>.<a class="xref" href="EchoHub.Server.Services.html">Services</a></dd></dl>
<dl><dt>Assembly</dt><dd>EchoHub.Server.dll</dd></dl>
</div>
<div class="markdown summary"><p>Background service that periodically unmutes users whose timed mute has expired.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public sealed class MuteExpirationService : BackgroundService, IDisposable</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">BackgroundService</span></div>
<div><span class="xref">MuteExpirationService</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="EchoHub_Server_Services_MuteExpirationService__ctor_" data-uid="EchoHub.Server.Services.MuteExpirationService.#ctor*"></a>
<h3 id="EchoHub_Server_Services_MuteExpirationService__ctor_Microsoft_Extensions_DependencyInjection_IServiceScopeFactory_Microsoft_Extensions_Logging_ILogger_EchoHub_Server_Services_MuteExpirationService__" data-uid="EchoHub.Server.Services.MuteExpirationService.#ctor(Microsoft.Extensions.DependencyInjection.IServiceScopeFactory,Microsoft.Extensions.Logging.ILogger{EchoHub.Server.Services.MuteExpirationService})">
MuteExpirationService(IServiceScopeFactory, ILogger&lt;MuteExpirationService&gt;)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/MuteExpirationService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MuteExpirationService(IServiceScopeFactory scopeFactory, ILogger&lt;MuteExpirationService&gt; logger)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>scopeFactory</code> <span class="xref">IServiceScopeFactory</span></dt>
<dd></dd>
<dt><code>logger</code> <span class="xref">ILogger</span>&lt;<a class="xref" href="EchoHub.Server.Services.MuteExpirationService.html">MuteExpirationService</a>&gt;</dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="EchoHub_Server_Services_MuteExpirationService_ExecuteAsync_" data-uid="EchoHub.Server.Services.MuteExpirationService.ExecuteAsync*"></a>
<h3 id="EchoHub_Server_Services_MuteExpirationService_ExecuteAsync_System_Threading_CancellationToken_" data-uid="EchoHub.Server.Services.MuteExpirationService.ExecuteAsync(System.Threading.CancellationToken)">
ExecuteAsync(CancellationToken)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/MuteExpirationService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected override Task ExecuteAsync(CancellationToken stoppingToken)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>stoppingToken</code> <span class="xref">CancellationToken</span></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/MuteExpirationService.cs" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<div class='footer-custom'><div class='footer-inner'><span class='footer-brand'>EchoHub</span><span class='footer-sep'>&middot;</span><a href='https://github.com/HueByte/EchoHub'>GitHub</a><span class='footer-sep'>&middot;</span><a href='https://echohub.voidcube.cloud'>Website</a><span class='footer-sep'>&middot;</span><span class='footer-credit'>Built with <a href='https://dotnet.github.io/docfx'>DocFX</a></span></div></div>
</div>
</div>
</footer>
</body>
</html>
@@ -461,8 +461,8 @@ Class SignalRBroadcaster <a class="header-action link-secondary" title="View so
<a id="EchoHub_Server_Services_SignalRBroadcaster_SendUserJoinedAsync_" data-uid="EchoHub.Server.Services.SignalRBroadcaster.SendUserJoinedAsync*"></a>
<h3 id="EchoHub_Server_Services_SignalRBroadcaster_SendUserJoinedAsync_System_String_System_String_System_String_" data-uid="EchoHub.Server.Services.SignalRBroadcaster.SendUserJoinedAsync(System.String,System.String,System.String)">
SendUserJoinedAsync(string, string, string?)
<h3 id="EchoHub_Server_Services_SignalRBroadcaster_SendUserJoinedAsync_System_String_System_String_EchoHub_Core_DTOs_UserPresenceDto_System_String_" data-uid="EchoHub.Server.Services.SignalRBroadcaster.SendUserJoinedAsync(System.String,System.String,EchoHub.Core.DTOs.UserPresenceDto,System.String)">
SendUserJoinedAsync(string, string, UserPresenceDto?, string?)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/SignalRBroadcaster.cs"><i class="bi bi-code-slash"></i></a>
</h3>
@@ -470,7 +470,7 @@ Class SignalRBroadcaster <a class="header-action link-secondary" title="View so
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task SendUserJoinedAsync(string channelName, string username, string? excludeConnectionId = null)</code></pre>
<pre><code class="lang-csharp hljs">public Task SendUserJoinedAsync(string channelName, string username, UserPresenceDto? presence, string? excludeConnectionId = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -479,6 +479,8 @@ Class SignalRBroadcaster <a class="header-action link-secondary" title="View so
<dd></dd>
<dt><code>username</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>presence</code> <a class="xref" href="../core/EchoHub.Core.DTOs.UserPresenceDto.html">UserPresenceDto</a></dt>
<dd></dd>
<dt><code>excludeConnectionId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
@@ -0,0 +1,451 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class UserService | EchoHub Documentation </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class UserService | EchoHub Documentation ">
<link rel="icon" href="../../images/hue_icon.svg">
<link rel="stylesheet" href="../../public/docfx.min.css">
<link rel="stylesheet" href="../../public/main.css">
<meta name="docfx:navrel" content="../../toc.html">
<meta name="docfx:tocrel" content="../toc.html">
<meta name="docfx:rel" content="../../">
<meta name="docfx:docurl" content="https://github.com/HueByte/EchoHub/new/master/apiSpec/new?filename=EchoHub_Server_Services_UserService.md&amp;value=---%0Auid%3A%20EchoHub.Server.Services.UserService%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../images/hue_icon.svg" alt="EchoHub">
EchoHub
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="EchoHub.Server.Services.UserService">
<h1 id="EchoHub_Server_Services_UserService" data-uid="EchoHub.Server.Services.UserService" class="text-break">
Class UserService <a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/UserService.cs"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="EchoHub.html">EchoHub</a>.<a class="xref" href="EchoHub.Server.html">Server</a>.<a class="xref" href="EchoHub.Server.Services.html">Services</a></dd></dl>
<dl><dt>Assembly</dt><dd>EchoHub.Server.dll</dd></dl>
</div>
<div class="markdown summary"></div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class UserService : IUserService</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">UserService</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="../core/EchoHub.Core.Contracts.IUserService.html">IUserService</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="EchoHub_Server_Services_UserService__ctor_" data-uid="EchoHub.Server.Services.UserService.#ctor*"></a>
<h3 id="EchoHub_Server_Services_UserService__ctor_Microsoft_Extensions_DependencyInjection_IServiceScopeFactory_" data-uid="EchoHub.Server.Services.UserService.#ctor(Microsoft.Extensions.DependencyInjection.IServiceScopeFactory)">
UserService(IServiceScopeFactory)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/UserService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public UserService(IServiceScopeFactory scopeFactory)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>scopeFactory</code> <span class="xref">IServiceScopeFactory</span></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="EchoHub_Server_Services_UserService_AuthenticateUserAsync_" data-uid="EchoHub.Server.Services.UserService.AuthenticateUserAsync*"></a>
<h3 id="EchoHub_Server_Services_UserService_AuthenticateUserAsync_System_String_System_String_" data-uid="EchoHub.Server.Services.UserService.AuthenticateUserAsync(System.String,System.String)">
AuthenticateUserAsync(string, string)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/UserService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;UserOperationResult&gt; AuthenticateUserAsync(string username, string password)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>username</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>password</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span>&lt;<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/CommonDtos.cs">UserOperationResult</a>&gt;</dt>
<dd></dd>
</dl>
<a id="EchoHub_Server_Services_UserService_GetUserByIdAsync_" data-uid="EchoHub.Server.Services.UserService.GetUserByIdAsync*"></a>
<h3 id="EchoHub_Server_Services_UserService_GetUserByIdAsync_System_Guid_" data-uid="EchoHub.Server.Services.UserService.GetUserByIdAsync(System.Guid)">
GetUserByIdAsync(Guid)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/UserService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;UserProfileDto?&gt; GetUserByIdAsync(Guid userId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>userId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span>&lt;<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/ProfileDtos.cs">UserProfileDto</a>&gt;</dt>
<dd></dd>
</dl>
<a id="EchoHub_Server_Services_UserService_GetUserProfileAsync_" data-uid="EchoHub.Server.Services.UserService.GetUserProfileAsync*"></a>
<h3 id="EchoHub_Server_Services_UserService_GetUserProfileAsync_System_String_" data-uid="EchoHub.Server.Services.UserService.GetUserProfileAsync(System.String)">
GetUserProfileAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/UserService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;UserProfileDto?&gt; GetUserProfileAsync(string username)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>username</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span>&lt;<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/ProfileDtos.cs">UserProfileDto</a>&gt;</dt>
<dd></dd>
</dl>
<a id="EchoHub_Server_Services_UserService_RegisterUserAsync_" data-uid="EchoHub.Server.Services.UserService.RegisterUserAsync*"></a>
<h3 id="EchoHub_Server_Services_UserService_RegisterUserAsync_System_String_System_String_System_String_" data-uid="EchoHub.Server.Services.UserService.RegisterUserAsync(System.String,System.String,System.String)">
RegisterUserAsync(string, string, string?)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/UserService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;UserOperationResult&gt; RegisterUserAsync(string username, string password, string? displayName = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>username</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>password</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>displayName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span>&lt;<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/CommonDtos.cs">UserOperationResult</a>&gt;</dt>
<dd></dd>
</dl>
<a id="EchoHub_Server_Services_UserService_SetAvatarAsync_" data-uid="EchoHub.Server.Services.UserService.SetAvatarAsync*"></a>
<h3 id="EchoHub_Server_Services_UserService_SetAvatarAsync_System_Guid_System_String_" data-uid="EchoHub.Server.Services.UserService.SetAvatarAsync(System.Guid,System.String)">
SetAvatarAsync(Guid, string)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/UserService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;UserOperationResult&gt; SetAvatarAsync(Guid userId, string asciiArt)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>userId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></dt>
<dd></dd>
<dt><code>asciiArt</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span>&lt;<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/CommonDtos.cs">UserOperationResult</a>&gt;</dt>
<dd></dd>
</dl>
<a id="EchoHub_Server_Services_UserService_UpdateProfileAsync_" data-uid="EchoHub.Server.Services.UserService.UpdateProfileAsync*"></a>
<h3 id="EchoHub_Server_Services_UserService_UpdateProfileAsync_System_Guid_System_String_System_String_System_String_" data-uid="EchoHub.Server.Services.UserService.UpdateProfileAsync(System.Guid,System.String,System.String,System.String)">
UpdateProfileAsync(Guid, string?, string?, string?)
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/UserService.cs"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;UserOperationResult&gt; UpdateProfileAsync(Guid userId, string? displayName, string? bio, string? nicknameColor)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>userId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></dt>
<dd></dd>
<dt><code>displayName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>bio</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>nicknameColor</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">Task</span>&lt;<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/CommonDtos.cs">UserOperationResult</a>&gt;</dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Services/UserService.cs" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<div class='footer-custom'><div class='footer-inner'><span class='footer-brand'>EchoHub</span><span class='footer-sep'>&middot;</span><a href='https://github.com/HueByte/EchoHub'>GitHub</a><span class='footer-sep'>&middot;</span><a href='https://echohub.voidcube.cloud'>Website</a><span class='footer-sep'>&middot;</span><span class='footer-credit'>Built with <a href='https://dotnet.github.io/docfx'>DocFX</a></span></div></div>
</div>
</div>
</footer>
</body>
</html>
+9
View File
@@ -126,6 +126,11 @@ Classes
<dt><a class="xref" href="EchoHub.Server.Services.MessageEncryptionService.html">MessageEncryptionService</a></dt>
<dd></dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="EchoHub.Server.Services.MuteExpirationService.html">MuteExpirationService</a></dt>
<dd><p>Background service that periodically unmutes users whose timed mute has expired.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="EchoHub.Server.Services.PresenceTracker.html">PresenceTracker</a></dt>
<dd></dd>
@@ -138,6 +143,10 @@ Classes
<dt><a class="xref" href="EchoHub.Server.Services.SignalRBroadcaster.html">SignalRBroadcaster</a></dt>
<dd></dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="EchoHub.Server.Services.UserService.html">UserService</a></dt>
<dd></dd>
</dl>
</article>