Skip to content

Commit

Permalink
Lib updates + version bump to 2.1 + changed minimum to net452
Browse files Browse the repository at this point in the history
  • Loading branch information
soukoku committed Dec 24, 2022
1 parent 194b0b9 commit e2defe1
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Build.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dotnet pack src\HelloSignApi\HelloSignApi.csproj -c Release
dotnet pack src\HelloSignApi\HelloSignApi.csproj -c Release /p:ContinuousIntegrationBuild=true
explorer src\HelloSignApi\bin\release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# HelloSignApi
This is an unofficial task-based HelloSign API lib for dotnet 4.0+ and dotnet core.
This is an unofficial task-based HelloSign API lib for dotnet 4.5.2+ and core versions.
It aims to support all of the non-deprecated HelloSign's v3 API operations.


Expand Down
4 changes: 2 additions & 2 deletions src/HelloSignApi.TestGui/HelloSignApi.TestGui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<Reference Include="ModernWpf.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c99d0cfbea7491ef, processorArchitecture=MSIL">
<HintPath>..\..\packages\ModernWpf.Core.2.0.0-beta01\lib\net40-Client\ModernWpf.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down
2 changes: 1 addition & 1 deletion src/HelloSignApi.TestGui/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<packages>
<package id="ModernWpf" version="2.0.0-alpha97" targetFramework="net452" />
<package id="ModernWpf.Core" version="2.0.0-beta01" targetFramework="net452" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net452" />
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net452" />
</packages>
8 changes: 4 additions & 4 deletions src/HelloSignApi.UnitTests/HelloSignApi.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>HelloSignApi</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion src/HelloSignApi/ColorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static string ToHtmlColor(byte red, byte green, byte blue)
}


#if FULLFX
#if NET40_OR_GREATER || NET5_0_OR_GREATER

/// <summary>
/// Converts html color string to color.
Expand All @@ -40,6 +40,9 @@ public static string ToHtmlColor(this System.Drawing.Color color)
//return System.Drawing.ColorTranslator.ToHtml(color); // doesn't convert known colors
return ToHtmlColor(color.R, color.G, color.B);
}
#endif

#if NET40_OR_GREATER

/// <summary>
/// Converts html color string to WPF color.
Expand Down
31 changes: 11 additions & 20 deletions src/HelloSignApi/HelloSignApi.csproj
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net40;net45;net461;netstandard1.3;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net452;net462;netstandard1.3;netstandard2.0;net6.0</TargetFrameworks>
<AssemblyName>HelloSignApi</AssemblyName>
<RootNamespace>HelloSignApi</RootNamespace>
<PackageId>HelloSignApi</PackageId>
<Description>Unofficial task-based HelloSign api lib for dotnet with intellisense doc.</Description>
<Company>Yin-Chun Wang</Company>
<Product>HelloSignApi</Product>
<PackageLicenseUrl>https://raw.githubusercontent.com/soukoku/HelloSignApi/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/soukoku/HelloSignApi</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IncludeSymbols>true</IncludeSymbols>
<Authors>Yin-Chun Wang</Authors>
<PackageTags>eSignature</PackageTags>
<AssemblyTitle>HelloSignApi</AssemblyTitle>
<Copyright>Copyright (C) Yin-Chun Wang 2017-2019</Copyright>
<Copyright>Copyright (C) Yin-Chun Wang 2017-2022</Copyright>
<Authors>Yin-Chun Wang</Authors>
<WarningsAsErrors>true</WarningsAsErrors>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AlloedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<AssemblyOriginatorKeyFile>Sign.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Version>2.0.3.0</Version>
<Version>2.1.0.0</Version>
<FileVersion>2.0.0.0</FileVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
<PackageReference Include="Microsoft.Net.Http" Version="2.2.29" />
<Reference Include="PresentationCore" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="System.Drawing.Primitives" Version="4.3.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="System.Net.Http" />
<Reference Include="PresentationCore" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System.Net.Http" />
<Reference Include="PresentationCore" />
</ItemGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants>$(DefineConstants);FULLFX</DefineConstants>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions src/HelloSignApi/Internal/HttpContentExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static void AddParameter(this MultipartFormDataContent content, IApiLog l

static void AddMetadata(this MultipartFormDataContent content, IApiLog log, IDictionary<string, string> metadata)
{
if (metadata == null) return;
foreach (var kv in metadata)
{
content.AddParameter(log, $"metadata[{kv.Key}]", kv.Value);
Expand Down
2 changes: 1 addition & 1 deletion src/HelloSignApi/Requests/NewRequestModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected NewRequestBase()
/// Each request can include up to 10 metadata keys, with key names up to 40 characters long and
/// values up to 500 characters long.
/// </summary>
public IDictionary<string, string> Metadata { get; private set; }
public IDictionary<string, string> Metadata { get; set; }

/// <summary>
/// Attachment info for new request.
Expand Down

0 comments on commit e2defe1

Please sign in to comment.