Пример #1
0
        public static ChatDesc Pop(
            this evolib.Databases.common1.OpsNotice rec,
            ChatDesc chatDesc
            )
        {
            rec.Pop((CommonDesc)chatDesc);

            chatDesc.times = rec.times;
            chatDesc.repeatedIntervalMinutes = rec.repeateIntervalMinutes;

            return(chatDesc);
        }
Пример #2
0
        public static bool Push(
            this evolib.Databases.common1.OpsNotice rec,
            ChatDesc chatDesc
            )
        {
            var edited = rec.Push((CommonDesc)chatDesc) ||
                         (rec.times != chatDesc.times.Value) ||
                         (rec.repeateIntervalMinutes != chatDesc.repeatedIntervalMinutes);

            rec.optNoticeType = evolib.OptNoticeType.Chat;

            rec.times = chatDesc.times.Value;
            rec.repeateIntervalMinutes = chatDesc.repeatedIntervalMinutes;

            if (edited)
            {
                rec.version++;
            }

            return(edited);
        }