Add converters from CICM Metadata to Aaru Metadata.

This commit is contained in:
2022-12-16 01:16:41 +00:00
parent 4cdf541a09
commit 647d3fac26
32 changed files with 1649 additions and 22 deletions

View File

@@ -36,7 +36,9 @@
// Copyright © 2011-2023 Natalia Portillo
// ****************************************************************************/
using System;
using System.Collections.Generic;
using Schemas;
// ReSharper disable UnusedMember.Global
// ReSharper disable ClassNeverInstantiated.Global
@@ -52,4 +54,16 @@ public class Pcmcia
public string Manufacturer { get; set; }
public string ProductName { get; set; }
public List<string> AdditionalInformation { get; set; }
[Obsolete("Will be removed in Aaru 7")]
public static implicit operator Pcmcia(PCMCIAType cicm) => cicm is null ? null : new Pcmcia
{
Cis = cicm.CIS,
Compliance = cicm.Compliance,
ManufacturerCode = cicm.ManufacturerCodeSpecified ? cicm.ManufacturerCode : null,
CardCode = cicm.CardCodeSpecified ? cicm.CardCode : null,
Manufacturer = cicm.Manufacturer,
ProductName = cicm.ProductName,
AdditionalInformation = cicm.AdditionalInformation is null ? null : new List<string>(cicm.AdditionalInformation)
};
}