dotnet / dotnet/project-system

Fire change events for "synthetic" properties

Open
#6,816 3 comments 0 reactions 0 assignees View on GitHub
Feature-Project-Properties-Designer Feature-Rules/Properties Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

The new property pages use a number of "synthetic" properties, that is, properties that can appear in the UI but are not stored in the project file. Instead, their values are dependent on other properties, and attempts to set the synthetic property generally update other properties instead (see the `PackageLicenseKindValueProvider` type for an example).

We do this by leveraging the `IInterceptingPropertyValueProvider` types (and the related `InterceptedProjectProperties` and `InterceptedProjectPropertiesProviderBase` types).

One problem with this approach is that when the value of the synthetic property changes (either because it is changed directly, or the underlying "real" properties change) we have no way of firing the appropriate events on `IProjectProperties`. We need to design a mechanism such that the `IInterceptingPropertyValueProvider` can ask the underlying `InterceptedProjectPropertiesProviderBase` to raise events when the synthetic properties change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.