chore: dual-target Base to .NET Standard 2.0
This commit is contained in:
parent
d7fe778c1e
commit
3aab47e9c6
|
@ -1,8 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
||||
<LangVersion>10</LangVersion>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>FruityFoundation.Base</RootNamespace>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
|
@ -15,7 +16,6 @@
|
|||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\LICENSE" Pack="true" PackagePath="" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Data;
|
||||
using System;
|
||||
using System.Data;
|
||||
using FruityFoundation.Base.Structures;
|
||||
|
||||
namespace FruityFoundation.Base.Extensions;
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
namespace FruityFoundation.Base.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FruityFoundation.Base.Extensions;
|
||||
|
||||
public static class EnumerableExtensions
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace FruityFoundation.Base.Extensions;
|
||||
using System;
|
||||
|
||||
namespace FruityFoundation.Base.Extensions;
|
||||
|
||||
public static class StringExtensions
|
||||
{
|
||||
|
@ -14,5 +16,5 @@ public static class StringExtensions
|
|||
/// <param name="str"></param>
|
||||
/// <param name="maxLength">The maximum number of characters. If <paramref name="str"/> has fewer characters, it will be truncated to the length of <paramref name="str"/>.</param>
|
||||
public static string Truncate(this string str, int maxLength) =>
|
||||
str[..Math.Min(str.Length, maxLength)];
|
||||
str.Substring(0, Math.Min(str.Length, maxLength));
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
// Normally we wouldn't want to disable Nullable references, but in this case we want to.
|
||||
// We're assuming that if you're following Maybe conventions, you won't be hitting null ref exceptions.
|
||||
|
||||
using System;
|
||||
|
||||
#pragma warning disable CS8601
|
||||
namespace FruityFoundation.Base.Structures;
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
namespace FruityFoundation.Base.Structures;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FruityFoundation.Base.Structures;
|
||||
|
||||
public static class MaybeExtensions
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace FruityFoundation.Base.Structures;
|
||||
using System;
|
||||
|
||||
namespace FruityFoundation.Base.Structures;
|
||||
|
||||
public class OneOf<T1, T2>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user