public RegistrationController( ILogger <RegistrationController> logger, IPushNotifyer notificationSender, INotificationScheduler notificationScheduler) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.pushNotifyer = notificationSender ?? throw new ArgumentNullException(nameof(notificationSender)); this.notificationScheduler = notificationScheduler ?? throw new ArgumentNullException(nameof(notificationScheduler)); }
public void OneTimeSetUp() { #if __ANDROID__ _schedulerToTest = new Notifications.Droid.NotificationScheduler(); #elif __IOS__ _schedulerToTest = new Notifications.iOS.NotificationScheduler(); #else throw new Exception("Invalid envrionment.") #endif }
/// <summary> /// Create a new view model without any notification. /// </summary> public MainPageViewModel() { // So we can send notifications. _notificationScheduler = DependencyService.Get <INotificationScheduler>(); // Commands used to schedule notifications. ScheduleNowCommand = new Command(ScheduleNow); ScheduleTwoMinutesCommand = new Command(ScheduleTwoMinuteNotification); // No extra info by default. IncludeExtraInfo = false; _extraInfoOne = ""; _extraInfoTwo = ""; _scheduledNotifications = new ObservableCollection <MainPageViewModelScheduledNotification>(); }
/// <summary> /// Creates a new view model with default values set. /// </summary> public ScheduledNotificationViewModel() { // So we can send notifications. _notificationScheduler = DependencyService.Get <INotificationScheduler>(); // Handle notification cancelling. CancelNotificationCommand = new Command(CancelNotification); // Set some default values. CreatedOn = ""; ScheduledFor = ""; RecievedOn = ""; ScheduledTitle = ""; RecievedTitle = ""; ScheduledMessage = ""; RecivedMessage = ""; ScheduledExtraInfoOne = ""; RecivedExtraInfoOne = ""; ScheduledExtraInfoTwo = ""; RecivedExtraInfoTwo = ""; _canceledOn = ""; CanceledOn = ""; }
public SetReminderUseCase(INeuronRepository neuronRepository, INotificationScheduler scheduler) { this.neuronRepository = neuronRepository ?? throw new ArgumentNullException(nameof(neuronRepository)); this.scheduler = scheduler ?? throw new ArgumentNullException(nameof(scheduler)); }