/// <inheritdoc /> public void Dispose() { _disposed = true; foreach (DataBindingModifier <TLayerProperty, TProperty> dataBindingModifier in Modifiers) { dataBindingModifier.Dispose(); } SourcePath?.Dispose(); }
/// <summary> /// Updates the source of the data binding /// </summary> /// <param name="path">The path pointing to the source</param> public void UpdateSource(DataModelPath?path) { if (_disposed) { throw new ObjectDisposedException("DirectDataBinding"); } if (path != null && !path.IsValid) { throw new ArtemisCoreException("Cannot update source of data binding to an invalid path"); } SourcePath?.Dispose(); SourcePath = path != null ? new DataModelPath(path) : null; }