public TrayViewModel(IKernel kernel, IWindowManager windowManager, IWindowService windowService, IMessageService messageService, IUpdateService updateService, IEventAggregator eventAggregator, ICoreService coreService, IDebugService debugService, ISettingsService settingsService) { _kernel = kernel; _windowManager = windowManager; _eventAggregator = eventAggregator; _debugService = debugService; Core.Utilities.ShutdownRequested += UtilitiesOnShutdownRequested; Core.Utilities.RestartRequested += UtilitiesOnShutdownRequested; windowService.ConfigureMainWindowProvider(this); messageService.ConfigureNotificationProvider(this); bool autoRunning = Bootstrapper.StartupArguments.Contains("--autorun"); bool minimized = Bootstrapper.StartupArguments.Contains("--minimized"); bool showOnAutoRun = settingsService.GetSetting("UI.ShowOnStartup", true).Value; if (autoRunning && !showOnAutoRun || minimized) { coreService.Initialized += (_, _) => updateService.AutoUpdate(); } else { ShowSplashScreen(); coreService.Initialized += (_, _) => TrayBringToForeground(); } }
public GeneralSettingsTabViewModel( IKernel kernel, IWindowManager windowManager, IDialogService dialogService, IDebugService debugService, ISettingsService settingsService, IUpdateService updateService, IPluginManagementService pluginManagementService, IMessageService messageService, IRegistrationService registrationService, ICoreService coreService ) { DisplayName = "GENERAL"; _kernel = kernel; _windowManager = windowManager; _dialogService = dialogService; _debugService = debugService; _settingsService = settingsService; _updateService = updateService; _messageService = messageService; _registrationService = registrationService; LogLevels = new BindableCollection <ValueDescription>(EnumUtilities.GetAllValuesAndDescriptions(typeof(LogEventLevel))); ColorSchemes = new BindableCollection <ValueDescription>(EnumUtilities.GetAllValuesAndDescriptions(typeof(ApplicationColorScheme))); RenderScales = new List <Tuple <string, double> > { new("25%", 0.25), new("50%", 0.5), new("100%", 1), };
public RootViewModel( IEventAggregator eventAggregator, ISettingsService settingsService, ICoreService coreService, IDebugService debugService, IRegistrationService builtInRegistrationService, ISnackbarMessageQueue snackbarMessageQueue, SidebarViewModel sidebarViewModel) { SidebarViewModel = sidebarViewModel; _eventAggregator = eventAggregator; _coreService = coreService; _debugService = debugService; _builtInRegistrationService = builtInRegistrationService; _snackbarMessageQueue = snackbarMessageQueue; _frameTimeUpdateTimer = new Timer(500); _colorScheme = settingsService.GetSetting("UI.ColorScheme", ApplicationColorScheme.Automatic); _windowSize = settingsService.GetSetting <WindowSize>("UI.RootWindowSize"); _themeWatcher = new ThemeWatcher(); ApplyColorSchemeSetting(); ActiveItem = SidebarViewModel.SelectedItem; ActiveItemReady = true; AssemblyInformationalVersionAttribute?versionAttribute = typeof(RootViewModel).Assembly.GetCustomAttribute <AssemblyInformationalVersionAttribute>(); WindowTitle = $"Artemis {versionAttribute?.InformationalVersion}"; }
public RootViewModel( IKernel kernel, IEventAggregator eventAggregator, ISettingsService settingsService, ICoreService coreService, IWindowManager windowManager, IDebugService debugService, IRegistrationService builtInRegistrationService, IMessageService messageService, SidebarViewModel sidebarViewModel) { _kernel = kernel; _eventAggregator = eventAggregator; _settingsService = settingsService; _coreService = coreService; _windowManager = windowManager; _debugService = debugService; _builtInRegistrationService = builtInRegistrationService; _messageService = messageService; _sidebarViewModel = sidebarViewModel; _frameTimeUpdateTimer = new Timer(500); _windowSize = _settingsService.GetSetting <WindowSize>("UI.RootWindowSize"); _sidebarViewModel.ConductWith(this); ActiveItem = sidebarViewModel.SelectedItem; ActiveItemReady = true; PinSidebar = _settingsService.GetSetting("UI.PinSidebar", false); AssemblyInformationalVersionAttribute versionAttribute = typeof(RootViewModel).Assembly.GetCustomAttribute <AssemblyInformationalVersionAttribute>(); WindowTitle = $"Artemis {versionAttribute?.InformationalVersion} build {Constants.BuildInfo.BuildNumberDisplay}"; }
public AdminController( IWebHostEnvironment environment, ILogger <AdminController> logger, SignInManager <UserProfileModel> signInManager, UserManager <UserProfileModel> userManager, IPostService posts, IUserProfileService localProfiles, IPublicProfileService publicProfiles, IDebugService debugService, RoleManager <UserGroupModel> roleManager, IReactionService reactions, ITagService tags, INotificationService notifications, IPeerService peers, IAuthService auth, ISettingsService settings, IInvitationService invitationService, IActivityStreamRepository activityStreams ) : base(environment, signInManager, userManager, posts, localProfiles, publicProfiles, reactions, tags, notifications, peers, auth, settings, activityStreams) { _logger = logger; _debugService = debugService; _roleManager = roleManager; _invitationService = invitationService; }
public static IDebugService GetDebugService(this ICoreObject coreObject) { IDlc idlc = (IDlc)coreObject.Context; IDlcManager idlcManager = idlc.WorkingContext.DlcManager; IDebugService IDebugService = idlcManager.Load("PlcLanguages.BlockLogic.DebugService") as IDebugService; return(IDebugService); }
public HtmlController(IHostingEnvironment env, IDebugService debugService) { var config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json") .Build(); _uIApiConfiguration = config.GetSection("UIApi").Get <UiApiConfiguration>(); _env = env; _debugService = debugService; }
private static async Task CallThrowApplicationException(IDebugService proxy) { Console.WriteLine("WCF call ThrowApplicationException"); try { await proxy.ThrowApplicationException("some message"); } catch (FaultException <ApplicationExceptionFaultDetail> ex) { Console.WriteLine(" Error message: {0}", ex.Detail.Message); } }
void BreakLine() { AdvancedTextBox atb = ServiceHost.File[ServiceHost.File.Current] as AdvancedTextBox; AdvancedTextBox.TextBuffer.TokenLine tl = atb.Buffer.GetUserState(atb.Buffer.CurrentLine); AdvancedTextBox.TextBuffer.DrawInfo[] di = atb.Buffer.GetDrawCache(atb.Buffer.CurrentLine); IDebugService dbg = ServiceHost.Debug; System.Diagnostics.Debugger.Break(); Console.WriteLine("{0}{1}", tl, di); atb.Buffer.SetDrawCache(atb.Buffer.CurrentLine, null); atb.Invalidate(); }
private static async Task CallThrowInvalidOperationException(IDebugService proxy) { Console.WriteLine("gRPC call ThrowApplicationException"); try { await proxy.ThrowInvalidOperationException("some message"); } catch (FaultException <InvalidOperationExceptionFaultDetail> ex) { Console.WriteLine(" Error message: {0}", ex.Detail.Message); Console.WriteLine(" StackTrace: {0}", ex.Detail.StackTrace); } }
public GeneralSettingsTabViewModel( IKernel kernel, IWindowManager windowManager, IDialogService dialogService, IDebugService debugService, ISettingsService settingsService, IUpdateService updateService, IPluginManagementService pluginManagementService, IMessageService messageService) { DisplayName = "GENERAL"; _kernel = kernel; _windowManager = windowManager; _dialogService = dialogService; _debugService = debugService; _settingsService = settingsService; _updateService = updateService; _messageService = messageService; LogLevels = new BindableCollection <ValueDescription>(EnumUtilities.GetAllValuesAndDescriptions(typeof(LogEventLevel))); ColorSchemes = new BindableCollection <ValueDescription>(EnumUtilities.GetAllValuesAndDescriptions(typeof(ApplicationColorScheme))); RenderScales = new List <Tuple <string, double> > { new("10%", 0.1) }; for (int i = 25; i <= 100; i += 25) { RenderScales.Add(new Tuple <string, double>(i + "%", i / 100.0)); } TargetFrameRates = new List <Tuple <string, int> >(); for (int i = 10; i <= 30; i += 5) { TargetFrameRates.Add(new Tuple <string, int>(i + " FPS", i)); } List <LayerBrushProvider> layerBrushProviders = pluginManagementService.GetFeaturesOfType <LayerBrushProvider>(); LayerBrushDescriptors = new BindableCollection <LayerBrushDescriptor>(layerBrushProviders.SelectMany(l => l.LayerBrushDescriptors)); _defaultLayerBrushDescriptor = _settingsService.GetSetting("ProfileEditor.DefaultLayerBrushDescriptor", new LayerBrushReference { LayerBrushProviderId = "Artemis.Plugins.LayerBrushes.Color.ColorBrushProvider-92a9d6ba", BrushType = "SolidBrush" }); WebServerPortSetting = _settingsService.GetSetting("WebServer.Port", 9696); WebServerPortSetting.AutoSave = true; }
public HtmlController(IHostingEnvironment env, IDebugService debugService, ILogger <HtmlController> logger, IReadOnlyPolicyRegistry <string> policyRegistry) { var config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json") .Build(); _uIApiConfiguration = config.GetSection("UIApi").Get <UiApiConfiguration>(); _env = env; _debugService = debugService; _logger = logger; _policyRegistry = policyRegistry; }
// Token: 0x060000CC RID: 204 RVA: 0x000055F0 File Offset: 0x000037F0 private int CalcHash(ref int idx, bool isNeedTrace) { int num = 0; int num2 = 0; IDebugService service = this._serviceContainer.GetService <IDebugService>(); foreach (IService service2 in this._serviceContainer.GetAllServices()) { IHashCode hashCode; bool flag = (hashCode = (service2 as IHashCode)) != null; if (flag) { num2 += hashCode.GetHash(ref num) * PrimerLUT.GetPrimer(num++); } } return(num2); }
public virtual void InitReference(IServiceContainer serviceContainer, IManagerContainer mgrContainer = null) { this._serviceContainer = serviceContainer; this._ecsFactoryService = serviceContainer.GetService <IECSFactoryService>(); this._randomService = serviceContainer.GetService <IRandomService>(); this._timeMachineService = serviceContainer.GetService <ITimeMachineService>(); this._globalStateService = serviceContainer.GetService <IGlobalStateService>(); this._inputService = serviceContainer.GetService <IInputService>(); this._viewService = serviceContainer.GetService <IViewService>(); this._audioService = serviceContainer.GetService <IAudioService>(); this._map2DService = serviceContainer.GetService <IMap2DService>(); this._resService = serviceContainer.GetService <IResService>(); this._effectService = serviceContainer.GetService <IEffectService>(); this._eventRegisterService = serviceContainer.GetService <IEventRegisterService>(); this._idService = serviceContainer.GetService <IIdService>(); this._debugService = serviceContainer.GetService <IDebugService>(); }
public TrayViewModel(IKernel kernel, IWindowManager windowManager, IEventAggregator eventAggregator, ICoreService coreService, IDebugService debugService, ISettingsService settingsService) { _kernel = kernel; _windowManager = windowManager; _eventAggregator = eventAggregator; _debugService = debugService; CanShowRootViewModel = true; bool autoRunning = Bootstrapper.StartupArguments.Contains("--autorun"); bool showOnAutoRun = settingsService.GetSetting("UI.ShowOnStartup", true).Value; if (!autoRunning || showOnAutoRun) { ShowSplashScreen(); coreService.Initialized += (sender, args) => TrayBringToForeground(); } }
public virtual void InitReference(IServiceContainer serviceContainer, IManagerContainer mgrContainer) { _serviceContainer = serviceContainer; //通用Service _ecsFacadeService = serviceContainer.GetService <IECSFacadeService>(); _randomService = serviceContainer.GetService <IRandomService>(); _timeMachineService = serviceContainer.GetService <ITimeMachineService>(); _constStateService = serviceContainer.GetService <IConstStateService>(); _inputService = serviceContainer.GetService <IInputService>(); _viewService = serviceContainer.GetService <IViewService>(); _audioService = serviceContainer.GetService <IAudioService>(); _map2DService = serviceContainer.GetService <IMap2DService>(); _resService = serviceContainer.GetService <IResService>(); _effectService = serviceContainer.GetService <IEffectService>(); _eventRegisterService = serviceContainer.GetService <IEventRegisterService>(); _idService = serviceContainer.GetService <IIdService>(); _commonStateService = serviceContainer.GetService <ICommonStateService>(); _debugService = serviceContainer.GetService <IDebugService>(); }
public DebuggingViewModel(GameStudioViewModel editor, IDebugService debugService) : base(editor.SafeArgument(nameof(editor)).ServiceProvider) { this.editor = editor; this.debugService = debugService; outputTitle = outputTitleBase; BuildLog = new BuildLogViewModel(ServiceProvider); LiveScriptingLog = new LoggerViewModel(ServiceProvider); LiveScriptingLog.AddLogger(assemblyReloadLogger); BuildProjectCommand = new AnonymousTaskCommand(ServiceProvider, () => BuildProject(false)); StartProjectCommand = new AnonymousTaskCommand(ServiceProvider, () => BuildProject(true)); CancelBuildCommand = new AnonymousCommand(ServiceProvider, () => { currentBuild?.Cancel(); }); LivePlayProjectCommand = new AnonymousTaskCommand(ServiceProvider, LivePlayProject); ReloadAssembliesCommand = new AnonymousTaskCommand(ServiceProvider, ReloadAssemblies) { IsEnabled = false }; ResetOutputTitleCommand = new AnonymousCommand(ServiceProvider, () => OutputTitle = outputTitleBase); modifiedAssemblies = new Dictionary <PackageLoadedAssembly, ModifiedAssembly>(); trackAssemblyChanges = true; assemblyTrackingCancellation = new CancellationTokenSource(); // Create script resolver scriptsSorter = new ScriptSourceCodeResolver(); ServiceProvider.RegisterService(scriptsSorter); assemblyReloadLogger.MessageLogged += (sender, e) => Dispatcher.InvokeAsync(() => OutputTitle = outputTitleBase + '*'); editor.Session.PropertyChanged += SessionPropertyChanged; UpdateCommands(); Task.Run(async() => { var watcher = await editor.StrideAssets.Code.ProjectWatcher; await scriptsSorter.Initialize(editor.Session, watcher, assemblyTrackingCancellation.Token); PullAssemblyChanges(watcher); }); }
protected override void OnInit(BaseContext context, IServiceContainer services) { _context = (Context)context; //BuildInServices _randomService = services.GetService <IRandomService>(); _timeMachineService = services.GetService <ITimeMachineService>(); _globalStateService = services.GetService <IGlobalStateService>(); _viewService = services.GetService <IViewService>(); _audioService = services.GetService <IAudioService>(); _inputService = services.GetService <IInputService>(); _map2DService = services.GetService <IMap2DService>(); _resService = services.GetService <IResService>(); _effectService = services.GetService <IEffectService>(); _eventRegisterService = services.GetService <IEventRegisterService>(); _idService = services.GetService <IIdService>(); _debugService = services.GetService <IDebugService>(); //GameServices _gameStateService = services.GetService <IGameStateService>(); _gameConfigService = services.GetService <IGameConfigService>(); _gameEventService = services.GetService <IGameEventService>(); }
public GeneralSettingsTabViewModel(IDialogService dialogService, IDebugService debugService, ISettingsService settingsService, IPluginService pluginService) { DisplayName = "GENERAL"; _dialogService = dialogService; _debugService = debugService; _settingsService = settingsService; LogLevels = new BindableCollection <ValueDescription>(EnumUtilities.GetAllValuesAndDescriptions(typeof(LogEventLevel))); ColorSchemes = new BindableCollection <ValueDescription>(EnumUtilities.GetAllValuesAndDescriptions(typeof(ApplicationColorScheme))); RenderScales = new List <Tuple <string, double> > { new Tuple <string, double>("10%", 0.1) }; for (int i = 25; i <= 100; i += 25) { RenderScales.Add(new Tuple <string, double>(i + "%", i / 100.0)); } TargetFrameRates = new List <Tuple <string, int> >(); for (int i = 10; i <= 30; i += 5) { TargetFrameRates.Add(new Tuple <string, int>(i + " FPS", i)); } // Anything else is kinda broken right now SampleSizes = new List <int> { 1, 9 }; List <LayerBrushProvider> layerBrushProviders = pluginService.GetPluginsOfType <LayerBrushProvider>(); LayerBrushDescriptors = new BindableCollection <LayerBrushDescriptor>(layerBrushProviders.SelectMany(l => l.LayerBrushDescriptors)); _defaultLayerBrushDescriptor = _settingsService.GetSetting("ProfileEditor.DefaultLayerBrushDescriptor", new LayerBrushReference { BrushPluginGuid = Guid.Parse("92a9d6ba-6f7a-4937-94d5-c1d715b4141a"), BrushType = "ColorBrush" }); }
public static void SetDebugProvider(IDebugService provider) { DebugProvider = provider; }
public static void Initialize() { audioProvider = new NullAudioProvider(); DebugProvider = new NullDebugProvider(); }
public async Task Invoke(HttpContext context, IWebHostEnvironment env, UserManager <UserProfileModel> users, IDebugService debug) { try { await _next(context); } catch (Exception e) { var user = await users.GetUserAsync(context.User); await debug.Log(e, context.TraceIdentifier, user?.Id); context.Response.Redirect("/Error/500", permanent: false); if (env.IsDevelopment()) { throw; } else { context.Response.Redirect("/Error/500", permanent: false); } } }
public TestTechController(ITestTechService testTechService, IDebugService debugService) { this.testTechService = testTechService; this.debugService = debugService; }
public DebugController(IDebugService debugService, IAdminService adminService, IHostingEnvironment hostingEnvironment) { this.debugService = debugService; this.adminService = adminService; this.hostingEnvironment = hostingEnvironment; }
public HomeController(IDebugService debugService, IAdminService adminService, ITestTechService testTechService) { this.debugService = debugService; this.adminService = adminService; this.testTechService = testTechService; }
public DebugDumpImportantLinks(IRepositoryProvider provider, IDebugService debugService) { _provider = provider; _debugService = debugService; }
public ClientContext(IDebugService client, ClientInfo info) { Client = client; Info = info; }