Initial commit
This commit is contained in:
13
C#/WebApplication/.idea/.idea.WebApplication/.idea/.gitignore
generated
vendored
Normal file
13
C#/WebApplication/.idea/.idea.WebApplication/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/contentModel.xml
|
||||
/.idea.WebApplication.iml
|
||||
/modules.xml
|
||||
/projectSettingsUpdater.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
12
C#/WebApplication/.idea/.idea.WebApplication/.idea/dataSources.xml
generated
Normal file
12
C#/WebApplication/.idea/.idea.WebApplication/.idea/dataSources.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="WebApplication" uuid="1b049126-8676-4de9-8c4a-6852cc597410">
|
||||
<driver-ref>mariadb</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mariadb://leon-hoppe.de:3306/WebApplication</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
||||
7
C#/WebApplication/.idea/.idea.WebApplication/.idea/discord.xml
generated
Normal file
7
C#/WebApplication/.idea/.idea.WebApplication/.idea/discord.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
||||
4
C#/WebApplication/.idea/.idea.WebApplication/.idea/encodings.xml
generated
Normal file
4
C#/WebApplication/.idea/.idea.WebApplication/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
8
C#/WebApplication/.idea/.idea.WebApplication/.idea/indexLayout.xml
generated
Normal file
8
C#/WebApplication/.idea/.idea.WebApplication/.idea/indexLayout.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
8
C#/WebApplication/.idea/.idea.WebApplication/.idea/sqldialects.xml
generated
Normal file
8
C#/WebApplication/.idea/.idea.WebApplication/.idea/sqldialects.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/Program.cs" dialect="GenericSQL" />
|
||||
<file url="file://$PROJECT_DIR$/Repositorys/CustomerRepository.cs" dialect="GenericSQL" />
|
||||
<file url="file://$PROJECT_DIR$/Repositorys/SessionRepository.cs" dialect="GenericSQL" />
|
||||
</component>
|
||||
</project>
|
||||
66
C#/WebApplication/Controllers/CustomerController.cs
Normal file
66
C#/WebApplication/Controllers/CustomerController.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WebApplication.Logic;
|
||||
using WebApplication.Modules;
|
||||
|
||||
namespace WebApplication.Controllers {
|
||||
[Route("api/customers")]
|
||||
public class CustomerController : ControllerBase {
|
||||
private readonly ICustomerLogic _logic;
|
||||
|
||||
public CustomerController(ICustomerLogic logic) {
|
||||
_logic = logic;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ILogicResult<Customer> AddCustomer([FromBody] CustomerEditor editor) {
|
||||
return _logic.AddCustomer(editor);
|
||||
}
|
||||
|
||||
[HttpDelete]
|
||||
[Route("{id}")]
|
||||
public ILogicResult RemoveCustomer(string id) {
|
||||
return _logic.RemoveCustomer(id, GetSessionKey());
|
||||
}
|
||||
|
||||
[HttpPut]
|
||||
[Route("{id}")]
|
||||
public ILogicResult EditCustomer(string id, [FromBody] CustomerEditor editor) {
|
||||
return _logic.EditCustomer(id, editor, GetSessionKey());
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("{id}")]
|
||||
public ILogicResult<Customer> GetCustomer(string id) {
|
||||
return _logic.GetCustomer(id, GetSessionKey());
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public ILogicResult<IEnumerable<Customer>> GetCustomers() {
|
||||
return _logic.GetCustomers();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("register")]
|
||||
public ILogicResult<Session> Register([FromBody] CustomerEditor editor) {
|
||||
Customer customer = _logic.AddCustomer(editor).Data;
|
||||
return _logic.CreateCustomerSession(customer.Guid);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("{id}/logout")]
|
||||
public ILogicResult Logout(string id) {
|
||||
return _logic.DeleteCustomerSession(id, GetSessionKey());
|
||||
}
|
||||
|
||||
[HttpPut]
|
||||
[Route("login")]
|
||||
public ILogicResult<Session> Login([FromBody] CustomerLogin login) {
|
||||
return _logic.Login(login);
|
||||
}
|
||||
|
||||
private string GetSessionKey() {
|
||||
return HttpContext.Request.Headers["Authorization"];
|
||||
}
|
||||
}
|
||||
}
|
||||
72
C#/WebApplication/Logic/CustomerLogic.cs
Normal file
72
C#/WebApplication/Logic/CustomerLogic.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using WebApplication.Modules;
|
||||
using WebApplication.Repositorys.Interfaces;
|
||||
|
||||
namespace WebApplication.Logic {
|
||||
public interface ICustomerLogic {
|
||||
ILogicResult<Customer> AddCustomer(CustomerEditor editor);
|
||||
ILogicResult RemoveCustomer(string id, string session);
|
||||
ILogicResult EditCustomer(string id, CustomerEditor editor, string session);
|
||||
ILogicResult<Customer> GetCustomer(string id, string session);
|
||||
ILogicResult<IEnumerable<Customer>> GetCustomers();
|
||||
ILogicResult<Session> CreateCustomerSession(string customer);
|
||||
ILogicResult DeleteCustomerSession(string customer, string session);
|
||||
ILogicResult<Session> Login(CustomerLogin login);
|
||||
}
|
||||
|
||||
public class CustomerLogic : ICustomerLogic {
|
||||
private readonly ICustomerRepository _customers;
|
||||
private readonly ISessionRepository _sessions;
|
||||
|
||||
public CustomerLogic(ICustomerRepository customers, ISessionRepository sessions) {
|
||||
_customers = customers;
|
||||
_sessions = sessions;
|
||||
}
|
||||
|
||||
public ILogicResult<Customer> AddCustomer(CustomerEditor editor) {
|
||||
return LogicResult<Customer>.Ok(_customers.AddCustomer(editor));
|
||||
}
|
||||
|
||||
public ILogicResult RemoveCustomer(string id, string session) {
|
||||
if (!ValidateSession(session, id)) return LogicResult.Forbidden();
|
||||
_customers.RemoveCustomer(id);
|
||||
return LogicResult.Ok();
|
||||
}
|
||||
|
||||
public ILogicResult EditCustomer(string id, CustomerEditor editor, string session) {
|
||||
if (!ValidateSession(session, id)) return LogicResult.Forbidden();
|
||||
_customers.EditCustomer(id, editor);
|
||||
return LogicResult.Ok();
|
||||
}
|
||||
|
||||
public ILogicResult<Customer> GetCustomer(string id, string session) {
|
||||
if (!ValidateSession(session, id)) return LogicResult<Customer>.Forbidden();
|
||||
return LogicResult<Customer>.Ok(_customers.GetCustomer(id));
|
||||
}
|
||||
|
||||
public ILogicResult<IEnumerable<Customer>> GetCustomers() {
|
||||
return LogicResult<IEnumerable<Customer>>.Ok(_customers.GetCustomers());
|
||||
}
|
||||
|
||||
public ILogicResult<Session> CreateCustomerSession(string customer) {
|
||||
return LogicResult<Session>.Ok(_sessions.CreateSession(customer));
|
||||
}
|
||||
|
||||
public ILogicResult DeleteCustomerSession(string customer, string session) {
|
||||
if (!ValidateSession(session, customer)) return LogicResult.Forbidden();
|
||||
_sessions.RemoveSession(_sessions.GetSession(session));
|
||||
return LogicResult.Ok();
|
||||
}
|
||||
|
||||
public ILogicResult<Session> Login(CustomerLogin login) {
|
||||
var customer = _customers.GetCustomers().FirstOrDefault(c => c.Email == login.Email);
|
||||
if (customer is null) return LogicResult<Session>.NotFound();
|
||||
return !customer.Password.Equals(login.Password) ? LogicResult<Session>.Forbidden() : CreateCustomerSession(customer.Guid);
|
||||
}
|
||||
|
||||
private bool ValidateSession(string session, string customerToAccess) {
|
||||
return _sessions.ValidateSession(_sessions.GetSession(session), customerToAccess);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Net;
|
||||
|
||||
public static class ControllerBaseExtension
|
||||
{
|
||||
public static ActionResult FromLogicResult(this ControllerBase controller, ILogicResult result)
|
||||
{
|
||||
switch (result.State)
|
||||
{
|
||||
case LogicResultState.Ok:
|
||||
return controller.Ok();
|
||||
|
||||
case LogicResultState.BadRequest:
|
||||
return controller.StatusCode((int)HttpStatusCode.BadRequest, result.Message);
|
||||
|
||||
case LogicResultState.Forbidden:
|
||||
return controller.StatusCode((int)HttpStatusCode.Forbidden, result.Message);
|
||||
|
||||
case LogicResultState.NotFound:
|
||||
return controller.StatusCode((int)HttpStatusCode.NotFound, result.Message);
|
||||
|
||||
case LogicResultState.Conflict:
|
||||
return controller.StatusCode((int)HttpStatusCode.Conflict, result.Message);
|
||||
|
||||
default:
|
||||
throw new Exception("An unhandled result has occurred as a result of a service call.");
|
||||
}
|
||||
}
|
||||
|
||||
public static ActionResult FromLogicResult<T>(this ControllerBase controller, ILogicResult<T> result)
|
||||
{
|
||||
switch (result.State)
|
||||
{
|
||||
case LogicResultState.Ok:
|
||||
return controller.Ok(result.Data);
|
||||
|
||||
case LogicResultState.BadRequest:
|
||||
return controller.StatusCode((int)HttpStatusCode.BadRequest, result.Message);
|
||||
|
||||
case LogicResultState.Forbidden:
|
||||
return controller.StatusCode((int)HttpStatusCode.Forbidden, result.Message);
|
||||
|
||||
case LogicResultState.NotFound:
|
||||
return controller.StatusCode((int)HttpStatusCode.NotFound, result.Message);
|
||||
|
||||
case LogicResultState.Conflict:
|
||||
return controller.StatusCode((int)HttpStatusCode.Conflict, result.Message);
|
||||
|
||||
default:
|
||||
throw new Exception("An unhandled result has occurred as a result of a service call.");
|
||||
}
|
||||
}
|
||||
}
|
||||
8
C#/WebApplication/Logic/LogicResult/ILogicResult.cs
Normal file
8
C#/WebApplication/Logic/LogicResult/ILogicResult.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
public interface ILogicResult
|
||||
{
|
||||
LogicResultState State { get; set; }
|
||||
|
||||
string Message { get; set; }
|
||||
|
||||
bool IsSuccessful { get; }
|
||||
}
|
||||
10
C#/WebApplication/Logic/LogicResult/ILogicResult{T}.cs
Normal file
10
C#/WebApplication/Logic/LogicResult/ILogicResult{T}.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
public interface ILogicResult<T>
|
||||
{
|
||||
LogicResultState State { get; set; }
|
||||
|
||||
T Data { get; set; }
|
||||
|
||||
string Message { get; set; }
|
||||
|
||||
bool IsSuccessful { get; }
|
||||
}
|
||||
108
C#/WebApplication/Logic/LogicResult/LogicResult.cs
Normal file
108
C#/WebApplication/Logic/LogicResult/LogicResult.cs
Normal file
@@ -0,0 +1,108 @@
|
||||
internal class LogicResult : ILogicResult
|
||||
{
|
||||
public LogicResultState State { get; set; }
|
||||
|
||||
public string Message { get; set; }
|
||||
|
||||
public bool IsSuccessful
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.State == LogicResultState.Ok;
|
||||
}
|
||||
}
|
||||
|
||||
public static LogicResult Ok()
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = LogicResultState.Ok
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult BadRequest()
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = LogicResultState.BadRequest
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult BadRequest(string message)
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = LogicResultState.BadRequest,
|
||||
Message = message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult Forbidden()
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = LogicResultState.Forbidden
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult Forbidden(string message)
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = LogicResultState.Forbidden,
|
||||
Message = message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult NotFound()
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = LogicResultState.NotFound
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult NotFound(string message)
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = LogicResultState.NotFound,
|
||||
Message = message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult Conflict()
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = LogicResultState.Conflict
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult Conflict(string message)
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = LogicResultState.Conflict,
|
||||
Message = message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult Forward(LogicResult result)
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = result.State,
|
||||
Message = result.Message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult Forward<T>(ILogicResult<T> result)
|
||||
{
|
||||
return new LogicResult()
|
||||
{
|
||||
State = result.State,
|
||||
Message = result.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
8
C#/WebApplication/Logic/LogicResult/LogicResultState.cs
Normal file
8
C#/WebApplication/Logic/LogicResult/LogicResultState.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
public enum LogicResultState
|
||||
{
|
||||
Ok,
|
||||
BadRequest,
|
||||
Forbidden,
|
||||
NotFound,
|
||||
Conflict
|
||||
}
|
||||
119
C#/WebApplication/Logic/LogicResult/LogicResult{T}.cs
Normal file
119
C#/WebApplication/Logic/LogicResult/LogicResult{T}.cs
Normal file
@@ -0,0 +1,119 @@
|
||||
internal class LogicResult<T> : ILogicResult<T>
|
||||
{
|
||||
public LogicResultState State { get; set; }
|
||||
|
||||
public T Data { get; set; }
|
||||
|
||||
public string Message { get; set; }
|
||||
|
||||
public bool IsSuccessful
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.State == LogicResultState.Ok;
|
||||
}
|
||||
}
|
||||
|
||||
public static LogicResult<T> Ok()
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.Ok
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> Ok(T result)
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.Ok,
|
||||
Data = result
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> BadRequest()
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.BadRequest
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> BadRequest(string message)
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.BadRequest,
|
||||
Message = message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> Forbidden()
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.Forbidden
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> Forbidden(string message)
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.Forbidden,
|
||||
Message = message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> NotFound()
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.NotFound
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> NotFound(string message)
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.NotFound,
|
||||
Message = message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> Conflict()
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.Conflict
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> Conflict(string message)
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = LogicResultState.Conflict,
|
||||
Message = message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> Forward(ILogicResult result)
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = result.State,
|
||||
Message = result.Message
|
||||
};
|
||||
}
|
||||
|
||||
public static LogicResult<T> Forward<T2>(ILogicResult<T2> result)
|
||||
{
|
||||
return new LogicResult<T>()
|
||||
{
|
||||
State = result.State,
|
||||
Message = result.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
31
C#/WebApplication/Modules/Customer.cs
Normal file
31
C#/WebApplication/Modules/Customer.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace WebApplication.Modules {
|
||||
public class Customer : CustomerEditor {
|
||||
public string Guid { get; set; }
|
||||
public DateTime CreationDate { get; set; }
|
||||
}
|
||||
|
||||
public class CustomerEditor {
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public float Balance { get; set; }
|
||||
|
||||
public void EditCustomer(Customer customer) {
|
||||
customer.FirstName = FirstName;
|
||||
customer.LastName = LastName;
|
||||
customer.Email = Email;
|
||||
customer.Username = Username;
|
||||
customer.Password = Password;
|
||||
customer.Balance = Balance;
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomerLogin {
|
||||
public string Email { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
9
C#/WebApplication/Modules/Session.cs
Normal file
9
C#/WebApplication/Modules/Session.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace WebApplication.Modules {
|
||||
public class Session {
|
||||
public string Guid { get; set; }
|
||||
public string CustomerId { get; set; }
|
||||
public DateTime CreationDate { get; set; }
|
||||
}
|
||||
}
|
||||
36
C#/WebApplication/MySQL.cs
Normal file
36
C#/WebApplication/MySQL.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using MySqlConnector;
|
||||
|
||||
namespace WebApplication {
|
||||
public class MySQL {
|
||||
private const string Server = "leon-hoppe.de";
|
||||
private const string Database = "WebApplication";
|
||||
private const string Username = "WebApplication";
|
||||
private const string Password = "/q/cIGlBK.FgNphs";
|
||||
|
||||
private static MySqlConnection _con;
|
||||
private static MySqlCommand _command;
|
||||
|
||||
public static void Connect() {
|
||||
var builder = new MySqlConnectionStringBuilder { Server = Server, Database = Database, UserID = Username, Password = Password };
|
||||
_con = new MySqlConnection(builder.ConnectionString);
|
||||
_con.Open();
|
||||
_command = _con.CreateCommand();
|
||||
Console.WriteLine("MySQL connected Successfully");
|
||||
}
|
||||
|
||||
public static bool IsConnected() {
|
||||
return _con != null;
|
||||
}
|
||||
|
||||
public static void Insert(string qry) {
|
||||
_command.CommandText = qry;
|
||||
_command.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
public static MySqlDataReader GetData(string qry) {
|
||||
_command.CommandText = qry;
|
||||
return _command.ExecuteReader();
|
||||
}
|
||||
}
|
||||
}
|
||||
23
C#/WebApplication/Program.cs
Normal file
23
C#/WebApplication/Program.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace WebApplication {
|
||||
public class Program {
|
||||
public static void Main(string[] args) {
|
||||
MySQL.Connect();
|
||||
CreateTables();
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); });
|
||||
|
||||
private static void CreateTables() {
|
||||
if (!MySQL.IsConnected()) throw new NullReferenceException("MySQL not connected!");
|
||||
MySQL.Insert("CREATE TABLE IF NOT EXISTS Customers (Guid VARCHAR(50), CreationDate VARCHAR(50), FirstName VARCHAR(50), LastName VARCHAR(50), Email VARCHAR(50), Username VARCHAR(50), Password VARCHAR(50), Balance VARCHAR(50))");
|
||||
MySQL.Insert("CREATE TABLE IF NOT EXISTS Sessions (Guid VARCHAR(50), CustomerId VARCHAR(50), CreationDate VARCHAR(50))");
|
||||
}
|
||||
}
|
||||
}
|
||||
31
C#/WebApplication/Properties/launchSettings.json
Normal file
31
C#/WebApplication/Properties/launchSettings.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:38372",
|
||||
"sslPort": 44357
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"WebApplication": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
78
C#/WebApplication/Repositorys/CustomerRepository.cs
Normal file
78
C#/WebApplication/Repositorys/CustomerRepository.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MySqlConnector;
|
||||
using WebApplication.Modules;
|
||||
using WebApplication.Repositorys.Interfaces;
|
||||
|
||||
namespace WebApplication.Repositorys {
|
||||
public class CustomerRepository : ICustomerRepository {
|
||||
private string GetFreeId() {
|
||||
string guid = Guid.NewGuid().ToString();
|
||||
while (true) {
|
||||
if (GetCustomer(guid) is not null) guid = Guid.NewGuid().ToString();
|
||||
else break;
|
||||
}
|
||||
|
||||
return guid;
|
||||
}
|
||||
|
||||
public Customer AddCustomer(CustomerEditor editor) {
|
||||
Customer customer = new Customer {Guid = GetFreeId(), CreationDate = DateTime.Now};
|
||||
editor.EditCustomer(customer);
|
||||
SaveCustomer(customer);
|
||||
return customer;
|
||||
}
|
||||
|
||||
public void RemoveCustomer(string id) {
|
||||
MySQL.Insert($"DELETE FROM Customers WHERE Guid = \"{id}\"");
|
||||
}
|
||||
|
||||
public void EditCustomer(string id, CustomerEditor editor) {
|
||||
RemoveCustomer(id);
|
||||
Customer customer = GetCustomer(id);
|
||||
editor.EditCustomer(customer);
|
||||
SaveCustomer(customer);
|
||||
}
|
||||
|
||||
public Customer GetCustomer(string id) {
|
||||
MySqlDataReader reader = MySQL.GetData($"SELECT * FROM Customers WHERE Guid = \"{id}\"");
|
||||
if (reader.Read()) {
|
||||
Customer customer = new Customer();
|
||||
customer.Guid = reader.GetString("Guid");
|
||||
customer.CreationDate = DateTime.Parse(reader.GetString("CreationDate"));
|
||||
customer.FirstName = reader.GetString("FirstName");
|
||||
customer.LastName = reader.GetString("LastName");
|
||||
customer.Email = reader.GetString("Email");
|
||||
customer.Username = reader.GetString("Username");
|
||||
customer.Password = reader.GetString("Password");
|
||||
customer.Balance = float.Parse(reader.GetString("Balance"));
|
||||
reader.Close();
|
||||
return customer;
|
||||
}
|
||||
reader.Close();
|
||||
return null;
|
||||
}
|
||||
|
||||
public IEnumerable<Customer> GetCustomers() {
|
||||
List<Customer> customers = new List<Customer>();
|
||||
MySqlDataReader reader = MySQL.GetData("SELECT * FROM Customers");
|
||||
while (reader.Read()) {
|
||||
Customer customer = new Customer();
|
||||
customer.Guid = reader.GetString("Guid");
|
||||
customer.CreationDate = DateTime.Parse(reader.GetString("CreationDate"));
|
||||
customer.FirstName = reader.GetString("FirstName");
|
||||
customer.LastName = reader.GetString("LastName");
|
||||
customer.Email = reader.GetString("Email");
|
||||
customer.Username = reader.GetString("Username");
|
||||
customer.Balance = float.Parse(reader.GetString("Balance"));
|
||||
customers.Add(customer);
|
||||
}
|
||||
reader.Close();
|
||||
return customers;
|
||||
}
|
||||
|
||||
private void SaveCustomer(Customer customer) {
|
||||
MySQL.Insert($"INSERT INTO Customers VALUES (\"{customer.Guid}\", \"{customer.CreationDate}\", \"{customer.FirstName}\", \"{customer.LastName}\", \"{customer.Email}\", \"{customer.Username}\", \"{customer.Password}\", \"{customer.Balance}\")");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using WebApplication.Modules;
|
||||
|
||||
namespace WebApplication.Repositorys.Interfaces {
|
||||
public interface ICustomerRepository {
|
||||
Customer AddCustomer(CustomerEditor editor);
|
||||
void RemoveCustomer(string id);
|
||||
void EditCustomer(string id, CustomerEditor editor);
|
||||
Customer GetCustomer(string id);
|
||||
IEnumerable<Customer> GetCustomers();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using WebApplication.Modules;
|
||||
|
||||
namespace WebApplication.Repositorys.Interfaces {
|
||||
public interface ISessionRepository {
|
||||
Session CreateSession(string customer);
|
||||
void RemoveSession(Session session);
|
||||
Session GetSession(string id);
|
||||
bool ValidateSession(Session session, string customerToAccess);
|
||||
}
|
||||
}
|
||||
54
C#/WebApplication/Repositorys/SessionRepository.cs
Normal file
54
C#/WebApplication/Repositorys/SessionRepository.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using MySqlConnector;
|
||||
using WebApplication.Modules;
|
||||
using WebApplication.Repositorys.Interfaces;
|
||||
|
||||
namespace WebApplication.Repositorys {
|
||||
public class SessionRepository : ISessionRepository {
|
||||
public SessionRepository() {
|
||||
MySQL.Insert("DELETE FROM Sessions");
|
||||
}
|
||||
|
||||
public Session CreateSession(string customer) {
|
||||
Session session = new Session {Guid = GetFreeId(), CustomerId = customer, CreationDate = DateTime.Now};
|
||||
MySQL.Insert($"INSERT INTO Sessions VALUES (\"{session.Guid}\", \"{session.CustomerId}\", \"{session.CreationDate}\")");
|
||||
return session;
|
||||
}
|
||||
|
||||
public void RemoveSession(Session session) {
|
||||
MySQL.Insert($"DELETE FROM Sessions WHERE Guid = \"{session.Guid}\"");
|
||||
}
|
||||
|
||||
public Session GetSession(string id) {
|
||||
MySqlDataReader reader = MySQL.GetData($"SELECT * FROM Sessions WHERE Guid = \"{id}\"");
|
||||
if (reader.Read()) {
|
||||
Session session = new Session {Guid = id};
|
||||
session.CustomerId = reader.GetString("CustomerId");
|
||||
session.CreationDate = DateTime.Parse(reader.GetString("CreationDate"));
|
||||
reader.Close();
|
||||
return session;
|
||||
}
|
||||
reader.Close();
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool ValidateSession(Session session, string customerToAccess) {
|
||||
if (session == null) return false;
|
||||
if (session.CustomerId != customerToAccess) return false;
|
||||
TimeSpan span = DateTime.Now - session.CreationDate;
|
||||
bool valid = span.Minutes <= 30;
|
||||
if (!valid) RemoveSession(session);
|
||||
return valid;
|
||||
}
|
||||
|
||||
private string GetFreeId() {
|
||||
string guid = Guid.NewGuid().ToString();
|
||||
while (true) {
|
||||
if (GetSession(guid) is not null) guid = Guid.NewGuid().ToString();
|
||||
else break;
|
||||
}
|
||||
|
||||
return guid;
|
||||
}
|
||||
}
|
||||
}
|
||||
71
C#/WebApplication/Startup.cs
Normal file
71
C#/WebApplication/Startup.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using WebApplication.Logic;
|
||||
using WebApplication.Repositorys;
|
||||
using WebApplication.Repositorys.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WebApplication {
|
||||
public class Startup {
|
||||
public Startup(IConfiguration configuration) {
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services) {
|
||||
services.AddControllers();
|
||||
services.AddSwaggerGen(c => {
|
||||
c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme {
|
||||
Description = @"JWT Authorization header using the Bearer scheme. \r\n\r\n
|
||||
Enter 'Bearer' [space] and then your token in the text input below.
|
||||
\r\n\r\nExample: 'Bearer 12345abcdef'",
|
||||
Name = "Authorization",
|
||||
In = ParameterLocation.Header,
|
||||
Type = SecuritySchemeType.ApiKey,
|
||||
Scheme = "Bearer"
|
||||
});
|
||||
|
||||
c.AddSecurityRequirement(new OpenApiSecurityRequirement() {
|
||||
{
|
||||
new OpenApiSecurityScheme {
|
||||
Reference = new OpenApiReference {
|
||||
Type = ReferenceType.SecurityScheme,
|
||||
Id = "Bearer"
|
||||
},
|
||||
Scheme = "oauth2",
|
||||
Name = "Bearer",
|
||||
In = ParameterLocation.Header,
|
||||
},
|
||||
new List<string>()
|
||||
}
|
||||
});
|
||||
});
|
||||
services.AddScoped<ICustomerRepository, CustomerRepository>();
|
||||
services.AddScoped<ISessionRepository, SessionRepository>();
|
||||
services.AddScoped<ICustomerLogic, CustomerLogic>();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
|
||||
if (env.IsDevelopment()) {
|
||||
app.UseDeveloperExceptionPage();
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "WebApplication v1"));
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
12
C#/WebApplication/WebApplication.csproj
Normal file
12
C#/WebApplication/WebApplication.csproj
Normal file
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MySqlConnector" Version="1.3.14" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
16
C#/WebApplication/WebApplication.sln
Normal file
16
C#/WebApplication/WebApplication.sln
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication", "WebApplication.csproj", "{4743C50C-2462-4CA0-985F-47E014E91FB3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4743C50C-2462-4CA0-985F-47E014E91FB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4743C50C-2462-4CA0-985F-47E014E91FB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4743C50C-2462-4CA0-985F-47E014E91FB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4743C50C-2462-4CA0-985F-47E014E91FB3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
9
C#/WebApplication/appsettings.Development.json
Normal file
9
C#/WebApplication/appsettings.Development.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
10
C#/WebApplication/appsettings.json
Normal file
10
C#/WebApplication/appsettings.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
BIN
C#/WebApplication/bin/Debug/net5.0/Microsoft.OpenApi.dll
Normal file
BIN
C#/WebApplication/bin/Debug/net5.0/Microsoft.OpenApi.dll
Normal file
Binary file not shown.
BIN
C#/WebApplication/bin/Debug/net5.0/MySqlConnector.dll
Normal file
BIN
C#/WebApplication/bin/Debug/net5.0/MySqlConnector.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3570
C#/WebApplication/bin/Debug/net5.0/WebApplication.deps.json
Normal file
3570
C#/WebApplication/bin/Debug/net5.0/WebApplication.deps.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
C#/WebApplication/bin/Debug/net5.0/WebApplication.dll
Normal file
BIN
C#/WebApplication/bin/Debug/net5.0/WebApplication.dll
Normal file
Binary file not shown.
BIN
C#/WebApplication/bin/Debug/net5.0/WebApplication.exe
Normal file
BIN
C#/WebApplication/bin/Debug/net5.0/WebApplication.exe
Normal file
Binary file not shown.
BIN
C#/WebApplication/bin/Debug/net5.0/WebApplication.pdb
Normal file
BIN
C#/WebApplication/bin/Debug/net5.0/WebApplication.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"additionalProbingPaths": [
|
||||
"C:\\Users\\leon\\.dotnet\\store\\|arch|\\|tfm|",
|
||||
"C:\\Users\\leon\\.nuget\\packages"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net5.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.AspNetCore.App",
|
||||
"version": "5.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.GC.Server": true,
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
10
C#/WebApplication/bin/Debug/net5.0/appsettings.json
Normal file
10
C#/WebApplication/bin/Debug/net5.0/appsettings.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
7
C#/WebApplication/bin/Debug/net5.0/global.json
Normal file
7
C#/WebApplication/bin/Debug/net5.0/global.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "5.0",
|
||||
"rollForward": "latestMajor",
|
||||
"allowPrerelease": true
|
||||
}
|
||||
}
|
||||
BIN
C#/WebApplication/bin/Debug/net5.0/ref/WebApplication.dll
Normal file
BIN
C#/WebApplication/bin/Debug/net5.0/ref/WebApplication.dll
Normal file
Binary file not shown.
BIN
C#/WebApplication/bin/Release/net5.0/Microsoft.OpenApi.dll
Normal file
BIN
C#/WebApplication/bin/Release/net5.0/Microsoft.OpenApi.dll
Normal file
Binary file not shown.
BIN
C#/WebApplication/bin/Release/net5.0/MySqlConnector.dll
Normal file
BIN
C#/WebApplication/bin/Release/net5.0/MySqlConnector.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3570
C#/WebApplication/bin/Release/net5.0/WebApplication.deps.json
Normal file
3570
C#/WebApplication/bin/Release/net5.0/WebApplication.deps.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
C#/WebApplication/bin/Release/net5.0/WebApplication.dll
Normal file
BIN
C#/WebApplication/bin/Release/net5.0/WebApplication.dll
Normal file
Binary file not shown.
BIN
C#/WebApplication/bin/Release/net5.0/WebApplication.exe
Normal file
BIN
C#/WebApplication/bin/Release/net5.0/WebApplication.exe
Normal file
Binary file not shown.
BIN
C#/WebApplication/bin/Release/net5.0/WebApplication.pdb
Normal file
BIN
C#/WebApplication/bin/Release/net5.0/WebApplication.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"additionalProbingPaths": [
|
||||
"C:\\Users\\leon\\.dotnet\\store\\|arch|\\|tfm|",
|
||||
"C:\\Users\\leon\\.nuget\\packages"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net5.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.AspNetCore.App",
|
||||
"version": "5.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.GC.Server": true,
|
||||
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
10
C#/WebApplication/bin/Release/net5.0/appsettings.json
Normal file
10
C#/WebApplication/bin/Release/net5.0/appsettings.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
7
C#/WebApplication/bin/Release/net5.0/global.json
Normal file
7
C#/WebApplication/bin/Release/net5.0/global.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "5.0",
|
||||
"rollForward": "latestMajor",
|
||||
"allowPrerelease": true
|
||||
}
|
||||
}
|
||||
BIN
C#/WebApplication/bin/Release/net5.0/ref/WebApplication.dll
Normal file
BIN
C#/WebApplication/bin/Release/net5.0/ref/WebApplication.dll
Normal file
Binary file not shown.
7
C#/WebApplication/global.json
Normal file
7
C#/WebApplication/global.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "5.0",
|
||||
"rollForward": "latestMajor",
|
||||
"allowPrerelease": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("WebApplication")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("WebApplication")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("WebApplication")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
462ecd42a9c734f55dab94dac3896ee7bbd7497e
|
||||
@@ -0,0 +1,10 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net5.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb = true
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = WebApplication
|
||||
build_property.ProjectDir = D:\Programmierstuff\C#\WebApplication\
|
||||
@@ -0,0 +1,16 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.SwaggerGen")]
|
||||
|
||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
44549f78fa4f9dbede420960805a831f4eb092cb
|
||||
BIN
C#/WebApplication/obj/Debug/net5.0/WebApplication.assets.cache
Normal file
BIN
C#/WebApplication/obj/Debug/net5.0/WebApplication.assets.cache
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
ca7a3909b2ce3166fd49b5eee2f472ac61a765f2
|
||||
@@ -0,0 +1,29 @@
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\appsettings.Development.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\appsettings.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\global.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\WebApplication.exe
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\WebApplication.deps.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\WebApplication.runtimeconfig.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\WebApplication.runtimeconfig.dev.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\WebApplication.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\ref\WebApplication.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\WebApplication.pdb
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\Microsoft.OpenApi.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\Swashbuckle.AspNetCore.Swagger.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\Swashbuckle.AspNetCore.SwaggerGen.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\Swashbuckle.AspNetCore.SwaggerUI.dll
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.csproj.AssemblyReference.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.GeneratedMSBuildEditorConfig.editorconfig
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.AssemblyInfoInputs.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.AssemblyInfo.cs
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.csproj.CoreCompileInputs.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.MvcApplicationPartsAssemblyInfo.cs
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.MvcApplicationPartsAssemblyInfo.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\scopedcss\bundle\WebApplication.styles.css
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\staticwebassets\WebApplication.StaticWebAssets.Manifest.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.RazorTargetAssemblyInfo.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.dll
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\ref\WebApplication.dll
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.pdb
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Debug\net5.0\WebApplication.genruntimeconfig.cache
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Debug\net5.0\MySqlConnector.dll
|
||||
BIN
C#/WebApplication/obj/Debug/net5.0/WebApplication.dll
Normal file
BIN
C#/WebApplication/obj/Debug/net5.0/WebApplication.dll
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
713e8e03ef57488e10a00c99447100c2666718c6
|
||||
BIN
C#/WebApplication/obj/Debug/net5.0/WebApplication.pdb
Normal file
BIN
C#/WebApplication/obj/Debug/net5.0/WebApplication.pdb
Normal file
Binary file not shown.
BIN
C#/WebApplication/obj/Debug/net5.0/apphost.exe
Normal file
BIN
C#/WebApplication/obj/Debug/net5.0/apphost.exe
Normal file
Binary file not shown.
BIN
C#/WebApplication/obj/Debug/net5.0/ref/WebApplication.dll
Normal file
BIN
C#/WebApplication/obj/Debug/net5.0/ref/WebApplication.dll
Normal file
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("WebApplication")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("WebApplication")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("WebApplication")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
7152b7a598faa3076e5ec8b91681901d41a65673
|
||||
@@ -0,0 +1,10 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net5.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb = true
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = WebApplication
|
||||
build_property.ProjectDir = D:\Programmierstuff\C#\WebApplication\
|
||||
@@ -0,0 +1,16 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.SwaggerGen")]
|
||||
|
||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
53055bb163229a26bea54af2b981fcc45a8897d0
|
||||
BIN
C#/WebApplication/obj/Release/net5.0/WebApplication.assets.cache
Normal file
BIN
C#/WebApplication/obj/Release/net5.0/WebApplication.assets.cache
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
fe5998cdb76fad87dd828216076c602e068d128c
|
||||
@@ -0,0 +1,30 @@
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\appsettings.Development.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\appsettings.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\global.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\WebApplication.exe
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\WebApplication.deps.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\WebApplication.runtimeconfig.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\WebApplication.runtimeconfig.dev.json
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\WebApplication.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\ref\WebApplication.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\WebApplication.pdb
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\Microsoft.OpenApi.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\MySqlConnector.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\Swashbuckle.AspNetCore.Swagger.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\Swashbuckle.AspNetCore.SwaggerGen.dll
|
||||
D:\Programmierstuff\C#\WebApplication\bin\Release\net5.0\Swashbuckle.AspNetCore.SwaggerUI.dll
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.csproj.AssemblyReference.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.GeneratedMSBuildEditorConfig.editorconfig
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.AssemblyInfoInputs.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.AssemblyInfo.cs
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.csproj.CoreCompileInputs.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.MvcApplicationPartsAssemblyInfo.cs
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.MvcApplicationPartsAssemblyInfo.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\scopedcss\bundle\WebApplication.styles.css
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\staticwebassets\WebApplication.StaticWebAssets.Manifest.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.RazorTargetAssemblyInfo.cache
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.csproj.CopyComplete
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.dll
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\ref\WebApplication.dll
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.pdb
|
||||
D:\Programmierstuff\C#\WebApplication\obj\Release\net5.0\WebApplication.genruntimeconfig.cache
|
||||
BIN
C#/WebApplication/obj/Release/net5.0/WebApplication.dll
Normal file
BIN
C#/WebApplication/obj/Release/net5.0/WebApplication.dll
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
e58879111c4b883b4d90fdc401fc7a33c9c083a7
|
||||
BIN
C#/WebApplication/obj/Release/net5.0/WebApplication.pdb
Normal file
BIN
C#/WebApplication/obj/Release/net5.0/WebApplication.pdb
Normal file
Binary file not shown.
BIN
C#/WebApplication/obj/Release/net5.0/apphost.exe
Normal file
BIN
C#/WebApplication/obj/Release/net5.0/apphost.exe
Normal file
Binary file not shown.
BIN
C#/WebApplication/obj/Release/net5.0/ref/WebApplication.dll
Normal file
BIN
C#/WebApplication/obj/Release/net5.0/ref/WebApplication.dll
Normal file
Binary file not shown.
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"D:\\Programmierstuff\\C#\\WebApplication\\WebApplication.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"D:\\Programmierstuff\\C#\\WebApplication\\WebApplication.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\Programmierstuff\\C#\\WebApplication\\WebApplication.csproj",
|
||||
"projectName": "WebApplication",
|
||||
"projectPath": "D:\\Programmierstuff\\C#\\WebApplication\\WebApplication.csproj",
|
||||
"packagesPath": "C:\\Users\\leon\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\Programmierstuff\\C#\\WebApplication\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\leon\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net5.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net5.0": {
|
||||
"targetAlias": "net5.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net5.0": {
|
||||
"targetAlias": "net5.0",
|
||||
"dependencies": {
|
||||
"MySqlConnector": {
|
||||
"target": "Package",
|
||||
"version": "[1.3.14, )"
|
||||
},
|
||||
"Swashbuckle.AspNetCore": {
|
||||
"target": "Package",
|
||||
"version": "[5.6.3, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"downloadDependencies": [
|
||||
{
|
||||
"name": "Microsoft.NETCore.App.Host.win-x64",
|
||||
"version": "[5.0.11, 5.0.11]"
|
||||
}
|
||||
],
|
||||
"frameworkReferences": {
|
||||
"Microsoft.AspNetCore.App": {
|
||||
"privateAssets": "none"
|
||||
},
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.100-rc.2.21505.57\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
22
C#/WebApplication/obj/WebApplication.csproj.nuget.g.props
Normal file
22
C#/WebApplication/obj/WebApplication.csproj.nuget.g.props
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\leon\.nuget\packages\</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.0.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\leon\.nuget\packages\" />
|
||||
</ItemGroup>
|
||||
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.props')" />
|
||||
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore\5.6.3\build\Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore\5.6.3\build\Swashbuckle.AspNetCore.props')" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">C:\Users\leon\.nuget\packages\microsoft.extensions.apidescription.server\3.0.0</PkgMicrosoft_Extensions_ApiDescription_Server>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.targets')" />
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
312
C#/WebApplication/obj/project.assets.json
Normal file
312
C#/WebApplication/obj/project.assets.json
Normal file
@@ -0,0 +1,312 @@
|
||||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
"net5.0": {
|
||||
"Microsoft.Extensions.ApiDescription.Server/3.0.0": {
|
||||
"type": "package",
|
||||
"build": {
|
||||
"build/Microsoft.Extensions.ApiDescription.Server.props": {},
|
||||
"build/Microsoft.Extensions.ApiDescription.Server.targets": {}
|
||||
},
|
||||
"buildMultiTargeting": {
|
||||
"buildMultiTargeting/Microsoft.Extensions.ApiDescription.Server.props": {},
|
||||
"buildMultiTargeting/Microsoft.Extensions.ApiDescription.Server.targets": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.OpenApi/1.2.3": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netstandard2.0/Microsoft.OpenApi.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.OpenApi.dll": {}
|
||||
}
|
||||
},
|
||||
"MySqlConnector/1.3.14": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/net5.0/MySqlConnector.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net5.0/MySqlConnector.dll": {}
|
||||
}
|
||||
},
|
||||
"Swashbuckle.AspNetCore/5.6.3": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.ApiDescription.Server": "3.0.0",
|
||||
"Swashbuckle.AspNetCore.Swagger": "5.6.3",
|
||||
"Swashbuckle.AspNetCore.SwaggerGen": "5.6.3",
|
||||
"Swashbuckle.AspNetCore.SwaggerUI": "5.6.3"
|
||||
},
|
||||
"build": {
|
||||
"build/Swashbuckle.AspNetCore.props": {}
|
||||
}
|
||||
},
|
||||
"Swashbuckle.AspNetCore.Swagger/5.6.3": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.OpenApi": "1.2.3"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll": {}
|
||||
},
|
||||
"frameworkReferences": [
|
||||
"Microsoft.AspNetCore.App"
|
||||
]
|
||||
},
|
||||
"Swashbuckle.AspNetCore.SwaggerGen/5.6.3": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Swashbuckle.AspNetCore.Swagger": "5.6.3"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {}
|
||||
},
|
||||
"frameworkReferences": [
|
||||
"Microsoft.AspNetCore.App"
|
||||
]
|
||||
},
|
||||
"Swashbuckle.AspNetCore.SwaggerUI/5.6.3": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {}
|
||||
},
|
||||
"frameworkReferences": [
|
||||
"Microsoft.AspNetCore.App"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Microsoft.Extensions.ApiDescription.Server/3.0.0": {
|
||||
"sha512": "LH4OE/76F6sOCslif7+Xh3fS/wUUrE5ryeXAMcoCnuwOQGT5Smw0p57IgDh/pHgHaGz/e+AmEQb7pRgb++wt0w==",
|
||||
"type": "package",
|
||||
"path": "microsoft.extensions.apidescription.server/3.0.0",
|
||||
"hasTools": true,
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"build/Microsoft.Extensions.ApiDescription.Server.props",
|
||||
"build/Microsoft.Extensions.ApiDescription.Server.targets",
|
||||
"buildMultiTargeting/Microsoft.Extensions.ApiDescription.Server.props",
|
||||
"buildMultiTargeting/Microsoft.Extensions.ApiDescription.Server.targets",
|
||||
"microsoft.extensions.apidescription.server.3.0.0.nupkg.sha512",
|
||||
"microsoft.extensions.apidescription.server.nuspec",
|
||||
"tools/Newtonsoft.Json.dll",
|
||||
"tools/dotnet-getdocument.deps.json",
|
||||
"tools/dotnet-getdocument.dll",
|
||||
"tools/dotnet-getdocument.runtimeconfig.json",
|
||||
"tools/net461-x86/GetDocument.Insider.exe",
|
||||
"tools/net461-x86/GetDocument.Insider.exe.config",
|
||||
"tools/net461/GetDocument.Insider.exe",
|
||||
"tools/net461/GetDocument.Insider.exe.config",
|
||||
"tools/netcoreapp2.1/GetDocument.Insider.deps.json",
|
||||
"tools/netcoreapp2.1/GetDocument.Insider.dll",
|
||||
"tools/netcoreapp2.1/GetDocument.Insider.runtimeconfig.json"
|
||||
]
|
||||
},
|
||||
"Microsoft.OpenApi/1.2.3": {
|
||||
"sha512": "Nug3rO+7Kl5/SBAadzSMAVgqDlfGjJZ0GenQrLywJ84XGKO0uRqkunz5Wyl0SDwcR71bAATXvSdbdzPrYRYKGw==",
|
||||
"type": "package",
|
||||
"path": "microsoft.openapi/1.2.3",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/net46/Microsoft.OpenApi.dll",
|
||||
"lib/net46/Microsoft.OpenApi.pdb",
|
||||
"lib/net46/Microsoft.OpenApi.xml",
|
||||
"lib/netstandard2.0/Microsoft.OpenApi.dll",
|
||||
"lib/netstandard2.0/Microsoft.OpenApi.pdb",
|
||||
"lib/netstandard2.0/Microsoft.OpenApi.xml",
|
||||
"microsoft.openapi.1.2.3.nupkg.sha512",
|
||||
"microsoft.openapi.nuspec"
|
||||
]
|
||||
},
|
||||
"MySqlConnector/1.3.14": {
|
||||
"sha512": "JW7YYHtjW5dKk3SQGkgKzvj7+n+RLZXYCZ+s2izjFD1ehmr5JlGZFZG98DCI4T9wB154qKja5GA9IQMfX+GH+Q==",
|
||||
"type": "package",
|
||||
"path": "mysqlconnector/1.3.14",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"README.md",
|
||||
"lib/net45/MySqlConnector.dll",
|
||||
"lib/net45/MySqlConnector.xml",
|
||||
"lib/net461/MySqlConnector.dll",
|
||||
"lib/net461/MySqlConnector.xml",
|
||||
"lib/net471/MySqlConnector.dll",
|
||||
"lib/net471/MySqlConnector.xml",
|
||||
"lib/net5.0/MySqlConnector.dll",
|
||||
"lib/net5.0/MySqlConnector.xml",
|
||||
"lib/netcoreapp2.1/MySqlConnector.dll",
|
||||
"lib/netcoreapp2.1/MySqlConnector.xml",
|
||||
"lib/netcoreapp3.1/MySqlConnector.dll",
|
||||
"lib/netcoreapp3.1/MySqlConnector.xml",
|
||||
"lib/netstandard1.3/MySqlConnector.dll",
|
||||
"lib/netstandard1.3/MySqlConnector.xml",
|
||||
"lib/netstandard2.0/MySqlConnector.dll",
|
||||
"lib/netstandard2.0/MySqlConnector.xml",
|
||||
"lib/netstandard2.1/MySqlConnector.dll",
|
||||
"lib/netstandard2.1/MySqlConnector.xml",
|
||||
"logo.png",
|
||||
"mysqlconnector.1.3.14.nupkg.sha512",
|
||||
"mysqlconnector.nuspec"
|
||||
]
|
||||
},
|
||||
"Swashbuckle.AspNetCore/5.6.3": {
|
||||
"sha512": "UkL9GU0mfaA+7RwYjEaBFvAzL8qNQhNqAeV5uaWUu/Z+fVgvK9FHkGCpTXBqSQeIHuZaIElzxnLDdIqGzuCnVg==",
|
||||
"type": "package",
|
||||
"path": "swashbuckle.aspnetcore/5.6.3",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"build/Swashbuckle.AspNetCore.props",
|
||||
"swashbuckle.aspnetcore.5.6.3.nupkg.sha512",
|
||||
"swashbuckle.aspnetcore.nuspec"
|
||||
]
|
||||
},
|
||||
"Swashbuckle.AspNetCore.Swagger/5.6.3": {
|
||||
"sha512": "rn/MmLscjg6WSnTZabojx5DQYle2GjPanSPbCU3Kw8Hy72KyQR3uy8R1Aew5vpNALjfUFm2M/vwUtqdOlzw+GA==",
|
||||
"type": "package",
|
||||
"path": "swashbuckle.aspnetcore.swagger/5.6.3",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll",
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.pdb",
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.xml",
|
||||
"lib/netstandard2.0/Swashbuckle.AspNetCore.Swagger.dll",
|
||||
"lib/netstandard2.0/Swashbuckle.AspNetCore.Swagger.pdb",
|
||||
"lib/netstandard2.0/Swashbuckle.AspNetCore.Swagger.xml",
|
||||
"swashbuckle.aspnetcore.swagger.5.6.3.nupkg.sha512",
|
||||
"swashbuckle.aspnetcore.swagger.nuspec"
|
||||
]
|
||||
},
|
||||
"Swashbuckle.AspNetCore.SwaggerGen/5.6.3": {
|
||||
"sha512": "CkhVeod/iLd3ikVTDOwG5sym8BE5xbqGJ15iF3cC7ZPg2kEwDQL4a88xjkzsvC9oOB2ax6B0rK0EgRK+eOBX+w==",
|
||||
"type": "package",
|
||||
"path": "swashbuckle.aspnetcore.swaggergen/5.6.3",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll",
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.pdb",
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.xml",
|
||||
"lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerGen.dll",
|
||||
"lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerGen.pdb",
|
||||
"lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerGen.xml",
|
||||
"swashbuckle.aspnetcore.swaggergen.5.6.3.nupkg.sha512",
|
||||
"swashbuckle.aspnetcore.swaggergen.nuspec"
|
||||
]
|
||||
},
|
||||
"Swashbuckle.AspNetCore.SwaggerUI/5.6.3": {
|
||||
"sha512": "BPvcPxQRMsYZ3HnYmGKRWDwX4Wo29WHh14Q6B10BB8Yfbbcza+agOC2UrBFA1EuaZuOsFLbp6E2+mqVNF/Je8A==",
|
||||
"type": "package",
|
||||
"path": "swashbuckle.aspnetcore.swaggerui/5.6.3",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll",
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.pdb",
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.xml",
|
||||
"lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerUI.dll",
|
||||
"lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerUI.pdb",
|
||||
"lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerUI.xml",
|
||||
"swashbuckle.aspnetcore.swaggerui.5.6.3.nupkg.sha512",
|
||||
"swashbuckle.aspnetcore.swaggerui.nuspec"
|
||||
]
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
"net5.0": [
|
||||
"MySqlConnector >= 1.3.14",
|
||||
"Swashbuckle.AspNetCore >= 5.6.3"
|
||||
]
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\leon\\.nuget\\packages\\": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\Programmierstuff\\C#\\WebApplication\\WebApplication.csproj",
|
||||
"projectName": "WebApplication",
|
||||
"projectPath": "D:\\Programmierstuff\\C#\\WebApplication\\WebApplication.csproj",
|
||||
"packagesPath": "C:\\Users\\leon\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\Programmierstuff\\C#\\WebApplication\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\leon\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net5.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net5.0": {
|
||||
"targetAlias": "net5.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net5.0": {
|
||||
"targetAlias": "net5.0",
|
||||
"dependencies": {
|
||||
"MySqlConnector": {
|
||||
"target": "Package",
|
||||
"version": "[1.3.14, )"
|
||||
},
|
||||
"Swashbuckle.AspNetCore": {
|
||||
"target": "Package",
|
||||
"version": "[5.6.3, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"downloadDependencies": [
|
||||
{
|
||||
"name": "Microsoft.NETCore.App.Host.win-x64",
|
||||
"version": "[5.0.11, 5.0.11]"
|
||||
}
|
||||
],
|
||||
"frameworkReferences": {
|
||||
"Microsoft.AspNetCore.App": {
|
||||
"privateAssets": "none"
|
||||
},
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.100-rc.2.21505.57\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
17
C#/WebApplication/obj/project.nuget.cache
Normal file
17
C#/WebApplication/obj/project.nuget.cache
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "oYDz7WPkgP2VQy2lbA1r84kAj6ddKxQVh78GQhtrsiUONONWi0YOlvkYI6CEl7GwGinulhgM9TEvE9cBUV3/Kg==",
|
||||
"success": true,
|
||||
"projectFilePath": "D:\\Programmierstuff\\C#\\WebApplication\\WebApplication.csproj",
|
||||
"expectedPackageFiles": [
|
||||
"C:\\Users\\leon\\.nuget\\packages\\microsoft.extensions.apidescription.server\\3.0.0\\microsoft.extensions.apidescription.server.3.0.0.nupkg.sha512",
|
||||
"C:\\Users\\leon\\.nuget\\packages\\microsoft.openapi\\1.2.3\\microsoft.openapi.1.2.3.nupkg.sha512",
|
||||
"C:\\Users\\leon\\.nuget\\packages\\mysqlconnector\\1.3.14\\mysqlconnector.1.3.14.nupkg.sha512",
|
||||
"C:\\Users\\leon\\.nuget\\packages\\swashbuckle.aspnetcore\\5.6.3\\swashbuckle.aspnetcore.5.6.3.nupkg.sha512",
|
||||
"C:\\Users\\leon\\.nuget\\packages\\swashbuckle.aspnetcore.swagger\\5.6.3\\swashbuckle.aspnetcore.swagger.5.6.3.nupkg.sha512",
|
||||
"C:\\Users\\leon\\.nuget\\packages\\swashbuckle.aspnetcore.swaggergen\\5.6.3\\swashbuckle.aspnetcore.swaggergen.5.6.3.nupkg.sha512",
|
||||
"C:\\Users\\leon\\.nuget\\packages\\swashbuckle.aspnetcore.swaggerui\\5.6.3\\swashbuckle.aspnetcore.swaggerui.5.6.3.nupkg.sha512",
|
||||
"C:\\Users\\leon\\.nuget\\packages\\microsoft.netcore.app.host.win-x64\\5.0.11\\microsoft.netcore.app.host.win-x64.5.0.11.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
1
C#/WebApplication/obj/project.packagespec.json
Normal file
1
C#/WebApplication/obj/project.packagespec.json
Normal file
@@ -0,0 +1 @@
|
||||
"restore":{"projectUniqueName":"D:\\Programmierstuff\\C#\\WebApplication\\WebApplication.csproj","projectName":"WebApplication","projectPath":"D:\\Programmierstuff\\C#\\WebApplication\\WebApplication.csproj","outputPath":"D:\\Programmierstuff\\C#\\WebApplication\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net5.0"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net5.0":{"targetAlias":"net5.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net5.0":{"targetAlias":"net5.0","dependencies":{"MySqlConnector":{"target":"Package","version":"[1.3.14, )"},"Swashbuckle.AspNetCore":{"target":"Package","version":"[5.6.3, )"}},"imports":["net461","net462","net47","net471","net472","net48"],"assetTargetFallback":true,"warn":true,"downloadDependencies":[{"name":"Microsoft.NETCore.App.Host.win-x64","version":"[5.0.11, 5.0.11]"}],"frameworkReferences":{"Microsoft.AspNetCore.App":{"privateAssets":"none"},"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\6.0.100-rc.2.21505.57\\RuntimeIdentifierGraph.json"}}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user