Skip to content

Commit 7bb28b8

Browse files
New client initialisation.
1 parent 9135951 commit 7bb28b8

21 files changed

+153
-414
lines changed

sample/Sample.Android/Resources/Resource.designer.cs

Lines changed: 0 additions & 213 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sample/Sample.iOS.Shared/Sample.iOS.Shared.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</ProjectReference>
5151
</ItemGroup>
5252
<ItemGroup>
53-
<PackageReference Include="Notifo.SDK" Version="1.5.1" />
53+
<PackageReference Include="Notifo.SDK" Version="1.6.1" />
5454
</ItemGroup>
5555
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
5656
</Project>

sample/Sample/App.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// All rights reserved. Licensed under the MIT license.
66
// ==========================================================================
77

8-
using Notifo.SDK;
98
using Prism;
109
using Prism.DryIoc;
1110
using Prism.Ioc;

sample/Sample/NotifoStartup.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// All rights reserved. Licensed under the MIT license.
66
// ==========================================================================
77

8-
using Notifo.SDK;
9-
using Notifo.SDK.FirebasePlugin;
108
using Xamarin.Forms;
119

1210
namespace Sample

sample/Sample/ViewModels/LoginPageViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// All rights reserved. Licensed under the MIT license.
66
// ==========================================================================
77

8-
using Notifo.SDK;
98
using Prism.Commands;
109
using Prism.Mvvm;
1110

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.5.1.0, Culture=neutral, processorArchitecture=MSIL">
94-
<HintPath>..\..\packages\Notifo.SDK.1.5.1\lib\netstandard2.1\Notifo.SDK.dll</HintPath>
93+
<Reference Include="Notifo.SDK, Version=1.6.1.0, Culture=neutral, processorArchitecture=MSIL">
94+
<HintPath>..\..\packages\Notifo.SDK.1.6.1\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.5.1" targetFramework="xamarinios10" />
4+
<package id="Notifo.SDK" version="1.6.1" targetFramework="xamarinios10" />
55
<package id="System.ComponentModel.Annotations" version="5.0.0" targetFramework="xamarinios10" />
66
</packages>

sdk/Notifo.SDK.FirebasePlugin/Notifo.SDK.FirebasePlugin.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</ItemGroup>
5454

5555
<ItemGroup>
56-
<PackageReference Include="Notifo.SDK" Version="1.5.1" />
56+
<PackageReference Include="Notifo.SDK" Version="1.6.1" />
5757
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
5858
</ItemGroup>
5959

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// ==========================================================================
2+
// Notifo.io
3+
// ==========================================================================
4+
// Copyright (c) Sebastian Stehle
5+
// All rights reserved. Licensed under the MIT license.
6+
// ==========================================================================
7+
8+
using System.Net.Http;
9+
using Notifo.SDK.Configuration;
10+
11+
namespace Notifo.SDK.Helpers
12+
{
13+
internal sealed class NotifoHttpClientProvider : DefaultHttpClientProvider
14+
{
15+
public NotifoHttpClientProvider(INotifoOptions options)
16+
: base(options)
17+
{
18+
}
19+
20+
public override HttpClient BuildHttpClient(HttpMessageHandler handler)
21+
{
22+
if (handler is DelegatingHandler delegatingHandler)
23+
{
24+
delegatingHandler.InnerHandler = new NotifoHttpMessageHandler();
25+
}
26+
27+
return base.BuildHttpClient(handler);
28+
}
29+
}
30+
}

sdk/Notifo.SDK/Helpers/NotifoHttpMessageHandler.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414

1515
namespace Notifo.SDK.Helpers
1616
{
17-
internal class NotifoHttpMessageHandler : PolicyHttpMessageHandler
17+
internal sealed class NotifoHttpMessageHandler : PolicyHttpMessageHandler
1818
{
1919
private static readonly AsyncRetryPolicy<HttpResponseMessage> RetryPolicy =
20-
HttpPolicyExtensions
21-
.HandleTransientHttpError()
20+
HttpPolicyExtensions.HandleTransientHttpError()
2221
.WaitAndRetryAsync(retryCount: 3, sleepDurationProvider: attempt => TimeSpan.FromMilliseconds(300));
2322

2423
public NotifoHttpMessageHandler()

0 commit comments

Comments
 (0)