-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Provide support for exposing .NET classes to COM through source generation #83755
Conversation
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsImplement the API defined in #83471 in Ancillary.Interop.
|
…eed in the tests.
src/libraries/System.Runtime.InteropServices/tests/Ancillary.Interop/IComExposedDetails.cs
Show resolved
Hide resolved
...libraries/System.Runtime.InteropServices/tests/Ancillary.Interop/StrategyBasedComWrappers.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComClassGenerator.cs
Show resolved
Hide resolved
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComClassGenerator.cs
Outdated
Show resolved
Hide resolved
…rmation type instead of the user type. This allows the generator to be more incremental as the class-info type now doesn't need the class name (so a class rename will not result in regenerating the syntax for this step).
...libraries/System.Runtime.InteropServices/tests/Ancillary.Interop/IUnknownDerivedAttribute.cs
Outdated
Show resolved
Hide resolved
...libraries/System.Runtime.InteropServices/tests/Ancillary.Interop/IUnknownDerivedAttribute.cs
Outdated
Show resolved
Hide resolved
...libraries/System.Runtime.InteropServices/tests/Ancillary.Interop/ComExposedClassAttribute.cs
Outdated
Show resolved
Hide resolved
...braries/System.Runtime.InteropServices/tests/Ancillary.Interop/GeneratedComClassAttribute.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComClassGenerator.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComClassGenerator.cs
Outdated
Show resolved
Hide resolved
names.Add(iface.ToDisplayString()); | ||
} | ||
} | ||
return new ComClassInfo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to warn / bail if there are no interfaces with GeneratedComInterface
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's still a valid scenario, but I could see us adding a warning for it. I'll file a follow-up issue for that.
{ | ||
} | ||
|
||
public unsafe class GeneratedComClassTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan to add some of the more complex cases (at least the ones in the ComObjectRedux repo) in a follow-up change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll add those in in a follow-up change.
Uncategorized failures were #84010 |
Implement the API defined in #83471 in Ancillary.Interop and add a source generator in ComInterfaceGenerator to provide the expected behavior.