public void Evaluate(TclVoiceInterpreter interpreter)
        {
            var commandName = GetType().Name;

            Logger.Info($"Evaluating {commandName} command.");
            EvaluateInternal(interpreter);
            Logger.Info($"{commandName} command evaluated.");
        }
Example #2
0
        /// <summary>
        /// Factory method to create and properly initialize TCL interpreter.
        /// </summary>
        /// <returns>Initialized TCL interpreter</returns>
        public static TclVoiceInterpreter Create(CancellationTokenSource cancellationToken)
        {
            Logger.Info("Creating TCL interpreter.");

            Result result         = null;
            var    tclInterpreter = Interpreter.Create(null, CreateFlags.Default, ref result);

            Logger.Debug("TCL Interpreter created.");

            var interpreter = new TclVoiceInterpreter(tclInterpreter);

            interpreter.StartAsync(cancellationToken);

            Logger.Info("TCL interpreter successfully initialized.");

            return(interpreter);
        }
 protected abstract void EvaluateInternal(TclVoiceInterpreter interpreter);