Runtime: Add missing Designer support attributes to the FileSystemWatcher and BackgroundWorker component

Created on 15 Jul 2020  路  8Comments  路  Source: dotnet/runtime

Description

Several Attributes providing Designer support for the FileSystemWatcher and BackgroundWorker components are missing for the class itself but also for some of its properties and events which results in missing Designer support.

Configuration

*These affects all .NET Core versions on all OS.

Regression?

This is a regression from NetFx.

Other information

From FileSystemWatcher

  • The DescriptionAttribute is missing for the class definition.
  • The DefaultEventAttribute ("Changed") is missing for the class definition.
  • The BrowsableAttribute (false) is missing for the Site property.
  • The BrowsableAttribute (false) is missing for the Error property.
  • The BrowsableAttribute (false) is missing for the SynchronizingObject property.
  • The DefaultValueAttribute is missing for the SynchronizingObject property.
  • The DescriptionAttribute is missing for the SynchronizingObject property.
  • The BrowsableAttribute (false) is missing for the InternalBufferSize property.
  • The DefaultValueAttribute is missing for the for the InternalBufferSize property.
  • The DescriptionAttribute is missing for the for the Path property.
  • The DefaultValueAttribute is missing for the for the Path property.
  • The EditorAttribute is missing for the for the Path property.
  • The TypeConverterAttribute is missing for the for the Path property.
  • The SettingBindableAttribute is missing for the for the Path property.
  • The DescriptionAttribute is missing for the Changed event.
  • The DescriptionAttribute is missing for the Created event.
  • The DesciptionAttribute is missing for the Deleted event.
  • The DesciptionAttribute is missing for the Renamed event.
  • The DescriptionAttribute is missing for the for the Filter property.
  • The DefaultValueAttribute is missing for the for the Filter property.
  • The SettingsBindableAttribute is missing for the for the Filter property.
  • The DescriptionAttribute is missing for the EnableRaisingEvents property.
  • The DefaultValueAttribute is missing for the for the EnableRaisingEvents property.
  • The DescriptionAttribute is missing for the for the NotifyFilter property.
  • The DefaultValueAttribute is missing for the for the NotifyFilter property.
  • The DescriptionAttribute is missing for the IncludeSubdirectories property.
  • The DefaultValueAttribute is missing for the for the IncludeSubdirectories property.

From BackgroundWorker

  • The DescriptionAttribute is missing for the class definition.
  • The DefaultEventAttribute ("DoWork") is missing for the class definition.
  • The BrowsableAttribute (false) is missing for the CancellationPending property.
  • The DescriptionAttribute is missing for the for the CancellationPending property.
  • The CategoryAttribute is missing for DoWork event.
  • The DescriptionAttribute is missing for the DoWork event.
  • The BrowsableAttribute (false) is missing for the IsBusy property.
  • The DescriptionAttribute is missing for the for the IsBusy property.
  • The CategoryAttribute is missing for ProgressChanged event.
  • The DescriptionAttribute is missing for the ProgressChanged event.
  • The CategoryAttribute is missing for RunWorkerCompleted event.
  • The DescriptionAttribute is missing for the RunWorkerCompleted event.
  • The CategoryProperty is missing for the WorkerReportsProgress property.
  • The DescriptionAttribute is missing for the for the WorkerReportsProgress property.
  • The DefaultValue is missing for the for the WorkerReportsProgress property.
  • The CategoryProperty is missing for the WorkerSupportsCancellation property.
  • The DescriptionAttribute is missing for the for the WorkerSupportsCancellation property.
  • The DefaultValue is missing for the for the WorkerSupportsCancellation property.
area-System.ComponentModel enhancement

Most helpful comment

bloating runtime metadata for the designer time only scenario

Does this really add much more runtime metadata bloat over, say, nullability attributes? :smile:

All 8 comments

Do we want/need to enable designer support for non-visual components? AFAIK these attributes will cause a dependency on System.ComponentModel which might be overkill. I'm not sure we care about File System Watcher in particular, but I'm more curious where we draw the line and why.

@danmosemsft brought up the same things are missing from BackgroundWorker.

@safern has been looking at similar things missing in https://github.com/dotnet/runtime/issues/31428

Do we want/need to enable designer support for non-visual components? AFAIK these attributes will cause a dependency on System.ComponentModel which might be overkill.

Most of these attributes have already been pushed down low enough to avoid unnecessary dependencies. So it's more a question of bloating runtime metadata for the designer time only scenario.

Tagging subscribers to this area: @safern
See info in area-owners.md if you want to be subscribed.

So it's more a question of bloating runtime metadata for the designer time only scenario.

For EventLog, the attributes are already included. So, I think being consistent would be the right think to do?

bloating runtime metadata for the designer time only scenario

Does this really add much more runtime metadata bloat over, say, nullability attributes? :smile:

@KlausLoeffelmann @DustinCampbell is the impact only visual (description/titles in property grid)? If so I think this is not a must have for 5.0 so I will move to Future (although we'd accept a PR if offered))..?

Editor attribute was fixed by @safern with https://github.com/dotnet/runtime/commit/3130ac980c97c0664eddb04411f8f765a9f908d8

@KlausLoeffelmann @DustinCampbell can you address @danmosemsft's question?

Moving to 6.0.0. If you feel this can meet the 5.0.0 bar please fill in detail as requested.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bencz picture bencz  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments

sahithreddyk picture sahithreddyk  路  3Comments

btecu picture btecu  路  3Comments

jzabroski picture jzabroski  路  3Comments