/// <summary> /// Attach the model to the view. /// </summary> /// <param name="model">The model.</param> /// <param name="view">The view.</param> /// <param name="explorerPresenter">An <see cref="ExplorerPresenter" /> instance.</param> public override void Attach(object model, object view, ExplorerPresenter explorerPresenter) { if (view == null) { throw new ArgumentNullException(nameof(view)); } if (explorerPresenter == null) { throw new ArgumentNullException(nameof(explorerPresenter)); } this.model = model as IModel; this.view = view as PropertyMultiModelView; base.view = view as IPropertyView; this.presenter = explorerPresenter; if (this.model != null && !(this.model is IModel)) { throw new ArgumentException($"The model must be an IModel instance"); } if (this.view == null) { throw new ArgumentException($"The view must be an IPropertyView instance"); } RefreshView(this.model); presenter.CommandHistory.ModelChanged += OnModelChanged; this.view.PropertyChanged += OnViewChanged; }