public static object convert(object data, string fromFormat, string toFormat, string toType, Dict args) { Type myType = QPage.getInstance().loadConverter(fromFormat, toFormat, toType); try { MethodInfo method = myType.GetMethod("convert"); if (method == null) { throw new Exception("Function convert not found in converter " + fromFormat); } var myInstance = Activator.CreateInstance(myType); return(method.Invoke(myInstance, new object[] { data, args })); } catch (Exception ex) { return("Exception: " + ex.InnerException.Message + " at " + ex.InnerException.Source + "\n" + String.Join("\n", ex.InnerException.StackTrace)); } }
public Component(string name, string heading) { this._page = QPage.getInstance(); this._name = name; this._heading = heading; }
public Component() { this._page = QPage.getInstance(); }
public Component(string name) { this._page = QPage.getInstance(); this._name = name; }
public object convert(string toType) { return(convert(QPage.getInstance().outputFormat(), toType, "", new Dict())); }