mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-12 20:01:15 -04:00
Code style refactor (#142)
This commit is contained in:
@@ -27,6 +27,17 @@ using Identity = AliasGenerators.Identity.Models.Identity;
|
||||
/// </summary>
|
||||
public class CredentialService(HttpClient httpClient, DbService dbService, Config config)
|
||||
{
|
||||
/// <summary>
|
||||
/// Generates a random password for a credential.
|
||||
/// </summary>
|
||||
/// <returns>Random password.</returns>
|
||||
public static string GenerateRandomPassword()
|
||||
{
|
||||
// Generate a random password using a IPasswordGenerator implementation.
|
||||
var passwordGenerator = new SpamOkPasswordGenerator();
|
||||
return passwordGenerator.GenerateRandomPassword();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a random identity for a credential.
|
||||
/// </summary>
|
||||
@@ -81,17 +92,6 @@ public class CredentialService(HttpClient httpClient, DbService dbService, Confi
|
||||
return domainToUse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a random password for a credential.
|
||||
/// </summary>
|
||||
/// <returns>Random password.</returns>
|
||||
public string GenerateRandomPassword()
|
||||
{
|
||||
// Generate a random password using a IPasswordGenerator implementation.
|
||||
IPasswordGenerator passwordGenerator = new SpamOkPasswordGenerator();
|
||||
return passwordGenerator.GenerateRandomPassword();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate random identity by calling the IdentityGenerator API.
|
||||
/// </summary>
|
||||
|
||||
@@ -17,7 +17,6 @@ using Microsoft.JSInterop;
|
||||
/// </summary>
|
||||
public class KeyboardShortcutService : IAsyncDisposable
|
||||
{
|
||||
private readonly IJSRuntime _jsRuntime;
|
||||
private readonly DotNetObjectReference<CallbackWrapper> _dotNetHelper;
|
||||
private readonly NavigationManager _navigationManager;
|
||||
private readonly Lazy<Task<IJSObjectReference>> moduleTask;
|
||||
@@ -29,7 +28,6 @@ public class KeyboardShortcutService : IAsyncDisposable
|
||||
/// <param name="navigationManager">NavigationManager instance.</param>
|
||||
public KeyboardShortcutService(IJSRuntime jsRuntime, NavigationManager navigationManager)
|
||||
{
|
||||
_jsRuntime = jsRuntime;
|
||||
_dotNetHelper = DotNetObjectReference.Create(new CallbackWrapper());
|
||||
_navigationManager = navigationManager;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user