M
Michael Maes
Hello,
If you want to have the Assembly who is Calling a certain Method in another one, you use 'GetCallingAssembly'.
So far no problem.
However:
If you have the following Architecture:
Library-Assembly
myLibrary (Root NS)
Class BaseClass
Methods X, Y, Z
End Class
Class ChildOne
Inherits BaseClass
Methods A, B, C
End Class
Class ChildTwo
Inherits BaseClass
Methods D, E, F
End Class
........
Running Project
myProject
References myLibrary
Calls a method in myLibrary
If you Determine the 'GetCallingAssembly' in SubClass ChildOne or SubClass ChildTwo, then you get a refence to 'myProject' which is correct.
If you Determine the 'GetCallingAssembly' in the BaseClass, then you get a refence to 'myLibrary' (which, in a certain way, is also correct). But here I would also like to "have" 'myProject'.
So I thought: Let's be "smart" and have "Me.GetType.Assembly.GetCallingAssembly.GetCallingAssembly" (in the BaseClass), but helas, that still returns 'myLibrary'.
Is there a way to find out who called a method in a Derived Class by the BaseClass?
TIA,
Michael
If you want to have the Assembly who is Calling a certain Method in another one, you use 'GetCallingAssembly'.
So far no problem.
However:
If you have the following Architecture:
Library-Assembly
myLibrary (Root NS)
Class BaseClass
Methods X, Y, Z
End Class
Class ChildOne
Inherits BaseClass
Methods A, B, C
End Class
Class ChildTwo
Inherits BaseClass
Methods D, E, F
End Class
........
Running Project
myProject
References myLibrary
Calls a method in myLibrary
If you Determine the 'GetCallingAssembly' in SubClass ChildOne or SubClass ChildTwo, then you get a refence to 'myProject' which is correct.
If you Determine the 'GetCallingAssembly' in the BaseClass, then you get a refence to 'myLibrary' (which, in a certain way, is also correct). But here I would also like to "have" 'myProject'.
So I thought: Let's be "smart" and have "Me.GetType.Assembly.GetCallingAssembly.GetCallingAssembly" (in the BaseClass), but helas, that still returns 'myLibrary'.
Is there a way to find out who called a method in a Derived Class by the BaseClass?
TIA,
Michael