31 lines
926 B
C#
31 lines
926 B
C#
using System;
|
|
|
|
namespace AlayaCore.Models.Manifests
|
|
{
|
|
public sealed class LauncherManifestModel
|
|
{
|
|
public Version Version { get; }
|
|
public string Sha512Hash { get; }
|
|
public Uri DownloadUri { get; }
|
|
|
|
public LauncherManifestModel(
|
|
Version version,
|
|
string sha512Hash,
|
|
Uri downloadUri)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(version.ToString()))
|
|
{
|
|
throw new ArgumentException("Version cannot be null or empty.", nameof(version));
|
|
}
|
|
|
|
if (string.IsNullOrWhiteSpace(sha512Hash))
|
|
{
|
|
throw new ArgumentException("SHA-512 hash cannot be null or empty.", nameof(sha512Hash));
|
|
}
|
|
|
|
DownloadUri = downloadUri ?? throw new ArgumentNullException(nameof(downloadUri));
|
|
Version = version;
|
|
Sha512Hash = sha512Hash;
|
|
}
|
|
}
|
|
} |