public bool SetStaticProperty(string typeName, string property, object value)
{
SetError();
Type type = GetTypeFromName(typeName);
if (type == null)
{
SetError("Unable to find type signature. Please make sure you call LoadAssembly first.");
return false;
}
value = FixupParameter(value);
ErrorMessage = "";
object result = null;
try
{
type.InvokeMember(property, BindingFlags.Static | BindingFlags.Public | BindingFlags.SetField | BindingFlags.SetProperty, null, type, new object[1] { value });
}
catch (Exception ex)
{
SetError(ex.GetBaseException(), true);
throw ex.GetBaseException();
}
return true;
}