Initialize migration. (#88)
Co-authored-by: defnotken <itsdefnotken@gmail.com> Co-authored-by: cake <admin@cakeandbanana.nl> Reviewed-on: #88 Reviewed-by: cake <cake@noreply.git.lightless-sync.org> Co-authored-by: defnotken <defnotken@noreply.git.lightless-sync.org> Co-committed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
This commit was merged in pull request #88.
This commit is contained in:
19
LightlessSync/Services/CharaData/CharacterAnalysisSummary.cs
Normal file
19
LightlessSync/Services/CharaData/CharacterAnalysisSummary.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using LightlessSync.API.Data.Enum;
|
||||
using LightlessSync.Services.CharaData.Models;
|
||||
using System.Collections.Immutable;
|
||||
namespace LightlessSync.Services.CharaData;
|
||||
|
||||
public sealed class CharacterAnalysisSummary
|
||||
{
|
||||
public static CharacterAnalysisSummary Empty { get; } =
|
||||
new(ImmutableDictionary<ObjectKind, CharacterAnalysisObjectSummary>.Empty);
|
||||
|
||||
internal CharacterAnalysisSummary(IImmutableDictionary<ObjectKind, CharacterAnalysisObjectSummary> objects)
|
||||
{
|
||||
Objects = objects;
|
||||
}
|
||||
|
||||
public IImmutableDictionary<ObjectKind, CharacterAnalysisObjectSummary> Objects { get; }
|
||||
|
||||
public bool HasData => Objects.Any(kvp => kvp.Value.HasEntries);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Runtime.InteropServices;
|
||||
namespace LightlessSync.Services.CharaData.Models;
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public readonly record struct CharacterAnalysisObjectSummary(int EntryCount, long TotalTriangles, long TexOriginalBytes, long TexCompressedBytes)
|
||||
{
|
||||
public bool HasEntries => EntryCount > 0;
|
||||
}
|
||||
Reference in New Issue
Block a user