FoxPro:
WITH this
TRY
loObj = CREATEOBJECT(.cProcessObj, .lRunProcessorTest)
CATCH
ENDTRY
ENDWITH
C#:
using System.Reflection;
try
{
Type ObjectType = null;
foreach (Assembly Asmb in AppDomain.CurrentDomain.GetAssemblies())
{
if (Asmb.FullName.ToUpper().Contains("QUALSET"))
{
Type[] Types = Asmb.GetTypes();
foreach (Type t in Types)
{
if (t.IsClass && t.Name.ToUpper() == ProcessObj.ToUpper())
{
ObjectType = t;
break;
}
}
}
if (ObjectType != null)
break;
}
if (ObjectType != null)
{
Obj = Activator.CreateInstance(ObjectType, new Object[] { RunProcessorTest });
}
else
{
Error.LogError("Selector.Process()", "Cannot find processor in assemblies to create: " + ProcessObj);
return false;
}
}
catch (Exception e)
{
LogError("Processor Creation during Process()", e.Message, e.StackTrace);
return false;
}
Last edited: