Skip to content

Commit

Permalink
Target netstandard 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mnieto committed Nov 29, 2024
1 parent 2ed6abb commit 3d6dc50
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@ Default top-left cell is A1. With `SetStartingAddress` you can specify any other
- Conditional format
- Append rows to an existing report
- Posibility to change the top-left starting point
- Target netstandard 2.0 in nuget package
- Target netstandard 2.0 in nuget package
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public PropertyNames Build(Expression<Func<T, object?>> expression)
names.Add(memberExpr!.Member.Name);
names.Reverse();

result.FullName = string.Join('.', names);
result.FullName = string.Join(".", names);
return result;
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/Kevull.EPPLus.MultiHeader/HeaderManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected List<ColumnInfo> ChildColumns(int deep)
var result = new List<ColumnInfo>();
foreach(var col in Columns.Where(x => x.Deep > deep))
{
col.FullName = string.Join('.', col.FullName.Split('.').Skip(deep));
col.FullName = string.Join(".", col.FullName.Split('.').Skip(deep));
result.Add(col);
}
return result;
Expand Down Expand Up @@ -237,14 +237,20 @@ private ColumnInfo ColumnInfoFactory(PropertyInfo property)
private string? GetDefaultStyleNameForDataType(PropertyInfo property)
{
string? styleName = null;
if (property.PropertyType == typeof(DateOnly) || property.PropertyType == typeof(DateTime))
if (property.PropertyType == typeof(DateTime))
{
styleName = StyleNames.DateStyleName;
}
#if !NETSTANDARD2_0
else if (property.PropertyType == typeof(DateOnly))
{
styleName = StyleNames.DateStyleName;
}
else if (property.PropertyType == typeof(TimeOnly))
{
styleName = StyleNames.TimeStyleName;
}
#endif
return styleName;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
Expand Down

0 comments on commit 3d6dc50

Please sign in to comment.