If I understand correctly, a class which implements abstract class AGIScript will be created at runtime via Reflection.
this is the code in GeneralMappingStrategy.cs uses reflection to create script object:
public AGIScript CreateInstance()
{
AGIScript rtn = null;
try
{
if (LoadedAssembly != null)
rtn = (AGIScript)LoadedAssembly.CreateInstance(ClassName);
else
rtn = (AGIScript)Assembly.GetEntryAssembly().CreateInstance(ClassName);
}
catch (Exception ex)
{
}
return rtn;
}
I want to create a script object by myself or use dependency injection technique, because my script class can be depended on another dependencies.
Is it possible?
Thanks in advanced.
If I understand correctly, a class which implements abstract class
AGIScriptwill be created at runtime via Reflection.this is the code in
GeneralMappingStrategy.csuses reflection to create script object:I want to create a script object by myself or use dependency injection technique, because my script class can be depended on another dependencies.
Is it possible?
Thanks in advanced.