public IDictionary <string, decimal> GetPeriod(string period) { if (Periods.ContainsKey(period)) { return(Periods[period]); } return(Periods[period] = new Dictionary <string, decimal>()); }
/// <summary> /// Get periods for specified locale. /// </summary> /// <param name="locale">Locale.</param> /// <returns>Periods for specified locale.</returns> protected virtual PeriodList GetPeriods(ILocale locale) { PeriodList periods = null; if (Periods.ContainsKey(locale.ISOCode)) { periods = (PeriodList)(Periods[locale.ISOCode]); } return(periods); }
} // constructor public void Add(LoadDataForVatReturnSummary.ResultRow oRaw) { if (Periods.ContainsKey(oRaw.DateFrom)) { Periods[oRaw.DateFrom].Add(oRaw); } else { Periods[oRaw.DateFrom] = new BusinessDataEntry(oRaw); } } // Add
/// <summary> /// Get periods for specified locale. /// </summary> /// <param name="locale">Locale.</param> /// <returns>Periods for specified locale.</returns> protected override PeriodList GetPeriods(ILocale locale) { PeriodList periods = null; lock (Periods) { if (Periods.ContainsKey(locale.ISOCode)) { periods = (PeriodList)(Periods[locale.ISOCode]); } } return(periods); }