public Notification() { this.alert = (string)null; this.IosNotification = (IosNotification)null; this.AndroidNotification = (AndroidNotification)null; this.WinphoneNotification = (WinphoneNotification)null; }
public Notification() { this.alert = null; this.IosNotification = null; this.AndroidNotification = null; this.WinphoneNotification = null; }
public static Notification winphone(string alert) { WinphoneNotification winphoneNotification = new WinphoneNotification().setAlert(alert); Notification notification = new Notification().setAlert(alert); notification.WinphoneNotification = winphoneNotification; return(notification); }
public void testQuickAlert() { WinphoneNotification winphone = new WinphoneNotification().setAlert("aaa"); JObject json = new JObject(); json.Add("alert", JToken.FromObject("aaa")); Assert.AreEqual(json.ToString(Formatting.None), JsonConvert.SerializeObject(winphone, jSetting)); }
public void testEmpty() { WinphoneNotification winphone = new WinphoneNotification(); JObject json = new JObject(); Assert.AreEqual(new JObject().ToString(Formatting.None), JsonConvert.SerializeObject(winphone, jSetting)); }
public static Notification winphone(String alert) { var platformNotification = new WinphoneNotification().setAlert(alert); var notificaiton = new Notification().setAlert(alert); notificaiton.WinphoneNotification = platformNotification; return(notificaiton); }
public void testExtra() { WinphoneNotification winphone = new WinphoneNotification().AddExtra("key", "value").AddExtra("key2", 222); JObject json = new JObject(); JObject extra = new JObject(); extra.Add("key", JToken.FromObject("value")); extra.Add("key2", JToken.FromObject(222)); json.Add("extras", extra); Assert.AreEqual(json.ToString(Formatting.None), JsonConvert.SerializeObject(winphone, jSetting)); }
private static WinphoneNotification GetWinphoneNotification( string content, Dictionary <string, string> keyValueParams) { var winphoneNotification = new WinphoneNotification(); winphoneNotification.setAlert(content); foreach (var keyValueParam in keyValueParams) { winphoneNotification.AddExtra(keyValueParam.Key, keyValueParam.Value); } return(winphoneNotification); }
public Notification setWinphone(WinphoneNotification winphone) { this.WinphoneNotification = winphone; return(this); }