Binary Compatibility Shim #61328
Unanswered
TonyValenti
asked this question in
Q&A
Replies: 1 comment
-
I imagine implementing something like this would make method lookup very expensive, especially using this approach. I'd probably reverse the attribute, so instead if looks something like this: [MissingMethodHandler(typeof(IDictionaryAdditionalMethods))]
interface IDictionary<TKey, TValue>
{
// ...
} That way you don't have to scan the entire set of loaded assemblies for types that may be annotated that may be targeted for the type you're looking for - you just have to look at the target type's attributes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
RE: #61281
Many times I have heard people say "Such-and-such would be nice, but we can't do it because it would be a binary breaking change".
In the case of the above, is it possible to enhance the .NET runtime so that it can be told about different missing-methods and be provided an alternative?
It would be really nice if there were a way to say "Such and Such method has moved/changed/whatever and, if it is ever called, HERE is an alternative implementation of it".
I would imagine something like this:
Beta Was this translation helpful? Give feedback.
All reactions