Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
burdoto committed Apr 15, 2023
1 parent a048175 commit e473af3
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 65 deletions.
18 changes: 18 additions & 0 deletions kscr-repo-server/Controllers/RepositoryController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using KScr.Build;
using Microsoft.AspNetCore.Mvc;
using NAutowired.Core.Attributes;

namespace KScr.Server.Repo.Controllers;

[ApiController]
[Route("[controller]")]
public class RepositoryController : ControllerBase
{
[Autowired]
private readonly Repository _repository;

[HttpGet, Route("module/{domain}/{group}/{id}/{version}")]
public IEnumerable<DependencyInfo> Get(string domain, string group, string id, string version)
{
}
}
32 changes: 0 additions & 32 deletions kscr-repo-server/Controllers/WeatherForecastController.cs

This file was deleted.

35 changes: 35 additions & 0 deletions kscr-repo-server/KScrRepoServer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.Extensions.DependencyInjection.Extensions;
using NAutowired;

namespace KScr.Server.Repo;

public class KScrRepoServer
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddControllers().AddControllersAsServices();

builder.Services.Replace(ServiceDescriptor.Transient<IControllerActivator, NAutowiredControllerActivator>());

builder.Services.AddScoped<Repository>();

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();

app.UseAuthorization();

app.MapControllers();

app.Run();
}
}
33 changes: 0 additions & 33 deletions kscr-repo-server/Program.cs

This file was deleted.

13 changes: 13 additions & 0 deletions kscr-repo-server/Repository.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Collections.Concurrent;

namespace KScr.Server.Repo;

public class Repository
{
}

internal interface IRepoNode {}

internal class RepoGroupNode : ConcurrentDictionary<string, IRepoNode>, IRepoNode
{
}
1 change: 1 addition & 0 deletions kscr-repo-server/kscr-repo-server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NAutowired" Version="2.3.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

Expand Down

0 comments on commit e473af3

Please sign in to comment.