static Task <string> SerializeAsync(TimeSpan dueTime, TimeSpan period) { var timer = new ActorTimer( owner: null, timerName: "SomeTimer", asyncCallback: state => Task.CompletedTask, state: Encoding.UTF8.GetBytes("Some state value"), dueTime: dueTime, period: period); return(timer.SerializeAsync()); }
protected ActorApplication() { _updateTimer = new ActorTimer(this, UpdateCallback, TimeSpan.FromMilliseconds(UpdateDelay), UpdateDelay); _lastUpdate = DateTime.Now; }
public TimerElapsedEvent(ActorTimer timer) { Timer = timer; }
/// <summary> /// Indicates whether the specified <see cref="ActorId"/> is equal /// to the current <see cref="ActorId"/>. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns>true if the current object is equal to the other parameter; otherwise, false.</returns> public bool Equals(ActorTimer other) { return(this.Equals((object)other)); }