Conversation
Codecov Report
@@ Coverage Diff @@
## master #791 +/- ##
==================================================
+ Coverage 27.70557% 27.9726% +0.26703%
==================================================
Files 1061 1062 +1
Lines 291667 292311 +644
Branches 38514 38514
==================================================
+ Hits 80808 81767 +959
+ Misses 206797 206487 -310
+ Partials 4062 4057 -5
|
5cf50a5 to
a767cd4
Compare
JeremyKuhne
left a comment
There was a problem hiding this comment.
Thanks! I think we should consider making these enums in the future as I believe that would reduce the size of the assembly (see my inline comment).
There was a problem hiding this comment.
This code makes me think it might be better to change all of these consts into enums and use reflection to get the name. I think overall we'd be reducing the size of the assembly by something measurable.
There was a problem hiding this comment.
@zsd4yr I like this, and it wouldn't be too hard to do that in this PR.
One question - currently some window messages are commented out. Previously they'd return the hex value of the id in the Decode method, but now a string name would be returned. This actually seems quite good, right - is this a good change?
There was a problem hiding this comment.
@hughbe, I am unfamiliar with the change you're asking about. Could you give me an example and let me know who the author is in the git blame? Has this been the case since we wen't open? If so, I can followup by "git blaming" in our previous system to discern why the change was made.
There was a problem hiding this comment.
Ignore me - I'm confused. Essentially I think @JeremyKuhne said that we should put this in an enum them use Enum.GetName(typeof(Interop.WindowMessages), id) in MessageDecoder. I pointed out that there isn't exact a one-to-one mapping between MessageDecoder and the values defined in Interop.WindowMessages or Interop.EditMessages
There was a problem hiding this comment.
we should put this in an enum them use Enum.GetName(typeof(Interop.WindowMessages), id)
Yes, that is what I'm saying. It should cut the assembly size down. It's also nice when debugging to be able to see the name.
there isn't exact a one-to-one mapping
What doesn't match? We can update the names or special case.
e5edf7b to
6aa4d18
Compare
|
Rebased - sorry for tall the force pushing :( Seems like there's been loads of PRs that sort of overlap but don't really that get in the way! |
6aa4d18 to
6b9cf6d
Compare
....Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/COM2PropertyDescriptor.cs
Outdated
Show resolved
Hide resolved
...m.Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/COM2TypeInfoProcessor.cs
Outdated
Show resolved
Hide resolved
|
@hughbe would you mind adding a description with a summary of the changes you intend here? Do we want to further separate out Native Methods and Unsafe Native Methods? |
Yes! But thats going to be a gradual cleanup process |
To make them usable in tests and avoid duplication
|
Rebased... again :(( |
bd6a20c to
f681c43
Compare
As part the dotnet#791 refactor EM_* messages got mixed with RTB.EM_* messages that led to an issue described in dotnet#994. * Restore correct EM_ messagest * Separate RTB.EM_ messages * Update RichTextBox to use RTB.EM_* messages Fixes dotnet#994
UnsafeMethods.PtrToStructure/UnsafeMethods.StructureToPtr/UnsafeMethods.SizeOfas just call the equivalentMarshalmethod.PtrToStructurestructCache.GetStructgeneric to avoid so much castingWM_*andEM_*messages to avoid code duplication and extract them from the massiveNativeMethodsetc files and to match interop guidelinesMessageclass, especiallyMessage.ToString