コード例 #1
0
        public static void TaskQuestionAsked(ResponseTipTask task)
        {
            long answerTweetId = TwitterHandlingClass.CheckAnswerToQuestion((long)task.questionTweetId, task.twitterUserNameSelected);

            if (answerTweetId > 0)
            {
                task.answerTweetId = answerTweetId;
                task.answer        = TwitterHandlingClass.GetTweetAsString((long)task.answerTweetId);
                task.taskStatus    = TaskStatusesEnum.responseTip_questionAnswered;
                return;
            }

            TimeSpan timeElapsedFromQuestionAsked = DateTime.Now.Subtract(task.timeQuestionAsked);

            if (timeElapsedFromQuestionAsked.TotalDays > taskQuestionAskedExpirationTime)
            {
                task.taskStatus = TaskStatusesEnum.responseTip_questionAsked_expired;
            }
        }
コード例 #2
0
 public static void TaskPaid(ResponseTipTask task)
 {
     task.questionTweetId   = TwitterHandlingClass.PostATweetOnAWall(task.twitterUserNameSelected, task.question);
     task.taskStatus        = TaskStatusesEnum.responseTip_questionAsked;
     task.timeQuestionAsked = DateTime.Now;
 }