C# Class Sage.ResourceManagement.ResourceManager

Handles internal file resource management.
Afficher le fichier Open project: igorfrance/sage

Méthodes publiques

Méthode Description
GetHttpResponse ( string url ) : WebResponse

Returns the WebResponse resulting from issuing a request to url.

GetHttpResponse ( string url, string username, string password ) : WebResponse

Returns the WebResponse resulting from issuing a request to url, using the specified username and password.

GetRemoteTextFile ( string url ) : string

Fetches the remote file from the specified url and returns the response text.

LoadXml ( string path ) : CacheableXmlDocument

Creates and returns a new CacheableXmlDocument, loaded from the specified path.

LoadXmlDocument ( string path ) : CacheableXmlDocument

Creates and returns a new CacheableXmlDocument, loaded from the specified path.

LoadXmlDocument ( string path, SageContext context ) : CacheableXmlDocument

Creates and returns a new CacheableXmlDocument, loaded from the specified path, using the specified context.

LoadXmlDocument ( string path, SageContext context, string schemaPath ) : CacheableXmlDocument

Creates, validates and returns a new CacheableXmlDocument, loaded from the specified path, using the specified context and schemaPath.

ResourceManager ( SageContext context ) : System

Initializes a new instance of the ResourceManager class, using the specified SageContext.

ValidateDocument ( XmlDocument document, string schemaPath ) : ValidationResult

Validates the specified document document against the XML schema loaded from the specified schemaPath, and returns an object that contains the validation information.

ValidateElement ( XmlElement element, string schemaPath ) : ValidationResult

Validates the specified document element against the XML schema loaded from the specified schemaPath, and returns an object that contains the validation information.

Private Methods

Méthode Description
GetPhrase ( string phraseId ) : string

Gets the dictionary phrase with the specified id, for the current category, in the current locale.

LoadGlobalizedDocument ( string path, SageContext context ) : CacheableXmlDocument
LoadSourceDocument ( string path, SageContext context ) : CacheableXmlDocument

Method Details

GetHttpResponse() public static méthode

Returns the WebResponse resulting from issuing a request to url.
public static GetHttpResponse ( string url ) : WebResponse
url string The URL to which to send the request.
Résultat System.Net.WebResponse

GetHttpResponse() public static méthode

Returns the WebResponse resulting from issuing a request to url, using the specified username and password.
public static GetHttpResponse ( string url, string username, string password ) : WebResponse
url string The URL to which to send the request.
username string The username to use.
password string The password to use.
Résultat System.Net.WebResponse

GetRemoteTextFile() public static méthode

Fetches the remote file from the specified url and returns the response text.
public static GetRemoteTextFile ( string url ) : string
url string The URL of the file to fetch.
Résultat string

LoadXml() public méthode

Creates and returns a new CacheableXmlDocument, loaded from the specified path.
public LoadXml ( string path ) : CacheableXmlDocument
path string The path.
Résultat CacheableXmlDocument

LoadXmlDocument() public static méthode

Creates and returns a new CacheableXmlDocument, loaded from the specified path.
public static LoadXmlDocument ( string path ) : CacheableXmlDocument
path string The path to the document to load.
Résultat CacheableXmlDocument

LoadXmlDocument() public static méthode

Creates and returns a new CacheableXmlDocument, loaded from the specified path, using the specified context.
public static LoadXmlDocument ( string path, SageContext context ) : CacheableXmlDocument
path string The path to the document to load.
context SageContext The context to use to resolve the and load the document.
Résultat CacheableXmlDocument

LoadXmlDocument() public static méthode

Creates, validates and returns a new CacheableXmlDocument, loaded from the specified path, using the specified context and schemaPath.
public static LoadXmlDocument ( string path, SageContext context, string schemaPath ) : CacheableXmlDocument
path string The path to the document to load.
context SageContext The context to use to resolve the and load the document.
schemaPath string The path to the XML schema to use to validate the document against.
Résultat CacheableXmlDocument

ResourceManager() public méthode

Initializes a new instance of the ResourceManager class, using the specified SageContext.
public ResourceManager ( SageContext context ) : System
context SageContext The current context.
Résultat System

ValidateDocument() public static méthode

Validates the specified document document against the XML schema loaded from the specified schemaPath, and returns an object that contains the validation information.
public static ValidateDocument ( XmlDocument document, string schemaPath ) : ValidationResult
document System.Xml.XmlDocument The document to validate.
schemaPath string The path to the XML schema to use to validate the document against.
Résultat Sage.Configuration.ValidationResult

ValidateElement() public static méthode

Validates the specified document element against the XML schema loaded from the specified schemaPath, and returns an object that contains the validation information.
public static ValidateElement ( XmlElement element, string schemaPath ) : ValidationResult
element System.Xml.XmlElement The element to validate.
schemaPath string The path to the XML schema to use to validate the element against.
Résultat Sage.Configuration.ValidationResult