/// <summary> /// Исключения: /// System.ArgumentNullException: /// Параметр model имеет значение null. /// </summary> /// <param name="model"></param> public ItemViewModel(IItemModelAdapter <DataModelType> model, IDataViewModelCreator <DataModelType, DataViewModelType> creator) { if (model == null) { throw new ArgumentNullException("model can't be null"); } _model = model; if (creator == null) { throw new ArgumentNullException("creator can't be null"); } DataViewModel = creator.CreateDataViewModel(_model.DataModel); _model.Updated += OnUpdate; }
public ItemViewModelTests() { creator = new EventDataViewModelCreator();; }