示例#1
0
        public static async Task Delay([NotNull] this Busy busy, Func <Task> a, TimeSpan delay, bool force = false)
        {
            using (busy.Set()) {
                await a();
            }

            busy.Delay(delay, force).Ignore();
        }
示例#2
0
        public static void Delay([NotNull] this Busy busy, Action a, TimeSpan delay, bool force = false)
        {
            using (busy.Set()) {
                a();
            }

            busy.Delay(delay, force).Ignore();
        }
示例#3
0
        public static async Task Delay([NotNull] this Busy busy, Func <Task> a, int millisecondsDelay, bool force = false)
        {
            using (busy.Set()) {
                await a();
            }

            busy.Delay(millisecondsDelay, force).Ignore();
        }
示例#4
0
        public static void Delay([NotNull] this Busy busy, Action a, int millisecondsDelay, bool force = false)
        {
            using (busy.Set()) {
                a();
            }

            busy.Delay(millisecondsDelay, force).Ignore();
        }