forked from Redth/PushSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindowsPhonePushFluent.cs
708 lines (598 loc) · 20 KB
/
WindowsPhonePushFluent.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PushSharp.WindowsPhone;
namespace PushSharp
{
public static class WindowsPhoneRawPushFluent
{
public static WindowsPhoneRawNotification ForEndpointUri(this WindowsPhoneRawNotification n, Uri endpointUri)
{
n.EndPointUrl = endpointUri.ToString();
return n;
}
public static WindowsPhoneRawNotification WithCallbackUri(this WindowsPhoneRawNotification n, Uri callbackUri)
{
n.CallbackURI = callbackUri.ToString();
return n;
}
public static WindowsPhoneRawNotification WithMessageID(this WindowsPhoneRawNotification n, Guid messageID)
{
n.MessageID = messageID;
return n;
}
public static WindowsPhoneRawNotification WithBatchingInterval(this WindowsPhoneRawNotification n, BatchingInterval batchingInterval)
{
n.NotificationClass = batchingInterval;
return n;
}
public static WindowsPhoneRawNotification ForOSVersion(this WindowsPhoneRawNotification n, WindowsPhoneDeviceOSVersion osVersion)
{
n.OSVersion = osVersion;
return n;
}
public static WindowsPhoneRawNotification WithRaw(this WindowsPhoneRawNotification n, string raw)
{
n.Raw = raw;
return n;
}
public static WindowsPhoneRawNotification WithTag(this WindowsPhoneRawNotification n, object tag)
{
n.Tag = tag;
return n;
}
}
public static class WindowsPhoneToastPushFluent
{
public static WindowsPhoneToastNotification ForEndpointUri(this WindowsPhoneToastNotification n, Uri endpointUri)
{
n.EndPointUrl = endpointUri.ToString();
return n;
}
public static WindowsPhoneToastNotification WithCallbackUri(this WindowsPhoneToastNotification n, Uri callbackUri)
{
n.CallbackURI = callbackUri.ToString();
return n;
}
public static WindowsPhoneToastNotification WithMessageID(this WindowsPhoneToastNotification n, Guid messageID)
{
n.MessageID = messageID;
return n;
}
public static WindowsPhoneToastNotification WithBatchingInterval(this WindowsPhoneToastNotification n, BatchingInterval batchingInterval)
{
n.NotificationClass = batchingInterval;
return n;
}
public static WindowsPhoneToastNotification ForOSVersion(this WindowsPhoneToastNotification n, WindowsPhoneDeviceOSVersion osVersion)
{
n.OSVersion = osVersion;
return n;
}
public static WindowsPhoneToastNotification WithNavigatePath(this WindowsPhoneToastNotification n, string navigatePath)
{
n.NavigatePath = navigatePath;
return n;
}
public static WindowsPhoneToastNotification WithText1(this WindowsPhoneToastNotification n, string text1)
{
n.Text1 = text1;
return n;
}
public static WindowsPhoneToastNotification WithText2(this WindowsPhoneToastNotification n, string text2)
{
n.Text2 = text2;
return n;
}
public static WindowsPhoneToastNotification WithParameter(this WindowsPhoneToastNotification n, string key, string value)
{
if (n.Parameters == null)
n.Parameters = new System.Collections.Specialized.NameValueCollection();
n.Parameters.Add(key, value);
return n;
}
public static WindowsPhoneToastNotification WithTag(this WindowsPhoneToastNotification n, object tag)
{
n.Tag = tag;
return n;
}
}
public static class WindowsPhoneTilePushFluent
{
public static WindowsPhoneTileNotification ForEndpointUri(this WindowsPhoneTileNotification n, Uri endpointUri)
{
n.EndPointUrl = endpointUri.ToString();
return n;
}
public static WindowsPhoneTileNotification WithCallbackUri(this WindowsPhoneTileNotification n, Uri callbackUri)
{
n.CallbackURI = callbackUri.ToString();
return n;
}
public static WindowsPhoneTileNotification WithMessageID(this WindowsPhoneTileNotification n, Guid messageID)
{
n.MessageID = messageID;
return n;
}
public static WindowsPhoneTileNotification WithBatchingInterval(this WindowsPhoneTileNotification n, BatchingInterval batchingInterval)
{
n.NotificationClass = batchingInterval;
return n;
}
public static WindowsPhoneTileNotification ForOSVersion(this WindowsPhoneTileNotification n, WindowsPhoneDeviceOSVersion osVersion)
{
n.OSVersion = osVersion;
return n;
}
public static WindowsPhoneTileNotification WithBackBackgroundImage(this WindowsPhoneTileNotification n, string backBackgroundImage)
{
n.BackBackgroundImage = backBackgroundImage;
return n;
}
public static WindowsPhoneTileNotification WithBackgroundImage(this WindowsPhoneTileNotification n, string backgroundImage)
{
n.BackgroundImage = backgroundImage;
return n;
}
public static WindowsPhoneTileNotification WithBackContent(this WindowsPhoneTileNotification n, string backContent)
{
n.BackContent = backContent;
return n;
}
public static WindowsPhoneTileNotification WithBackTitle(this WindowsPhoneTileNotification n, string backTitle)
{
n.BackTitle = backTitle;
return n;
}
public static WindowsPhoneTileNotification WithCount(this WindowsPhoneTileNotification n, int count)
{
n.Count = count;
return n;
}
public static WindowsPhoneTileNotification WithTileId(this WindowsPhoneTileNotification n, string tileId)
{
n.TileId = tileId;
return n;
}
public static WindowsPhoneTileNotification WithTitle(this WindowsPhoneTileNotification n, string title)
{
n.Title = title;
return n;
}
public static WindowsPhoneTileNotification ClearBackBackgroundImage(this WindowsPhoneTileNotification n)
{
n.ClearBackBackgroundImage = true;
return n;
}
public static WindowsPhoneTileNotification ClearBackContent(this WindowsPhoneTileNotification n)
{
n.ClearBackContent = true;
return n;
}
public static WindowsPhoneTileNotification ClearBackTitle(this WindowsPhoneTileNotification n)
{
n.ClearBackTitle = true;
return n;
}
public static WindowsPhoneTileNotification ClearCount(this WindowsPhoneTileNotification n)
{
n.ClearCount = true;
return n;
}
public static WindowsPhoneTileNotification ClearTitle(this WindowsPhoneTileNotification n)
{
n.ClearTitle = true;
return n;
}
public static WindowsPhoneTileNotification WithTag(this WindowsPhoneTileNotification n, object tag)
{
n.Tag = tag;
return n;
}
}
public static class WindowsPhoneFlipTilePushFluent
{
public static WindowsPhoneFlipTileNotification ForEndpointUri(this WindowsPhoneFlipTileNotification n, Uri endpointUri)
{
n.EndPointUrl = endpointUri.ToString();
return n;
}
public static WindowsPhoneFlipTileNotification WithCallbackUri(this WindowsPhoneFlipTileNotification n, Uri callbackUri)
{
n.CallbackURI = callbackUri.ToString();
return n;
}
public static WindowsPhoneFlipTileNotification WithMessageID(this WindowsPhoneFlipTileNotification n, Guid messageID)
{
n.MessageID = messageID;
return n;
}
public static WindowsPhoneFlipTileNotification WithBatchingInterval(this WindowsPhoneFlipTileNotification n, BatchingInterval batchingInterval)
{
n.NotificationClass = batchingInterval;
return n;
}
public static WindowsPhoneFlipTileNotification ForOSVersion(this WindowsPhoneFlipTileNotification n, WindowsPhoneDeviceOSVersion osVersion)
{
n.OSVersion = osVersion;
return n;
}
public static WindowsPhoneFlipTileNotification WithTitle(this WindowsPhoneFlipTileNotification n, string title)
{
n.Title = title;
return n;
}
public static WindowsPhoneTileNotification WithTileId(this WindowsPhoneTileNotification n, string tileId)
{
n.TileId = tileId;
return n;
}
public static WindowsPhoneFlipTileNotification WithCount(this WindowsPhoneFlipTileNotification n, int count)
{
n.Count = count;
return n;
}
public static WindowsPhoneFlipTileNotification WithBackTitle(this WindowsPhoneFlipTileNotification n, string backTitle)
{
n.BackTitle = backTitle;
return n;
}
public static WindowsPhoneFlipTileNotification WithBackContent(this WindowsPhoneFlipTileNotification n, string backContent)
{
n.BackContent = backContent;
return n;
}
public static WindowsPhoneFlipTileNotification WithWideBackContent(this WindowsPhoneFlipTileNotification n, string wideBackContent)
{
n.WideBackContent = wideBackContent;
return n;
}
public static WindowsPhoneFlipTileNotification WithSmallBackgroundImage(this WindowsPhoneFlipTileNotification n, string smallBackgroundImage)
{
n.SmallBackgroundImage = smallBackgroundImage;
return n;
}
public static WindowsPhoneFlipTileNotification WithBackgroundImage(this WindowsPhoneFlipTileNotification n, string backgroundImage)
{
n.BackgroundImage = backgroundImage;
return n;
}
public static WindowsPhoneFlipTileNotification WithBackBackgroundImage(this WindowsPhoneFlipTileNotification n, string backBackgroundImage)
{
n.BackBackgroundImage = backBackgroundImage;
return n;
}
public static WindowsPhoneFlipTileNotification WithWideBackgroundImage(this WindowsPhoneFlipTileNotification n, string wideBackgroundImage)
{
n.WideBackgroundImage = wideBackgroundImage;
return n;
}
public static WindowsPhoneFlipTileNotification WithWideBackBackgroundImage(this WindowsPhoneFlipTileNotification n, string wideBackBackgroundImage)
{
n.WideBackBackgroundImage = wideBackBackgroundImage;
return n;
}
public static WindowsPhoneFlipTileNotification ClearTitle(this WindowsPhoneFlipTileNotification n)
{
n.ClearTitle = true;
return n;
}
public static WindowsPhoneFlipTileNotification ClearBackTitle(this WindowsPhoneFlipTileNotification n)
{
n.ClearBackTitle = true;
return n;
}
public static WindowsPhoneFlipTileNotification ClearBackContent(this WindowsPhoneFlipTileNotification n)
{
n.ClearBackContent = true;
return n;
}
public static WindowsPhoneFlipTileNotification ClearWideBackContent(this WindowsPhoneFlipTileNotification n)
{
n.ClearWideBackContent = true;
return n;
}
public static WindowsPhoneFlipTileNotification ClearCount(this WindowsPhoneFlipTileNotification n)
{
n.ClearCount = true;
return n;
}
public static WindowsPhoneFlipTileNotification ClearSmallBackgroundImage(this WindowsPhoneFlipTileNotification n)
{
n.ClearSmallBackgroundImage = true;
return n;
}
public static WindowsPhoneFlipTileNotification ClearBackgroundImage(this WindowsPhoneFlipTileNotification n)
{
n.ClearBackgroundImage = true;
return n;
}
public static WindowsPhoneFlipTileNotification ClearBackBackgroundImage(this WindowsPhoneFlipTileNotification n)
{
n.ClearBackBackgroundImage = true;
return n;
}
public static WindowsPhoneFlipTileNotification ClearWideBackgroundImage(this WindowsPhoneFlipTileNotification n)
{
n.ClearWideBackgroundImage = true;
return n;
}
public static WindowsPhoneFlipTileNotification ClearWideBackBackgroundImage(this WindowsPhoneFlipTileNotification n)
{
n.ClearWideBackBackgroundImage = true;
return n;
}
public static WindowsPhoneFlipTileNotification WithTag(this WindowsPhoneFlipTileNotification n, object tag)
{
n.Tag = tag;
return n;
}
}
public static class WindowsPhoneIconicTilePushFluent
{
public static WindowsPhoneIconicTileNotification ForEndpointUri(this WindowsPhoneIconicTileNotification n, Uri endpointUri)
{
n.EndPointUrl = endpointUri.ToString();
return n;
}
public static WindowsPhoneTileNotification WithTileId(this WindowsPhoneTileNotification n, string tileId)
{
n.TileId = tileId;
return n;
}
public static WindowsPhoneIconicTileNotification WithCallbackUri(this WindowsPhoneIconicTileNotification n, Uri callbackUri)
{
n.CallbackURI = callbackUri.ToString();
return n;
}
public static WindowsPhoneIconicTileNotification WithMessageID(this WindowsPhoneIconicTileNotification n, Guid messageID)
{
n.MessageID = messageID;
return n;
}
public static WindowsPhoneIconicTileNotification WithBatchingInterval(this WindowsPhoneIconicTileNotification n, BatchingInterval batchingInterval)
{
n.NotificationClass = batchingInterval;
return n;
}
public static WindowsPhoneIconicTileNotification ForOSVersion(this WindowsPhoneIconicTileNotification n, WindowsPhoneDeviceOSVersion osVersion)
{
n.OSVersion = osVersion;
return n;
}
public static WindowsPhoneIconicTileNotification WithTitle(this WindowsPhoneIconicTileNotification n, string title)
{
n.Title = title;
return n;
}
public static WindowsPhoneIconicTileNotification WithCount(this WindowsPhoneIconicTileNotification n, int count)
{
n.Count = count;
return n;
}
public static WindowsPhoneIconicTileNotification WithWideContent1(this WindowsPhoneIconicTileNotification n, string wideContent1)
{
n.WideContent1 = wideContent1;
return n;
}
public static WindowsPhoneIconicTileNotification WithWideContent2(this WindowsPhoneIconicTileNotification n, string wideContent2)
{
n.WideContent2 = wideContent2;
return n;
}
public static WindowsPhoneIconicTileNotification WithWideContent3(this WindowsPhoneIconicTileNotification n, string wideContent3)
{
n.WideContent3 = wideContent3;
return n;
}
public static WindowsPhoneIconicTileNotification WithSmallIconImage(this WindowsPhoneIconicTileNotification n, string smallIconImage)
{
n.SmallIconImage = smallIconImage;
return n;
}
public static WindowsPhoneIconicTileNotification WithIconImage(this WindowsPhoneIconicTileNotification n, string iconImage)
{
n.IconImage = iconImage;
return n;
}
public static WindowsPhoneIconicTileNotification WithBackgroundColor(this WindowsPhoneIconicTileNotification n, string backgroundColor)
{
n.BackgroundColor = backgroundColor;
return n;
}
public static WindowsPhoneIconicTileNotification ClearTitle(this WindowsPhoneIconicTileNotification n)
{
n.ClearTitle = true;
return n;
}
public static WindowsPhoneIconicTileNotification ClearWideContent1(this WindowsPhoneIconicTileNotification n)
{
n.ClearWideContent1 = true;
return n;
}
public static WindowsPhoneIconicTileNotification ClearWideContent2(this WindowsPhoneIconicTileNotification n)
{
n.ClearWideContent2 = true;
return n;
}
public static WindowsPhoneIconicTileNotification ClearWideContent3(this WindowsPhoneIconicTileNotification n)
{
n.ClearWideContent3 = true;
return n;
}
public static WindowsPhoneIconicTileNotification ClearCount(this WindowsPhoneIconicTileNotification n)
{
n.ClearCount = true;
return n;
}
public static WindowsPhoneIconicTileNotification ClearSmallIconImage(this WindowsPhoneIconicTileNotification n)
{
n.ClearSmallIconImage = true;
return n;
}
public static WindowsPhoneIconicTileNotification ClearIconImage(this WindowsPhoneIconicTileNotification n)
{
n.ClearIconImage = true;
return n;
}
public static WindowsPhoneIconicTileNotification ClearBackgroundColor(this WindowsPhoneIconicTileNotification n)
{
n.ClearBackgroundColor = true;
return n;
}
public static WindowsPhoneIconicTileNotification WithTag(this WindowsPhoneIconicTileNotification n, object tag)
{
n.Tag = tag;
return n;
}
}
public static class WindowsPhoneCycleTilePushFluent
{
public static WindowsPhoneCycleTileNotification ForEndpointUri(this WindowsPhoneCycleTileNotification n, Uri endpointUri)
{
n.EndPointUrl = endpointUri.ToString();
return n;
}
public static WindowsPhoneTileNotification WithTileId(this WindowsPhoneTileNotification n, string tileId)
{
n.TileId = tileId;
return n;
}
public static WindowsPhoneCycleTileNotification WithCallbackUri(this WindowsPhoneCycleTileNotification n, Uri callbackUri)
{
n.CallbackURI = callbackUri.ToString();
return n;
}
public static WindowsPhoneCycleTileNotification WithMessageID(this WindowsPhoneCycleTileNotification n, Guid messageID)
{
n.MessageID = messageID;
return n;
}
public static WindowsPhoneCycleTileNotification WithBatchingInterval(this WindowsPhoneCycleTileNotification n, BatchingInterval batchingInterval)
{
n.NotificationClass = batchingInterval;
return n;
}
public static WindowsPhoneCycleTileNotification ForOSVersion(this WindowsPhoneCycleTileNotification n, WindowsPhoneDeviceOSVersion osVersion)
{
n.OSVersion = osVersion;
return n;
}
public static WindowsPhoneCycleTileNotification WithTitle(this WindowsPhoneCycleTileNotification n, string title)
{
n.Title = title;
return n;
}
public static WindowsPhoneCycleTileNotification WithCount(this WindowsPhoneCycleTileNotification n, int count)
{
n.Count = count;
return n;
}
public static WindowsPhoneCycleTileNotification WithCycleImage1(this WindowsPhoneCycleTileNotification n, string cycleImage1)
{
n.CycleImage1 = cycleImage1;
return n;
}
public static WindowsPhoneCycleTileNotification WithCycleImage2(this WindowsPhoneCycleTileNotification n, string cycleImage2)
{
n.CycleImage2 = cycleImage2;
return n;
}
public static WindowsPhoneCycleTileNotification WithCycleImage3(this WindowsPhoneCycleTileNotification n, string cycleImage3)
{
n.CycleImage3 = cycleImage3;
return n;
}
public static WindowsPhoneCycleTileNotification WithCycleImage4(this WindowsPhoneCycleTileNotification n, string cycleImage4)
{
n.CycleImage4 = cycleImage4;
return n;
}
public static WindowsPhoneCycleTileNotification WithCycleImage5(this WindowsPhoneCycleTileNotification n, string cycleImage5)
{
n.CycleImage5 = cycleImage5;
return n;
}
public static WindowsPhoneCycleTileNotification WithCycleImage6(this WindowsPhoneCycleTileNotification n, string cycleImage6)
{
n.CycleImage6 = cycleImage6;
return n;
}
public static WindowsPhoneCycleTileNotification WithCycleImage7(this WindowsPhoneCycleTileNotification n, string cycleImage7)
{
n.CycleImage6 = cycleImage7;
return n;
}
public static WindowsPhoneCycleTileNotification WithCycleImage8(this WindowsPhoneCycleTileNotification n, string cycleImage8)
{
n.CycleImage6 = cycleImage8;
return n;
}
public static WindowsPhoneCycleTileNotification WithCycleImage9(this WindowsPhoneCycleTileNotification n, string cycleImage9)
{
n.CycleImage6 = cycleImage9;
return n;
}
public static WindowsPhoneCycleTileNotification ClearTitle(this WindowsPhoneCycleTileNotification n)
{
n.ClearTitle = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCount(this WindowsPhoneCycleTileNotification n)
{
n.ClearCount = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCycleImage1(this WindowsPhoneCycleTileNotification n)
{
n.ClearCycleImage1 = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCycleImage2(this WindowsPhoneCycleTileNotification n)
{
n.ClearCycleImage2 = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCycleImage3(this WindowsPhoneCycleTileNotification n)
{
n.ClearCycleImage3 = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCycleImage4(this WindowsPhoneCycleTileNotification n)
{
n.ClearCycleImage4 = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCycleImage5(this WindowsPhoneCycleTileNotification n)
{
n.ClearCycleImage5 = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCycleImage6(this WindowsPhoneCycleTileNotification n)
{
n.ClearCycleImage6 = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCycleImage7(this WindowsPhoneCycleTileNotification n)
{
n.ClearCycleImage7 = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCycleImage8(this WindowsPhoneCycleTileNotification n)
{
n.ClearCycleImage8 = true;
return n;
}
public static WindowsPhoneCycleTileNotification ClearCycleImage9(this WindowsPhoneCycleTileNotification n)
{
n.ClearCycleImage9 = true;
return n;
}
public static WindowsPhoneCycleTileNotification WithTag(this WindowsPhoneCycleTileNotification n, object tag)
{
n.Tag = tag;
return n;
}
}
}