コード例 #1
0
ファイル: ModuleSetting.cs プロジェクト: HongSic/HSServer
        public static ModuleSetting FromJSON(string JSON, string RootPath = null)
        {
            var option = new ModuleLoadOption();

            var json = JsonDocument.Parse(JSON, new JsonDocumentOptions
            {
                CommentHandling     = JsonCommentHandling.Skip,
                AllowTrailingCommas = true,
            });

            var Controller = json.RootElement.GetProperty("Controller");
            var Router     = json.RootElement.GetProperty("Router");
            var MiddleWare = json.RootElement.GetProperty("MiddleWare");

            var load = new ModuleLoad(GetArray(MiddleWare, RootPath), GetArray(Router, RootPath), GetArray(Controller, RootPath));

            return(new ModuleSetting(option, load));
        }
コード例 #2
0
ファイル: ModuleSetting.cs プロジェクト: HongSic/HSServer
 public ModuleSetting(ModuleLoadOption LoadOption, ModuleLoad Load)
 {
     this.LoadOption = LoadOption; this.Load = Load;
 }
コード例 #3
0
ファイル: SetupMain.cs プロジェクト: xpoi5010/eP-Installation
 public void LoadModule()
 {
     ModuleLoad.Load();
 }