C# Класс Sage.ResourceManagement.XmlResource

Represents an XML resource that may be globalized.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetDateFirstGlobalized ( List locales ) : DateTime?

Gets the earliest modification date of all versions generated from this resource file.

GetInternationalizedName ( string locale, bool appendPath ) : string

Gets the globalized locale name of this resource file.

GetSourcePath ( string locale ) : string

Gets the path to the locale-specific version of this resource if it exists, or the path to the non-specific version if it doesn't.

Globalize ( ) : InternationalizationSummary

Globalizes this instance.

IsGlobalizable ( XmlDocument document ) : bool

Gets a value indicating whether the specified document is globalizable.

In order for an xml resources to be considered globalizable, it needs to reference the XmlNamespaces.InternationalizationNamespace.

Load ( string locale ) : CacheableXmlDocument

Loads this resource (optionally) localized into the specified locale.

ToString ( ) : string
XmlResource ( string path, SageContext context ) : System

Initializes a new instance of the XmlResource class, using the specified resource path and context.

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

Метод Описание
LoadGlobalizedDocument ( string locale ) : CacheableXmlDocument
LoadLocalizedSourceDocument ( string locale ) : CacheableXmlDocument
LoadSourceDocument ( string locale ) : CacheableXmlDocument

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

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

Gets the earliest modification date of all versions generated from this resource file.
public GetDateFirstGlobalized ( List locales ) : DateTime?
locales List The locales to check for.
Результат DateTime?

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

Gets the globalized locale name of this resource file.
public GetInternationalizedName ( string locale, bool appendPath ) : string
locale string The locale for which to get the name.
appendPath bool If set to true the resulting value will be the full path to the file.
Результат string

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

Gets the path to the locale-specific version of this resource if it exists, or the path to the non-specific version if it doesn't.
public GetSourcePath ( string locale ) : string
locale string The locale for which to get the path.
Результат string

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

Globalizes this instance.
public Globalize ( ) : InternationalizationSummary
Результат InternationalizationSummary

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

Gets a value indicating whether the specified document is globalizable.
In order for an xml resources to be considered globalizable, it needs to reference the XmlNamespaces.InternationalizationNamespace.
public IsGlobalizable ( XmlDocument document ) : bool
document System.Xml.XmlDocument The document to check.
Результат bool

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

Loads this resource (optionally) localized into the specified locale.
public Load ( string locale ) : CacheableXmlDocument
locale string The locale into which to localize this resource.
Результат CacheableXmlDocument

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

public ToString ( ) : string
Результат string

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

Initializes a new instance of the XmlResource class, using the specified resource path and context.
/// is null or is null. ///
public XmlResource ( string path, SageContext context ) : System
path string The path to the XML resource.
context SageContext The current under which this class is being created.
Результат System