Refactored the settings manager into the abstract base class

This commit is contained in:
Thorsten Sommer 2024-10-14 19:41:29 +02:00
parent 776fa8ac58
commit 036a54b6a7
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 5 additions and 3 deletions

View File

@ -1,9 +1,14 @@
using AIStudio.Settings;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public abstract class MSGComponentBase : ComponentBase, IDisposable, IMessageBusReceiver
{
[Inject]
protected SettingsManager SettingsManager { get; init; } = null!;
[Inject]
protected MessageBus MessageBus { get; init; } = null!;

View File

@ -17,9 +17,6 @@ namespace AIStudio.Pages;
/// </summary>
public partial class Chat : MSGComponentBase, IAsyncDisposable
{
[Inject]
private SettingsManager SettingsManager { get; init; } = null!;
[Inject]
private ThreadSafeRandom RNG { get; init; } = null!;