コード例 #1
0
        public Simulator(IAction mainAction, AbstractWindowsEnvironment environmentInterface)
        {
            if (mainAction == null)
                throw new ArgumentNullException(nameof(mainAction));
            if (environmentInterface == null)
                throw new ArgumentNullException(nameof(environmentInterface));


            this.mainAction = mainAction;
            this.environmentInterface = environmentInterface;

            provider = new StandardInteractionProvider(this, environmentInterface, out cancelCallback);
        }
コード例 #2
0
        public Simulator(SimulatorConfiguration config, AbstractWindowsEnvironment environmentInterface)
        {
            if (config == null)
                throw new ArgumentNullException(nameof(config));
            if (environmentInterface == null)
                throw new ArgumentNullException(nameof(environmentInterface));
            if (config.MainAction == null)
                throw new ArgumentException("There must be an action specified in the SimulatorConfiguration.");
            

            this.config = config;
            this.environmentInterface = environmentInterface;

            provider = new StandardInteractionProvider(environmentInterface, out cancelCallback);
        }