Esempio n. 1
0
        public static JarvisEngine Instance(IInteractor interactor, IDecisionTaker decisionTaker)
        {
            if (interactor == null)
            {
                throw new ArgumentNullException($"Interactor module cannot be null.");
            }

            if (decisionTaker == null)
            {
                throw new ArgumentNullException($"Decision Taker module cannot be null.");
            }

            return(new JarvisEngine(interactor, decisionTaker));
        }
Esempio n. 2
0
 private JarvisEngine(IInteractor interactor, IDecisionTaker decisionTaker)
 {
     this._interactor      = interactor;
     this._decisionTaker   = decisionTaker;
     this._voiceController = new VoiceController(interactor);
 }