Updated FaKrosnoDataModel with View. Changes in EmailClient. Add library to create Excel files. Changes in DataProvider with adding new recipient from ScheduleDetail Misc

This commit is contained in:
2022-03-30 17:38:36 +02:00
parent 3073b1f85f
commit f77356e192
20 changed files with 812 additions and 49 deletions

9
FA.sln
View File

@@ -15,6 +15,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SytelineSaAppDataModel", "S
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SynchronizeOrdersWithMissingQty", "SynchronizeOrdersWithMissingQty\SynchronizeOrdersWithMissingQty.csproj", "{9E54CED0-3D39-48AA-BE4F-4F05CFDB08C2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{CADA431E-B809-42D6-9F7E-53571EE27487}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xls", "Xls\Xls.csproj", "{C166DCB9-5ACD-42AF-A489-D170C5B98A51}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -41,6 +45,10 @@ Global
{9E54CED0-3D39-48AA-BE4F-4F05CFDB08C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E54CED0-3D39-48AA-BE4F-4F05CFDB08C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E54CED0-3D39-48AA-BE4F-4F05CFDB08C2}.Release|Any CPU.Build.0 = Release|Any CPU
{C166DCB9-5ACD-42AF-A489-D170C5B98A51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C166DCB9-5ACD-42AF-A489-D170C5B98A51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C166DCB9-5ACD-42AF-A489-D170C5B98A51}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C166DCB9-5ACD-42AF-A489-D170C5B98A51}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -48,6 +56,7 @@ Global
GlobalSection(NestedProjects) = preSolution
{6A95691D-DA87-4164-B030-47095788EEA2} = {63C122C9-D1DE-45CB-9A71-0196444C50B3}
{776570D9-F7D3-449D-8667-F436DB1468D8} = {63C122C9-D1DE-45CB-9A71-0196444C50B3}
{C166DCB9-5ACD-42AF-A489-D170C5B98A51} = {CADA431E-B809-42D6-9F7E-53571EE27487}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5510D1A6-B22F-4C3D-9EA8-66F1676CF7D5}

View File

@@ -0,0 +1,90 @@
namespace FaKrosnoDataModel
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("DelforLastUpdatedView")]
public partial class DelforLastUpdatedView
{
[Key]
[Column("PONum", Order = 0)]
[StringLength(50)]
public string PoNumber { get; set; }
[Key]
[Column("orderID", Order = 1)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int OrderId { get; set; }
[Key]
[Column("recipientID", Order = 2)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int RecipientId { get; set; }
[Key]
[Column("lastUpdateDate", Order = 3)]
public DateTime LastUpdateDate { get; set; }
[Key]
[Column("docNumber", Order = 4)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int DocNumber { get; set; }
[Column("recipientCode")]
[StringLength(50)]
public string RecipientCode { get; set; }
[Column("recipientDesc")]
public string RecipientDesc { get; set; }
[Column("purchaserCode")]
[StringLength(50)]
public string PurchaserCode { get; set; }
[Column("scheduleOrderID")]
public int? ScheduleOrderID { get; set; }
[Column("sc_productCode")]
[StringLength(50)]
public string SalesChannelProductCode { get; set; }
[Column("sh_productCode")]
[StringLength(50)]
public string ShipperProductCode { get; set; }
[Column("qty")]
public int? Qty { get; set; }
[Column("dateFrom", TypeName = "date")]
public DateTime? DateFrom { get; set; }
[Column("dateTo", TypeName = "date")]
public DateTime? DateTo { get; set; }
[Column("sccType")]
[StringLength(50)]
public string SalesChannelType { get; set; }
[Column("qtyType")]
[StringLength(50)]
public string QtyType { get; set; }
[Column("qtyDesc")]
[StringLength(50)]
public string QtyDesc { get; set; }
[Column("status")]
[StringLength(50)]
public string Status { get; set; }
[Column("shipDate", TypeName = "date")]
public DateTime? ShipDate { get; set; }
[Column("NR_POTW_ODBIORU")]
[StringLength(50)]
public string ReceivedNumber { get; set; }
}
}

View File

@@ -1,7 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
namespace FaKrosnoDataModel
{
@@ -24,6 +21,7 @@ namespace FaKrosnoDataModel
public virtual DbSet<ScheduleOrderDetailMisc> ScheduleOrderDetailMisc { get; set; }
public virtual DbSet<ScheduleOrderMisc> ScheduleOrderMisc { get; set; }
public virtual DbSet<PlannedQty> PlannedQty { get; set; }
public virtual DbSet<DelforLastUpdatedView> DelforLastUpdatedView { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
@@ -180,6 +178,50 @@ namespace FaKrosnoDataModel
modelBuilder.Entity<PlannedQty>()
.Property(e => e.Status)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.PoNumber)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.RecipientCode)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.RecipientDesc)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.PurchaserCode)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.SalesChannelProductCode)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.ShipperProductCode)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.SalesChannelType)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.QtyType)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.QtyDesc)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.Status)
.IsUnicode(false);
modelBuilder.Entity<DelforLastUpdatedView>()
.Property(e => e.ReceivedNumber)
.IsUnicode(false);
}
}
}

View File

@@ -60,6 +60,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Buyer.cs" />
<Compile Include="DelforLastUpdatedView.cs" />
<Compile Include="ExportOrder.cs" />
<Compile Include="FaKrosnoDataContext.cs" />
<Compile Include="PlannedQty.cs" />

View File

@@ -46,5 +46,8 @@ namespace FaKrosnoDataModel
public DateTime LastUpdateDate { get; set; }
public DateTime CreatedDate { get; set; }
[Column("RecipientID")]
public int RecipientId { get; set; }
}
}

View File

@@ -1,7 +0,0 @@
namespace FaKrosnoShared
{
public class Class1
{
}
}

View File

@@ -1,9 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -19,6 +19,11 @@ namespace SynchronizeOrdersWithMissingQty.DataProvider
return scheduleOrders;
}
public IList<Recipient> GetRecipients()
{
return FaKrosnoDataContext.Recipient.ToList();
}
public IList<ScheduleOrderDetail> GetUniqueOrderDetails(IList<ScheduleOrder> scheduleOrders)
{
IList<ScheduleOrderDetail> scheduleOrderDetails = scheduleOrders.SelectMany(x => x.ScheduleOrderDetail)
@@ -58,10 +63,11 @@ namespace SynchronizeOrdersWithMissingQty.DataProvider
public IList<PlannedQty> GetMissingSendingDetails(IList<ScheduleOrderDetail> scheduleOrderDetails,
DateTime plannedSendingDate, IList<ScheduleOrderDetailDetail> plannedSendingDetails,
IList<PlannedQty> existingPlannedDetails)
IList<PlannedQty> existingPlannedDetails, IList<Recipient> recipients)
{
ISet<int> scheduleOrderDetailIds =
existingPlannedDetails.Select(x => x.ScheduleOrderDetailId).Distinct().ToHashSet();
IList<PlannedQty> missedPlannedDetails = new List<PlannedQty>();
scheduleOrderDetails = scheduleOrderDetails.Where(x => !scheduleOrderDetailIds.Contains(x.Id)).ToList();
@@ -82,10 +88,11 @@ namespace SynchronizeOrdersWithMissingQty.DataProvider
foreach (ScheduleOrderDetail scheduleOrderDetail in missedDetailsMisc)
{
if ((existsDetails.FirstOrDefault(x =>
Contains(x, scheduleOrderDetail)) is ScheduleOrderDetail detail &&
detail.ScheduleOrderDetailDetail.All(s => s.DateFrom != plannedSendingDate)) ||
!existsDetails.Any(x => Contains(x, scheduleOrderDetail)))
Recipient recipient = recipients.GetRecipientFromMiscAddress(scheduleOrderDetail);
if (existsDetails.FirstOrDefault(x => x.IsEqualTo(scheduleOrderDetail)) is { } detail &&
detail.ScheduleOrderDetailDetail.All(s => s.DateFrom != plannedSendingDate) ||
!existsDetails.Have(scheduleOrderDetail))
{
missedPlannedDetails.Add(new PlannedQty
{
@@ -101,7 +108,8 @@ namespace SynchronizeOrdersWithMissingQty.DataProvider
QtyDesc =
$"LATE: {scheduleOrderDetail.ScheduleOrderDetailDetail.FirstOrDefault()?.QtyDesc}",
Status = "new",
CreatedDate = DateTime.Now
CreatedDate = DateTime.Now,
RecipientId = recipient.Id
});
}
}
@@ -117,14 +125,5 @@ namespace SynchronizeOrdersWithMissingQty.DataProvider
return changes;
}
private bool Contains(ScheduleOrderDetail source, ScheduleOrderDetail other)
{
return source.ShipperProductCode == other.ShipperProductCode &&
source.SalesChannelProductCode == other.SalesChannelProductCode &&
source.ScheduleOrder.OrderID == other.ScheduleOrder.OrderID &&
source.ScheduleOrder.RecipientID == other.ScheduleOrder.RecipientID &&
source.ScheduleOrder.Recipient.PurchaserID == other.ScheduleOrder.Recipient.PurchaserID;
}
}
}

View File

@@ -19,13 +19,19 @@ namespace SynchronizeOrdersWithMissingQty
SynchronizeOrdersWithMissingQtyItem = synchronizeOrdersWithMissingQtyItem;
}
public void SendEmail(string body)
public void SendEmail(string body, IList<MimeEntity> attachments = null)
{
MimeMessage mailMessage = new MimeMessage();
mailMessage.From.Add(MailboxAddress.Parse(SynchronizeOrdersWithMissingQtyItem.EmailFrom));
mailMessage.To.Add(MailboxAddress.Parse(SynchronizeOrdersWithMissingQtyItem.EmailTo));
mailMessage.Subject = SynchronizeOrdersWithMissingQtyItem.Subject;
mailMessage.Body = new TextPart(TextFormat.Html) {Text = body};
//if (null != attachments)
//{
// mailMessage.Attachments = attachments;
//}
using (SmtpClient smtpClient = new SmtpClient())
{

View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FaKrosnoDataModel;
namespace SynchronizeOrdersWithMissingQty
{
public static class Extensions
{
public static bool IsEqualTo(this ScheduleOrderDetail source, ScheduleOrderDetail other)
{
return source.ShipperProductCode == other.ShipperProductCode &&
source.SalesChannelProductCode == other.SalesChannelProductCode &&
source.ScheduleOrder.OrderID == other.ScheduleOrder.OrderID &&
source.ScheduleOrder.RecipientID == other.ScheduleOrder.RecipientID &&
source.ScheduleOrder.Recipient.PurchaserID == other.ScheduleOrder.Recipient.PurchaserID;
}
public static bool Have(this IList<ScheduleOrderDetail> source, ScheduleOrderDetail other)
{
return source.Any(x => x.IsEqualTo(other));
}
public static Recipient GetRecipientFromMiscAddress(this IList<Recipient> recipients, ScheduleOrderDetail scheduleOrderDetail)
{
string recipientCode = scheduleOrderDetail.ScheduleOrderDetailMisc.FirstOrDefault(x => x.Type == "LOC_11")
?.Value;
if (!string.IsNullOrWhiteSpace(recipientCode) &&
scheduleOrderDetail.ScheduleOrder.Recipient.RecipientCode != recipientCode)
{
if (recipientCode.StartsWith("RW2"))
{
return recipients.FirstOrDefault(x => x.RecipientCode == "RW2");
}
if (recipients.FirstOrDefault(x => x.RecipientCode == recipientCode) is { } recipient)
{
return recipient;
}
}
return scheduleOrderDetail.ScheduleOrder.Recipient;
}
}
}

View File

@@ -7,6 +7,7 @@ using System.Linq;
using System.Threading;
using System.Xml.Serialization;
using SynchronizeOrdersWithMissingQty.Configuration;
using Xls;
namespace SynchronizeOrdersWithMissingQty
{
@@ -24,7 +25,7 @@ namespace SynchronizeOrdersWithMissingQty
try
{
DateTime workingDate = DateTime.Now;
DateTime workingDate = new DateTime(2022, 3, 31, 11, 0, 0);
DateTime plannedSendingDate = GetWeekday(workingDate, GetNextSendingDay(workingDate));
DateTime nextSendingDate = new DateTime(plannedSendingDate.Year, plannedSendingDate.Month,
plannedSendingDate.Day, 12, 0, 0);
@@ -38,6 +39,7 @@ namespace SynchronizeOrdersWithMissingQty
IList<ScheduleOrder> scheduleOrders = faKrosnoDataProvider.GetFaKrosnoScheduleOrders(nextSendingDate)
.OrderByDescending(x => x.LastUpdateDate).ToList();
IList<Recipient> recipients = faKrosnoDataProvider.GetRecipients();
IList<ScheduleOrderDetail> scheduleOrderDetails =
faKrosnoDataProvider.GetUniqueOrderDetails(scheduleOrders);
IList<ScheduleOrderDetailDetail> plannedDetails =
@@ -45,7 +47,7 @@ namespace SynchronizeOrdersWithMissingQty
IList<PlannedQty> existsPlannedDetails =
faKrosnoDataProvider.GetPlannedQuantities(scheduleOrderDetails);
IList<PlannedQty> missedDetails = faKrosnoDataProvider.GetMissingSendingDetails(scheduleOrderDetails,
nextSendingDate, plannedDetails, existsPlannedDetails);
nextSendingDate, plannedDetails, existsPlannedDetails, recipients);
reportList.Add($"Pobrano harmonogramów do wysyłki: <b>{plannedDetails.Count}</b>");
reportList.Add(
@@ -59,32 +61,31 @@ namespace SynchronizeOrdersWithMissingQty
return result;
}
if (faKrosnoDataProvider.AddMissingDetails(missedDetails) is int resultCount &&
resultCount == missedDetails.Count)
int resultCount = faKrosnoDataProvider.AddMissingDetails(missedDetails);
if (resultCount == missedDetails.Count)
{
reportList.Add("<b>Dodano nowe harmonogramy:</b>");
string filePath =
GenerateXlsReport(scheduleOrderDetails, plannedDetails, missedDetails, recipients);
foreach (PlannedQty missedDetail in missedDetails)
if (File.Exists(filePath) && configuration.SendEmail)
{
ScheduleOrderDetail scheduleOrderDetail =
scheduleOrderDetails.First(x => x.Id == missedDetail.ScheduleOrderDetailId);
string emailBody = string.Join("<br />", reportList);
reportList.Add(
$"&emsp; - {scheduleOrderDetail.ScheduleOrder.Recipient.RecipientDesc}&emsp;{scheduleOrderDetail.ScheduleOrder.Recipient.Purchaser.PurchaserDesc}&emsp;{scheduleOrderDetail.ScheduleOrder.PoNum}&emsp;{scheduleOrderDetail.ShipperProductCode}&emsp;{missedDetail.Qty}&emsp;{missedDetail.DateFrom:dd.MM.yyyy}&emsp;{missedDetail.DateTo:dd.MM.yyyy}&emsp;{missedDetail.QtyDesc}");
emailClient.SendEmail(emailBody);
Console.WriteLine("Wysłano email z raportem.");
}
}
else
{
reportList.Add("<b>BŁĄD: Nie dodano harmonogramów do bazy danych.</b>");
}
if (configuration.SendEmail)
{
string emailBody = string.Join("<br />", reportList);
emailClient.SendEmail(emailBody);
Console.WriteLine("Wysłano email z raportem.");
Console.WriteLine("Wysłano ERROR email.");
}
}
catch (Exception ex)
@@ -145,5 +146,57 @@ namespace SynchronizeOrdersWithMissingQty
return configuration;
}
private static string GenerateXlsReport(IList<ScheduleOrderDetail> scheduleOrderDetails,
IList<ScheduleOrderDetailDetail> plannedDetails, IList<PlannedQty> missingDetails,
IList<Recipient> recipients)
{
IList<IList<string>> data = new List<IList<string>>();
int[] numberColumns = {4};
string outPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
$"{Path.GetFileNameWithoutExtension(Path.GetTempFileName())}.xlsx");
data.Add(new List<string>
{
"Recipient", "Purchaser", "PoNumber", "ShipperProductCode", "Quantity", "DateFrom", "DateTo",
"QuantityDesc"
});
foreach (ScheduleOrderDetailDetail plannedDetail in plannedDetails)
{
data.Add(new List<string>
{
plannedDetail.ScheduleOrderDetail.ScheduleOrder.Recipient.RecipientDesc,
plannedDetail.ScheduleOrderDetail.ScheduleOrder.Recipient.Purchaser.PurchaserDesc,
plannedDetail.ScheduleOrderDetail.ScheduleOrder.PoNum,
plannedDetail.ScheduleOrderDetail.ShipperProductCode, plannedDetail.Qty.ToString(),
plannedDetail.DateFrom.ToString("dd.MM.yyyy"), plannedDetail.DateTo.ToString("dd.MM.yyyy"),
plannedDetail.QtyDesc
});
}
foreach (PlannedQty missingDetail in missingDetails)
{
ScheduleOrderDetail scheduleOrderDetail =
scheduleOrderDetails.First(x => x.Id == missingDetail.ScheduleOrderDetailId);
Recipient recipient = recipients.FirstOrDefault(x => x.Id == missingDetail.RecipientId);
data.Add(new List<string>
{
recipient?.RecipientDesc, recipient?.Purchaser.PurchaserDesc, scheduleOrderDetail.ScheduleOrder.PoNum,
scheduleOrderDetail.ShipperProductCode, missingDetail.Qty.ToString(),
missingDetail.DateFrom.ToString("dd.MM.yyyy"), missingDetail.DateTo.ToString("dd.MM.yyyy"),
missingDetail.QtyDesc
});
}
ExcelGenerator excelGenerator = new ExcelGenerator();
excelGenerator.GenerateExcel(data, numberColumns, true);
excelGenerator.SaveFile(outPath);
return outPath;
}
}
}

View File

@@ -26,6 +26,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -35,6 +36,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
@@ -84,8 +86,12 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="Xls">
<HintPath>..\Xls\bin\Release\Xls.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Extensions.cs" />
<Compile Include="DataProvider\DataProviderBase.cs" />
<Compile Include="DataProvider\FaKrosnoDataProvider.cs" />
<Compile Include="EmailClient.cs" />

71
Xls/ExcelGenerator.cs Normal file
View File

@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
namespace Xls
{
public class ExcelGenerator
{
public XSSFWorkbook ExcelWorkbook { get; set; }
public ExcelGenerator()
{
ExcelWorkbook = new XSSFWorkbook();
}
public void GenerateExcel(DataSet dataSet)
{
foreach (DataTable dataTable in dataSet.Tables)
{
GenerateExcel(dataTable);
}
}
public void GenerateExcel(DataTable dataTable)
{
int rowNumber = 0;
IList<DataColumn> columns = dataTable.Columns.Cast<DataColumn>().ToList();
int[] numberColumns = columns.Where(x => x.DataType == typeof(int)).Select(x => columns.IndexOf(x)).ToArray();
ISheet sheet = ExcelWorkbook.CreateSheet(dataTable.TableName);
ICellStyle headerStyle = ExcelWorkbook.CreateXlsCustomStyle(IndexedColors.Grey25Percent, boldFont: true);
sheet.AddNewRow(columns.Select(x => x.ColumnName).ToList(), headerStyle, ++rowNumber, new int[] { });
foreach (DataRow dataRow in dataTable.Rows)
{
sheet.AddNewRow(dataRow, null, ++rowNumber, numberColumns);
}
}
public void GenerateExcel(IList<IList<string>> sourceList, int[] numberColumns, bool headersInFirstRow = false)
{
int rowNumber = 0;
ISheet sheet = ExcelWorkbook.CreateSheet(nameof(sourceList));
ICellStyle headerStyle = ExcelWorkbook.CreateXlsCustomStyle(IndexedColors.Grey25Percent, boldFont: true);
foreach (IList<string> dataRow in sourceList)
{
sheet.AddNewRow(dataRow, rowNumber == 0 && headersInFirstRow ? headerStyle : null, rowNumber++,
new int[] { });
}
}
public void SaveFile(string fileName)
{
using (var fileData = new FileStream(fileName, FileMode.Create))
{
ExcelWorkbook.Write(fileData);
Console.WriteLine("File created: " + fileName);
}
}
}
}

72
Xls/ExcelRow.cs Normal file
View File

@@ -0,0 +1,72 @@
using System.Collections.Generic;
using System.Data;
using System.Linq;
using NPOI.SS.UserModel;
namespace Xls
{
public static class ExcelRow
{
public static void AddNewRow(this ISheet sheet, DataRow dataRow, ICellStyle cellStyle, int rowNumber, int[] numberColumns)
{
IRow row = sheet.CreateRow(rowNumber);
for (int i = 0; i < dataRow.Table.Columns.Count; i++)
{
ICell cell = row.CreateCell(i);
if (null != cellStyle)
{
cell.CellStyle = cellStyle;
}
if (numberColumns.Any(o => o == i))
{
try
{
cell.SetCellValue(double.Parse(dataRow[i].ToString()));
}
catch
{
cell.SetCellValue(dataRow[i].ToString());
}
}
else
{
cell.SetCellValue(dataRow[i].ToString());
}
}
}
public static void AddNewRow(this ISheet sheet, IList<string> dataRow, ICellStyle cellStyle, int rowNumber, int[] numberColumns)
{
IRow row = sheet.CreateRow(rowNumber);
for (int i = 0; i < dataRow.Count; i++)
{
ICell cell = row.CreateCell(i);
if (null != cellStyle)
{
cell.CellStyle = cellStyle;
}
if (numberColumns.Any(o => o == i))
{
try
{
cell.SetCellValue(double.Parse(dataRow[i]));
}
catch
{
cell.SetCellValue(dataRow[i]);
}
}
else
{
cell.SetCellValue(dataRow[i]);
}
}
}
}
}

View File

@@ -0,0 +1,47 @@
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
namespace Xls
{
public static class ExcelStyleExtensions
{
public static ICellStyle CreateXlsCustomStyle(this XSSFWorkbook workbook, IndexedColors color = null,
bool wrapText = false, bool boldFont = false, bool italicFont = false, short fontSize = 11,
bool borderBottom = false, bool borderRest = false)
{
ICellStyle custom = workbook.CreateCellStyle();
if (color != null)
{
custom.FillForegroundColor = color.Index;
custom.FillPattern = FillPattern.SolidForeground;
custom.WrapText = wrapText;
}
if (borderBottom)
{
custom.BorderBottom = BorderStyle.Thin;
}
if (borderRest)
{
custom.BorderTop = BorderStyle.Thin;
custom.BorderLeft = BorderStyle.Thin;
custom.BorderRight = BorderStyle.Thin;
custom.TopBorderColor = IndexedColors.Grey25Percent.Index;
custom.LeftBorderColor = IndexedColors.Grey25Percent.Index;
custom.RightBorderColor = IndexedColors.Grey25Percent.Index;
}
var font = workbook.CreateFont();
font.FontHeightInPoints = fontSize;
font.FontName = "Calibri";
font.IsBold = boldFont;
font.IsItalic = italicFont;
custom.SetFont(font);
return custom;
}
}
}

3
Xls/FodyWeavers.xml Normal file
View File

@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura />
</Weavers>

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Xls")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Xls")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c166dcb9-5acd-42af-a489-d170c5b98a51")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

224
Xls/Xls.csproj Normal file
View File

@@ -0,0 +1,224 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C166DCB9-5ACD-42AF-A489-D170C5B98A51}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Xls</RootNamespace>
<AssemblyName>Xls</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="NPOI, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.dll</HintPath>
</Reference>
<Reference Include="NPOI.OOXML, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OOXML.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXml4Net, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXml4Net.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXmlFormats, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.AppContext, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.AppContext.4.3.0\lib\net463\System.AppContext.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.Tracing, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Globalization.Calendars, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Linq, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Linq.Expressions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Linq.Expressions.4.3.0\lib\net463\System.Linq.Expressions.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.InteropServices, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Text.RegularExpressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ExcelGenerator.cs" />
<Compile Include="ExcelRow.cs" />
<Compile Include="ExcelStyleExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="FodyWeavers.xsd">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="FodyWeavers.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Fody.6.5.5\build\Fody.targets" Condition="Exists('..\packages\Fody.6.5.5\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.6.5.5\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.5.5\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets'))" />
</Target>
<Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" />
</Project>

15
Xls/app.config Normal file
View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.3.11" newVersion="1.3.3.11" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.9.0.0" newVersion="1.9.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

54
Xls/packages.config Normal file
View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="5.7.0" targetFramework="net472" developmentDependency="true" />
<package id="Fody" version="6.5.5" targetFramework="net472" developmentDependency="true" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net472" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net472" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net472" />
<package id="NPOI" version="2.5.5" targetFramework="net472" />
<package id="Portable.BouncyCastle" version="1.9.0" targetFramework="net472" />
<package id="SharpZipLib" version="1.3.3" targetFramework="net472" />
<package id="System.AppContext" version="4.3.0" targetFramework="net472" />
<package id="System.Collections" version="4.3.0" targetFramework="net472" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net472" />
<package id="System.Console" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net472" />
<package id="System.Globalization" version="4.3.0" targetFramework="net472" />
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net472" />
<package id="System.IO" version="4.3.0" targetFramework="net472" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net472" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net472" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net472" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Linq" version="4.3.0" targetFramework="net472" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Http" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net472" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net472" />
<package id="System.Reflection" version="4.3.0" targetFramework="net472" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net472" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net472" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net472" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net472" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net472" />
<package id="System.Threading" version="4.3.0" targetFramework="net472" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net472" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net472" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net472" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net472" />
</packages>