Skip to content

Commit

Permalink
📦 Struct: Optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Sep 23, 2024
1 parent c56a8df commit ac73e6d
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<RootNamespace>KitX_Website_Backend</RootNamespace>
<RootNamespace>KitX.Website.Backend.Api</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
23 changes: 23 additions & 0 deletions KitX Website Backend/Api/Controllers/KxpController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using KitX.Shared.CSharp.Plugin;
using Microsoft.AspNetCore.Mvc;

namespace KitX.Website.Backend.Api.Controllers;

[ApiController]
[Route("[controller]")]
public class KxpController : ControllerBase
{
private readonly ILogger<KxpController> _logger;

public KxpController(ILogger<KxpController> logger)
{
_logger = logger;
}

[HttpGet(Name = "QueryKxp")]
public IEnumerable<PluginInfo> Get()
{
return Enumerable.Range(1, 5).Select(index => new PluginInfo())
.ToArray();
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using KitX_Website_Backend.Api.Modules.DataBase;
using KitX_Website_Backend.Api.Modules.Interfaces;
using KitX.Website.Backend.Api.Modules.DataBase;
using KitX.Website.Backend.Api.Modules.Interfaces;

namespace KitX_Website_Backend.Api.Modules.Accounts;
namespace KitX.Website.Backend.Api.Modules.Accounts;

public class AccountsManager : IManager
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using KitX_Website_Backend.Api.Modules.Accounts;
using KitX_Website_Backend.Api.Modules.Interfaces;
using KitX.Website.Backend.Api.Modules.Accounts;
using KitX.Website.Backend.Api.Modules.Interfaces;

namespace KitX_Website_Backend.Api.Modules.DataBase;
namespace KitX.Website.Backend.Api.Modules.DataBase;

public class AccountsModule : IModule
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using KitX_Website_Backend.Api.Modules.Interfaces;
using KitX.Website.Backend.Api.Modules.Interfaces;

namespace KitX_Website_Backend.Api.Modules.DataBase;
namespace KitX.Website.Backend.Api.Modules.DataBase;

public class DataBaseModule : IModule
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace KitX_Website_Backend.Api.Modules.DataBase;
namespace KitX.Website.Backend.Api.Modules.DataBase;

public interface IConnector
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using MongoDB.Driver;
using MongoDB.Driver.Linq;

namespace KitX_Website_Backend.Api.Modules.DataBase;
namespace KitX.Website.Backend.Api.Modules.DataBase;

public class MongoDbConnector(ILogger<IConnector> logger, string connectionString) : IConnector
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace KitX_Website_Backend.Api.Modules.Interfaces;
namespace KitX.Website.Backend.Api.Modules.Interfaces;

public interface IManager
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace KitX_Website_Backend.Api.Modules.Interfaces;
namespace KitX.Website.Backend.Api.Modules.Interfaces;

public interface IModule
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using KitX_Website_Backend.Api.Modules.Interfaces;
using KitX.Website.Backend.Api.Modules.Interfaces;

namespace KitX_Website_Backend.Api.Modules.Kxp;
namespace KitX.Website.Backend.Api.Modules.Kxp;

public class KxpModule : IModule
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using KitX_Website_Backend.Api.Modules.DataBase;
using KitX_Website_Backend.Api.Modules.Interfaces;
using KitX_Website_Backend.Api.Modules.Kxp;
using KitX.Website.Backend.Api.Modules.DataBase;
using KitX.Website.Backend.Api.Modules.Interfaces;
using KitX.Website.Backend.Api.Modules.Kxp;

namespace KitX_Website_Backend.Api.Modules;
namespace KitX.Website.Backend.Api.Modules;

public class ModulesManager
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using KitX_Website_Backend.Api.Modules;
using KitX_Website_Backend.Api.Modules.DataBase;
using KitX.Website.Backend.Api.Modules;
using KitX.Website.Backend.Api.Modules.DataBase;

var builder = WebApplication.CreateBuilder(args);

Expand Down

This file was deleted.

This file was deleted.

14 changes: 7 additions & 7 deletions KitX Website.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "KitX Website Backend", "KitX Website Backend", "{7F5DD801-36D3-4C19-A8DD-51EC4913A7C4}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "KitX Website Backend", "KitX Website Backend", "{6BA5EBFA-B8D5-4D5A-8B25-7829F99B566B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KitX Website Backend Api", "KitX Website Backend\KitX Website Backend Api\KitX Website Backend Api.csproj", "{351EA9CD-EB24-47DD-91D2-205DCE86EBE4}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Api", "KitX Website Backend\Api\Api.csproj", "{2582E634-BB42-448E-BE1B-DA04BD89907F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{351EA9CD-EB24-47DD-91D2-205DCE86EBE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{351EA9CD-EB24-47DD-91D2-205DCE86EBE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{351EA9CD-EB24-47DD-91D2-205DCE86EBE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{351EA9CD-EB24-47DD-91D2-205DCE86EBE4}.Release|Any CPU.Build.0 = Release|Any CPU
{2582E634-BB42-448E-BE1B-DA04BD89907F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2582E634-BB42-448E-BE1B-DA04BD89907F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2582E634-BB42-448E-BE1B-DA04BD89907F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2582E634-BB42-448E-BE1B-DA04BD89907F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -25,6 +25,6 @@ Global
SolutionGuid = {DD4793C4-DEBC-4A00-ADDA-901D84CD7480}
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{351EA9CD-EB24-47DD-91D2-205DCE86EBE4} = {7F5DD801-36D3-4C19-A8DD-51EC4913A7C4}
{2582E634-BB42-448E-BE1B-DA04BD89907F} = {6BA5EBFA-B8D5-4D5A-8B25-7829F99B566B}
EndGlobalSection
EndGlobal

0 comments on commit ac73e6d

Please sign in to comment.