Пример #1
0
 /// <summary>
 /// Returns the direct path to the file
 /// </summary>
 /// <returns>
 /// The download URL
 /// </returns>
 public string GetDownloadUrl()
 {
     if (string.IsNullOrWhiteSpace(_downloadUrl))
     {
         _downloadUrl = CurseApi.ResolveRedirect(new Uri(ModPageUrl + "/files/" + id + "/download")).ToString();
     }
     return(_downloadUrl);
 }
Пример #2
0
 /// <summary>
 /// Returns the direct path to the mod's current home on Curse
 /// </summary>
 /// <returns>The home</returns>
 public string GetPageUrl()
 {
     if (_pageUrl == null)
     {
         _pageUrl = new Uri(Regex.Replace(CurseApi.ResolveRedirect(new Uri(GetProjectUrl())).ToString(), "\\?.*$", "")).ToString();
     }
     return(_pageUrl);
 }
Пример #3
0
 /// <summary>
 /// Returns the direct path to the file
 /// </summary>
 /// <returns>The download url</returns>
 public String GetDownloadUrl()
 {
     if (_downloadUrl == null)
     {
         _downloadUrl = CurseApi.ResolveRedirect(new Uri(Mod.GetPageUrl() + "/files/" + id + "/download")).ToString();
     }
     return(_downloadUrl);
 }