C# Class Simplify.Web.Modules.Data.FileReader

Provides localizable files reader, reads the files from data folder
Inheritance: IFileReader
Afficher le fichier Open project: i4004/Simplify.Web Class Usage Examples

Méthodes publiques

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

Private Methods

Méthode Description
TryToLoadTextDocumentFromCache ( string fileName, string language, string &data ) : bool
TryToLoadXDocumentFromCache ( string fileName, string language, System.Xml.Linq.XDocument &data ) : bool

Method Details

ClearCache() public static méthode

Clears the cache.
public static ClearCache ( ) : void
Résultat void

FileReader() public méthode

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

GetFilePath() public méthode

Get file path
public GetFilePath ( string fileName ) : string
fileName string File name
Résultat string

GetFilePath() public méthode

Get extension data file path for specific language
public GetFilePath ( string fileName, string language ) : string
fileName string File name
language string File language
Résultat string

LoadTextDocument() public méthode

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

LoadTextDocument() public méthode

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

LoadXDocument() public méthode

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

LoadXDocument() public méthode

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

Setup() public méthode

Setups the file reader.
public Setup ( ) : void
Résultat void