/// <summary>
        /// Initialize a <see cref="StartButtonController"/> object
        /// </summary>
        /// <param name="model">an instance of an object that implements <see cref="IStartButtonModel"/></param>
        /// <param name="view">an instance of an object that implements <see cref="IStartButtonView"/></param>
        public StartButtonController(IStartButtonModel model, IStartButtonView view)
        {
            _model = model ?? throw new ArgumentNullException(nameof(model));
            _view  = view ?? throw new ArgumentNullException(nameof(view));

            _view.OnClicked += HandleOnClickedEvent;
        }
示例#2
0
 /// <summary>
 /// Create a start button controller factory
 /// </summary>
 public StartButtonControllerBuilder(IStartButtonModel model, IStartButtonView view)
 {
     this.model = model ?? throw new ArgumentNullException(nameof(model));
     this.view  = view ?? throw new ArgumentNullException(nameof(view));
 }