/*
Copyright 2013-2014 appPlant UG
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
using System;
using System.Linq;
using System.Runtime.Serialization;
namespace De.APPPlant.Cordova.Plugin.LocalNotification
{
///
/// Represents LiveTile options
///
[DataContract]
class Options
{
///
/// 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; }
///
/// Notification specific data
///
[DataMember(IsRequired = false, Name = "json")]
public string JSON { get; set; }
///
/// Message-ID
///
[DataMember(IsRequired = false, Name = "id")]
public string ID { get; set; }
///
/// Setting this flag will make it so the notification is automatically canceled when the user clicks it
///
[DataMember(IsRequired = false, Name = "autoCancel")]
public bool AutoCancel { 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; }
}
}