I'm new to System.Reflection and I've stumbled on the following.
I am using a third party executable, A, that has a custom interpreter engine class B that allows me to build simple 'tasks' that run on a mobile device. 'A' also has a class C that, when using A's default interface, shows a list of 'tasks' that are running within the interpreted runtime environment.
'A' also allows me to write custom functions embedded in .Net assemblies that can be loaded at runtime to extend the capabilities of interpreter B. Let's call my assembly D.
In execution, 'A' invokes 'B' to process my task that uses 'D'. Due to some issues with this runtime system, I sometimes get multiple copies of my task running that causes all sorts of problems.
I'd like to somehow get access to C from inside my assembly D so that I can find out what tasks are running and take some action based on that. For example, if I've already got a certain task running, I don't need to start another one, I want to resume the existing one.
The vendor is unhelpful in explaining (as in, not forthcoming at all) as to how I might approach this, so I figured I could probably figure it out myself. I've gotten as far as being able to get a reference to the Parent assembly (System.Reflection.Assembly.GetCallingAssembly()), but that only gets me to B. In order to get a reference to C, I need to back up one more level in the chain to find a reference to A, such that I can instantiate an instance of C to get at the list of running tasks.
This sounds an awful lot like an operating system scheduler, and in fact it's startlingly similar, however, the application is a database centric mobile application that allows non-programmers to quickly and easily deploy mobile apps. This gives rise, I'm sure, to the vendor being reluctant to share with me how this might be done, support issues and all that.
Does this make any sense at all?