You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File.WriteAllText(Path.Combine(consumer,"Program.cs"),"using System.IO; using System.Linq; using Magicodes.IE.IO; namespace Consumer; public sealed class MoneyConverter : CellConverter<decimal> { public override bool Read(string cell, out decimal value) => decimal.TryParse(cell, out value); } [XlsxExportable] public sealed class ConsumerRow { public string Name { get; set; } = \"\"; public decimal Amount { get; set; } } public static class Program { public static void Main() { var metadata = XlsxGeneratedTypeMetadataRegistry.TryGet<ConsumerRow>(); if (metadata is null) throw new System.Exception(\"metadata:null\"); using var ms = new MemoryStream(); Xlsx.Write(ms, new[] { new ConsumerRow { Name = \"ok\", Amount = 12.5m } }); ms.Position = 0; var options = new XlsxReadOptions<ConsumerRow>().WithConverter(new MoneyConverter()); var row = Xlsx.Read<ConsumerRow>(ms, options).Single(); if (row.Name != \"ok\" || row.Amount != 12.5m) throw new System.Exception($\"{row.Name}|{row.Amount}\"); } }");
thrownewFileNotFoundException($"NativeAOT executable was not found under {publishRoot}. Files: {string.Join(", ",Directory.Exists(publishRoot)?Directory.GetFiles(publishRoot,"*",SearchOption.AllDirectories):Array.Empty<string>())}");
0 commit comments