/// <summary> /// Initializes a new instance of the <see cref="DatasetDetailModel"/> class. /// </summary> /// <param name="context">The context that is used to execute actions on the UI thread.</param> /// <param name="progressTracker">The object that handles the progress notifications for the applications.</param> /// <param name="project">The project that holds all the data.</param> /// <param name="dataset">The dataset.</param> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="context"/> is <see langword="null" />. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="progressTracker"/> is <see langword="null" />. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="project"/> is <see langword="null" />. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="dataset"/> is <see langword="null" />. /// </exception> public DatasetDetailModel(IContextAware context, ITrackSteppingProgress progressTracker, ILinkToProjects project, DatasetFacade dataset) : base(context) { { Lokad.Enforce.Argument(() => progressTracker); Lokad.Enforce.Argument(() => project); Lokad.Enforce.Argument(() => dataset); } m_ProgressTracker = progressTracker; m_Project = project; m_Dataset = dataset; m_Dataset.OnNameChanged += (s, e) => { Notify(() => Name); Notify(() => DisplayName); }; m_Dataset.OnSummaryChanged += (s, e) => Notify(() => Summary); m_Dataset.OnProgressOfCurrentAction += HandleDatasetProgress; m_Dataset.OnDeactivated += (s, e) => { Notify(() => IsActivated); Notify(() => Endpoint); RaiseOnDeactivated(); }; }
/// <summary> /// Initializes a new instance of the <see cref="DatasetDetailModel"/> class. /// </summary> /// <param name="context">The context that is used to execute actions on the UI thread.</param> /// <param name="progressTracker">The object that handles the progress notifications for the applications.</param> /// <param name="project">The project that holds all the data.</param> /// <param name="dataset">The dataset.</param> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="context"/> is <see langword="null" />. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="progressTracker"/> is <see langword="null" />. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="project"/> is <see langword="null" />. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="dataset"/> is <see langword="null" />. /// </exception> public DatasetDetailModel(IContextAware context, ITrackSteppingProgress progressTracker, ILinkToProjects project, DatasetFacade dataset) : base(context) { { Lokad.Enforce.Argument(() => progressTracker); Lokad.Enforce.Argument(() => project); Lokad.Enforce.Argument(() => dataset); } m_ProgressTracker = progressTracker; m_Project = project; m_Dataset = dataset; m_Dataset.OnNameChanged += (s, e) => { Notify(() => Name); Notify(() => DisplayName); }; m_Dataset.OnSummaryChanged += (s, e) => Notify(() => Summary); m_Dataset.OnProgressOfCurrentAction += HandleDatasetProgress; m_Dataset.OnDeactivated += (s, e) => { Notify(() => IsActivated); Notify(() => Endpoint); RaiseOnDeactivated(); }; }