protected override void InitEnvironment() { //如果在初始化时发生异常,则会引发再次启动。这时应该保证之前的所有的初始化工作归零。 RafyEnvironment.Location.IsWebUI = true; RafyEnvironment.Location.IsWPFUI = false; RafyEnvironment.Location.DataPortalMode = DataPortalMode.ConnectDirectly; base.InitEnvironment(); if (RafyEnvironment.Location.IsWebUI) { JsonServiceRepository.LoadAllServices(); } }
protected override void InitEnvironment() { //如果在初始化时发生异常,则会引发再次启动。这时应该保证之前的所有的初始化工作归零。 var isWcfServer = ConfigurationHelper.GetAppSettingOrDefault("Rafy_IsWCFServer", false); RafyEnvironment.Location.IsWebUI = !isWcfServer; RafyEnvironment.Location.IsWPFUI = false; RafyEnvironment.Location.DataPortalMode = DataPortalMode.ConnectDirectly; base.InitEnvironment(); if (RafyEnvironment.Location.IsWebUI) { JsonServiceRepository.LoadAllServices(); } }