Skip to content

Commit

Permalink
Merge branch 'master' into add-actor-serialization-options
Browse files Browse the repository at this point in the history
  • Loading branch information
halspang committed Aug 2, 2023
2 parents 797b84c + f4e02df commit 869fcc6
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 869fcc6

Please sign in to comment.