wabbajack/Wabbajack.DTOs/DownloadStates/ADownloadState.cs

22 lines
535 B
C#
Raw Normal View History

2021-09-27 12:42:46 +00:00
using System.Collections.Generic;
using System.Linq;
2021-10-23 16:51:17 +00:00
namespace Wabbajack.DTOs.DownloadStates;
public abstract class ADownloadState : IDownloadState
2021-09-27 12:42:46 +00:00
{
2021-10-23 16:51:17 +00:00
public abstract string TypeName { get; }
public abstract object[] PrimaryKey { get; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
public string PrimaryKeyString
{
get
2021-09-27 12:42:46 +00:00
{
2021-10-23 16:51:17 +00:00
var pk = new List<object>();
pk.Add(TypeName);
pk.AddRange(PrimaryKey);
var pk_str = string.Join("|", pk.Select(p => p.ToString()));
return pk_str;
2021-09-27 12:42:46 +00:00
}
}
}