This repository was archived by the owner on Mar 31, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathPackageIcon.cs
More file actions
65 lines (50 loc) · 2.28 KB
/
PackageIcon.cs
File metadata and controls
65 lines (50 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.ComponentModel.DataAnnotations;
namespace NuGet.Insights.Worker.PackageIconToCsv
{
[CsvRecord]
public partial record PackageIcon : PackageRecord, IAggregatedCsvRecord<PackageIcon>
{
public PackageIcon()
{
}
public PackageIcon(Guid scanId, DateTimeOffset scanTimestamp, PackageDeleteCatalogLeaf leaf) : base(scanId, scanTimestamp, leaf)
{
ResultType = PackageIconResultType.Deleted;
}
public PackageIcon(Guid scanId, DateTimeOffset scanTimestamp, PackageDetailsCatalogLeaf leaf) : base(scanId, scanTimestamp, leaf)
{
ResultType = PackageIconResultType.Available;
}
[Required]
public PackageIconResultType ResultType { get; set; }
public long? FileLength { get; set; }
public string FileSHA256 { get; set; }
public string ContentType { get; set; }
public string HeaderFormat { get; set; }
public bool? AutoDetectedFormat { get; set; }
public string Signature { get; set; }
public long? Width { get; set; }
public long? Height { get; set; }
public int? FrameCount { get; set; }
public bool? IsOpaque { get; set; }
[KustoType("dynamic")]
public string FrameFormats { get; set; }
[KustoType("dynamic")]
public string FrameDimensions { get; set; }
[KustoType("dynamic")]
public string FrameAttributeNames { get; set; }
public static string CsvCompactMessageSchemaName => "cc.pi";
public static IEqualityComparer<PackageIcon> KeyComparer { get; } = PackageRecordIdentityComparer<PackageIcon>.Instance;
public static IReadOnlyList<string> KeyFields { get; } = PackageRecordExtensions.IdentityKeyField;
public static List<PackageIcon> Prune(List<PackageIcon> records, bool isFinalPrune, IOptions<NuGetInsightsWorkerSettings> options, ILogger logger)
{
return PackageRecordExtensions.Prune(records, isFinalPrune);
}
public int CompareTo(PackageIcon other)
{
return base.CompareTo(other);
}
}
}