C# Class Sage.ResourceManagement.XmlResource

Represents an XML resource that may be globalized.
Afficher le fichier Open project: igorfrance/sage Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
LoadGlobalizedDocument ( string locale ) : CacheableXmlDocument
LoadLocalizedSourceDocument ( string locale ) : CacheableXmlDocument
LoadSourceDocument ( string locale ) : CacheableXmlDocument

Method Details

GetDateFirstGlobalized() public méthode

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.
Résultat DateTime?

GetInternationalizedName() public méthode

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.
Résultat string

GetSourcePath() public méthode

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.
Résultat string

Globalize() public méthode

Globalizes this instance.
public Globalize ( ) : InternationalizationSummary
Résultat InternationalizationSummary

IsGlobalizable() public méthode

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.
Résultat bool

Load() public méthode

Loads this resource (optionally) localized into the specified locale.
public Load ( string locale ) : CacheableXmlDocument
locale string The locale into which to localize this resource.
Résultat CacheableXmlDocument

ToString() public méthode

public ToString ( ) : string
Résultat string

XmlResource() public méthode

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.
Résultat System