Пример #1
0
 public GiveawayWebsocketEventDraw(int moduleId, GiveawayModuleSettings settings, DateTime drawTimestamp, GiveawayEntry winner)
     : base(moduleId)
 {
     SelectedWinner      = winner.DisplayName;
     DrawnAt             = drawTimestamp;
     ResponseTimeSeconds = settings.ResponseTimeSeconds;
     RedrawingAt         = drawTimestamp.Add(new TimeSpan(0, 0, settings.ResponseTimeSeconds));
 }
Пример #2
0
        public GiveawayWebsocketEventOpen(int moduleId, GiveawayModuleSettings settings, DateTime openedTimestamp, int currentEntries)
            : base(moduleId)
        {
            Keyword = settings.Keyword;
            KeywordCaseInsensitive = settings.KeywordCaseInsensitive;
            Prize             = settings.Prize;
            FollowingRequired = settings.FollowingRequired;
            SubscriberOnly    = settings.SubscriberOnly;

            HasOpenTime = settings.OpenTimeMinutes > 0 ? true : false;
            OpenTime    = settings.OpenTimeMinutes;

            OpenedAt  = openedTimestamp;
            ClosingAt = openedTimestamp.Add(new TimeSpan(0, settings.OpenTimeMinutes, 0));

            CurrentEntries = currentEntries;
        }