Added some item cats
This commit is contained in:
@@ -9,7 +9,6 @@ using Microsoft.Extensions.DependencyInjection.Extensions;
|
|||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.Json;
|
|
||||||
using Toolkit.Avalonia;
|
using Toolkit.Avalonia;
|
||||||
using Toolkit.Foundation;
|
using Toolkit.Foundation;
|
||||||
|
|
||||||
@@ -28,14 +27,14 @@ public partial class App : Application
|
|||||||
IHost? host = DefaultHostBuilder.Create()
|
IHost? host = DefaultHostBuilder.Create()
|
||||||
.AddConfiguration<LockerConfiguration>("Locker:*")
|
.AddConfiguration<LockerConfiguration>("Locker:*")
|
||||||
.AddConfiguration<ItemConfiguration>("Item:*")
|
.AddConfiguration<ItemConfiguration>("Item:*")
|
||||||
//.AddConfiguration<ItemConfiguration>(args => args.Name = "Bank Account", "Item:Bank Account")
|
.AddConfiguration("Item:Bank Account", ItemConfiguration.BankAccount)
|
||||||
.AddConfiguration("Item:Credit Card", ItemConfiguration.CreditCard)
|
.AddConfiguration("Item:Credit Card", ItemConfiguration.CreditCard)
|
||||||
//.AddConfiguration<ItemConfiguration>(args => args.Name = "Document", "Item:Document")
|
.AddConfiguration("Item:Document", ItemConfiguration.Document)
|
||||||
//.AddConfiguration<ItemConfiguration>(args => args.Name = "Driving Licence", "Item:Driving Licence")
|
.AddConfiguration<ItemConfiguration>("Item:Driving Licence", ItemConfiguration.DrivingLicence)
|
||||||
//.AddConfiguration<ItemConfiguration>(args => args.Name = "Identity", "Item:Identity")
|
.AddConfiguration<ItemConfiguration>("Item:Identity", ItemConfiguration.Identity)
|
||||||
//.AddConfiguration<ItemConfiguration>(args => args.Name = "Login", "Item:Login")
|
.AddConfiguration<ItemConfiguration>("Item:Login", ItemConfiguration.Login)
|
||||||
//.AddConfiguration<ItemConfiguration>(args => args.Name = "Note", "Item:Note")
|
.AddConfiguration<ItemConfiguration>("Item:Note", ItemConfiguration.Note)
|
||||||
//.AddConfiguration<ItemConfiguration>(args => args.Name = "Password", "Item:Password")
|
.AddConfiguration<ItemConfiguration>("Item:Password", ItemConfiguration.Password)
|
||||||
.ConfigureServices((context, services) =>
|
.ConfigureServices((context, services) =>
|
||||||
{
|
{
|
||||||
services.AddAvalonia();
|
services.AddAvalonia();
|
||||||
|
|||||||
@@ -6,6 +6,74 @@ public record ItemConfiguration
|
|||||||
|
|
||||||
public IList<ItemSectionConfiguration>? Sections { get; set; }
|
public IList<ItemSectionConfiguration>? Sections { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static ItemConfiguration Identity => new()
|
||||||
|
{
|
||||||
|
Name = "Identity",
|
||||||
|
Sections = new List<ItemSectionConfiguration>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static ItemConfiguration BankAccount => new()
|
||||||
|
{
|
||||||
|
Name = "Bank Account",
|
||||||
|
Sections = new List<ItemSectionConfiguration>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static ItemConfiguration Note => new()
|
||||||
|
{
|
||||||
|
Name = "Note",
|
||||||
|
Sections = new List<ItemSectionConfiguration>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
public static ItemConfiguration Document => new()
|
||||||
|
{
|
||||||
|
Name = "Document",
|
||||||
|
Sections = new List<ItemSectionConfiguration>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static ItemConfiguration DrivingLicence => new()
|
||||||
|
{
|
||||||
|
Name = "Driving Licence",
|
||||||
|
Sections = new List<ItemSectionConfiguration>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
public static ItemConfiguration Login => new()
|
||||||
|
{
|
||||||
|
Name = "Login",
|
||||||
|
Sections = new List<ItemSectionConfiguration>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static ItemConfiguration Password => new()
|
||||||
|
{
|
||||||
|
Name = "Password",
|
||||||
|
Sections = new List<ItemSectionConfiguration>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
public static ItemConfiguration CreditCard => new()
|
public static ItemConfiguration CreditCard => new()
|
||||||
{
|
{
|
||||||
Name = "Credit Card",
|
Name = "Credit Card",
|
||||||
|
|||||||
Reference in New Issue
Block a user