Intermediary component of Hack System.
$ dotnet add package HackSystem.Intermediary
A Hack System based on ASP.NET Core and Blazor WebAssembly.
Design and implement your program and Execute it in Hack System!
HackSystem.WebHost and HackSystem.WebAPI as startup projects.hosting.json file of HackSystem.WebHost and HackSystem.WebAPI projects to config the port to listen.wwwroot/appsettings.json file of HackSystem.Web so that APIConfiguration.APIURL equals urls of HackSystem.WebHost to config the address of Web API.JwtConfiguration section of HackSystem.WebAPI project's appsettings.json, it is Important for security!HackSystem.WebHost and HackSystem.WebAPI projects.
HackSystem.WebHost is just a fake host of core project HackSystem.Web.HackSystem.WebHost.HackSystem.Host project to visit Hack System.
HackSystem.Host, edit HostConfigs.json file so that RemoteURL equals the address which you just configured for HackSystem.WebHost.HackSystem.Host.exe.Something may change with platform developing.
Create a new Razor Class Library project.
Install above nuget pakcages to this project.
Add a new image file named as Index.png in root folder of this project, and copy to output directory if newer.
Create a new Razor Component as entry component, and inherits ProgramComponentBase class.
Create a new static Launcher class and return the type of entry component from static Launch method.
public static class Launcher
{
// Launch Parameter is not mandatory.
public static Type Launch(LaunchParameter parameter)
{
return typeof(TaskSchedulerComponent);
}
}
Something may change with platform developing.
Insert a new record in database of new program.
INSERT INTO ProgramDetails (Id,Name,Enabled,SingleInstance,EntryAssemblyName,EntryTypeName,EntryParameter,Mandatory)
VALUES ('program0-icon-0828-hack-system000006','TaskServer',1,1,'HackSystem.Web.TaskSchedule','HackSystem.Web.TaskSchedule.Launcher','{ "Developer": "Leon" }',1);
Edit ProgramAssetConfiguration section of HackSystem.WebAPI project's appsettings.json to config program asset folder path.
Create new filder named as new program ID in program asset folder.
Build program project and copy all files into above folder.
set assetFolder=$(SolutionDir)HackSystem.WebAPI\$(OutDir)ProgramAssets\
MKDIR assetFolder
set assetFolder=%assetFolder%program0-icon-0828-hack-system000006\
MKDIR assetFolder
XCOPY $(TargetDir)* %assetFolder% /Y /S /H
Insert a new record in database to map releationship between user and program.
INSERT INTO UserProgramMaps (UserId,ProgramId,PinToDesktop,PinToDock,PinToTop,"Rename")
VALUES ('msaspnet-core-user-hack-system000001','program0-icon-0828-hack-system000006',1,0,0,NULL);
Launch Hack System and login above user, should see the new program launch and enjoy it.
Click image below to watch video.







HackSystem.WebAPI as Startup project;HackSystem.WebAPI.Infrastructure as Default project in Package Manager Console;| Command | Description |
|---|---|
| Get-Help entityframework | Displays information about entity framework commands. |
| Add-Migration | Creates a migration by adding a migration snapshot. |
| Remove-Migration | Removes the last migration snapshot. |
| Update-Database | Updates the database schema based on the last migration snapshot. |
| Script-Migration | Generates a SQL script using all the migration snapshots. |
| Scaffold-DbContext | Generates a DbContext and entity type classes for a specified database. This is called reverse engineering. |
| Get-DbContext | Gets information about a DbContext type. |
| Drop-Database | Drops the database. |