Skip to content

Commit

Permalink
adding get actor reminder API in docs (dapr#1113)
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
  • Loading branch information
shivamkm07 authored Jul 21, 2023
1 parent 2449bcd commit f4e02df
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Define `IMyActor` interface and `MyData` data object. Paste the following code i

```csharp
using Dapr.Actors;
using Dapr.Actors.Runtime;
using System.Threading.Tasks;

namespace MyActor.Interfaces
Expand All @@ -91,6 +92,7 @@ namespace MyActor.Interfaces
Task<MyData> GetDataAsync();
Task RegisterReminder();
Task UnregisterReminder();
Task<IActorReminder> GetReminder();
Task RegisterTimer();
Task UnregisterTimer();
}
Expand Down Expand Up @@ -219,6 +221,14 @@ namespace MyActorService
TimeSpan.FromSeconds(5)); // Time interval between reminder invocations after the first invocation
}

/// <summary>
/// Get MyReminder reminder details with the actor
/// </summary>
public async Task<IActorReminder> GetReminder()
{
await this.GetReminderAsync("MyReminder");
}

/// <summary>
/// Unregister MyReminder reminder with the actor
/// </summary>
Expand Down

0 comments on commit f4e02df

Please sign in to comment.