I have a hierarchy of arbitrary depth types, which at the end implements the IPlugin<T> or IPlugin<T1, T2> interface, which is in a different .dll . You need to understand which types fall into <T> or <T1, T2> . Moreover, the position of types in the original class (or any other hierarchy along the way) may not correspond to their position in the interface.
Example:
// other .dll interface IPlugin<T> {} interface IPlugin<T1, T2> {} // my code class PluginBase<T1, T2>: IPlugin<T2, T1> {} class AnotherClass<T1, T2, T3>: PluginBase<T3, T1> {} class Plugin: AnotherClass<string, int, char> {} From this example, I expect to pull out string and char .
Here is a sample code , but it uses the position of the arguments and does not take into account the type hierarchy.
.dll, one of which has a type that implements theIPlugininterface. My goal is to find out which generic user has “fired” into this interface. In runtime with this, there would be no problems, because there they would be closed at the interface itself, but withcecilyou need to analyze the hierarchy. - CRRRRRRRRASH