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

Handles internal file resource management.
Показать файл Открыть проект

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

Метод Описание
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.

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

Метод Описание
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

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

GetHttpResponse() публичный статический Метод

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.
Результат System.Net.WebResponse

GetHttpResponse() публичный статический Метод

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.
Результат System.Net.WebResponse

GetRemoteTextFile() публичный статический Метод

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.
Результат string

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

Creates and returns a new CacheableXmlDocument, loaded from the specified path.
public LoadXml ( string path ) : CacheableXmlDocument
path string The path.
Результат CacheableXmlDocument

LoadXmlDocument() публичный статический Метод

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.
Результат CacheableXmlDocument

LoadXmlDocument() публичный статический Метод

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.
Результат CacheableXmlDocument

LoadXmlDocument() публичный статический Метод

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.
Результат CacheableXmlDocument

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

Initializes a new instance of the ResourceManager class, using the specified SageContext.
public ResourceManager ( SageContext context ) : System
context SageContext The current context.
Результат System

ValidateDocument() публичный статический Метод

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.
Результат Sage.Configuration.ValidationResult

ValidateElement() публичный статический Метод

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.
Результат Sage.Configuration.ValidationResult