Skip to content

Commit 652ce1e

Browse files
Merge pull request #206 from regulaforensics/feature/40399
40399 - add .net standard support
2 parents 992e1b6 + 55f7360 commit 652ce1e

File tree

9 files changed

+6
-18
lines changed

9 files changed

+6
-18
lines changed

csharp-generator-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packageName": "Regula.DocumentReader.WebClient",
33
"library": "httpclient",
44
"nullableReferenceTypes": true,
5-
"targetFramework": "net8.0",
5+
"targetFramework": "netstandard2.0",
66
"typeMappings" : {
77
"ContainerListListInner": "ResultItem",
88
"AuthenticityCheckResultListInner": "AuthenticityCheckResultItem"

src/Regula.DocumentReader.WebClient/Client/ApiClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
using System.Threading;
2323
using System.Text.RegularExpressions;
2424
using System.Threading.Tasks;
25-
using System.Web;
2625
using Newtonsoft.Json;
2726
using Newtonsoft.Json.Serialization;
2827
using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs;

src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,6 @@ public static string ParameterToString(object obj, IReadableConfiguration config
100100
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
101101
// For example: 2009-06-15T13:45:30.0000000
102102
return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
103-
if (obj is DateOnly dateOnly)
104-
// Return a formatted date string - Can be customized with Configuration.DateTimeFormat
105-
// Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")
106-
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
107-
// For example: 2009-06-15
108-
return dateOnly.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
109103
if (obj is bool boolean)
110104
return boolean ? "true" : "false";
111105
if (obj is ICollection collection) {

src/Regula.DocumentReader.WebClient/Client/Configuration.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ public class Configuration : IReadableConfiguration
5858
string.Format("Error calling {0}: {1}", methodName, response.RawContent),
5959
response.RawContent, response.Headers);
6060
}
61-
if (status == 0)
62-
{
63-
return new ApiException(status,
64-
string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText);
65-
}
6661
return null;
6762
};
6863

src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected EncryptedRCLItem() { }
5656
/// </summary>
5757
/// <value>Base64 encoded data</value>
5858
/*
59-
<example>[B@337484a1</example>
59+
<example>[B@36b75ee4</example>
6060
*/
6161
[DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)]
6262
public byte[] EncryptedRCL { get; set; }

src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected EncryptedRCLResult() { }
6262
/// </summary>
6363
/// <value>Base64 encoded data</value>
6464
/*
65-
<example>[B@337484a1</example>
65+
<example>[B@36b75ee4</example>
6666
*/
6767
[DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)]
6868
public byte[] EncryptedRCL { get; set; }

src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected LicenseItem() { }
5656
/// </summary>
5757
/// <value>Base64 encoded data</value>
5858
/*
59-
<example>[B@2e099f41</example>
59+
<example>[B@46cb6573</example>
6060
*/
6161
[DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)]
6262
public byte[] License { get; set; }

src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected LicenseResult() { }
6262
/// </summary>
6363
/// <value>Base64 encoded data</value>
6464
/*
65-
<example>[B@2e099f41</example>
65+
<example>[B@46cb6573</example>
6666
*/
6767
[DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)]
6868
public byte[] License { get; set; }

src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.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
<PropertyGroup>
33
<GenerateAssemblyInfo>false</GenerateAssemblyInfo><!-- setting GenerateAssemblyInfo to false causes this bug https://github.com/dotnet/project-system/issues/3934 -->
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
<PackageId>Regula.DocumentReader.WebClient</PackageId>
66
<Authors>Alexander Satsukevich</Authors>
77
<Company>Regula Ltd.</Company>

0 commit comments

Comments
 (0)