Skip to content

Commit 526a4ff

Browse files
authored
Merge pull request #87 from DeviesDevelopment/netstandard21
feature: Netstandard2.1
2 parents 079389c + 4032644 commit 526a4ff

7 files changed

Lines changed: 17 additions & 12 deletions

File tree

OnePassword.NET.Tests/OnePassword.NET.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>

OnePassword.NET/Common/CommonExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal static class CommonExtensions
1212
/// <returns>A string representation of the enum field.</returns>
1313
/// <exception cref="ArgumentNullException">Thrown when field is null.</exception>
1414
/// <exception cref="NotImplementedException">Thrown when field is not correctly annotated with a <see cref="EnumMemberAttribute" />.</exception>
15-
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2090:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to 'target method'.",
15+
[SuppressMessage("AssemblyLoadTrimming", "IL2090:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to 'target method'.",
1616
Justification = "https://github.com/dotnet/runtime/issues/97737")]
1717
internal static string ToEnumString<TField>(this TField field) where TField : Enum
1818
{

OnePassword.NET/Common/JsonStringEnumConverterEx.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Diagnostics.CodeAnalysis;
22
using System.Reflection;
3+
using System.Text.Json;
34

45
namespace OnePassword.Common;
56

@@ -13,10 +14,10 @@ internal sealed class JsonStringEnumConverterEx<TEnum> : JsonConverter<TEnum> wh
1314
private readonly Dictionary<string, TEnum> _stringToEnum = [];
1415

1516
/// <summary>Initializes a new instance of <see cref="JsonStringEnumConverterEx{TEnum}" />.</summary>
16-
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2090:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to 'target method'.", Justification = "https://github.com/dotnet/runtime/issues/97737")]
17+
[SuppressMessage("AssemblyLoadTrimming", "IL2090:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to 'target method'.", Justification = "https://github.com/dotnet/runtime/issues/97737")]
1718
public JsonStringEnumConverterEx()
1819
{
19-
foreach (var enumMemberValue in Enum.GetValues<TEnum>())
20+
foreach (TEnum enumMemberValue in Enum.GetValues(typeof(TEnum)))
2021
{
2122
var enumMemberName = enumMemberValue.ToString();
2223

OnePassword.NET/OnePassword.NET.csproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFramework>netstandard2.1</TargetFramework>
55
<RootNamespace>OnePassword</RootNamespace>
66
<AssemblyName>OnePassword.NET</AssemblyName>
77
<PackageId>OnePassword.NET</PackageId>
@@ -35,11 +35,12 @@
3535
</PropertyGroup>
3636

3737
<ItemGroup>
38-
<Using Include="System.Collections.Immutable"/>
39-
<Using Include="System.Text.Json"/>
40-
<Using Include="System.Text.Json.Serialization"/>
41-
<Using Include="System.Runtime.Serialization"/>
42-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
38+
<PackageReference Include="System.Collections.Immutable" Version="9.0.4" />
39+
<Using Include="System.Collections.Immutable" />
40+
<Using Include="System.Text.Json.Serialization" />
41+
<Using Include="System.Runtime.Serialization" />
42+
<PackageReference Include="System.Text.Json" Version="6.0.11" />
43+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
4344
<None Include="..\LICENSE.md">
4445
<Pack>True</Pack>
4546
<PackagePath>\</PackagePath>

OnePassword.NET/OnePasswordManager.Items.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using OnePassword.Common;
1+
using System.Text.Json;
2+
using OnePassword.Common;
23
using OnePassword.Items;
34
using OnePassword.Templates;
45
using OnePassword.Vaults;

OnePassword.NET/OnePasswordManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Diagnostics;
22
using System.IO.Compression;
33
using System.Text;
4+
using System.Text.Json;
45
using System.Text.Json.Serialization.Metadata;
56
using System.Text.RegularExpressions;
67
using OnePassword.Common;

OnePassword.NET/Templates/Template.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using OnePassword.Common;
1+
using System.Text.Json;
2+
using OnePassword.Common;
23
using OnePassword.Items;
34

45
namespace OnePassword.Templates;

0 commit comments

Comments
 (0)