Skip to content
Merged
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 csharp-generator-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packageName": "Regula.DocumentReader.WebClient",
"library": "httpclient",
"nullableReferenceTypes": true,
"targetFramework": "net8.0",
"targetFramework": "netstandard2.0",
"typeMappings" : {
"ContainerListListInner": "ResultItem",
"AuthenticityCheckResultListInner": "AuthenticityCheckResultItem"
Expand Down
1 change: 0 additions & 1 deletion src/Regula.DocumentReader.WebClient/Client/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
using System.Threading;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs;
Expand Down
6 changes: 0 additions & 6 deletions src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ public static string ParameterToString(object obj, IReadableConfiguration config
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
// For example: 2009-06-15T13:45:30.0000000
return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
if (obj is DateOnly dateOnly)
// Return a formatted date string - Can be customized with Configuration.DateTimeFormat
// Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
// For example: 2009-06-15
return dateOnly.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
if (obj is bool boolean)
return boolean ? "true" : "false";
if (obj is ICollection collection) {
Expand Down
5 changes: 0 additions & 5 deletions src/Regula.DocumentReader.WebClient/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ public class Configuration : IReadableConfiguration
string.Format("Error calling {0}: {1}", methodName, response.RawContent),
response.RawContent, response.Headers);
}
if (status == 0)
{
return new ApiException(status,
string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText);
}
return null;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected EncryptedRCLItem() { }
/// </summary>
/// <value>Base64 encoded data</value>
/*
<example>[B@337484a1</example>
<example>[B@36b75ee4</example>
*/
[DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)]
public byte[] EncryptedRCL { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
/// </summary>
/// <value>Base64 encoded data</value>
/*
<example>[B@337484a1</example>
<example>[B@36b75ee4</example>
*/
[DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)]
public byte[] EncryptedRCL { get; set; }
Expand Down Expand Up @@ -105,7 +105,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 108 in src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

'EncryptedRCLResult.BaseValidate(ValidationContext)' hides inherited member 'ResultItem.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
2 changes: 1 addition & 1 deletion src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected LicenseItem() { }
/// </summary>
/// <value>Base64 encoded data</value>
/*
<example>[B@2e099f41</example>
<example>[B@46cb6573</example>
*/
[DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)]
public byte[] License { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected LicenseResult() { }
/// </summary>
/// <value>Base64 encoded data</value>
/*
<example>[B@2e099f41</example>
<example>[B@46cb6573</example>
*/
[DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)]
public byte[] License { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo><!-- setting GenerateAssemblyInfo to false causes this bug https://github.com/dotnet/project-system/issues/3934 -->
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>Regula.DocumentReader.WebClient</PackageId>
<Authors>Alexander Satsukevich</Authors>
<Company>Regula Ltd.</Company>
Expand Down
Loading