コード例 #1
0
        /// <inheritdoc />
        public void Dispose()
        {
            _disposed = true;

            foreach (DataBindingModifier <TLayerProperty, TProperty> dataBindingModifier in Modifiers)
            {
                dataBindingModifier.Dispose();
            }

            SourcePath?.Dispose();
        }
コード例 #2
0
        /// <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;
        }