C# Класс Simplify.Web.Modules.Data.FileReader

Provides localizable files reader, reads the files from data folder
Наследование: IFileReader
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ClearCache ( ) : void

Clears the cache.

FileReader ( string dataPhysicalPath, string defaultLanguage, ILanguageManagerProvider languageManagerProvider, bool disableCache = false ) : System

Initializes a new instance of the FileReader class.

GetFilePath ( string fileName ) : string

Get file path

GetFilePath ( string fileName, string language ) : string

Get extension data file path for specific language

LoadTextDocument ( string fileName, bool memoryCache = false ) : string

Load text from a extension data file

LoadTextDocument ( string fileName, string language, bool memoryCache = false ) : string

Load text from a file with specific language

LoadXDocument ( string fileName, bool memoryCache = false ) : System.Xml.Linq.XDocument

Load xml document from a file

LoadXDocument ( string fileName, string language, bool memoryCache = false ) : System.Xml.Linq.XDocument

Load xml document from a file with specific language

Setup ( ) : void

Setups the file reader.

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

Метод Описание
TryToLoadTextDocumentFromCache ( string fileName, string language, string &data ) : bool
TryToLoadXDocumentFromCache ( string fileName, string language, System.Xml.Linq.XDocument &data ) : bool

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

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

Clears the cache.
public static ClearCache ( ) : void
Результат void

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

Initializes a new instance of the FileReader class.
public FileReader ( string dataPhysicalPath, string defaultLanguage, ILanguageManagerProvider languageManagerProvider, bool disableCache = false ) : System
dataPhysicalPath string The data physical path.
defaultLanguage string The default language.
languageManagerProvider ILanguageManagerProvider The language manager provider.
disableCache bool Disable FileReader cache.
Результат System

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

Get file path
public GetFilePath ( string fileName ) : string
fileName string File name
Результат string

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

Get extension data file path for specific language
public GetFilePath ( string fileName, string language ) : string
fileName string File name
language string File language
Результат string

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

Load text from a extension data file
public LoadTextDocument ( string fileName, bool memoryCache = false ) : string
fileName string File name
memoryCache bool Load file from memory cache if possible.
Результат string

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

Load text from a file with specific language
public LoadTextDocument ( string fileName, string language, bool memoryCache = false ) : string
fileName string File name
language string File language
memoryCache bool Load file from memory cache if possible.
Результат string

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

Load xml document from a file
public LoadXDocument ( string fileName, bool memoryCache = false ) : System.Xml.Linq.XDocument
fileName string File name
memoryCache bool Load file from memory cache if possible.
Результат System.Xml.Linq.XDocument

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

Load xml document from a file with specific language
public LoadXDocument ( string fileName, string language, bool memoryCache = false ) : System.Xml.Linq.XDocument
fileName string File name
language string File language
memoryCache bool Load file from memory cache if possible.
Результат System.Xml.Linq.XDocument

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

Setups the file reader.
public Setup ( ) : void
Результат void