Skip to content

Netstandard21 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OnePassword.NET.Tests/OnePassword.NET.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion OnePassword.NET/Common/CommonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal static class CommonExtensions
/// <returns>A string representation of the enum field.</returns>
/// <exception cref="ArgumentNullException">Thrown when field is null.</exception>
/// <exception cref="NotImplementedException">Thrown when field is not correctly annotated with a <see cref="EnumMemberAttribute" />.</exception>
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2090:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to 'target method'.",
[SuppressMessage("AssemblyLoadTrimming", "IL2090:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to 'target method'.",
Justification = "https://github.com/dotnet/runtime/issues/97737")]
internal static string ToEnumString<TField>(this TField field) where TField : Enum
{
Expand Down
5 changes: 3 additions & 2 deletions OnePassword.NET/Common/JsonStringEnumConverterEx.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Text.Json;

namespace OnePassword.Common;

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

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

Expand Down
13 changes: 7 additions & 6 deletions OnePassword.NET/OnePassword.NET.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFramework>netstandard2.1</TargetFramework>
<RootNamespace>OnePassword</RootNamespace>
<AssemblyName>OnePassword.NET</AssemblyName>
<PackageId>OnePassword.NET</PackageId>
Expand Down Expand Up @@ -35,11 +35,12 @@
</PropertyGroup>

<ItemGroup>
<Using Include="System.Collections.Immutable"/>
<Using Include="System.Text.Json"/>
<Using Include="System.Text.Json.Serialization"/>
<Using Include="System.Runtime.Serialization"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
<PackageReference Include="System.Collections.Immutable" Version="9.0.4" />
<Using Include="System.Collections.Immutable" />
<Using Include="System.Text.Json.Serialization" />
<Using Include="System.Runtime.Serialization" />
<PackageReference Include="System.Text.Json" Version="6.0.11" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<None Include="..\LICENSE.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
Expand Down
3 changes: 2 additions & 1 deletion OnePassword.NET/OnePasswordManager.Items.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using OnePassword.Common;
using System.Text.Json;
using OnePassword.Common;
using OnePassword.Items;
using OnePassword.Templates;
using OnePassword.Vaults;
Expand Down
1 change: 1 addition & 0 deletions OnePassword.NET/OnePasswordManager.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Diagnostics;
using System.IO.Compression;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization.Metadata;
using System.Text.RegularExpressions;
using OnePassword.Common;
Expand Down
3 changes: 2 additions & 1 deletion OnePassword.NET/Templates/Template.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using OnePassword.Common;
using System.Text.Json;
using OnePassword.Common;
using OnePassword.Items;

namespace OnePassword.Templates;
Expand Down