Ejemplo n.º 1
0
 public DummyService(
     ILogger <DummyService> logger,
     IOptions <DummyOptions> options,
     IUpdateableOptions <DummyOptions> updateableOptions,
     ILiveUpdateableOptions <DummyOptions> liveUpdateableOptions,
     ILiveOptions <DummyOptions> liveOptions)
 {
     this.logger                 = logger.ThrowIfNull(nameof(logger));
     this.dummyOptions           = options.ThrowIfNull(nameof(options));
     this.updateableDummyOptions = updateableOptions.ThrowIfNull(nameof(updateableOptions));
     this.liveOptions            = liveOptions.ThrowIfNull(nameof(liveOptions));
     this.liveUpdateableOptions  = liveUpdateableOptions.ThrowIfNull(nameof(liveUpdateableOptions));
 }
Ejemplo n.º 2
0
 public ApplicationLauncher(
     ILiveOptions <ApplicationConfiguration> liveOptions,
     ICredentialManager credentialManager,
     IMutexHandler mutexHandler,
     ILogger <ApplicationLauncher> logger,
     IPrivilegeManager privilegeManager)
 {
     this.logger            = logger.ThrowIfNull(nameof(logger));
     this.mutexHandler      = mutexHandler.ThrowIfNull(nameof(mutexHandler));
     this.credentialManager = credentialManager.ThrowIfNull(nameof(credentialManager));
     this.liveOptions       = liveOptions.ThrowIfNull(nameof(liveOptions));
     this.privilegeManager  = privilegeManager.ThrowIfNull(nameof(privilegeManager));
 }
Ejemplo n.º 3
0
 public IconRetriever(
     ILogger <IconRetriever> logger,
     IHttpClient <IconRetriever> httpClient,
     ILiveOptions <ApplicationConfiguration> liveOptions)
 {
     this.logger                 = logger.ThrowIfNull(nameof(logger));
     this.httpClient             = httpClient.ThrowIfNull(nameof(httpClient));
     this.liveOptions            = liveOptions.ThrowIfNull(nameof(liveOptions));
     this.httpClient.BaseAddress = new Uri(BaseUrl);
     if (Directory.Exists(IconsDirectoryName) is false)
     {
         Directory.CreateDirectory(IconsDirectoryName);
     }
 }
Ejemplo n.º 4
0
 public ScreenChoiceView(
     IViewManager viewManager,
     IScreenManager screenManager,
     ILiveOptions <ApplicationConfiguration> liveOptions,
     IApplicationLauncher applicationLauncher)
 {
     this.viewManager         = viewManager.ThrowIfNull(nameof(viewManager));
     this.screenManager       = screenManager.ThrowIfNull(nameof(screenManager));
     this.liveOptions         = liveOptions.ThrowIfNull(nameof(liveOptions));
     this.applicationLauncher = applicationLauncher.ThrowIfNull(nameof(applicationLauncher));
     this.InitializeComponent();
     this.selectedId = this.liveOptions.Value.DesiredGuildwarsScreen;
     this.CanTest    = applicationLauncher.IsGuildwarsRunning;
     this.SetupView();
 }
Ejemplo n.º 5
0
 public void InitializeTemplate(
     IIconRetriever iconRetriever,
     ILiveOptions <ApplicationConfiguration> liveOptions,
     IBuildTemplateManager buildTemplateManager,
     ILogger <ChromiumBrowserWrapper> logger)
 {
     this.SkillBrowser.InitializeBrowser(liveOptions, buildTemplateManager, logger);
     this.SkillTemplate0.InitializeSkillTemplate(iconRetriever);
     this.SkillTemplate1.InitializeSkillTemplate(iconRetriever);
     this.SkillTemplate2.InitializeSkillTemplate(iconRetriever);
     this.SkillTemplate3.InitializeSkillTemplate(iconRetriever);
     this.SkillTemplate4.InitializeSkillTemplate(iconRetriever);
     this.SkillTemplate5.InitializeSkillTemplate(iconRetriever);
     this.SkillTemplate6.InitializeSkillTemplate(iconRetriever);
     this.SkillTemplate7.InitializeSkillTemplate(iconRetriever);
 }
 public BuildTemplateView(
     IViewManager viewManager,
     IBuildTemplateManager buildTemplateManager,
     IIconRetriever iconRetriever,
     ILiveOptions <ApplicationConfiguration> liveOptions,
     ILogger <ChromiumBrowserWrapper> chromiumLogger,
     ILogger <BuildTemplateView> logger)
 {
     this.buildTemplateManager = buildTemplateManager.ThrowIfNull(nameof(buildTemplateManager));
     this.logger      = logger.ThrowIfNull(nameof(logger));
     this.viewManager = viewManager.ThrowIfNull(nameof(viewManager));
     this.InitializeComponent();
     this.BuildTemplate.InitializeTemplate(iconRetriever, liveOptions, buildTemplateManager, chromiumLogger);
     this.DataContextChanged += (sender, contextArgs) =>
     {
         if (contextArgs.NewValue is BuildEntry)
         {
             this.logger.LogInformation("Received data context. Setting current build");
             this.CurrentBuild     = contextArgs.NewValue.As <BuildEntry>();
             this.CurrentBuildCode = this.buildTemplateManager.EncodeTemplate(this.CurrentBuild.Build);
         }
     };
 }