public void Add(ActorId actorId, IActorReminderState reminderState)
        {
            var collection = this.reminderCollectionsByActorId.GetOrAdd(
                actorId, k => new ConcurrentCollection <IActorReminderState>());

            ((ConcurrentCollection <IActorReminderState>)collection).Add(reminderState);
        }
コード例 #2
0
        private Task RegisterOrUpdateReminderAsync(ActorId actorId, IActorReminderState reminderState,
                                                   bool saveState = true)
        {
            var reminder = new ActorReminder(actorId, this, reminderState);

            return(this.RegisterOrUpdateReminderAsync(reminder, reminderState.RemainingDueTime, saveState));
        }