Exemplo n.º 1
0
        /// <summary>
        /// Get WITS worker
        /// </summary>
        /// <param name="level">WITS level</param>
        /// <param name="postProcessors"></param>
        /// <returns>Returns worker</returns>
        public ISimpleWorker GetWitsWorker(WitsLevel level, IEnumerable <IPostProcessing> postProcessors = null)
        {
            switch (level)
            {
            case WitsLevel.Level0:
                return(new WitsLevel0Worker(postProcessors));

            default:
                throw new Exception("This Wits level not supported: " + level.ToString());
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Get strategy
        /// </summary>
        /// <param name="level">Wits level</param>
        /// <param name="client">Client</param>
        /// <returns>Returns strategy</returns>
        public IWitsStrategy GetStartegy(WitsLevel level, IClient client)
        {
            switch (level)
            {
            case WitsLevel.Level0:
                return(new WitsLevel0Strategy(client));

            default:
                var ex = new NotImplementedException(level.ToString() + " not implemented");
                _logger.Log(LogLevel.Error, ex);
                throw ex;
            }
        }