Skip to content

Commit b0062eb

Browse files
Merge pull request #25 from easymorph/development/5.7.1
5.7.1
2 parents 394be0e + da12b3e commit b0062eb

6 files changed

Lines changed: 5 additions & 27 deletions

File tree

src/Client/MorphServerApiClient.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,13 @@ internal ILowLevelApiClient BuildApiClient(ClientConfiguration configuration)
4646
throw new ArgumentNullException(nameof(configuration));
4747
}
4848

49-
#if NETSTANDARD2_0
5049
// handler will be disposed automatically
5150
HttpClientHandler aHandler = new HttpClientHandler()
5251
{
5352
ClientCertificateOptions = ClientCertificateOption.Automatic,
5453
ServerCertificateCustomValidationCallback = configuration.ServerCertificateCustomValidationCallback
5554
};
56-
#elif NETFRAMEWORK
57-
// handler will be disposed automatically
58-
HttpClientHandler aHandler = new HttpClientHandler()
59-
{
60-
ClientCertificateOptions = ClientCertificateOption.Automatic
61-
};
62-
#else
63-
Not implemented
64-
#endif
55+
6556
var httpClient = BuildHttpClient(configuration, aHandler);
6657
var restClient = ConstructRestApiClient(httpClient, BuildBaseAddress(configuration), clientConfiguration);
6758
return new LowLevelApiClient(restClient);

src/Client/MorphServerApiClientGlobalConfig.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace Morph.Server.Sdk.Client
1010
public static class MorphServerApiClientGlobalConfig
1111
{
1212

13-
#if NETSTANDARD2_0
1413
private static object obj = new object();
1514
public static Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ServerCertificateCustomValidationCallback { get; set; } =
1615
(httpRequestMessage, xcert, xchain, sslerror) =>
@@ -24,7 +23,6 @@ public static class MorphServerApiClientGlobalConfig
2423
return false;
2524
}
2625
};
27-
#endif
2826

2927
private const string DefaultClientType = "EMS-SDK";
3028

src/Client/MorphServerAuthenticator.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,8 @@ static async Task<ApiSession> OpenSessionViaWindowsAuthenticationAsync(OpenSessi
6767
ClientCertificateOptions = ClientCertificateOption.Automatic,
6868
// required for automatic NTML/Negotiate challenge
6969
UseDefaultCredentials = true,
70-
#if NETSTANDARD2_0
71-
ServerCertificateCustomValidationCallback = context.MorphServerApiClient.Config.ServerCertificateCustomValidationCallback
72-
#endif
73-
74-
75-
};
70+
ServerCertificateCustomValidationCallback = context.MorphServerApiClient.Config.ServerCertificateCustomValidationCallback
71+
};
7672

7773
// build a new low level client based on specified handler
7874
using (var ntmlRestApiClient = context.BuildApiClient(aHandler))

src/Model/ClientConfiguration.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@ public class ClientConfiguration : IClientConfiguration
2525
public HttpSecurityState HttpSecurityState { get; set; } = HttpSecurityState.NotEvaluated;
2626
internal string SDKVersionString { get; set; } = MorphServerApiClientGlobalConfig.SDKVersionString;
2727

28-
29-
30-
#if NETSTANDARD2_0
3128
public Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ServerCertificateCustomValidationCallback { get; set; }
3229
= MorphServerApiClientGlobalConfig.ServerCertificateCustomValidationCallback;
33-
#endif
34-
3530
}
3631

3732
}

src/Model/IClientConfiguration.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ public interface IClientConfiguration
2323
Uri ApiUri { get; }
2424
HttpSecurityState HttpSecurityState { get; }
2525

26-
#if NETSTANDARD2_0
2726
Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ServerCertificateCustomValidationCallback { get; }
28-
#endif
2927
}
3028
}

src/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
[assembly: Guid("72ecc66f-62fe-463f-afad-e1ff5cc19cd9")]
2222

2323

24-
[assembly: AssemblyVersion("5.7.0.0")]
25-
[assembly: AssemblyFileVersion("5.7.0.0")]
24+
[assembly: AssemblyVersion("5.7.1.0")]
25+
[assembly: AssemblyFileVersion("5.7.1.0")]

0 commit comments

Comments
 (0)