Skip to content

Commit

Permalink
Use Int64 for download counts instead of Int32
Browse files Browse the repository at this point in the history
  • Loading branch information
joelverhagen committed Aug 23, 2022
1 parent 1fc7615 commit caea740
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Data/PackagesSearchResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void Read (string json)
Version = (string)x["version"],
Description = (string)x["description"],
IconUrl = (string)x["iconUrl"],
TotalDownloads = ((int?)x["totalDownloads"]) ?? 0,
TotalDownloads = ((long?)x["totalDownloads"]) ?? 0,
Authors = string.Join (", ", x["authors"]),
});
}
Expand All @@ -57,7 +57,7 @@ void Read (string json)
existingResult.Version = newVersion;
existingResult.Description = (string)x["description"];
existingResult.IconUrl = (string)x["iconUrl"];
existingResult.TotalDownloads = ((int?)x["totalDownloads"]) ?? 0;
existingResult.TotalDownloads = ((long?)x["totalDownloads"]) ?? 0;
existingResult.Authors = string.Join (", ", x["authors"]);
}
}
Expand Down Expand Up @@ -109,7 +109,7 @@ public class PackagesSearchResult
public string Version { get; set; } = "";
public string Description { get; set; } = "";
public string IconUrl { get; set; } = "";
public int TotalDownloads { get; set; } = 0;
public long TotalDownloads { get; set; } = 0;
public string Authors { get; set; } = "";

public override string ToString() => PackageId;
Expand Down

0 comments on commit caea740

Please sign in to comment.