Exemplo n.º 1
0
        public CityPresenter(ICityView view, Cidade cidade, IUnityContainer container)
        {
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }
            if (cidade == null)
            {
                throw new ArgumentNullException("cidade");
            }
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }

            this._container = container;

            this.SubmitCommand      = new DelegateCommand <object>(this.Submit, this.CanSubmit);
            this.CancelCommand      = new DelegateCommand <object>(this.Cancel);
            this.SearchStateCommand = new DelegateCommand <object>(this.SearchState);

            this.Cidade = cidade;

            this._view = view;
            this._view.SetPresenter(this);

            OnPropertyChanged("Cidade"); // para executar a validação dos dados
        }
 public RootView(IBrandView brandView, ICityView cityView, ICountryView countryView, IGenderView genderView, ISuperstarView superstarView)
 {
     _brandView     = brandView;
     _cityView      = cityView;
     _countryView   = countryView;
     _genderView    = genderView;
     _superstarView = superstarView;
 }