/// <summary> /// Returns a list of <see cref="Resource"/> instances that should be applied to the target. /// </summary> /// <param name="target">Target to get a list of resources for.</param> /// <param name="messageSource"><see cref="IMessageSource"/> instance to retrieve resources from.</param> /// <param name="culture">Resource locale.</param> /// <returns>A list of resources to apply.</returns> private IList <Resource> GetResources(object target, IMessageSource messageSource, CultureInfo culture) { IList <Resource> resources = resourceCache.GetResources(target, culture); if (resources == null) { resources = LoadResources(target, messageSource, culture); resourceCache.PutResources(target, culture, resources); } return(resources); }