Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 0b5badb

Browse files
Merge pull request #2158 from github/autocompletebox-fix
Modernizing and Implementing Autocompletebox
2 parents f8cfdae + 76ebd75 commit 0b5badb

File tree

57 files changed

+1188
-1310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1188
-1310
lines changed

src/GitHub.App/Caches/AutoCompleteSourceCache.cs

Lines changed: 0 additions & 147 deletions
This file was deleted.

src/GitHub.App/Caches/IAutoCompleteSourceCache.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/GitHub.App/Caches/IIssuesCache.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/GitHub.App/Caches/IMentionsCache.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/GitHub.App/Caches/IssuesCache.cs

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/GitHub.App/Caches/MentionsCache.cs

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/GitHub.App/Models/SuggestionItem.cs

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using GitHub.Extensions;
23
using GitHub.Helpers;
34

45
namespace GitHub.Models
@@ -9,36 +10,22 @@ namespace GitHub.Models
910
/// </summary>
1011
public class SuggestionItem
1112
{
12-
public SuggestionItem() // So this can be deserialized from cache
13-
{
14-
}
15-
16-
public SuggestionItem(string name, Uri iconCacheKey)
17-
{
18-
Ensure.ArgumentNotNullOrEmptyString(name, "name");
19-
Ensure.ArgumentNotNull(iconCacheKey, "iconCacheKey");
20-
21-
Name = name;
22-
IconKey = iconCacheKey;
23-
}
24-
2513
public SuggestionItem(string name, string description)
2614
{
27-
Ensure.ArgumentNotNullOrEmptyString(name, "name");
28-
Ensure.ArgumentNotNullOrEmptyString(description, "description");
15+
Guard.ArgumentNotEmptyString(name, "name");
16+
Guard.ArgumentNotEmptyString(description, "description");
2917

3018
Name = name;
3119
Description = description;
3220
}
3321

34-
public SuggestionItem(string name, string description, Uri iconCacheKey)
22+
public SuggestionItem(string name, string description, string imageUrl)
3523
{
36-
Ensure.ArgumentNotNullOrEmptyString(name, "name");
37-
Ensure.ArgumentNotNull(iconCacheKey, "iconCacheKey");
24+
Guard.ArgumentNotEmptyString(name, "name");
3825

3926
Name = name;
4027
Description = description;
41-
IconKey = iconCacheKey;
28+
ImageUrl = imageUrl;
4229
}
4330

4431
/// <summary>
@@ -52,9 +39,9 @@ public SuggestionItem(string name, string description, Uri iconCacheKey)
5239
public string Description { get; set; }
5340

5441
/// <summary>
55-
/// A key to lookup when displaying the icon for this entry
42+
/// An image url for this entry
5643
/// </summary>
57-
public Uri IconKey { get; set; }
44+
public string ImageUrl { get; set; }
5845

5946
/// <summary>
6047
/// The date this suggestion was last modified according to the API.

0 commit comments

Comments
 (0)