Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        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();
            }
        }