/// <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;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create the instance of the <see cref="StartButtonModel"/>
 /// </summary>
 public StartButtonModelFactory()
 {
     Model = new StartButtonModel();
 }
Exemplo n.º 3
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));
 }