|
Home > Archive > BizTalk Server Tools > April 2005 > Scripting functoid reuse
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Scripting functoid reuse
|
|
|
| Hi all..
1. I would like to know if there is any way to call an external
assembly from within inline C# script in a scripting functoid..
Because it is possible to call a COM object (VB) from inline script
using remoting as follows:
public static String Function()
{
Type myType =Type.GetTypeFromProgID("DLLName.Interface");
object myObj = Activator.CreateInstance(myType);
object[] myArgs1 = {"Input_Parameter"};
myType.InvokeMember("MethodName",System.Reflection.BindingFlags.InvokeMethod,null,myObj,myArgs1);
return("Executed");
}
But for calling a .Net assembly in GAC, the documentation says i need
to use the external assembly option in the scripting functoid. That
works for me but i am forming the input parameter for this method in
another scripting functoid. If i can somehow call the method in the
first functoid itself, it would be great cos i can reduce the no of
functoids to half!
2. If there is no way of doing this for a .Net assembly, pls let me
know if atleast it is possible to have only one scripting functoid
that calls an external assembly in the map, but use that functoid
several times across the map. I mean, instead of copying and pasting
the same functoid each and every time i need to use it, can i reuse
the same across the map. This i know is again possible in case of
calling a function that is marked as PUBLIC in a functoid that uses
inline script. However i need to call a functoid several times that
in turn calls an external assembly.
Thanks in advance!
Regards,
Jagan
| |
|
| Hi..
i've realised that it is possible to late bind the .net assembly
also.. still i would like to know about reusing a functoid in a
map..
thanks..
Jagan
|
|
|
|
|