Class NotificationBuilder
Builder class for INotification objects. Provides a convenient way to set the various fields of a INotification.
Inheritance
Inherited Members
Namespace: VoxelBusters.EssentialKit
Assembly: cs.temp.dll.dll
Syntax
public class NotificationBuilder
Methods
Create()
Returns newly created
Declaration
public INotification Create()
Returns
Type | Description |
---|---|
INotification |
CreateNotification(String)
Initializes a new instance of the NotificationBuilder class.
Declaration
public static NotificationBuilder CreateNotification(string notificationId)
Parameters
Type | Name | Description |
---|---|---|
System.String | notificationId | The unique identifier for this notification. |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetAndroidProperties(NotificationAndroidProperties)
Sets the android specific properties of notification.
Declaration
public NotificationBuilder SetAndroidProperties(NotificationAndroidProperties value)
Parameters
Type | Name | Description |
---|---|---|
NotificationAndroidProperties | value | Value. |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetBadge(Int32)
Sets the badge property of notification.
Declaration
public NotificationBuilder SetBadge(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | Value. |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetBody(String)
Sets the body property of notification.
Declaration
public NotificationBuilder SetBody(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Value. |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetCalendarNotificationTrigger(DateComponents, Boolean)
Adds the date time based trigger.
Declaration
public NotificationBuilder SetCalendarNotificationTrigger(DateComponents dateComponent, bool repeats = false)
Parameters
Type | Name | Description |
---|---|---|
DateComponents | dateComponent | The time when notification is triggered for first time. |
System.Boolean | repeats | If set to |
Returns
Type | Description |
---|---|
NotificationBuilder | The date time based trigger. |
SetIosProperties(NotificationIosProperties)
Sets the iOS specific properties of notification.
Declaration
public NotificationBuilder SetIosProperties(NotificationIosProperties value)
Parameters
Type | Name | Description |
---|---|---|
NotificationIosProperties | value | Value. |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetLocationNotificationTrigger(CircularRegion, Boolean, Boolean, Boolean)
Adds the location based trigger.
Declaration
public NotificationBuilder SetLocationNotificationTrigger(CircularRegion region, bool notifyOnEntry, bool notifyOnExit, bool repeats = false)
Parameters
Type | Name | Description |
---|---|---|
CircularRegion | region | The geographic region that must be entered or exited. |
System.Boolean | notifyOnEntry | If set to |
System.Boolean | notifyOnExit | If set to |
System.Boolean | repeats | If set to |
Returns
Type | Description |
---|---|
NotificationBuilder | The location based trigger. |
SetSoundFileName(String)
Sets the sound filename property of notification.
Declaration
public NotificationBuilder SetSoundFileName(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Value. |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetSubtitle(String)
Sets the subtitle property of notification.
Declaration
public NotificationBuilder SetSubtitle(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Value. |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetTimeIntervalNotificationTrigger(Double, Boolean)
Adds the time interval based trigger.
Declaration
public NotificationBuilder SetTimeIntervalNotificationTrigger(double interval, bool repeats = false)
Parameters
Type | Name | Description |
---|---|---|
System.Double | interval | The time (in seconds) that must elapse from the current time before the trigger fires. |
System.Boolean | repeats | If set to |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetTitle(String)
Sets the title property of notification.
Declaration
public NotificationBuilder SetTitle(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Value. |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetUserInfo(Dictionary<String, String>)
Sets the custom userinfo property of notification.
Declaration
public NotificationBuilder SetUserInfo(Dictionary<string, string> value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | value | Value. |
Returns
Type | Description |
---|---|
NotificationBuilder |
SetUserInfo(KeyValuePair<String, String>[])
Sets the custom userinfo property of notification.
Declaration
public NotificationBuilder SetUserInfo(params KeyValuePair<string, string>[] values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.KeyValuePair<System.String, System.String>[] | values |
Returns
Type | Description |
---|---|
NotificationBuilder |