Пример #1
0
        async Task RunAsync()
        {
            while (_enabled)
            {
                LargeBadgeView lbv = OpenRandomBadge();
                await Utils.DelayAsync(1000);

                if (lbv != null)
                {
                    var numCommentActivities = _rnd.Next(5) + 1;
                    for (int i = 1; i <= numCommentActivities; ++i)
                    {
                        if (!_enabled)
                        {
                            return;
                        }
                        lbv.BotGenerateCommentChange();
                        await Utils.DelayAsync(200 + _rnd.Next(500));
                    }

                    await Utils.DelayAsync(200);

                    lbv.Close();
                }

                await Utils.DelayAsync(_rnd.Next(1000));
            }
        }