Made Manifest Size source of truth.

- Updated ModService->Resolve... to return Uri.
- Removed ModrinthModInfoModel as no longer needed.
This commit is contained in:
2026-04-04 21:20:56 +01:00
parent c48f670eab
commit ef135b1164
3 changed files with 0 additions and 75 deletions

View File

@@ -1,22 +0,0 @@
using System;
using Newtonsoft.Json;
namespace AlayaCore.Models.Manifests.DTO
{
[Serializable]
public class InstalledModEntryDto
{
[JsonProperty("name", Required = Required.Always)]
public string FileName { get; set; } = string.Empty;
[JsonProperty("version", Required = Required.Always)]
public string Version { get; set; } = string.Empty;
[JsonProperty("sha512Hash", Required = Required.Always)]
public string Sha512Hash { get; set; } = string.Empty;
[JsonProperty("size", Required = Required.Always)]
public long Size { get; set; }
}
}

View File

@@ -1,34 +0,0 @@
using System;
namespace AlayaCore.Models.Manifests
{
[Serializable]
public sealed class InstalledModEntry
{
public string FileName { get; }
public string Sha512Hash { get; }
public long Size { get; }
public InstalledModEntry(string fileName, string sha512Hash, long size)
{
if (string.IsNullOrWhiteSpace(fileName))
{
throw new ArgumentException("File name cannot be null, empty, or whitespace.", nameof(fileName));
}
if (string.IsNullOrWhiteSpace(sha512Hash))
{
throw new ArgumentException("SHA-512 hash cannot be null, empty, or whitespace.", nameof(sha512Hash));
}
if (size <= 0)
{
throw new ArgumentOutOfRangeException(nameof(size), "Size must be greater than zero.");
}
FileName = fileName;
Sha512Hash = sha512Hash;
Size = size;
}
}
}

View File

@@ -1,19 +0,0 @@
using System;
using AlayaCore.Models.Manifests;
namespace AlayaCore.Models
{
public class ModrinthModInfoModel
{
public ModrinthModInfoModel(Uri modUrl, long size)
{
ModUrl = modUrl;
Size = size;
}
public Uri ModUrl { get; set; }
public long Size { get; set; }
}
}