forked from Redth/PushSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindowsPushBrokerExtensions.cs
More file actions
48 lines (41 loc) · 1.5 KB
/
Copy pathWindowsPushBrokerExtensions.cs
File metadata and controls
48 lines (41 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PushSharp.Windows;
using PushSharp.Core;
namespace PushSharp
{
public static class WindowsPushBrokerExtensions
{
public static void RegisterWindowsService(this PushBroker broker, WindowsPushChannelSettings channelSettings, PushServiceSettings serviceSettings = null)
{
var service = new WindowsPushService(new WindowsPushChannelFactory(), channelSettings, serviceSettings);
broker.RegisterService<WindowsRawNotification>(service);
broker.RegisterService<WindowsTileNotification>(service);
broker.RegisterService<WindowsToastNotification>(service);
broker.RegisterService<WindowsBadgeNumericNotification>(service);
broker.RegisterService<WindowsBadgeGlyphNotification>(service);
}
public static WindowsRawNotification WindowsRawNotification(this PushBroker broker)
{
return new WindowsRawNotification();
}
public static WindowsTileNotification WindowsTileNotification(this PushBroker broker)
{
return new WindowsTileNotification();
}
public static WindowsToastNotification WindowsToastNotification(this PushBroker broker)
{
return new WindowsToastNotification();
}
public static WindowsBadgeNumericNotification WindowsBadgeNumericNotification(this PushBroker broker)
{
return new WindowsBadgeNumericNotification();
}
public static WindowsBadgeGlyphNotification WindowsBadgeGlyphNotification(this PushBroker broker)
{
return new WindowsBadgeGlyphNotification();
}
}
}