anonymous functions

LeadMagnet

New member
Joined
Aug 16, 2011
Messages
2
Programming Experience
10+
I have an unusual problem! ;)

I have a windows service (written in VB.Net) running on various machines that has a timer firing every minute. When the timer fires, I want to have this service call unknown methods from unknown DLL's.

For example:

The service is installed. One minute goes buy and the timer fires. The "timer1_tick" event calls "Run_External_Programs". "Run_External_Programs" reads the app.config file and finds an entry for "DoBackup" in a DLL called "MyNamespace.My_Class".

VB.NET:
Namespace MyNamespace
    Public Class My_Class
        Public Shared Sub DoBackup()
            'do something weird and wonderful!
        End Sub
    End Class
End Namespace

Problem is, I have no clue how to call an unknown (anonymous?) method like this.

Any idea's?
 
Yup, on the right track with Reflections. I can list all Classes within an Assembly, and then there Methods. Still working on a way to load "unknown" assemblies. Getting there. :D
 
Back
Top