Example #1
0
        /// <summary>
        /// 是否应该发送邮件
        ///     一天仅发送一封
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public static bool ShouldEmail(this Trader t)
        {
            var oed = tEmaioDay1.Get(t);

            if (oed == null)
            {
                oed = new OnceEveryDay();
                tEmaioDay1.Set(t, oed);
            }
            return(oed.Should());
        }
Example #2
0
        public static bool ShouldInstantMsg(this Trader t)
        {
            var oed = tInstant.Get(t);

            if (oed == null)
            {
                oed = new OnceEveryDay();
                tInstant.Set(t, oed);
            }
            return(oed.Should());
        }