public override string Execute(Dictionary <string, string> parameters) { string path = parameters["templatepath"]; if (string.IsNullOrEmpty(path)) { return(""); } string filename = parameters["templatefile"]; if (string.IsNullOrEmpty(filename)) { return(""); } try { string ModelProvider = parameters["dataprovider"]; string ModelConstructor = parameters["datasource"]; var ModelParameters = new Dictionary <string, string>(parameters); ModelParameters.Remove("templatepath"); ModelParameters.Remove("templatefile"); ModelParameters.Remove("dataprovider"); ModelParameters.Remove("datasource"); var Model = DataSourceProvider.Instance(ModelProvider).Invoke(ModelConstructor, ModelParameters); return(TemplateProvider.FindProviderAndExecute(path, filename, Dump(Model))); } catch (Exception ex) { return("Error : " + path + filename + " " + ex.Message); } }