finished diagnose system
This commit is contained in:
@@ -6,11 +6,15 @@ namespace Moonlight.ApiServer.Implementations.Diagnose;
|
||||
|
||||
public class CoreDiagnoseProvider : IDiagnoseProvider
|
||||
{
|
||||
public async Task<DiagnoseEntry> GetFiles()
|
||||
public DiagnoseEntry[] GetFiles()
|
||||
{
|
||||
return new DiagnoseFile()
|
||||
{
|
||||
GetContent = () => Encoding.UTF8.GetBytes("hello world")
|
||||
};
|
||||
return
|
||||
[
|
||||
new DiagnoseFile()
|
||||
{
|
||||
Name = "test.txt",
|
||||
GetContent = () => Encoding.UTF8.GetBytes("hello world")
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Moonlight.ApiServer.Implementations.Diagnose;
|
||||
|
||||
public class TestProvider
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Moonlight.ApiServer.Configuration;
|
||||
using Moonlight.ApiServer.Database;
|
||||
using Moonlight.ApiServer.Implementations.Diagnose;
|
||||
using Moonlight.ApiServer.Interfaces;
|
||||
using Moonlight.ApiServer.Interfaces.Startup;
|
||||
|
||||
namespace Moonlight.ApiServer.Implementations.Startup;
|
||||
@@ -48,6 +50,12 @@ public class CoreStartup : IPluginStartup
|
||||
|
||||
builder.Services.AddDbContext<CoreDataContext>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Diagnose
|
||||
|
||||
builder.Services.AddSingleton<IDiagnoseProvider, CoreDiagnoseProvider>();
|
||||
|
||||
#endregion
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
||||
Reference in New Issue
Block a user