コード例 #1
0
        /// <summary>
        ///     Creates a new feedback session for a playtest
        /// </summary>
        /// <returns>True if created, false otherwise</returns>
        public bool CreateVoiceFeedbackSession()
        {
            var testEvent = _calendar.GetNextPlaytestEvent();

            if (FeedbackSession != null || !testEvent.IsValid || testEvent.Game != PlaytestEvent.Games.CSGO)
            {
                return(false);
            }

            FeedbackSession = new VoiceFeedbackSession(_dataService, _client, testEvent, _rconService);
            return(true);
        }
コード例 #2
0
        /// <summary>
        ///     Ends the active feedback session
        /// </summary>
        /// <returns>True if successful, false otherwise</returns>
        public bool EndVoiceFeedbackSession()
        {
            try
            {
                if (FeedbackSession == null)
                {
                    return(false);
                }

                FeedbackSession.Dispose();
                FeedbackSession = null;
            }
            catch (Exception e)
            {
                _ = _log.LogMessage($"Something happened when ending a feedback session\n{e}");
            }

            return(true);
        }