-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Proposal for System.Runtime.CompilerServices.ICastable .NET Core public API #23727
Comments
@shrah can you provide more info what is the interface for, how is it used, etc.? See example in API review process |
What's the value of ICastable to developers outside of interop? As I understand it right now, it's very dangerous and fragile and only fulfills a very specific purpose. If you just have layering problems for System.Private.Interop, we can probably work out something more scoped than making ICastable public. |
ICastable is an interface used by the runtime to support dynamic interface casting. Implementing this interface on a type will allow the type to support interfaces (for the purposes of casting and interface dispatch) that do not appear in its interface map. An example of ICastable is here __ComObject . @morganbr that is a good question. I don't have any other use cases for ICastable outside of interop right now. @jkotas , can you think of any other use cases of ICastable outside of interop? |
Yes, this is primarily to support interop. |
For ProjectN, we have invented CastableObject that fixed some of the issues with ICastable. Would we want to expose the CastableObject instead? |
Closing this issue in lieu of #36654 |
We need the System.Runtime.CompilerServices.ICastable for building the CoreCLR version of System.Private.Interop.
Current Workarounds:
Today we use a hack by publishing the System.Private.ICastable.dll though myget and consume it from CoreRT.
Discussion:
The ideal solution would be to expose it as a public .NET Core API possibly in System.Runtime.InteropServices.dll
The text was updated successfully, but these errors were encountered: