public string FormatType(TargetType type) { string formatted; try { formatted = CurrentThread.PrintType ( interpreter.Style, type); } catch { formatted = "<cannot display type>"; } return (formatted); }
protected override string Execute(ScriptingContext context, Expression expression, DisplayFormat format) { TargetType type = expression.EvaluateType (context); string text = context.FormatType (type); context.Print (text); return text; }