public async Task <List <EntityReference> > GetAllReferences(int id)
        {
            List <EntityReference> entityReferences = new List <EntityReference>();

            entityReferences.AddRange(AcademiaRepository.Where(x => x.CompensationMatrixId == id)
                                      .ToList()
                                      .Select(x => new EntityReference()
            {
                Id = entityReferences.Count + 1, Name = x.Name, Code = x.Code, Type = "Academia"
            }));

            entityReferences.AddRange(SkillsRepository.Where(x => x.CompensationMatrixId == id)
                                      .ToList()
                                      .Select(x => new EntityReference()
            {
                Id = entityReferences.Count + 1, Name = x.Name, Code = x.Code, Type = "Skill"
            }));

            entityReferences.AddRange(FunctionsRepository.Where(x => x.CompensationMatrixId == id)
                                      .ToList()
                                      .Select(x => new EntityReference()
            {
                Id = entityReferences.Count + 1, Name = x.Name, Code = x.Code, Type = "Function"
            }));

            entityReferences.AddRange(TasksRepository.Where(x => x.CompensationMatrixId == id)
                                      .ToList()
                                      .Select(x => new EntityReference()
            {
                Id = entityReferences.Count + 1, Name = x.Name, Code = x.Code, Type = "Task"
            }));

            entityReferences.AddRange(JobsRepository.Where(x => x.CompensationMatrixId == id)
                                      .ToList()
                                      .Select(x => new EntityReference()
            {
                Id = entityReferences.Count + 1, Name = x.Name, Code = x.Code, Type = "Job"
            }));

            return(entityReferences);
        }
 public ParserA(FunctionsRepository functions, IVariablesHeap vars, IFunctionRuntimeControl runtimeControl)
 {
     this.functions      = functions ?? throw new ArgumentNullException("Interpreter box can't be null!");
     this.vars           = vars ?? throw new ArgumentNullException("Vars can't be null!");
     this.runtimeControl = runtimeControl ?? throw new ArgumentNullException("Runtime control can't be null!");
 }
 public LexerB(FunctionsRepository interpreter)
 {
     this.interpreter = interpreter ?? throw new ArgumentNullException("InterpreterBox can't be null!");
 }
Exemple #4
0
 internal ParserFactory(IInterpreterLoggerWriter logger, FunctionsRepository functions, ScriptEnvironment scriptEnvironment)
 {
     this.functions         = functions ?? throw new ArgumentNullException("Functions repository can't be null!");
     this.scriptEnvironment = scriptEnvironment ?? throw new ArgumentNullException("Script environment can't be null!");
     this.logger            = logger ?? throw new ArgumentNullException("Logger can't be null!");
 }