C# Класс Spring.Globalization.AbstractLocalizer

Abstract base class that all localizers should extend

This class contains the bulk of the localizer logic, including implementation of the ApplyResources methods that are defined in ILocalizer interface.

All specific localizers need to do is inherit this class and implement GetResources method that will return a list of Resource objects that should be applied to a specified target.

Custom implementations can use whatever type of resource storage they want, such as standard .NET resource sets, custom XML files, database, etc.

Наследование: ILocalizer
Показать файл Открыть проект

Открытые методы

Метод Описание
ApplyResources ( object target, IMessageSource messageSource ) : void

Applies resources to the specified target object, using current thread's uiCulture to resolve resources.

ApplyResources ( object target, IMessageSource messageSource, CultureInfo culture ) : void

Applies resources of the specified culture to the specified target object.

Защищенные методы

Метод Описание
LoadResources ( object target, IMessageSource messageSource, CultureInfo culture ) : IList

Loads resources from the storage and creates a list of Resource instances that should be applied to the target.

Приватные методы

Метод Описание
GetResources ( object target, IMessageSource messageSource, CultureInfo culture ) : IList

Returns a list of Resource instances that should be applied to the target.

Описание методов

ApplyResources() публичный Метод

Applies resources to the specified target object, using current thread's uiCulture to resolve resources.
public ApplyResources ( object target, IMessageSource messageSource ) : void
target object Target object to apply resources to.
messageSource IMessageSource instance to retrieve resources from.
Результат void

ApplyResources() публичный Метод

Applies resources of the specified culture to the specified target object.
public ApplyResources ( object target, IMessageSource messageSource, CultureInfo culture ) : void
target object Target object to apply resources to.
messageSource IMessageSource instance to retrieve resources from.
culture System.Globalization.CultureInfo Resource culture to use for resource lookup.
Результат void

LoadResources() защищенный абстрактный Метод

Loads resources from the storage and creates a list of Resource instances that should be applied to the target.
protected abstract LoadResources ( object target, IMessageSource messageSource, CultureInfo culture ) : IList
target object Target to get a list of resources for.
messageSource IMessageSource instance to retrieve resources from.
culture System.Globalization.CultureInfo Resource locale.
Результат IList