-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathWnsNotification.cs
More file actions
68 lines (51 loc) · 1.56 KB
/
WnsNotification.cs
File metadata and controls
68 lines (51 loc) · 1.56 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using PushSharp.Core;
using System.Xml.Linq;
namespace PushSharp.Windows
{
public abstract class WnsNotification : INotification
{
public string ChannelUri { get; set; }
public bool? RequestForStatus { get; set; }
public int? TimeToLive { get; set; }
public XElement Payload { get; set; }
public abstract WnsNotificationType Type { get; }
public WnsPriority Priority { get; set; }
public bool IsDeviceRegistrationIdValid ()
{
return true;
}
public object Tag { get; set; }
}
public class WnsTileNotification : WnsNotification
{
public override WnsNotificationType Type
{
get { return WnsNotificationType.Tile; }
}
public WnsNotificationCachePolicyType? CachePolicy { get; set; }
public string NotificationTag { get; set; }
}
public class WnsToastNotification : WnsNotification
{
public override WnsNotificationType Type
{
get { return WnsNotificationType.Toast; }
}
}
public class WnsBadgeNotification : WnsNotification
{
public override WnsNotificationType Type
{
get { return WnsNotificationType.Badge; }
}
public WnsNotificationCachePolicyType? CachePolicy { get; set; }
}
public class WnsRawNotification : WnsNotification
{
public override WnsNotificationType Type
{
get { return WnsNotificationType.Raw; }
}
public byte[] RawData { get; set; }
}
}