예제 #1
0
        public HomeController(IUserManager userManager

                              , ILearningRecord learningRecord
                              , ICourseManager courseManager
                              , ILearningDesignate learningDesignate
                              , IExamTestManager examTestManager
                              , ISurveyManager surveyManager
                              , ISortManager knowSortManager
                              , IResourceManager resourceManager
                              , IPromotionWayManager promotionWayManager
                              , IExaminationManager examinationManager
                              , ITrainLearningManager trainLearningManager
                              , IUserMessageManager userMessageManager)
        {
            _userManager          = userManager;
            _learningRecord       = learningRecord;
            _courseManager        = courseManager;
            _learningDesignate    = learningDesignate;
            _examTestManager      = examTestManager;
            _surveyManager        = surveyManager;
            _knowSortManager      = knowSortManager;
            _resourceManager      = resourceManager;
            _promotionWayManager  = promotionWayManager;
            _examinationManager   = examinationManager;
            _trainLearningManager = trainLearningManager;
            _userMessageManager   = userMessageManager;
        }
예제 #2
0
 public static void RegisterAll(ISortManager <Product> sortManager, IPopularityService popularityService)
 {
     sortManager.RegisterPlainSorter("low", (x, y) => x.Price.CompareTo(y.Price));
     sortManager.RegisterPlainSorter("high", (x, y) => y.Price.CompareTo(x.Price));
     sortManager.RegisterPlainSorter("ascending", (x, y) => x.Name.CompareTo(y.Name));
     sortManager.RegisterPlainSorter("descending", (x, y) => y.Name.CompareTo(x.Name));
     sortManager.RegisterComplexSorter("recommended", new ProductRecommendedSort(popularityService));
 }
예제 #3
0
 public KnowledgeManagerController(ISortManager sortManager
                                   , IResourceManager resourceManager
                                   , IUserManager userManager)
 {
     _sortManager     = sortManager;
     _resourceManager = resourceManager;
     _userManager     = userManager;
 }
예제 #4
0
 public KnowledgeCenterController(IResourceManager resourceManager
                                  , IReadRecordManager readRecordManager
                                  , ITagsManager tagsManager
                                  , ISortManager sortManager
                                  , IDeptManager deptManager)
 {
     _sortManager       = sortManager;
     _resourceManager   = resourceManager;
     _readRecordManager = readRecordManager;
     _tagsManager       = tagsManager;
     _deptManager       = deptManager;
 }
예제 #5
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env,
                              ISortManager <Product> sortManager, IPopularityService popularityService)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseMvc();

            ProductSortRegister.RegisterAll(sortManager, popularityService);
        }
예제 #6
0
 public void Setup()
 {
     _sut = new SortManager();
 }
 public void Init()
 {
     _mockFileManager = new Mock <IFileManager>();
     _sut             = new SortManager(_mockFileManager.Object);
 }
예제 #8
0
 public ProductService(IConfiguration configuration, ISortManager <Product> sortManager)
 {
     _configuration = configuration;
     _sortManager   = sortManager;
 }