return ccu;
}
public static string Run (System.Reflection.Assembly assem, string type, ITextTemplatingEngineHost host, System.Globalization.CultureInfo culture)
{
Type transformType = assem.GetType (type);
var extendedHost = host as IExtendedTextTemplatingEngineHost;
TextTransformation tt;
if (extendedHost != null)
tt = extendedHost.CreateInstance(transformType);
else
tt = (TextTransformation)Activator.CreateInstance (transformType);
//set the host property if it exists
System.Reflection.PropertyInfo hostProp = transformType.GetProperty ("Host", typeof (ITextTemplatingEngineHost));
if (hostProp != null && hostProp.CanWrite)
hostProp.SetValue (tt, host, null);
//set the culture
if (culture != null)
ToStringHelper.FormatProvider = culture;
else
ToStringHelper.FormatProvider = System.Globalization.CultureInfo.InvariantCulture;
tt.Initialize ();
string output = tt.TransformText ();
host.LogErrors (tt.Errors);
ToStringHelper.FormatProvider = System.Globalization.CultureInfo.InvariantCulture;