public BrowserApplicationInstance( AppConfig appConfig, BrowserSettings settings, int id, bool isMainInstance, IFileSystemDialog fileSystemDialog, IHashAlgorithm hashAlgorithm, IMessageBox messageBox, IModuleLogger logger, IText text, IUserInterfaceFactory uiFactory, string startUrl) { this.appConfig = appConfig; this.Id = id; this.httpClient = new HttpClient(); this.isMainInstance = isMainInstance; this.fileSystemDialog = fileSystemDialog; this.hashAlgorithm = hashAlgorithm; this.messageBox = messageBox; this.logger = logger; this.settings = settings; this.text = text; this.uiFactory = uiFactory; this.startUrl = startUrl; }
internal TestableResourceHandler( AppConfig appConfig, IRequestFilter filter, ILogger logger, BrowserSettings settings, WindowSettings windowSettings, IText text) : base(appConfig, filter, logger, settings, windowSettings, text) { }
public void Initialize() { appConfig = new AppConfig(); logger = new Mock <ILogger>(); settings = new BrowserSettings(); windowSettings = new WindowSettings(); sut = new DownloadHandler(appConfig, logger.Object, settings, windowSettings); }
internal DownloadHandler(AppConfig appConfig, ILogger logger, BrowserSettings settings, WindowSettings windowSettings) { this.appConfig = appConfig; this.callbacks = new ConcurrentDictionary <int, DownloadFinishedCallback>(); this.downloads = new ConcurrentDictionary <int, Guid>(); this.logger = logger; this.settings = settings; this.windowSettings = windowSettings; }
public void Initialize() { appConfig = new AppConfig(); filter = new Mock <IRequestFilter>(); logger = new Mock <ILogger>(); settings = new BrowserSettings(); windowSettings = new WindowSettings(); text = new Mock <IText>(); sut = new TestableResourceHandler(appConfig, filter.Object, logger.Object, settings, windowSettings, text.Object); }
internal MainWindow(AppSettings appSettings, BrowserSettings settings, IMessageBox messageBox, int id, bool mainInstance, int numWindows, string startUrl, IModuleLogger logger, IText text) { this.appSettings = appSettings; this.messageBox = messageBox; this.logger = logger; this.startUrl = startUrl; this.text = text; this.Id = id; this.mainInstance = mainInstance; this.numWindows = numWindows; this.settings = settings; InitializeComponent(); }
internal RequestHandler( AppConfig appConfig, IRequestFilter filter, ILogger logger, ResourceHandler resourceHandler, BrowserSettings settings, WindowSettings windowSettings, IText text) { this.filter = filter; this.logger = logger; this.resourceHandler = resourceHandler; this.settings = settings; this.windowSettings = windowSettings; }
internal ResourceHandler( AppConfig appConfig, IRequestFilter filter, ILogger logger, BrowserSettings settings, WindowSettings windowSettings, IText text) { this.appConfig = appConfig; this.algorithm = new SHA256Managed(); this.filter = filter; this.htmlLoader = new HtmlLoader(text); this.logger = logger; this.settings = settings; this.windowSettings = windowSettings; this.text = text; }
public BrowserApplication( AppConfig appConfig, BrowserSettings settings, IFileSystemDialog fileSystemDialog, IHashAlgorithm hashAlgorithm, INativeMethods nativeMethods, IMessageBox messageBox, IModuleLogger logger, IText text, IUserInterfaceFactory uiFactory) { this.appConfig = appConfig; this.fileSystemDialog = fileSystemDialog; this.hashAlgorithm = hashAlgorithm; this.nativeMethods = nativeMethods; this.instances = new List <BrowserApplicationInstance>(); this.logger = logger; this.messageBox = messageBox; this.settings = settings; this.text = text; this.uiFactory = uiFactory; }
public BrowserApplicationInstance( AppSettings appSettings, IMessageBox messageBox, int id, bool isMainInstance, int numWindows, string startUrl, IModuleLogger logger, IText text) { this.appSettings = appSettings; this.messageBox = messageBox; this.Id = id; this.isMainInstance = isMainInstance; this.logger = logger; this.text = text; this.startUrl = startUrl; this.settings = new BrowserSettings(); settings.QuitUrl = appSettings.QuitUrl; settings.DownloadDirectory = appSettings.DownloadDirectory; settings.AllowDownloads = true; settings.MainWindow.AllowReloading = appSettings.AllowReload; settings.AdditionalWindow.AllowReloading = appSettings.AllowReload; var instanceLogger = new ModuleLogger(logger, nameof(MainWindow)); window = new MainWindow(appSettings, settings, messageBox, id, isMainInstance, numWindows, startUrl, instanceLogger, text); window.TerminationRequested += () => TerminationRequested?.Invoke(); window.IconChanged += (i) => IconChanged?.Invoke(i); Handle = window.Handle; Icon = new BrowserIconResource(); window.Closing += Control_Closing; window.TitleChanged += Control_TitleChanged; window.PopupRequested += Control_PopupRequested; }