Azure Service Fabric Reminder GetReminder

时间:2016-10-25 15:24:03

标签: azure azure-service-fabric reminders

使用Azure Service Fabric提醒,您可以调用GetReminder方法来确定提醒是否已存在,但是如果它没有引发ReminderNotFoundException。有没有人知道是否有更好的方法来确定是否存在提醒而不必处理驱动逻辑流程的异常?

我唯一的想法是在actor状态中保存一个值,告诉我是否存在提醒而不是调用GetReminder。

1 个答案:

答案 0 :(得分:0)

目前还没有一种方法可以在不抛出异常的情况下测试提醒。您可以看到一些讨论和MSFT回复in this disqus thread

正如您所提到的,使用状态是当今常见的解决方案:

if(!(等待this.StateManager.TryGetStateAsync(" IsReminderSet"))。值){...}