Пример #1
0
        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));
            }
        }
Пример #2
0
 public Component(string name, string heading)
 {
     this._page    = QPage.getInstance();
     this._name    = name;
     this._heading = heading;
 }
Пример #3
0
 public Component()
 {
     this._page = QPage.getInstance();
 }
Пример #4
0
 public Component(string name)
 {
     this._page = QPage.getInstance();
     this._name = name;
 }
Пример #5
0
 public object convert(string toType)
 {
     return(convert(QPage.getInstance().outputFormat(), toType, "", new Dict()));
 }