Ejemplo n.º 1
0
        public void AddThread(Functions function, string threadName)
        {
            switch (function)
            {
            case Functions.Cube:
            {
                DictionaryOfThreads.Add("cube", new Thread(
                                            () => new CubeFunctionProducer(loggerService, threadName).Run(
                                                (point) => loggerService.Info($"Function {point}"))));

                break;
            }

            case Functions.Linear:
            {
                DictionaryOfThreads.Add("linear", new Thread(
                                            () => new LinearFunctionProducer(loggerService, threadName).Run(
                                                (point) => loggerService.Info($"Function {point}"))));

                break;
            }
            }
        }