C# Class EpLibrary.cs.BaseTextFile

A class for Base File.
Afficher le fichier Open project: juhgiyo/EpLibrary.cs Class Usage Examples

Protected Properties

Свойство Type Description
m_baseTextLock Object
m_encoding System.Text.Encoding
m_reader System.IO.StreamReader
m_writer System.IO.StreamWriter

Méthodes publiques

Méthode Description
AppendToFile ( String filename ) : bool

Append the text from the given file

BaseTextFile ( BaseTextFile b ) : System

Default Copy Constructor

BaseTextFile ( Encoding encoding = null ) : System

Default Constructor

GetEncoding ( ) : Encoding

Get current encoding

LoadFromFile ( String filename ) : bool

Load the list of the properties from the given file

SaveToFile ( String filename ) : bool

Save the text to the given file

SetEncoding ( Encoding encoding ) : void

Set encoding as given encoding

Méthodes protégées

Méthode Description
loadFromFile ( StreamReader stream ) : void

Actual load Function that loads values from the file.

Sub classes should implement this function

writeLoop ( ) : void

Loop Function that writes to the file.

Sub classes should implement this function

writeToFile ( String toFileString ) : void

Write the given string to the file

Method Details

AppendToFile() public méthode

Append the text from the given file
public AppendToFile ( String filename ) : bool
filename String the name of the file to append
Résultat bool

BaseTextFile() public méthode

Default Copy Constructor
public BaseTextFile ( BaseTextFile b ) : System
b BaseTextFile the second object
Résultat System

BaseTextFile() public méthode

Default Constructor
public BaseTextFile ( Encoding encoding = null ) : System
encoding System.Text.Encoding the encoding type for this file
Résultat System

GetEncoding() public méthode

Get current encoding
public GetEncoding ( ) : Encoding
Résultat System.Text.Encoding

LoadFromFile() public méthode

Load the list of the properties from the given file
public LoadFromFile ( String filename ) : bool
filename String the name of the file to load
Résultat bool

SaveToFile() public méthode

Save the text to the given file
public SaveToFile ( String filename ) : bool
filename String the name of the file to save
Résultat bool

SetEncoding() public méthode

Set encoding as given encoding
public SetEncoding ( Encoding encoding ) : void
encoding System.Text.Encoding encoding to set
Résultat void

loadFromFile() protected abstract méthode

Actual load Function that loads values from the file.
Sub classes should implement this function
protected abstract loadFromFile ( StreamReader stream ) : void
stream System.IO.StreamReader stream from the file
Résultat void

writeLoop() protected abstract méthode

Loop Function that writes to the file.
Sub classes should implement this function
protected abstract writeLoop ( ) : void
Résultat void

writeToFile() protected méthode

Write the given string to the file
protected writeToFile ( String toFileString ) : void
toFileString String the string to write to the file
Résultat void

Property Details

m_baseTextLock protected_oe property

lock
protected Object m_baseTextLock
Résultat Object

m_encoding protected_oe property

Encoding
protected Encoding,System.Text m_encoding
Résultat System.Text.Encoding

m_reader protected_oe property

reader stream
protected StreamReader,System.IO m_reader
Résultat System.IO.StreamReader

m_writer protected_oe property

writer stream
protected StreamWriter,System.IO m_writer
Résultat System.IO.StreamWriter