using System; using System.Linq; using System.Runtime.Serialization; namespace De.APPPlant.Cordova.Plugin.LocalNotification { /// /// Represents LiveTile options /// [DataContract] class LocalNotificationOptions { /// /// The Title that is displayed /// [DataMember(IsRequired = false, Name = "title")] public string Title { get; set; } /// /// The message that is displayed /// [DataMember(IsRequired = false, Name = "message")] public string Message { get; set; } /// /// Gekürzte Nachricht (alles ab dem Zeilenumbruch entfernt) /// public string ShortMessage { get { string[] separator = new string[] { "\r\n", "\n" }; return Message.Split(separator, StringSplitOptions.RemoveEmptyEntries).First(); } } /// /// Displays number badge to notification /// [DataMember(IsRequired = false, Name = "badge")] public int Badge { get; set; } /// /// Tile count /// [DataMember(IsRequired = false, Name = "Date")] public int Date { get; set; } /// /// Has the options of daily', 'weekly',''monthly','yearly') /// [DataMember(IsRequired = false, Name = "repeat")] public string Repeat { get; set; } /// /// Message-ID /// [DataMember(IsRequired = false, Name = "id")] public string ID { get; set; } /// /// A javascript function to be called if the app is in the background /// [DataMember(IsRequired = false, Name = "background")] public string Background { get; set; } /// /// A javascript function to be called if the app is running /// [DataMember(IsRequired = false, Name = "foreground")] public string Foreground { get; set; } /// /// The notification small background image to be displayed /// [DataMember(IsRequired = false, Name = "smallImage")] public string SmallImage { get; set; } /// /// The notification background image to be displayed /// [DataMember(IsRequired = false, Name = "image")] public string Image { get; set; } /// /// The notification wide background image to be displayed /// [DataMember(IsRequired = false, Name = "wideImage")] public string WideImage { get; set; } } }