forked from Redth/PushSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindowsPhonePushBrokerExtensions.cs
69 lines (58 loc) · 2.63 KB
/
WindowsPhonePushBrokerExtensions.cs
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PushSharp.WindowsPhone;
using PushSharp.Core;
namespace PushSharp
{
public static class WindowsPhonePushBrokerExtensions
{
public static void RegisterWindowsPhoneService(this PushBroker broker, string applicationId, IPushServiceSettings serviceSettings = null)
{
RegisterWindowsPhoneService (broker, null, applicationId, serviceSettings);
}
public static void RegisterWindowsPhoneService(this PushBroker broker, IPushServiceSettings serviceSettings = null)
{
RegisterWindowsPhoneService (broker, null, null, serviceSettings);
}
public static void RegisterWindowsPhoneService(this PushBroker broker, WindowsPhonePushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null)
{
RegisterWindowsPhoneService (broker, channelSettings, null, serviceSettings);
}
public static void RegisterWindowsPhoneService(this PushBroker broker, WindowsPhonePushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null)
{
var service = new WindowsPhonePushService(new WindowsPhonePushChannelFactory(), channelSettings, serviceSettings);
broker.RegisterService<WindowsPhoneCycleTileNotification>(service, applicationId);
broker.RegisterService<WindowsPhoneFlipTileNotification>(service, applicationId);
broker.RegisterService<WindowsPhoneIconicTileNotification>(service, applicationId);
broker.RegisterService<WindowsPhoneTileNotification>(service, applicationId);
broker.RegisterService<WindowsPhoneToastNotification>(service, applicationId);
broker.RegisterService<WindowsPhoneRawNotification>(service, applicationId);
}
public static WindowsPhoneCycleTileNotification WindowsPhoneCycleTileNotification(this PushBroker broker)
{
return new WindowsPhoneCycleTileNotification();
}
public static WindowsPhoneFlipTileNotification WindowsPhoneFlipTileNotification(this PushBroker broker)
{
return new WindowsPhoneFlipTileNotification();
}
public static WindowsPhoneIconicTileNotification WindowsPhoneIconicTileNotification(this PushBroker broker)
{
return new WindowsPhoneIconicTileNotification();
}
public static WindowsPhoneTileNotification WindowsPhoneTileNotification(this PushBroker broker)
{
return new WindowsPhoneTileNotification();
}
public static WindowsPhoneToastNotification WindowsPhoneToastNotification(this PushBroker broker)
{
return new WindowsPhoneToastNotification();
}
public static WindowsPhoneRawNotification WindowsPhoneRawNotification(this PushBroker broker)
{
return new WindowsPhoneRawNotification();
}
}
}