/** * Post with a specified initializer. */ public void Post(string notificationId, NotificationInitializer initializer) { NotificationInstance notif = NotificationInstance.Borrow(notificationId); initializer(notif); Post(notif); // will return notification instance here }
/** * Utility function to start a notification with parameter. This was made to avoid usage of closures which may instantiate memory. */ public NotificationInstance Begin(string notificationId) { return(NotificationInstance.Borrow(notificationId)); }
/** * Notify with a notification id. */ public void Post(string notificationId) { Post(NotificationInstance.Borrow(notificationId)); }