예제 #1
0
 public DashboardBuilder(IDashboardRepository dashboardrepository, IWidgetRepository widgetrepository,
     IParameterRepository parameterrepository)
 {
     _dashboardrepository = dashboardrepository;
     _widgetrepository = widgetrepository;
     _parameterrepository = parameterrepository;
 }
예제 #2
0
 public AlarmService(ISession session)
     : base(session)
 {
     _alarmRepository     = new AlarmRepository(session);
     _parameterRepository = new ParameterRepository(session);
     _alarmMetricService  = new AlarmMetricService(session);
 }
예제 #3
0
 public AlarmFiredService(IAlarmFiredRepository AlarmFiredRepository, IParameterRepository parameterRepository, IProcessInstanceRepository processInstanceRepository, IAlarmRepository alarmRepository)
 {
     _alarmFiredRepository      = AlarmFiredRepository;
     _parameterRepository       = parameterRepository;
     _processInstanceRepository = processInstanceRepository;
     _alarmRepository           = alarmRepository;
 }
예제 #4
0
 public ParameterService(IParameterRepository parameterRepository, IProcessRepository processRepository, IDeviceRepository deviceRepository, IAlarmService alarmService)
 {
     _parameterRepository = parameterRepository;
     _deviceRepository    = deviceRepository;
     _processRepository   = processRepository;
     _alarmService        = alarmService;
 }
예제 #5
0
 public Handler(
     IParameterRepository parameterRepository,
     IScriptInterpreterUnitOfWork unitOfWork)
 {
     _parameterRepository = parameterRepository;
     _unitOfWork          = unitOfWork;
 }
예제 #6
0
 public ParameterService(ISession session)
     : base(session)
 {
     _parameterRepository = new ParameterRepository(session);
     _processRepository   = new ProcessRepository(session);
     _deviceRepository    = new DeviceRepository(session);
     _alarmService        = new AlarmService(session);
 }
예제 #7
0
        public void Init()
        {
            parameterRepository = Substitute.For <IParameterRepository>();
            var mapper = new MapperConfiguration(x => x.AddProfile(new MappingProfile())).CreateMapper();

            log = Substitute.For <ILog>();
            parameterService = new ParameterService(parameterRepository, mapper, log);
        }
예제 #8
0
 public Authentication(ILdapRepository ldapRepository, IPermissionGroupRepository permissionGroupRepository,
                       IParameterRepository parameterRepository, ILogRepository log)
 {
     this.ldapRepository            = ldapRepository;
     this.permissionGroupRepository = permissionGroupRepository;
     this.parameterRepository       = parameterRepository;
     this.log = log;
 }
예제 #9
0
        public decimal VAT()
        {
            //DEPENDENCY INJECTION!!
            //IParameterRepository paramrepo = new XMLParameterRepository();
            IParameterRepository paramrepo = (IParameterRepository)DIResolver.GetClass <IParameterRepository>();

            return(decimal.Parse(paramrepo.getParameter("VAT")));
        }
예제 #10
0
 public FileAttachmentService(IConfiguration config,
                              IMasterService masterService,
                              IParameterRepository paramRepo)
 {
     _config        = config;
     _masterService = masterService;
     _paramRepo     = paramRepo;
 }
예제 #11
0
 public SeedDomainService(ITypeRepository typeRepository,
                          IStateRepository stateRepository,
                          IParameterRepository parameterRepository)
 {
     _typeRepository      = typeRepository;
     _stateRepository     = stateRepository;
     _parameterRepository = parameterRepository;
 }
예제 #12
0
 public AlarmFiredService(ISession session)
     : base(session)
 {
     _alarmFiredRepository      = new AlarmFiredRepository(session);
     _parameterRepository       = new ParameterRepository(session);
     _processInstanceRepository = new ProcessInstanceRepository(session);
     _alarmRepository           = new AlarmRepository(session);
 }
예제 #13
0
        static void Main(string[] args)
        {
            NinjectControllerFactory ninject = new NinjectControllerFactory();

            ControllerBuilder.Current.SetControllerFactory(ninject);

            ISearchEngineRepository  repositorySearchEngine  = ninject.ninjectKernel.Get <ISearchEngineRepository>();
            IParameterRepository     repositoryParameter     = ninject.ninjectKernel.Get <IParameterRepository>();
            IParameterTypeRepository repositoryParameterType = ninject.ninjectKernel.Get <IParameterTypeRepository>();

            string[] searchEngineWinners = new string[args.Length];
            long[]   maxResults          = new long[args.Length];
            long[]   totals   = new long[args.Length];
            long     maxTotal = 0;
            string   maxArg   = "";

            if (args.Length > 0)
            {
                for (int i = 0; i < args.Length; i++)
                {
                    maxResults[i] = 0;
                    totals[i]     = 0;

                    Console.Write("\n" + args[i] + ": ");

                    foreach (var item in repositorySearchEngine.SearchEngines.Where(x => x.disabled == false))
                    {
                        ISearch search = ninject.ninjectKernel.Get <ISearch>(new Ninject.Parameters.ConstructorArgument("searchEngine", item));

                        search.Execute(args[i], repositoryParameter.Parameters.Where(x => x.searchEngineID == item.searchEngineID && x.disabled == false), repositoryParameterType.ParameterTypes.Where(x => x.disabled == false));

                        Console.Write(item.name + ": " + search.results + " ");

                        if (search.results > maxResults[i])
                        {
                            searchEngineWinners[i] = item.name;
                            maxResults[i]          = search.results;
                        }
                        totals[i] += search.results;
                    }
                    if (totals[i] > maxTotal)
                    {
                        maxArg   = args[i];
                        maxTotal = totals[i];
                    }
                }
                for (int i = 0; i < args.Length; i++)
                {
                    Console.Write("\n" + searchEngineWinners[i] + " winner: " + args[i]);
                }
                Console.WriteLine("\nTotal winner: " + maxArg);
            }
            else
            {
                Console.WriteLine("\nBad Usage\nUsage: searchfight.exe [args]");
            }
        }
예제 #14
0
        public GetContentTypeResponse Get(Guid id)
        {
            IContentTypeRepository repo      = IoC.Container.Resolve <IContentTypeRepository>();
            GetContentTypeResponse response  = repo.GetById <GetContentTypeResponse>(id.ToString());
            IParameterRepository   paramRepo = IoC.Container.Resolve <IParameterRepository>();

            response.Parameters = paramRepo.GetByParentId(id, ParameterParentType.ContentType);
            return(response);
        }
예제 #15
0
 public Handler(IParameterRepository parameterRepository,
                IScriptRepository scriptRepository,
                ITranslationService translationService,
                IMapper mapper)
 {
     _parameterRepository = parameterRepository;
     _scriptRepository    = scriptRepository;
     _translationService  = translationService;
     _mapper = mapper;
 }
예제 #16
0
 public WorkflowLogic(IWorkflowQueueRepository workflowQueueRepository, IRunnedWorkflowRepository runnedWorkflowRepository,
                      IRunnedWorkflowStepRepository runnedWorkflowStepRepository, IRunnedTaskRepository runnedTaskRepository,
                      IRunnedNextWorkflowStepRepository runnedNextWorkflowStepRepository, IParameterRepository parameterRepository)
 {
     _workflowQueueRepository = workflowQueueRepository;
     _runnedWorkflowRepository = runnedWorkflowRepository;
     _runnedWorkflowStepRepository = runnedWorkflowStepRepository;
     _runnedTaskRepository = runnedTaskRepository;
     _runnedNextWorkflowStepRepository = runnedNextWorkflowStepRepository;
     _parameterRepository = parameterRepository;
 }
예제 #17
0
 internal CalculateFunction(
     IScriptRepository scriptRepository       = null,
     IParameterRepository parameterRepository = null,
     bool useContainer      = false,
     ICalculator calculator = null) : this()
 {
     _scriptRepository    = scriptRepository;
     _parameterRepository = parameterRepository;
     _useContainer        = useContainer;
     Calculator           = calculator;
 }
 public ScriptInterpreterUnitOfWork(
     ScriptInterpreterDbContext context,
     IScriptRepository scriptRepository,
     IParameterRepository parameterRepository,
     ITagRepository tagRepository)
 {
     _context   = context ?? throw new ArgumentNullException(nameof(context));
     Scripts    = scriptRepository ?? throw new ArgumentNullException(nameof(scriptRepository));
     Parameters = parameterRepository ?? throw new ArgumentNullException(nameof(parameterRepository));
     Tags       = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
 }
예제 #19
0
 public FiguresController(IHostingEnvironment host,
                          IParameterRepository parameterRepository,
                          IScriptInterpreterUnitOfWork unitOfWork,
                          IMapper mapper,
                          IOptionsSnapshot <FigureSettings> options)
 {
     _host = host;
     _parameterRepository = parameterRepository;
     _unitOfWork          = unitOfWork;
     _mapper        = mapper;
     _photoSettings = options.Value;
 }
예제 #20
0
 public ThuTucHanhChinhService(
     IDuongDiQuyTrinhRepository duongDiQuyTrinhRepository,
     IThuTucHanhChinhBoRepository thuTucHanhChinhRepository,
     ILinhVucRepository linhVucRepository,
     IThuTucHanhChinhRepository thuTucHanhChinhRepositories,
     IParameterRepository parameterRepository)
 {
     _duongDiQuyTrinhRepository   = duongDiQuyTrinhRepository;
     _thuTucHanhChinhRepository   = thuTucHanhChinhRepository;
     _linhVucRepository           = linhVucRepository;
     _thuTucHanhChinhRepositories = thuTucHanhChinhRepositories;
 }
        public ProductController(IProductRepository productRepo, IKlantRepository klantRepo, IKlantLoginRepository klantLoginsRepo
                                 , IOnlineBestelLijnRepository onlineBestelLijn, IParameterRepository parameterRepo, IStringLocalizer <ProductController> localizer)
        {
            this._onlineBestelLijnRepo = onlineBestelLijn;

            this._productRepo     = productRepo;
            this._klantRepo       = klantRepo;
            this._klantLoginsRepo = klantLoginsRepo;
            this._parameterRepo   = parameterRepo;
            this._localizer       = localizer;
            //Test commit
        }
예제 #22
0
 public MallController(ICompositeViewEngine viewEngine, IConfiguration configuration, IMediaRepository MediaRepository, IParameterRepository ParameterRepository, IProductRepository ProductRepository, IMemberRepository MemberRepository)
 {
     _viewEngine = viewEngine;
     IMR         = MediaRepository;
     IMR.constr  = configuration.GetConnectionString("SqlConn");
     IPR         = ParameterRepository;
     IPR.constr  = configuration.GetConnectionString("SqlConn");
     IPRR        = ProductRepository;
     IPRR.constr = configuration.GetConnectionString("SqlConn");
     IMER        = MemberRepository;
     IMER.constr = configuration.GetConnectionString("SqlConn");
 }
예제 #23
0
        public ModelController()
        {
            //If you want to use Generic Repository with Unit of work
            repository = new GenericRepository <Model>(unitOfWork);

            //If you want to use Specific Repository with Unit of work
            groupRepository            = new GroupRepository(unitOfWork);
            alarmDescriptionRepository = new AlarmDescriptionRepository(unitOfWork);
            partRepository             = new PartRepository(unitOfWork);
            parameterRepository        = new ParameterRepository(unitOfWork);
            alarmRepository            = new AlarmRepository(unitOfWork);
        }
예제 #24
0
        public DetailsViewModel(INavigation nav)
        {
            _navigation          = nav;
            _parameterA          = new Parameter();
            _parameterA.Id       = 1;
            _parameterB          = new Parameter();
            _parameterB.Id       = 2;
            _parameterRepository = new ParameterRepository();

            UpdateParameterCommand = new Command(async() => await UpdateParameter());

            FetchParameterDetails();
        }
예제 #25
0
 public Handler(
     IScriptRepository scriptRepository,
     IParameterRepository parameterRepository,
     IScriptInterpreterUnitOfWork unitOfWork,
     IScriptMappingProfile scriptMappingProfile,
     IDateTime dateTime)
 {
     _scriptRepository     = scriptRepository;
     _parameterRepository  = parameterRepository;
     _unitOfWork           = unitOfWork;
     _scriptMappingProfile = scriptMappingProfile;
     _dateTime             = dateTime;
 }
예제 #26
0
 public CartController(IConfiguration configuration, IMemberRepository MemberRepository, IProductRepository ProductRepository, IParameterRepository ParameterRepository, IOrderRepository OrderRepository, IEmailService EmailService, IEmailConfiguration EmailConfiguration)
 {
     IMER        = MemberRepository;
     IMER.constr = configuration.GetConnectionString("SqlConn");
     IPRR        = ProductRepository;
     IPRR.constr = configuration.GetConnectionString("SqlConn");
     IPR         = ParameterRepository;
     IPR.constr  = configuration.GetConnectionString("SqlConn");
     IOR         = OrderRepository;
     IOR.constr  = configuration.GetConnectionString("SqlConn");
     config      = configuration;
     IES         = EmailService;
     IEC         = EmailConfiguration;
 }
예제 #27
0
 public QuanTriService(
     ILinhVucRepository linhVucRepository,
     IParameterRepository parameterRepository,
     IDMCapDonViRepository dmCapDonViRepository,
     IDMDonViRepository dmDonViRepository,
     ITTHCDonViMappingRepository tthcDonViMapRepository,
     IDMHoSoKemTheoRepository hoSoKemTheoMapRepository)
 {
     _parameterRepository      = parameterRepository;
     _linhVucRepository        = linhVucRepository;
     _dmCapDonViRepository     = dmCapDonViRepository;
     _tthcDonViMapRepository   = tthcDonViMapRepository;
     _dmDonViRepository        = dmDonViRepository;
     _hoSoKemTheoMapRepository = hoSoKemTheoMapRepository;
 }
예제 #28
0
        private IEnumerable <IParameter> GetParameters(SI.Script scriptData, IParameterRepository parameterRepository)
        {
            var parametersData = parameterRepository.GetAllParametersForScriptAsync(scriptData.Id).Result;

            foreach (var parameter in parametersData)
            {
                yield return(new SIP.Parameter()
                {
                    Number = parameter.Number,
                    Name = parameter.Name,
                    Value = parameter.Value,
                    VisibilityValidator = parameter.VisibilityValidator,
                    Context = (SIP.ParameterOptions)parameter.Context
                });
            }
        }
        private void UpdateParameters(Guid contentId, IList <Parameter> parameters, IUnitOfWork uow)
        {
            IParameterRepository paramRepo     = IoC.Container.Resolve <IParameterRepository>(uow);
            IList <Parameter>    currentParams = paramRepo.GetByParentId(contentId, ParameterParentType.ContentType);

            foreach (Parameter param in currentParams)
            {
                if (parameters.Any(item => item.Id == param.Id))
                {
                    continue;
                }
                paramRepo.Delete(param.Id.ToString());
            }

            foreach (Parameter param in currentParams)
            {
                if (!parameters.Any(item => item.Id == param.Id))
                {
                    continue;
                }
                Parameter modifiedParam = parameters.FirstOrDefault(item => item.Id == param.Id);
                param.UpdateFrom(modifiedParam);
                paramRepo.Update(param);
            }

            foreach (Parameter param in parameters)
            {
                if (currentParams.Any(item => item.Id == param.Id))
                {
                    continue;
                }
                //if (param.Id != null && param.Id != Guid.Empty) { continue; }
                Parameter newParam = new Parameter();
                newParam.CreateFrom(param);
                newParam.ParentType = ParameterParentType.ContentType;
                newParam.ParentId   = contentId;
                paramRepo.Add(newParam);
            }
        }
예제 #30
0
 public ParameterService(IParameterRepository repo)
 {
     this.repo = repo;
 }
 public AdvertisementRepository(EscortServicesEntities context, IParameterRepository parameterRepository)
     : base(context)
 {
     _parameterRepository = parameterRepository;
 }
예제 #32
0
 public ParameterController(IConfiguration configuration, IParameterRepository ParameterRepository)
 {
     IAR        = ParameterRepository;
     IAR.constr = configuration.GetConnectionString("SqlConn");
 }
예제 #33
0
 public WidgetRepository(IParameterRepository parameterrepository)
 {
     _parameterrepository = parameterrepository;
 }
예제 #34
0
 public ParameterController(IParameterRepository parameterRepository)
 {
     this.parameterRepository = parameterRepository;
 }
 public ParameterManageController(IParameterRepository parameterRepository)
 {
     ParameterRepository = parameterRepository;
 }