//------------------------------------------------------------------------- /// <summary> /// Determines the reporting currency. /// <para> /// The reporting currency is specified using <seealso cref="ReportingCurrency"/>. /// If the currency is defined to be the "natural" currency, then the function /// is used to determine the natural currency. /// /// </para> /// </summary> /// <param name="task"> the calculation task </param> /// <param name="refData"> the reference data </param> /// <returns> the reporting currency </returns> internal Currency reportingCurrency(CalculationTask task, ReferenceData refData) { if (reportingCurrency_Renamed.Specific) { return(reportingCurrency_Renamed.Currency); } // this should never throw an exception, because it is only called if the measure is currency-convertible return(task.naturalCurrency(refData)); }