-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
67 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
{ | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters