protected void Page_Load(object sender, EventArgs e)
 {
     IUnityContainer container = new UnityContainer();
     UnityConfigurationSection section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity");
     section.Configure(container);
     if (Request["installation"] != null)
     {
         int installationid = Int32.Parse(Request["installation"]);
         userid = Int32.Parse(Request["userid"]);
         user = Request["user"];
         sservice = container.Resolve<IStatisticService>();
         IInstallationBL iinstall = container.Resolve<IInstallationBL>();
         imodel = iinstall.getInstallation(installationid);
         Dictionary<InstallationModel, List<InstallationState>> statelist = sservice.getInstallationState(imodel.customerid);
         StringBuilder str = new StringBuilder();
         str.Append("<table border = '1'><tr><th>Description</th><th>Messwert</th><th>Einheit</th></tr>");
         foreach (var values in statelist)
         {
             if(values.Key.installationid.Equals(installationid))
             {
                 foreach (var item in values.Value)
                 {
                      str.Append("<tr><td>" + item.description + "</td><td>" + item.lastValue + "</td><td>" + item.unit + "</td></tr>");
                 }
                 break;
             }
         }
         str.Append("</table>");
         anlagenzustand.InnerHtml = str.ToString();
     }
 }
示例#2
0
        /// <summary>
        /// Конструктор.
        /// </summary>
        public StatisticServiceTests()
        {
            notExistId = Guid.NewGuid();
            existId    = Guid.NewGuid();

            existName    = "exist";
            notExistName = "notexist";

            deviceRepositoryMock      = new Mock <IDeviceRepository>();
            eventRepositoryMock       = new Mock <IDeviceEventRepository>();
            deviceEventRepositoryMock = new Mock <IEventRepository>();

            deviceRepositoryMock.Setup(x => x.GetById(notExistId)).Returns(Task.FromResult <Device>(null));
            deviceRepositoryMock.Setup(x => x.GetById(existId)).Returns(Task.FromResult(new Device()));

            deviceEventRepositoryMock.Setup(x => x.GetByName(existName)).Returns(Task.FromResult <Event>(new Event()));
            deviceEventRepositoryMock.Setup(x => x.GetByName(notExistName)).Returns(Task.FromResult <Event>(null));


            uowMock = new Mock <IUnitOfWork>();
            uowMock.Setup(x => x.GetDeviceRepository()).Returns(() => deviceRepositoryMock.Object);
            uowMock.Setup(x => x.GetEventRepository()).Returns(() => eventRepositoryMock.Object);
            uowMock.Setup(x => x.GetDeviceEventRepository()).Returns(() => deviceEventRepositoryMock.Object);

            uowFactoryMock = new Mock <IUnitOfWorkFactory>();
            uowFactoryMock.Setup(x => x.Create()).Returns(() => uowMock.Object);

            notificationServiceMock = new Mock <INotificationService>();

            statisticService = new StatisticService(uowFactoryMock.Object, notificationServiceMock.Object);
        }
示例#3
0
        public TextController()
        {
            IRegExProvider regExProvider = new RegExProvider();

            this.statisticService = new StatisticService(regExProvider);
            this.sortService      = new SortService(regExProvider);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            IUnityContainer           container = new UnityContainer();
            UnityConfigurationSection section   = (UnityConfigurationSection)ConfigurationManager.GetSection("unity");

            section.Configure(container);
            if (Request["installation"] != null)
            {
                int installationid = Int32.Parse(Request["installation"]);
                userid   = Int32.Parse(Request["userid"]);
                user     = Request["user"];
                sservice = container.Resolve <IStatisticService>();
                IInstallationBL iinstall = container.Resolve <IInstallationBL>();
                imodel = iinstall.getInstallation(installationid);
                Dictionary <InstallationModel, List <InstallationState> > statelist = sservice.getInstallationState(imodel.customerid);
                StringBuilder str = new StringBuilder();
                str.Append("<table border = '1'><tr><th>Description</th><th>Messwert</th><th>Einheit</th></tr>");
                foreach (var values in statelist)
                {
                    if (values.Key.installationid.Equals(installationid))
                    {
                        foreach (var item in values.Value)
                        {
                            str.Append("<tr><td>" + item.description + "</td><td>" + item.lastValue + "</td><td>" + item.unit + "</td></tr>");
                        }
                        break;
                    }
                }
                str.Append("</table>");
                anlagenzustand.InnerHtml = str.ToString();
            }
        }
示例#5
0
 public StatisticController(UserManager <IdentityUser> userManager)
 {
     kernel       = new StandardKernel(new NinjectServiceModule());
     statsService = kernel.Get <StatisticsService>();
     testService  = kernel.Get <TestsService>();
     _userManager = userManager;
 }
示例#6
0
 private void Construct(IParticleService particleService, IStatisticService statisticService,
                        IRewardService rewardService)
 {
     this.particleService  = particleService;
     this.statisticService = statisticService;
     this.rewardService    = rewardService;
 }
示例#7
0
 public AnimalService(IRepository <Animal> repository, IMapper mapper, IKeepingService keepingService,
                      IAttitudeToService attitudesToService, IDefectService defectService,
                      IProcessingService processingService, INeedsService needsService,
                      IVaccinationService vaccinationService, IIsNewService isNewService, IUriService uriService,
                      IAnimalLocationHistoryService locationHistoryService,
                      IStatisticService <Animal> statisticService, IAnimalViewLocationService locationService,
                      IFilterService <Animal, AnimalQuery> animalFilterService,
                      IDescriptionService descriptionService, IBreedService breedService)
 {
     _repository             = repository;
     _mapper                 = mapper;
     _keepingService         = keepingService;
     _attitudesToService     = attitudesToService;
     _defectService          = defectService;
     _processingService      = processingService;
     _needsService           = needsService;
     _isNewService           = isNewService;
     _vaccinationService     = vaccinationService;
     _uriService             = uriService;
     _locationHistoryService = locationHistoryService;
     _statisticService       = statisticService;
     _descriptionService     = descriptionService;
     _breedService           = breedService;
     _locationService        = locationService;
     _animalFilterService    = animalFilterService;
 }
 public frmCustomerDetail(Customer customer)
 {
     InitializeComponent();
     this.customer    = customer;
     scheduleService  = InstanceFactory.GetInstance <IScheduleService>();
     statisticService = InstanceFactory.GetInstance <IStatisticService>();
 }
示例#9
0
 public frmAddStats(Customer customer, Statistic statistic = null)
 {
     InitializeComponent();
     statisticService = InstanceFactory.GetInstance <IStatisticService>();
     this.statistic   = statistic;
     this.customer    = customer;
 }
示例#10
0
        public HomeController(
            IAccountService accountService,
            IUserService userService,
            IStatisticService statisticService,
            IViewModelService viewModelService,
            ISignInManager signInManager,
            IUserManager userManager,
            IIdentityHelper identityHelper)
        {
            Guard.WhenArgument(accountService, "AccountService").IsNull().Throw();
            Guard.WhenArgument(userService, "UserService").IsNull().Throw();
            Guard.WhenArgument(statisticService, "StatisticService").IsNull().Throw();
            Guard.WhenArgument(viewModelService, "ViewModelService").IsNull().Throw();
            Guard.WhenArgument(signInManager, "SignInManager").IsNull().Throw();
            Guard.WhenArgument(userManager, "UserManager").IsNull().Throw();
            Guard.WhenArgument(identityHelper, "IdentityHelper").IsNull().Throw();

            this.accountService   = accountService;
            this.userService      = userService;
            this.statisticService = statisticService;
            this.viewModelService = viewModelService;
            this.signInManager    = signInManager;
            this.userManager      = userManager;
            this.identityHelper   = identityHelper;
        }
示例#11
0
 private void Construct(ITimer timer, IStatisticService statisticService,
                        IPauseMenuService pauseMenuService)
 {
     this.timer            = timer;
     this.statisticService = statisticService;
     this.pauseMenuService = pauseMenuService;
 }
 public TinifierImagesStatisticController(ISettingsService settingsService, IStatisticService statisticService,
                                          IHistoryService historyService)
 {
     _settingsService  = settingsService;
     _statisticService = statisticService;
     _historyService   = historyService;
 }
示例#13
0
 public StatisticController(
     IDatasetRepository datasetRepository,
     IStatisticService statisticService
     )
 {
     _datasetRepository = datasetRepository;
     _statisticService  = statisticService;
 }
示例#14
0
 public TrustManager(IRepository repository, IAccountService accountService, IStatisticService statisticService)
 {
     this.accountService   = accountService;
     this.repository       = repository;
     this.statisticService = statisticService;
     Observable.Timer(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(sheduleInterval))
     .Subscribe(timestamped => Handler());
 }
示例#15
0
 public OrderService(IDbContext dbContext,
                     IMapper mapper,
                     ICurrentUserService currentUserService,
                     IStatisticService statisticService) : base(dbContext, mapper)
 {
     _currentUserService = currentUserService;
     _statisticService   = statisticService;
 }
示例#16
0
 public TrustService(IRepository repository, IStatisticService statisticService)
 {
     Logger.Trace(" service construction");
     this.repository       = repository;
     this.statisticService = statisticService;
     this.accountService   = accountService;
     Manager = new TrustManager(repository, statisticService);
 }
 public CreateOrderCommandHandler(IDbContext dbContext,
                                  IMapper mapper,
                                  ICurrentUserService currentUserService,
                                  IStatisticService statisticService) : base(dbContext, mapper)
 {
     _currentUserService = currentUserService;
     _statisticService   = statisticService;
 }
 public CreateOrderCommandHandler(IDbContext dbContext,
                                  IMapper mapper,
                                  IStatisticService statisticService)
 {
     _dbContext        = dbContext;
     _mapper           = mapper;
     _statisticService = statisticService;
 }
示例#19
0
 public HomeController(IPublicationService publicationService,
     IStatisticService statisticService,
     IMediator mediator)
 {
     _publicationService = publicationService;
     _statisticService = statisticService;
     _mediator = mediator;
 }
示例#20
0
 public StatisticController(IMessageService messageService, IStatisticFuncsService chatAnalyzerService, IStatisticService statisticService, ICustomStatisticService customStatisticService, IStatisticCacheService statisticCacheService)
 {
     this.messageService         = messageService;
     this.statisticFuncsService  = chatAnalyzerService;
     this.statisticService       = statisticService;
     this.customStatisticService = customStatisticService;
     this.statisticCacheService  = statisticCacheService;
 }
 public TrustManagementService(ITrustManagementRepository repository, IAccountService accountService, IStatisticService statisticService)
 {
     Logger.Trace("TrustManagement service construction");
     this.repository        = repository;
     this.statisticService  = statisticService;
     this.accountService    = accountService;
     TrustManagementManager = new TrustManager(repository, accountService, statisticService);
 }
 public ReMiningHostedService(IMiningService miningService, IMiningQueue miningQueue,
                              IBackgroundQueue backgroundQueue, IStatisticService statisticService)
 {
     _miningService    = miningService;
     _miningQueue      = miningQueue;
     _backgroundQueue  = backgroundQueue;
     _statisticService = statisticService;
 }
示例#23
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="service"></param>
 /// <param name="currentUserService"></param>
 /// <param name="statisticService"></param>
 public UsersController(IUsersService service,
                        ICurrentUserService currentUserService,
                        IStatisticService statisticService)
 {
     _service            = service;
     _currentUserService = currentUserService;
     _statisticService   = statisticService;
 }
 public QueryController(
     ISensorService sensorService,
     IStatisticService statisticService,
     IAutomatizationService automatizationService)
 {
     this.sensorService         = sensorService;
     this.statisticService      = statisticService;
     this.automatizationService = automatizationService;
 }
示例#25
0
 public StatisticForm()
 {
     InitializeComponent();
     userService      = new UserService();
     statisticService = new StatisticService();
     testService      = new TestService();
     questionService  = new QuestionService();
     categoryService  = new CategoryService();
 }
示例#26
0
 public TrustManagementService(ApplicationDbContext context, IIpfsService ipfsService, ISmartContractService smartContractService, IStatisticService statisticService, IRateService rateService, ILogger <ITrustManagementService> logger)
 {
     this.context              = context;
     this.ipfsService          = ipfsService;
     this.smartContractService = smartContractService;
     this.statisticService     = statisticService;
     this.rateService          = rateService;
     this.logger = logger;
 }
 public frmEditCustomer(Customer customer)
 {
     InitializeComponent();
     this.customer    = customer;
     scheduleService  = InstanceFactory.GetInstance <IScheduleService>();
     statisticService = InstanceFactory.GetInstance <IStatisticService>();
     customerService  = InstanceFactory.GetInstance <ICustomerService>();
     BlockUnauthorizedViews();
 }
示例#28
0
 public UmbracoStartup()
 {
     _statisticService = new StatisticService();
     _settingsService  = new SettingsService();
     _imageService     = new ImageService();
     _historyService   = new HistoryService();
     _sectionRepo      = new TSectionRepo();
     _mediaService     = ApplicationContext.Current.Services.MediaService;
 }
示例#29
0
 public ImageService()
 {
     _imageRepository         = new TImageRepository();
     _validationService       = new ValidationService();
     _historyService          = new HistoryService();
     _statisticService        = new StatisticService();
     _stateService            = new StateService();
     _tinyPngConnectorService = new TinyPNGConnectorService();
 }
 public TinifierController()
 {
     _imageService            = new ImageService();
     _historyService          = new HistoryService();
     _tinyPngConnectorService = new TinyPNGConnectorService();
     _settingsService         = new SettingsService();
     _statisticService        = new StatisticService();
     _stateService            = new StateService();
 }
示例#31
0
 public OrderService(IStatisticService statisticService,
                     IMapper mapper,
                     IDbContext dbContext,
                     ICurrentUserService currentUserService)
 {
     _statisticService   = statisticService;
     _mapper             = mapper;
     _dbContext          = dbContext;
     _currentUserService = currentUserService;
 }
示例#32
0
 private void Construct(ISceneService sceneService, IPlayerBehaviour playerBehaviour,
                        ButtonUIInput buttonUIInput, IPauseMenuService pauseMenuService, ITimer timer, IStatisticService statisticService)
 {
     this.sceneService     = sceneService;
     this.playerBehaviour  = playerBehaviour;
     this.buttonUIInput    = buttonUIInput;
     this.pauseMenuService = pauseMenuService;
     this.timer            = timer;
     this.statisticService = statisticService;
 }
 public QuizController(IQuizService testService, IStatisticService statisticService, IUserService userService)
 {
     this.quizService = testService;
     this.statisticService = statisticService;
     this.userService = userService;
 }
 public ManageController(IStatisticService statisticService, IUserService userService, IQuizService quizService)
 {
     this.statisticService = statisticService;
     this.userService = userService;
     this.quizService = quizService;
 }
 public ReviewerShowStatisticPageController(IStatisticService statisticService)
 {
     this._statisticService = statisticService;
 }
 public StatisticsController(IStatisticService statisticService)
 {
     this.statisticService = statisticService;
 }