ファイル

26 行
988 B
C#
Raw パーマリンク Blame 履歴

このファイルには曖昧(ambiguous)なUnicode文字が含まれています
このファイルには、他の文字と見間違える可能性があるUnicode文字が含まれています。 それが意図的なものと考えられる場合は、この警告を無視して構いません。 それらの文字を表示するにはエスケープボタンを使用します。
using System.Globalization;
using ProxyForge.Cache;
namespace ProxyForge.ViewModels;
internal sealed class ProxyCacheEntryViewModel(ProxyCacheEntry entry)
{
public Guid Id { get; } = entry.Id;
public string SourcePath { get; } = entry.SourcePath;
public string FileName { get; } = System.IO.Path.GetFileName(entry.SourcePath);
public string Resolution { get; } = string.Create(CultureInfo.InvariantCulture, $"{entry.ProxyWidth}×{entry.ProxyHeight}");
public string Scale { get; } = string.Create(CultureInfo.InvariantCulture, $"{entry.Scale}%");
public string Chunks { get; } = string.Create(CultureInfo.InvariantCulture, $"{entry.Chunks.Count}/{entry.ChunkCount}");
public long Bytes { get; } = entry.FileLength;
public string Size { get; } = ByteText.Format(entry.FileLength);
public string LastUsed { get; } = new DateTime(entry.LastUsedTicks, DateTimeKind.Utc).ToLocalTime().ToString("yyyy/MM/dd HH:mm", CultureInfo.InvariantCulture);
}