public static QuestionObject fromDynamic(dynamic quData)
        {
            QuestionObject question = new QuestionObject()
            {
                Id = quData.id,
                Question = quData.question,
                AnswerCount = quData.answer_count,
                IsAnonymous = quData.anonymous,
                Questioner = UserObject.fromDynamicSlim(quData.user),
                CreatedWith = ApplicationRefObject.fromDynamic(quData.created_with),
                CreatedAt = quData.created_at
            };

            return question;
        }
        public static QuestionObject fromDynamic(dynamic quData)
        {
            QuestionObject question = new QuestionObject()
            {
                Id          = quData.id,
                Question    = quData.question,
                AnswerCount = quData.answer_count,
                IsAnonymous = quData.anonymous,
                Questioner  = UserObject.fromDynamicSlim(quData.user),
                CreatedWith = ApplicationRefObject.fromDynamic(quData.created_with),
                CreatedAt   = quData.created_at
            };

            return(question);
        }
示例#3
0
        public static AnswerObject fromDynamic(dynamic ansData)
        {
            AnswerObject answer = new AnswerObject()
            {
                Id           = ansData.id,
                Answer       = ansData.answer,
                CommentCount = ansData.comment_count,
                SmileCount   = ansData.smile_count,
                Answerer     = UserObject.fromDynamicSlim(ansData.user),
                Question     = QuestionObject.fromDynamic(ansData.question),
                CreatedWith  = ApplicationRefObject.fromDynamic(ansData.created_with),
                CreatedAt    = ansData.created_at
            };

            return(answer);
        }