Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Missing Types to Intrinsic TypeDescriptor table #1936

Closed
wants to merge 1 commit into from

Conversation

zsd4yr
Copy link
Member

@zsd4yr zsd4yr commented Sep 18, 2019

There is an issue in the design repo where certain types did not have the EditorAttribute on them as they did in .NET FX. This is intentional as many of these types were moved down to CoreFX and are fascaded, example: System.Drawing.Image @KlausLoeffelmann first reported this and @DustinCampbell expanded this to include other types.

upon further inspection, a great many types are missing.

  • add test for existing mappings in the table like IList -> CollectionEditor -- currently everything in this pr
  • add missing types
  • evaluate what to do about types which are mapped but are not in winforms yet (StringArrayEditor, BinaryEditor)
  • add tests for missing types
Microsoft Reviewers: Open in CodeFlow

TypeDescriptor.AddEditorTable(typeof(UITypeEditor), UITypeEditor.s_intrinsicEditors);

IList list = new List<int>();
var editor = TypeDescriptor.GetEditor(typeof(IList), typeof(UITypeEditor));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work for other types, for example for non-interface types?
Does this work for the instance TypeDescriptor.GetEditor(list...)

Copy link
Contributor

@weltkante weltkante Sep 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes these cases should be added to the tests, most callers won't ask for the editor on the interface type but either pass a concrete class type or an actual instance implementing the interface.

@RussKie
Copy link
Member

RussKie commented Sep 19, 2019

#1115 contains the list of missing editors

@Tanya-Solyanik
Copy link
Member

Tanya-Solyanik commented Sep 19, 2019

@zsd4yr
Copy link
Member Author

zsd4yr commented Sep 19, 2019

@zsd4yr zsd4yr closed this Oct 18, 2019
@zsd4yr zsd4yr deleted the dev/zadanz/uitypeedtiors branch October 21, 2019 18:26
@ghost ghost added the draft draft PR label Sep 11, 2021
@dotnet dotnet locked as resolved and limited conversation to collaborators Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
draft draft PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants