Skip to content

Commit 1b12060

Browse files
Update SDK.
1 parent 8b5921a commit 1b12060

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

sample/SampleNotificationServiceExtension/SampleNotificationServiceExtension.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
9191
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll</HintPath>
9292
</Reference>
93-
<Reference Include="Notifo.SDK, Version=1.6.4.0, Culture=neutral, processorArchitecture=MSIL">
94-
<HintPath>..\..\packages\Notifo.SDK.1.6.4\lib\netstandard2.1\Notifo.SDK.dll</HintPath>
93+
<Reference Include="Notifo.SDK, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL">
94+
<HintPath>..\..\packages\Notifo.SDK.1.7.0\lib\netstandard2.1\Notifo.SDK.dll</HintPath>
9595
</Reference>
9696
<Reference Include="System" />
9797
<Reference Include="System.Xml" />
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="xamarinios10" />
4-
<package id="Notifo.SDK" version="1.6.4" targetFramework="xamarinios10" />
4+
<package id="Notifo.SDK" version="1.7.0" targetFramework="xamarinios10" />
55
<package id="System.ComponentModel.Annotations" version="5.0.0" targetFramework="xamarinios10" />
66
</packages>

sdk/Notifo.SDK/Helpers/NotifoOptions.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ namespace Notifo.SDK.Helpers
1717
{
1818
internal sealed class NotifoOptions : INotifoOptions
1919
{
20-
private static readonly AsyncRetryPolicy<HttpResponseMessage> RetryPolicy =
21-
HttpPolicyExtensions.HandleTransientHttpError()
22-
.WaitAndRetryAsync(retryCount: 3, sleepDurationProvider: attempt => TimeSpan.FromMilliseconds(300));
2320

2421
private readonly ICredentialsStore store;
2522

@@ -55,14 +52,17 @@ public void Validate()
5552
{
5653
}
5754

58-
public HttpClient BuildHttpClient(DelegatingHandler handler)
55+
public DelegatingHandler Configure(DelegatingHandler inner)
5956
{
60-
handler.InnerHandler = new PolicyHttpMessageHandler(RetryPolicy)
61-
{
62-
InnerHandler = new HttpClientHandler()
63-
};
57+
var retryTimes = 3;
58+
var retryTime = TimeSpan.FromMilliseconds(300);
6459

65-
return new HttpClient(handler);
60+
inner.InnerHandler =
61+
new PolicyHttpMessageHandler(
62+
HttpPolicyExtensions.HandleTransientHttpError()
63+
.WaitAndRetryAsync(retryTimes, _ => retryTime));
64+
65+
return inner;
6666
}
6767
}
6868
}

0 commit comments

Comments
 (0)