コード例 #1
0
 public QuizzCreatorController(IQuizz quizz, IQuestions questions, IAnswerSet answerSet, IResponses responses)
 {
     _quizz     = quizz;
     _questions = questions;
     _answerSet = answerSet;
     _responses = responses;
 }
コード例 #2
0
 public QuestionnaireController(IQuestionSets qs, IResponseSets rs, IQuestions q, IAttributes a)
 {
     this.QuestionSets = qs;
     this.ResponseSets = rs;
     this.Questions = q;
     this.Attributes = a;
 }
コード例 #3
0
 /// <param name='operations'>
 /// Reference to the ZtherApiIntegration.API.IQuestions.
 /// </param>
 /// <param name='brand'>
 /// Required.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 public static Question GetQuestionsById(this IQuestions operations, string brand, int id)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IQuestions)s).GetQuestionsByIdAsync(brand, id);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #4
0
 /// <param name='operations'>
 /// Reference to the ZtherApiIntegration.API.IQuestions.
 /// </param>
 /// <param name='brand'>
 /// Required.
 /// </param>
 /// <param name='model'>
 /// Required.
 /// </param>
 public static string CreateQuestions(this IQuestions operations, string brand, Question model)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IQuestions)s).CreateQuestionsAsync(brand, model);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #5
0
    public static void InitializeQuestions()
    {
        TextAsset kati = Resources.Load <TextAsset>("questions");
        string    json = kati.text;
        //reader.Close();
        IQuestions qs = JsonUtility.FromJson <IQuestions>(json);

        // qs.questions this contains all the questions
        QUESTION_LIST = qs.questions;
    }
コード例 #6
0
 public void RemoveQuestion(IQuestions question)
 {
     if (Questions.Contains(question))
     {
         try
         {
             Questions.Remove(question);
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the LandauWebAPI class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public LandauWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._banners        = new Banners(this);
     this._brands         = new Brands(this);
     this._catalogs       = new Catalogs(this);
     this._colors         = new Colors(this);
     this._contactUs      = new ContactUsOperations(this);
     this._countries      = new Countries(this);
     this._groupOrders    = new GroupOrders(this);
     this._images         = new Images(this);
     this._productImages  = new ProductImages(this);
     this._productReviews = new ProductReviews(this);
     this._products       = new Products(this);
     this._questions      = new Questions(this);
     this._retailers      = new Retailers(this);
     this._seo            = new SeoOperations(this);
     this._signUps        = new SignUps(this);
     this._states         = new States(this);
     this._swatches       = new Swatches(this);
     this._baseUri        = new Uri("http://microsoft-apiapp5dcb282abbf74b72ad1667c2-staging.azurewebsites.net:80");
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the LandauPortalWebAPI class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public LandauPortalWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._banners        = new Banners(this);
     this._brands         = new Brands(this);
     this._cache          = new Cache(this);
     this._catalogs       = new Catalogs(this);
     this._colors         = new Colors(this);
     this._contactUs      = new ContactUsOperations(this);
     this._countries      = new Countries(this);
     this._emailFavorites = new EmailFavorites(this);
     this._groupOrders    = new GroupOrders(this);
     this._images         = new Images(this);
     this._productImages  = new ProductImages(this);
     this._productReviews = new ProductReviews(this);
     this._products       = new Products(this);
     this._questions      = new Questions(this);
     this._retailers      = new Retailers(this);
     this._seo            = new SeoOperations(this);
     this._signUps        = new SignUps(this);
     this._states         = new States(this);
     this._swatches       = new Swatches(this);
     this._baseUri        = new Uri(API_ENDPOINT);
 }
コード例 #9
0
 public QuestionsClient()
 {
     _baseResponse    = Substitute.For <BaseResponse <Question> >();
     _questions       = Substitute.For <IQuestions>();
     _questionFilters = Substitute.For <QuestionFilters>();
 }
コード例 #10
0
 public QuestionController()
 {
     repo    = new QuestionsRepo();
     repoCat = new CategoryQuestionsRepo();
 }
コード例 #11
0
 public AskFacade(ICategories categories, IQuestions questions)
 {
     Categories = categories;
     Questions  = questions;
 }
コード例 #12
0
ファイル: Program.cs プロジェクト: SargerasYakuza/LR6
        static void Main(string[] args)
        {
            Console.WriteLine("=================Тест================");

            Test testik = new Test();

            ((ITest)testik).ToSurvivale();

            testik.Study();

            testik.ToSurvivale();

            testik.GetSurvivale();

            testik.ToSurvivale();

            testik.GetSurvivale();

            testik.ExSurvival(8);


            if (testik is Survivale)

            {
                Console.WriteLine($"{testik} is Survivale");
            }

            Console.WriteLine("-----------Экзамен-------------");

            Exams Exams = new Exams("Math");

            IQuestions Exams_2 = Exams;

            Exams_2.PullQuestion();

            Exams_2.AnswerQuestion();

            Exams.ToSurvivale();

            Exams.GetSurvivale();

            Exams.ExSurvival(7);

            Console.WriteLine("-----------Выпускной экзамен-------------");

            FinallyExams FinEx = new FinallyExams();

            FinEx.ToSurvivale();

            FinEx.GetSurvivale();

            FinEx.ToSurvivale();

            FinEx.GetSurvivale();

            FinEx.ToSurvivale();

            FinEx.GetSurvivale();

            FinEx.GetFinExamsInfo();

            FinEx.ExSurvival(6);

            Printer printer = new Printer();

            const int n = 3;

            Survivale[] surv1 = new Survivale[n] {
                testik, FinEx, Exams
            };
            printer.iAmPrinting(surv1, n);



            bool i = true;

            while (i)
            {
                Console.Clear();

                Sessiya two = new Sessiya();
                while (i)
                {
                    Console.WriteLine("  Меню");
                    Console.WriteLine(" 1 - Вывести");
                    Console.WriteLine(" 2 - Добавить");
                    Console.WriteLine(" 3 - Удалить");
                    Console.WriteLine(" 4 - Поиск");
                    Console.WriteLine(" 5 - Кол-во испытаний");
                    Console.WriteLine(" 0 - Выйти");

                    Console.Write("\nВаш выбор = ");
                    int switch_on = int.Parse(Console.ReadLine());

                    Console.Clear();

                    switch (switch_on)
                    {
                    case 1:
                        two.Out();
                        break;

                    case 2:
                        two.Add();
                        break;

                    case 3:
                        two.Remove();
                        break;

                    case 4:
                        two = SessiyaController.Search(two);
                        break;

                    case 5:
                        two = SessiyaController.Kolvo(two);
                        break;

                    case 0:
                        i = false;
                        break;

                    default: break;
                    }
                }
            }



            Console.ReadKey();
        }
コード例 #13
0
 public QuestionController(IQuestions qs, IAttributes a)
 {
     this.Questions = qs;
     this.Attributes = a;
 }
コード例 #14
0
        /// <param name='operations'>
        /// Reference to the ZtherApiIntegration.API.IQuestions.
        /// </param>
        /// <param name='brand'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <QuestionList> GetAllQuestionsAsync(this IQuestions operations, string brand, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <ZtherApiIntegration.API.Models.QuestionList> result = await operations.GetAllQuestionsWithOperationResponseAsync(brand, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
コード例 #15
0
 public QuestionController(IQuestions _questions)
 {
     questions = _questions;
 }
コード例 #16
0
 public CreateQuestionController()
 {
     this.CreateQuestionService = new Questions();
 }
コード例 #17
0
ファイル: RssPresenter.cs プロジェクト: Olbrasoft/AskMe
 public RssPresenter(HtmlEncoder encoder, IDotvvmRequestContext context, IQuestions questions)
 {
     this.encoder = encoder;
     this.context = context;
     _questions   = questions;
 }
コード例 #18
0
 public void AddQuestion(IQuestions question)
 {
     Questions.Add(question);
 }
コード例 #19
0
 public SurveyController(IQuestions iQuestionList)
 {
     this.allQuestions = iQuestionList;
 }
コード例 #20
0
ファイル: Question.cshtml.cs プロジェクト: Olbrasoft/AskMe
        // Constructor

        public QuestionModel(IQuestions questions)
        {
            _questions = questions;
        }
コード例 #21
0
        /// <param name='operations'>
        /// Reference to the ZtherApiIntegration.API.IQuestions.
        /// </param>
        /// <param name='brand'>
        /// Required.
        /// </param>
        /// <param name='model'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <string> CreateQuestionsAsync(this IQuestions operations, string brand, Question model, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <string> result = await operations.CreateQuestionsWithOperationResponseAsync(brand, model, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
コード例 #22
0
 public StatisticsController(IQuestions iQuestionList)
 {
     this.allQuestions = iQuestionList;
 }
コード例 #23
0
        public IndexViewModel(IHostingEnvironment env, AskDbContext dbContext, IQuestions questions) : base(env)
        {
            Data.PagingOptions.PageSize = 10;

            _questions = questions;
        }
コード例 #24
0
 public SyndicationController(HtmlEncoder encoder, IQuestions questions)
 {
     _encoder   = encoder;
     _questions = questions;
 }
コード例 #25
0
 public void Setup()
 {
     _questionsRepository = DAOFactory.Get<IQuestions>();
 }