/// <summary> /// Updates the tree view to reflect the changes in the specified <see cref="ConfigurationObjectChangeSet" />. /// </summary> /// <param name="changeSet">The <see cref="ConfigurationObjectChangeSet" />.</param> public void UpdateTreeView(ConfigurationObjectChangeSet changeSet) { BeginUpdate(); foreach (ConfigurationObjectTag tag in changeSet.AddedObjects) { HandleAdded(tag); } foreach (ConfigurationObjectTag tag in changeSet.ModifiedObjects) { HandleModified(tag); } foreach (ConfigurationObjectTag tag in changeSet.RemovedObjects) { HandleRemoved(tag); } EndUpdate(); }
private void OnConfigurationObjectsChanged(ConfigurationObjectChangeSet changeSet) { ConfigurationChangeSetEventArgs eventArgs = new ConfigurationChangeSetEventArgs(changeSet); ConfigurationObjectsChanged?.Invoke(this, eventArgs); }
/// <summary> /// Initializes a new instance of the <see cref="ConfigurationChangeSetEventArgs" /> class. /// </summary> /// <param name="changeSet">The <see cref="ConfigurationObjectChangeSet" />.</param> /// <exception cref="ArgumentNullException"><paramref name="changeSet" /> is null.</exception> public ConfigurationChangeSetEventArgs(ConfigurationObjectChangeSet changeSet) { ChangeSet = changeSet ?? throw new ArgumentNullException(nameof(changeSet)); }
/// <summary> /// Loads all configuration objects from the database. /// </summary> public void Load() { ConfigurationObjectChangeSet loadedObjects = _enterpriseTestController.LoadConfigurationObjects(); OnConfigurationObjectsChanged(loadedObjects); }