private TradeReportTemplate parseIni(string resourceName) { ResourceLocator locator = ResourceLocator.of("classpath:" + resourceName); IniFile ini = IniFile.of(locator.CharSource); TradeReportTemplateIniLoader loader = new TradeReportTemplateIniLoader(); return(loader.load(ini)); }
/// <summary> /// Loads a trade report template from the standard INI format. /// </summary> /// <param name="templateName"> the name of the template </param> /// <returns> the loaded report template </returns> public static TradeReportTemplate loadTradeReportTemplate(string templateName) { string resourceName = string.format(Locale.ENGLISH, "classpath:example-reports/%s.ini", templateName); ResourceLocator resourceLocator = ResourceLocator.of(resourceName); IniFile ini = IniFile.of(resourceLocator.CharSource); return(TradeReportTemplate.load(ini)); }
public virtual CashFlowReportTemplate load(IniFile iniFile) { return(new CashFlowReportTemplate()); }
/// <summary> /// Creates a trade report template by reading a template definition in an ini file. /// </summary> /// <param name="ini"> the ini file containing the definition of the template </param> /// <returns> a trade report template built from the definition in the ini file </returns> public static CashFlowReportTemplate load(IniFile ini) { CashFlowReportTemplateIniLoader loader = new CashFlowReportTemplateIniLoader(); return(loader.load(ini)); }