/// <summary> /// Initializes a new instance of the <see cref="SqliteFavorites"/> class. /// </summary> /// <param name="config"> /// The config file. /// </param> /// <param name="cache"> /// The cache. /// </param> public SqliteFavorites(IConfig config, IFavicon cache) { this._config = config; this._faviconCache = cache; this.Load(); this.OnFavoritesAddOrUpdate += this.UpdateFavorites; }
/// <summary> /// Initializes a new instance of the <see cref="SqliteHistory"/> class. /// </summary> /// <param name="config"> /// The config. /// </param> /// <param name="cache"> /// The cache. /// </param> public SqliteHistory(IConfig config, IFavicon cache) { this._faviconCache = cache; this._config = config; this.Load(); this.HistoryUpdated += this.AddToHistory; }
/// <summary> /// The from history Location. /// </summary> /// <param name="location"> /// The Location. /// </param> /// <param name="faviconLookup"> /// The favicon Lookup. /// </param> /// <returns> /// The <see cref="HistoryViewModel"/>. /// </returns> public static HistoryViewModel FromHistoryLocation(HistoryLocation location, IFavicon faviconLookup) { HistoryViewModel hvm = new HistoryViewModel() { Name = string.IsNullOrEmpty(location.Title) ? location.Url.Host : location.Title, Date = location.Date, _historyLocation = location, _faviconLookup = faviconLookup }; location.PropertyChanged += hvm.UpdateViewModel; return(hvm); }
public MockTabPresenter(ITab tab, IFavorites favorites, IConfig config, IFavicon favicons, IHistory history, ITabHistory tabHistory) { this.Name = Guid.NewGuid().ToString(); tab.Name = this.Name; this._history = history; }
public void Setup() { this._cache = this.CreateCache(); }