简体   繁体   中英

Azure Service Fabric Reminder GetReminder

With Azure Service Fabric reminders there is a GetReminder method that you can call to determine if a reminder already exists, but if it doesn't it throws a ReminderNotFoundException. Does anyone know if there is a better way to determine if a reminder exists without having to handle the exception to drive logic flow?

My only thought would be to save a value in the actor state that tells me whether or not a reminder exists instead of calling GetReminder.

There currently isn't a way to test for the reminder without throwing an exception. You can see some discussion and a MSFT reply in this disqus thread .

As you mentioned, using state is a common solution today:

if (!(await this.StateManager.TryGetStateAsync("IsReminderSet")).Value) { ...}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM