public StartupOptions(DILevel level) { mValue = this; HasMainProcessRequired = level.HasFlag(DILevel.MainProcessRequired); HasNotifyIcon = HasMainProcessRequired; HasGUI = level.HasFlag(DILevel.GUI); HasServerApiClient = level.HasFlag(DILevel.ServerApiClient); HasHttpClientFactory = level.HasFlag(DILevel.HttpClientFactory); HasHttpProxy = level.HasFlag(DILevel.HttpProxy); HasHosts = level.HasFlag(DILevel.Hosts); HasSteam = level.HasFlag(DILevel.Steam); }
/// <summary> /// 初始化启动 /// </summary> public static void Init(DILevel level) { if (!isInitialized) { isInitialized = true; #if !__MOBILE__ FileSystemDesktop.InitFileSystem(); #if StartupTrace StartupTrace.Restart("Startup.InitFileSystem"); #endif #endif if (level.HasFlag(DILevel.ServerApiClient)) { ModelValidatorProvider.Init(); #if StartupTrace StartupTrace.Restart("ModelValidatorProvider.Init"); #endif } InitDI(level); #if StartupTrace StartupTrace.Restart($"InitDI: {level}");