NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Config.Compiler.ConfigFileReader Class Reference
Inheritance diagram for Ntp.Analyzer.Config.Compiler.ConfigFileReader:
Collaboration diagram for Ntp.Analyzer.Config.Compiler.ConfigFileReader:

Public Member Functions

 ConfigFileReader (string file)
 
void Dispose ()
 
void NextLine ()
 
char Peek ()
 
char Read ()
 Consumes one character from file. More...
 

Properties

string File [get]
 
int Line [get, private set]
 
int Position [get, private set]
 

Private Member Functions

void OpenFile ()
 

Private Attributes

TextReader reader
 

Detailed Description

Definition at line 28 of file ConfigFileReader.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Config.Compiler.ConfigFileReader.ConfigFileReader ( string  file)
inline

Definition at line 30 of file ConfigFileReader.cs.

Member Function Documentation

void Ntp.Analyzer.Config.Compiler.ConfigFileReader.Dispose ( )
inline

Definition at line 45 of file ConfigFileReader.cs.

46  {
47  reader?.Close();
48  reader?.Dispose();
49  }
void Ntp.Analyzer.Config.Compiler.ConfigFileReader.NextLine ( )
inline
void Ntp.Analyzer.Config.Compiler.ConfigFileReader.OpenFile ( )
inlineprivate
char Ntp.Analyzer.Config.Compiler.ConfigFileReader.Peek ( )
inline

Definition at line 57 of file ConfigFileReader.cs.

58  {
59  if (reader == null)
60  OpenFile();
61 
62  return reader != null && reader.Peek() != -1
63  ? (char) reader.Peek()
64  : (char) 0;
65  }
char Ntp.Analyzer.Config.Compiler.ConfigFileReader.Read ( )
inline

Consumes one character from file.

Definition at line 70 of file ConfigFileReader.cs.

71  {
72  if (reader == null)
73  OpenFile();
74 
75  Position++;
76 
77  return reader != null
78  ? (char) reader.Read()
79  : (char) 0;
80  }

Member Data Documentation

TextReader Ntp.Analyzer.Config.Compiler.ConfigFileReader.reader
private

Definition at line 36 of file ConfigFileReader.cs.

Property Documentation

string Ntp.Analyzer.Config.Compiler.ConfigFileReader.File
get

Definition at line 38 of file ConfigFileReader.cs.

int Ntp.Analyzer.Config.Compiler.ConfigFileReader.Line
getprivate set

Definition at line 40 of file ConfigFileReader.cs.

int Ntp.Analyzer.Config.Compiler.ConfigFileReader.Position
getprivate set

Definition at line 42 of file ConfigFileReader.cs.


The documentation for this class was generated from the following file: