コード例 #1
0
 /// <summary>
 /// Set taxon alert statuses for specified locale.
 /// </summary>
 /// <param name="taxonAlertStatuses">Taxon alert statuses.</param>
 /// <param name="locale">Locale.</param>
 protected override void SetTaxonAlertStatuses(TaxonAlertStatusList taxonAlertStatuses,
                                               ILocale locale)
 {
     lock (TaxonAlertStatuses)
     {
         TaxonAlertStatuses[locale.ISOCode] = taxonAlertStatuses;
     }
 }
コード例 #2
0
        /// <summary>
        /// Get taxon alert statuses for specified locale.
        /// </summary>
        /// <param name="locale">Locale.</param>
        /// <returns>Taxon alert statuses for specified locale.</returns>
        protected virtual TaxonAlertStatusList GetTaxonAlertStatuses(ILocale locale)
        {
            TaxonAlertStatusList taxonAlertStatuses = null;

            if (TaxonAlertStatuses.ContainsKey(locale.ISOCode))
            {
                taxonAlertStatuses = (TaxonAlertStatusList)(TaxonAlertStatuses[locale.ISOCode]);
            }
            return(taxonAlertStatuses);
        }
コード例 #3
0
        /// <summary>
        /// Get all taxon alert statuses.
        /// </summary>
        /// <param name="locale">Locale.</param>
        /// <returns>All taxon alert statuses.</returns>
        protected override TaxonAlertStatusList GetTaxonAlertStatuses(ILocale locale)
        {
            TaxonAlertStatusList taxonAlertStatuses = null;

            lock (TaxonAlertStatuses)
            {
                if (TaxonAlertStatuses.ContainsKey(locale.ISOCode))
                {
                    taxonAlertStatuses = (TaxonAlertStatusList)(TaxonAlertStatuses[locale.ISOCode]);
                }
            }
            return(taxonAlertStatuses);
        }
コード例 #4
0
 /// <summary>
 /// Set taxon alert statuses for specified locale.
 /// </summary>
 /// <param name="taxonAlertStatuses">Taxon alert statuses.</param>
 /// <param name="locale">Locale.</param>
 protected virtual void SetTaxonAlertStatuses(TaxonAlertStatusList taxonAlertStatuses,
                                              ILocale locale)
 {
     TaxonAlertStatuses[locale.ISOCode] = taxonAlertStatuses;
 }