CORS, Theme, Better flow and dotnet tools
This commit is contained in:
@ -1,11 +0,0 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IServiceShopOrderController
|
||||
{
|
||||
|
||||
enum Action : int
|
||||
{
|
||||
All = 0
|
||||
}
|
||||
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface ISsaOrderController
|
||||
{
|
||||
|
||||
enum Action : int
|
||||
{
|
||||
All = 0
|
||||
}
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Expose.MyIT.Shared.Models;
|
||||
|
||||
public record Order2(
|
||||
[property: JsonPropertyName("Id")] string Id,
|
||||
[property: JsonPropertyName("Name")] string Name,
|
||||
[property: JsonPropertyName("TypeId")] int TypeId
|
||||
);
|
@ -2,7 +2,7 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Expose.MyIT.Shared.Models;
|
||||
|
||||
public record SSA(
|
||||
public record Ssa(
|
||||
[property: JsonPropertyName("Orders")] IReadOnlyList<Order> Orders,
|
||||
[property: JsonPropertyName("Total")] int Total
|
||||
);
|
14
Shared/Models/Stateless/IAppSettingsController.cs
Normal file
14
Shared/Models/Stateless/IAppSettingsController.cs
Normal file
@ -0,0 +1,14 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IAppSettingsController<T>
|
||||
{
|
||||
|
||||
enum Action : int
|
||||
{
|
||||
App = 0
|
||||
}
|
||||
|
||||
static string GetRouteName() => nameof(IAppSettingsController<T>)[1..^10];
|
||||
T GetAppSettings();
|
||||
|
||||
}
|
8
Shared/Models/Stateless/IAppSettingsRepository.cs
Normal file
8
Shared/Models/Stateless/IAppSettingsRepository.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IAppSettingsRepository
|
||||
{
|
||||
|
||||
List<string> GetAppSettings();
|
||||
|
||||
}
|
16
Shared/Models/Stateless/IClientSettingsController.cs
Normal file
16
Shared/Models/Stateless/IClientSettingsController.cs
Normal file
@ -0,0 +1,16 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IClientSettingsController<T>
|
||||
{
|
||||
|
||||
enum Action : int
|
||||
{
|
||||
Client = 0,
|
||||
IP = 1
|
||||
}
|
||||
|
||||
static string GetRouteName() => nameof(IClientSettingsController<T>)[1..^10];
|
||||
T GetClientSettings();
|
||||
T GetIpAddress();
|
||||
|
||||
}
|
11
Shared/Models/Stateless/IClientSettingsRepository.cs
Normal file
11
Shared/Models/Stateless/IClientSettingsRepository.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Net;
|
||||
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IClientSettingsRepository
|
||||
{
|
||||
|
||||
List<string> GetClientSettings(IPAddress? remoteIpAddress);
|
||||
string GetIpAddress(IPAddress? remoteIpAddress);
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IMethodName
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IServiceShopOrder
|
||||
{
|
||||
@ -6,6 +6,6 @@ public interface IServiceShopOrder
|
||||
ViewModels.ServiceShopOrder[] TestStatic_GetServiceShopOrders(ServiceShop? serviceShop) =>
|
||||
GetServiceShopOrders(serviceShop);
|
||||
static ViewModels.ServiceShopOrder[] GetServiceShopOrders(ServiceShop? serviceShop) =>
|
||||
ServiceShopOrder.GetServiceShopOrders(serviceShop);
|
||||
ServiceShopOrder.GetServiceShopOrders(serviceShop);
|
||||
|
||||
}
|
15
Shared/Models/Stateless/IServiceShopOrderController.cs
Normal file
15
Shared/Models/Stateless/IServiceShopOrderController.cs
Normal file
@ -0,0 +1,15 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IServiceShopOrderController<T>
|
||||
{
|
||||
|
||||
enum Action : int
|
||||
{
|
||||
All = 0
|
||||
}
|
||||
|
||||
static string GetRouteName() => nameof(IServiceShopOrderController<T>)[1..^10];
|
||||
Task<T> GetAllServiceShopOrders();
|
||||
Task<T> GetServiceShopOrders(string id);
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
namespace Expose.MyIT.Shared.Models.Methods;
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IServiceShopOrderRepository
|
||||
{
|
11
Shared/Models/Stateless/ISsaOrder.cs
Normal file
11
Shared/Models/Stateless/ISsaOrder.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface ISsaOrder
|
||||
{
|
||||
|
||||
ViewModels.SsaOrder[] TestStatic_GetSsaOrders(Ssa? ssa) =>
|
||||
GetSsaOrders(ssa);
|
||||
static ViewModels.SsaOrder[] GetSsaOrders(Ssa? ssa) =>
|
||||
SsaOrder.GetSsaOrders(ssa);
|
||||
|
||||
}
|
15
Shared/Models/Stateless/ISsaOrderController.cs
Normal file
15
Shared/Models/Stateless/ISsaOrderController.cs
Normal file
@ -0,0 +1,15 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface ISsaOrderController<T>
|
||||
{
|
||||
|
||||
enum Action : int
|
||||
{
|
||||
All = 0
|
||||
}
|
||||
|
||||
static string GetRouteName() => nameof(ISsaOrderController<T>)[1..^10];
|
||||
Task<T> GetAllSsaOrders();
|
||||
Task<T> GetSsaOrders(string id);
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
namespace Expose.MyIT.Shared.Models.Methods;
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface ISsaOrderRepository
|
||||
{
|
9
Shared/Models/Stateless/IWeatherForecastController.cs
Normal file
9
Shared/Models/Stateless/IWeatherForecastController.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
public interface IWeatherForecastController<T>
|
||||
{
|
||||
|
||||
static string GetRouteName() => nameof(IWeatherForecastController<T>)[1..^10];
|
||||
T Get();
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
|
||||
public interface IAppSettingsController
|
||||
{
|
||||
|
||||
static string GetRouteName() => nameof(IAppSettingsController)[1..^10];
|
||||
string[] GetAppSettings();
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
|
||||
public interface IClientSettingsController
|
||||
{
|
||||
|
||||
static string GetRouteName() => nameof(IClientSettingsController)[1..^10];
|
||||
string[] GetClientSettings();
|
||||
string GetIpAddress();
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
|
||||
public interface IServiceShopOrderController
|
||||
{
|
||||
|
||||
static string GetRouteName() => nameof(IServiceShopOrderController)[1..^10];
|
||||
Task<ViewModels.ServiceShopOrder[]> GetAllServiceShopOrders();
|
||||
Task<ViewModels.ServiceShopOrder[]> GetServiceShopOrders(string id);
|
||||
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
|
||||
public interface ISsaOrder
|
||||
{
|
||||
|
||||
ViewModels.SsaOrder[] TestStatic_GetSsaOrders(SSA? ssa) =>
|
||||
GetSsaOrders(ssa);
|
||||
static ViewModels.SsaOrder[] GetSsaOrders(SSA? ssa) =>
|
||||
SsaOrder.GetSsaOrders(ssa);
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
|
||||
public interface ISsaOrderController
|
||||
{
|
||||
|
||||
static string GetRouteName() => nameof(ISsaOrderController)[1..^10];
|
||||
Task<ViewModels.SsaOrder[]> GetAllSsaOrders();
|
||||
Task<ViewModels.SsaOrder[]> GetSsaOrders(string id);
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
|
||||
public interface IWeatherForecastController
|
||||
{
|
||||
|
||||
static string GetRouteName() => nameof(IWeatherForecastController)[1..^10];
|
||||
Task<ViewModels.WeatherForecast[]> Get();
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
internal class ServiceShopOrder
|
||||
internal abstract class ServiceShopOrder
|
||||
{
|
||||
|
||||
internal static ViewModels.ServiceShopOrder[] GetServiceShopOrders(ServiceShop? serviceShop)
|
@ -1,9 +1,9 @@
|
||||
namespace Expose.MyIT.Shared.Models.Stateless.Methods;
|
||||
namespace Expose.MyIT.Shared.Models.Stateless;
|
||||
|
||||
internal class SsaOrder
|
||||
internal abstract class SsaOrder
|
||||
{
|
||||
|
||||
internal static ViewModels.SsaOrder[] GetSsaOrders(SSA? ssa)
|
||||
internal static ViewModels.SsaOrder[] GetSsaOrders(Ssa? ssa)
|
||||
{
|
||||
ViewModels.SsaOrder[] results;
|
||||
if (ssa is null || !ssa.Orders.Any())
|
@ -2,34 +2,18 @@ using System.Text.Json;
|
||||
|
||||
namespace Expose.MyIT.Shared.ViewModels;
|
||||
|
||||
public class ServiceShopOrder
|
||||
public record ServiceShopOrder(string Id,
|
||||
string Name,
|
||||
string[] BookingNames,
|
||||
string Type,
|
||||
string State,
|
||||
string ItemNumber,
|
||||
DateTime CreatedDate,
|
||||
DateTime DecidedDate,
|
||||
string Recipient,
|
||||
string Requestor)
|
||||
{
|
||||
|
||||
public string Id { init; get; }
|
||||
public string Name { init; get; }
|
||||
public string[] BookingNames { init; get; }
|
||||
public string Type { init; get; }
|
||||
public string State { init; get; }
|
||||
public string ItemNumber { init; get; }
|
||||
public DateTime CreatedDate { init; get; }
|
||||
public DateTime DecidedDate { init; get; }
|
||||
public string Recipient { init; get; }
|
||||
public string Requestor { init; get; }
|
||||
|
||||
public ServiceShopOrder(string id, string name, string[] bookingNames, string type, string state, string itemNumber, DateTime createdDate, DateTime decidedDate, string recipient, string requestor)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
BookingNames = bookingNames;
|
||||
Type = type;
|
||||
State = state;
|
||||
ItemNumber = itemNumber;
|
||||
CreatedDate = createdDate;
|
||||
DecidedDate = decidedDate;
|
||||
Recipient = recipient;
|
||||
Requestor = requestor;
|
||||
}
|
||||
|
||||
public ServiceShopOrder(Models.Order order) :
|
||||
this(order.Id,
|
||||
order.Name,
|
||||
|
@ -2,34 +2,18 @@ using System.Text.Json;
|
||||
|
||||
namespace Expose.MyIT.Shared.ViewModels;
|
||||
|
||||
public class SsaOrder
|
||||
public record SsaOrder(string Id,
|
||||
string Name,
|
||||
string[] BookingNames,
|
||||
string Type,
|
||||
string State,
|
||||
string ItemNumber,
|
||||
DateTime CreatedDate,
|
||||
DateTime DecidedDate,
|
||||
string Recipient,
|
||||
string Requestor)
|
||||
{
|
||||
|
||||
public string Id { init; get; }
|
||||
public string Name { init; get; }
|
||||
public string[] BookingNames { init; get; }
|
||||
public string Type { init; get; }
|
||||
public string State { init; get; }
|
||||
public string ItemNumber { init; get; }
|
||||
public DateTime CreatedDate { init; get; }
|
||||
public DateTime DecidedDate { init; get; }
|
||||
public string Recipient { init; get; }
|
||||
public string Requestor { init; get; }
|
||||
|
||||
public SsaOrder(string id, string name, string[] bookingNames, string type, string state, string itemNumber, DateTime createdDate, DateTime decidedDate, string recipient, string requestor)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
BookingNames = bookingNames;
|
||||
Type = type;
|
||||
State = state;
|
||||
ItemNumber = itemNumber;
|
||||
CreatedDate = createdDate;
|
||||
DecidedDate = decidedDate;
|
||||
Recipient = recipient;
|
||||
Requestor = requestor;
|
||||
}
|
||||
|
||||
public SsaOrder(Models.Order order) :
|
||||
this(order.Id,
|
||||
order.Name,
|
||||
|
@ -1,25 +1,14 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Expose.MyIT.Shared.ViewModels;
|
||||
|
||||
public class WeatherForecast
|
||||
public record WeatherForecast
|
||||
{
|
||||
|
||||
public DateOnly Date { init; get; }
|
||||
|
||||
public int TemperatureC { init; get; }
|
||||
|
||||
public string? Summary { init; get; }
|
||||
|
||||
public int TemperatureF { init; get; }
|
||||
|
||||
public WeatherForecast(DateOnly date, int temperatureC, string? summary, int temperatureF)
|
||||
{
|
||||
Date = date;
|
||||
TemperatureC = temperatureC;
|
||||
Summary = summary;
|
||||
TemperatureF = temperatureF;
|
||||
}
|
||||
[JsonConstructor]
|
||||
public WeatherForecast(DateOnly Date, int TemperatureC, string? Summary, int TemperatureF)
|
||||
{ }
|
||||
|
||||
public WeatherForecast(Models.WeatherForecast weatherForecast) :
|
||||
this(weatherForecast.Date,
|
||||
|
Reference in New Issue
Block a user