C# Class Sage.ResourceManagement.XmlResource

Represents an XML resource that may be globalized.
ファイルを表示 Open project: igorfrance/sage Class Usage Examples

Public Methods

Method 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

Method Description
LoadGlobalizedDocument ( string locale ) : CacheableXmlDocument
LoadLocalizedSourceDocument ( string locale ) : CacheableXmlDocument
LoadSourceDocument ( string locale ) : CacheableXmlDocument

Method Details

GetDateFirstGlobalized() public method

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.
return DateTime?

GetInternationalizedName() public method

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.
return string

GetSourcePath() public method

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.
return string

Globalize() public method

Globalizes this instance.
public Globalize ( ) : InternationalizationSummary
return InternationalizationSummary

IsGlobalizable() public method

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.
return bool

Load() public method

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

ToString() public method

public ToString ( ) : string
return string

XmlResource() public method

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.
return System