Esempio n. 1
0
            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());
            }
Esempio n. 2
0
 protected ActorApplication()
 {
     _updateTimer = new ActorTimer(this, UpdateCallback, TimeSpan.FromMilliseconds(UpdateDelay), UpdateDelay);
     _lastUpdate  = DateTime.Now;
 }
Esempio n. 3
0
 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));
 }