Example #1
0
 public Timeout(TimeSpan begin, TimeSpan span, IRepeatBehavior repeat, object data, TimeoutCallback callback)
 {
     this.begin = begin;
     this.span = span;
     this.repeat = repeat;
     this.data = data;
     this.callback = callback;
 }
Example #2
0
 public Timeout(DateTime expires, TimeSpan span, IRepeatBehavior repeat, object data, TimeoutCallback callback)
 {
     this.expires = expires;
     this.span = span;
     this.repeat = repeat;
     this.data = data;
     this.callback = callback;
 }
Example #3
0
 public static Timeout AddTimeout(TimeSpan timespan, IRepeatBehavior repeat, object data, TimeoutCallback callback)
 {
     return AppHost.AddTimeout (timespan, repeat, data, callback);
 }
Example #4
0
 public static Timeout AddTimeout(TimeSpan timespan, IRepeatBehavior repeat, TimeoutCallback callback)
 {
     return AddTimeout (timespan, repeat, null, callback);
 }
Example #5
0
 public static void AddTimeout(TimeSpan timespan, IRepeatBehavior repeat, TimeoutCallback callback)
 {
     AddTimeout (timespan, repeat, null, callback);
 }
Example #6
0
        public static Timeout AddTimeout(TimeSpan begin, TimeSpan timespan, IRepeatBehavior repeat, object data, TimeoutCallback callback)
        {
            Timeout t = new Timeout (begin, timespan, repeat, data, callback);

            ioloop.AddTimeout (t);

            return t;
        }
Example #7
0
        public static Timeout AddTimeout(TimeSpan begin, TimeSpan timespan, IRepeatBehavior repeat, object data, TimeoutCallback callback)
        {
            Timeout t = new Timeout (begin, timespan, repeat, data, callback);

            ITimerWatcher timer = null;
            timer = context.CreateTimerWatcher (begin, timespan, delegate {
                t.Run (app);
                if (!t.ShouldContinueToRepeat ()) {
                    t.Stop ();
                    timer.Dispose ();
                }
            });

            timer.Start ();

            return t;
        }
Example #8
0
 public Timeout(TimeSpan span, IRepeatBehavior repeat, object data, TimeoutCallback callback)
     : this(TimeSpan.Zero, span, repeat,data, callback)
 {
 }
Example #9
0
 public static void AddTimeout(TimeSpan timespan, IRepeatBehavior repeat, object data, TimeoutCallback callback)
 {
     AddTimeout (timespan, timespan, repeat, data, callback);
 }
Example #10
0
        public static void AddTimeout(TimeSpan timespan, IRepeatBehavior repeat, object data, TimeoutCallback callback)
        {
            Timeout t = new Timeout (DateTime.UtcNow + timespan, timespan, repeat, data, callback);

            ioloop.AddTimeout (t);
        }