Re: How can I detect the presense of an optional assembly and call a method within it?



You need more than just the assembly name, you also need the class name that
will be invoked against.

Basically you will need to use Reflection. The idea being that reflection
allows you to dynamically create instances at runtime and invoke method.
Take a look at reflection and see if this helps.

"Gaetan" <someone@xxxxxxxxxxxxx> wrote in message
news:8ugol1pf2fqu9gl55udr43oijp3bqg2afj@xxxxxxxxxx
>I would like to extend the capabilities of my application by calling a user
>method
> residing in a client provided assembly without having to recompile my
> application.
>
> Things would work like this:
>
> 1- Read a configuration file where the client provides the assembly name
> (DLL) and the
> method name.
>
> 2- Detect the existence of the assembly file.
>
> 3- Invoke the client method.
>
> I'm not sure how to handle item #3. I cannot add a reference to the client
> DLL in my
> application since I do not know in advance what the assembly name will be
> nor the method
> name. Can someone provide me a clue on how I should handle it?
>
> Thanks.


.



Relevant Pages

  • Re: Access VB6 Modules Methods in C#
    ... exposes the methods that you want to expose, ... > i just want to ask how to access VB6 Module's methods> in c#. i already converted the dll into interop assembly> but i cannot invoke Module's methods thru reflection. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Need for programmatic config:timeToleranceInSeconds, MaxReques
    ... using reflection, but only in principle. ... Our client group attempted this without success. ... creating a config file that they specifically query ... Is there a way to set timeToleranceInSeconds programmatically? ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Client callback adding items to databound collection = crossthread error
    ... // the server ... // SynchronizationContext earlier in the service's Ctor, ... My client passes an EventShim with a callback to the server. ... How do I invoke a delegate on the UI thread without having ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to query n web services
    ... When I added web references, I wrote 10 different web references name. ... and then invoke service01.someMethod... ... The subset is given by strings. ... Using Reflection, you can use a string to create an instance of an object and then invoke methods on that instance. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How to change ASE page size from 2k to 8k
    ... client and server character sets. ... Please use BCP's -Y option to invoke ... so that you aren't in a UTF8 environement (note - if you're running ...
    (comp.databases.sybase)