public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
string s = value as string;
if (String.IsNullOrEmpty(s) == false) {
ScriptTriggerAction scriptAction = ScriptTriggerAction.Parse(s);
if (scriptAction == null) {
throw new InvalidOperationException("Unable to parse the script expression '" + s + "' as a valid script action.");
}
return scriptAction;
}
return null;
}