- tweak: refactor funny
This commit is contained in:
14
Nebula.Runner/App.cs
Normal file
14
Nebula.Runner/App.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Nebula.Shared;
|
||||
using Nebula.Shared.Services;
|
||||
|
||||
namespace Nebula.Runner;
|
||||
|
||||
[ServiceRegister]
|
||||
public class App(DebugService debugService)
|
||||
{
|
||||
|
||||
public void Run(string[] args)
|
||||
{
|
||||
debugService.Log("HELLO!!! " + string.Join(" ",args));
|
||||
}
|
||||
}
|
||||
17
Nebula.Runner/Nebula.Runner.csproj
Normal file
17
Nebula.Runner/Nebula.Runner.csproj
Normal file
@@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Nebula.Shared\Nebula.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
16
Nebula.Runner/Program.cs
Normal file
16
Nebula.Runner/Program.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Nebula.Shared;
|
||||
|
||||
namespace Nebula.Runner;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
services.AddServices();
|
||||
|
||||
var serviceProvider = services.BuildServiceProvider();
|
||||
serviceProvider.GetService<App>()!.Run(args);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user