/// <summary>
 /// Refresh cached data.
 /// </summary>
 /// <param name="userContext">User context.</param>
 protected virtual void RefreshCache(IUserContext userContext)
 {
     BirdNestActivities.Clear();
     SpeciesActivities.Clear();
     SpeciesActivityCategories.Clear();
     SpeciesObservationDataProviders.Clear();
 }
        /// <summary>
        /// Get all bird nest activities for specified locale.
        /// </summary>
        /// <param name="locale">Locale.</param>
        /// <returns>All bird nest activities for specified locale.</returns>
        protected virtual SpeciesActivityList GetBirdNestActivities(ILocale locale)
        {
            SpeciesActivityList birdNestActivities = null;

            if (BirdNestActivities.ContainsKey(locale.ISOCode))
            {
                birdNestActivities = (SpeciesActivityList)(BirdNestActivities[locale.ISOCode]);
            }
            return(birdNestActivities);
        }
        /// <summary>
        /// Get all bird nest activities for specified locale.
        /// </summary>
        /// <param name="locale">Locale.</param>
        /// <returns>All bird nest activities for specified locale.</returns>
        protected override SpeciesActivityList GetBirdNestActivities(ILocale locale)
        {
            SpeciesActivityList birdNestActivities = null;

            lock (BirdNestActivities)
            {
                if (BirdNestActivities.ContainsKey(locale.ISOCode))
                {
                    birdNestActivities = (SpeciesActivityList)(BirdNestActivities[locale.ISOCode]);
                }
            }
            return(birdNestActivities);
        }
 /// <summary>
 /// Refresh cached data.
 /// </summary>
 /// <param name="userContext">User context.</param>
 protected override void RefreshCache(IUserContext userContext)
 {
     lock (BirdNestActivities)
     {
         BirdNestActivities.Clear();
     }
     lock (SpeciesActivities)
     {
         SpeciesActivities.Clear();
     }
     lock (SpeciesActivityCategories)
     {
         SpeciesActivityCategories.Clear();
     }
     lock (SpeciesObservationDataProviders)
     {
         SpeciesObservationDataProviders.Clear();
     }
 }