public bool Send(WindowsPhoneApiNotificationPayLoad payLoad) { HookEvents(PushBroker); try { PushBroker.RegisterService <WindowsPhoneNotification>(new WindowsPhonePushService()); var notification = new WindowsPhoneToastNotification() .ForEndpointUri(new Uri(payLoad.Token)) .ForOSVersion(WindowsPhoneDeviceOSVersion.MangoSevenPointFive) .WithBatchingInterval(BatchingInterval.Immediate) .WithNavigatePath(payLoad.NavigationPath) .WithText1(payLoad.Message) .WithText2(payLoad.TextMessage2); PushBroker.QueueNotification(notification); } finally { StopBroker(); } return(true); }
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 WithText2(this WindowsPhoneToastNotification n, string text2) { n.Text2 = text2; return(n); }
public static WindowsPhoneToastNotification WithNavigatePath(this WindowsPhoneToastNotification n, string navigatePath) { n.NavigatePath = navigatePath; return(n); }
public static WindowsPhoneToastNotification ForOSVersion(this WindowsPhoneToastNotification n, WindowsPhoneDeviceOSVersion osVersion) { n.OSVersion = osVersion; return(n); }
public static WindowsPhoneToastNotification WithBatchingInterval(this WindowsPhoneToastNotification n, BatchingInterval batchingInterval) { n.NotificationClass = batchingInterval; return(n); }
public static WindowsPhoneToastNotification WithMessageID(this WindowsPhoneToastNotification n, Guid messageID) { n.MessageID = messageID; return(n); }
public static WindowsPhoneToastNotification WithCallbackUri(this WindowsPhoneToastNotification n, Uri callbackUri) { n.CallbackURI = callbackUri.ToString(); return(n); }
public static WindowsPhoneToastNotification ForEndpointUri(this WindowsPhoneToastNotification n, Uri endpointUri) { n.EndPointUrl = endpointUri.ToString(); return(n); }
public static WindowsPhoneToastNotification WithTag(this WindowsPhoneToastNotification n, object tag) { n.Tag = tag; return(n); }