コード例 #1
0
ファイル: SqliteFavorites.cs プロジェクト: arlyon/browser
 /// <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;
 }
コード例 #2
0
ファイル: SqliteHistory.cs プロジェクト: arlyon/browser
 /// <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;
 }
コード例 #3
0
ファイル: HistoryViewModel.cs プロジェクト: arlyon/browser
        /// <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);
        }
コード例 #4
0
 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;
 }
コード例 #5
0
ファイル: FaviconCacheTests.cs プロジェクト: arlyon/browser
 public void Setup()
 {
     this._cache = this.CreateCache();
 }