OpenKeyWord  Version: 426, Datum:
OKW.Log.Log2ConsoleFile Klassenreferenz

Klasse zur Ausgabe in eine Datei. Mehr ...

Klassendiagramm für OKW.Log.Log2ConsoleFile:
Inheritance graph
Zusammengehörigkeiten von OKW.Log.Log2ConsoleFile:
Collaboration graph

Öffentliche Methoden

 Log2ConsoleFile (string PathAndFile)
 
void LogError (string fps_Message)
 LogError Function: Logs an error message to the results file. Mehr ...
 
void LogException (string fps_Message)
 LogException Function: Logs a Script Exception to the results file. Mehr ...
 
void LogFunctionEnd ()
 
void LogFunctionEnd (string fps_Return)
 
void LogFunctionEnd (bool fpb_Return)
 
void LogFunctionEnd (List< string > fpls_Return)
 
void LogFunctionStart (string fps_FunctionName, params string[] fpsParameter)
 
void LogKeyWordEnd ()
 
void LogKeyWordStart (string fps_KeyWordName, params string[] fpsParameter)
 
void LogPrint (string fps_Message)
 LogPrint Function: Prints the values of expressions to the results file. Mehr ...
 
void LogVerify (string fps_Actual, string fps_Expected)
 
void LogWarning (string fps_Message)
 LogWarning Function: Logs a warning to the results file. Mehr ...
 
void ResCloseList ()
 Closes the outline level. Mehr ...
 
void ResOpenList (string fps_Name)
 

Private Methoden

void BlankBefore ()
 
void FileClose ()
 
void FileOpen ()
 

Private Attribute

string BlanksBefore = string.Empty
 
int LevelCounter = 0
 
StreamWriter myFile
 
int myFileCounter = 0
 
string myPathAndFile
 

Ausführliche Beschreibung

Klasse zur Ausgabe in eine Datei.

Ausgaben erfolgen wie auf der Konsole jedoch einfarbig: Implementiert das Interface ILogger für eine Datei-Ausgabe.

Autor
Zoltán Hrabovszki
Datum
2015.05.02

Definiert in Zeile 63 der Datei Log2ConsoleFile.cs.

Dokumentation der Elementfunktionen

void OKW.Log.Log2ConsoleFile.BlankBefore ( )
private

Definiert in Zeile 368 der Datei Log2ConsoleFile.cs.

369  {
370  this.BlanksBefore = new string('\t', this.LevelCounter);
371  }

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

void OKW.Log.Log2ConsoleFile.LogError ( string  fps_Message)

LogError Function: Logs an error message to the results file.

Parameter
fps_Message

Implementiert OKW.Log.ILogger.

Definiert in Zeile 94 der Datei Log2ConsoleFile.cs.

95  {
96  this.FileOpen();
97 
98  this.myFile.Write(this.BlanksBefore + "Error: ");
99  this.myFile.WriteLine(fps_Message);
100 
101  this.FileClose();
102  }
void OKW.Log.Log2ConsoleFile.LogException ( string  fps_Message)

LogException Function: Logs a Script Exception to the results file.

Parameter
fps_Message

Implementiert OKW.Log.ILogger.

Definiert in Zeile 109 der Datei Log2ConsoleFile.cs.

110  {
111  this.FileOpen();
112 
113  this.myFile.Write(this.BlanksBefore + "Exception: ");
114  this.myFile.WriteLine(fps_Message);
115 
116  this.FileClose();
117  }
void OKW.Log.Log2ConsoleFile.LogFunctionEnd ( )

Implementiert OKW.Log.ILogger.

Definiert in Zeile 124 der Datei Log2ConsoleFile.cs.

125  {
126  this.FileOpen();
127 
128  this.ResCloseList();
129 
130  this.FileClose();
131  }
void ResCloseList()
Closes the outline level.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void OKW.Log.Log2ConsoleFile.LogFunctionEnd ( string  fps_Return)

Implementiert OKW.Log.ILogger.

Definiert in Zeile 138 der Datei Log2ConsoleFile.cs.

139  {
140  this.FileOpen();
141 
142  this.ResOpenList("Return...");
143  this.LogPrint(">>" + fps_Return + "<<");
144  this.ResCloseList();
145 
146  this.ResCloseList();
147 
148  this.FileClose();
149  }
void ResCloseList()
Closes the outline level.
void LogPrint(string fps_Message)
LogPrint Function: Prints the values of expressions to the results file.
void ResOpenList(string fps_Name)

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void OKW.Log.Log2ConsoleFile.LogFunctionEnd ( bool  fpb_Return)

Implementiert OKW.Log.ILogger.

Definiert in Zeile 156 der Datei Log2ConsoleFile.cs.

157  {
158  string fpsBoolean = OKW_Helper.Boolean2String(fpb_Return);
159  this.FileOpen();
160 
161  this.ResOpenList("Return...");
162  this.LogPrint(">>" + fpsBoolean + "<<");
163  this.ResCloseList();
164 
165  this.ResCloseList();
166 
167  this.FileClose();
168  }
void ResCloseList()
Closes the outline level.
void LogPrint(string fps_Message)
LogPrint Function: Prints the values of expressions to the results file.
void ResOpenList(string fps_Name)

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void OKW.Log.Log2ConsoleFile.LogFunctionEnd ( List< string >  fpls_Return)

Implementiert OKW.Log.ILogger.

Definiert in Zeile 175 der Datei Log2ConsoleFile.cs.

176  {
177  this.FileOpen();
178 
179  this.ResOpenList("Return...");
180 
181  foreach (string Value in fpls_Return)
182  {
183  this.LogPrint(Value);
184  }
185 
186  this.ResCloseList();
187 
188  this.ResCloseList();
189 
190  this.FileClose();
191  }
void ResCloseList()
Closes the outline level.
void LogPrint(string fps_Message)
LogPrint Function: Prints the values of expressions to the results file.
void ResOpenList(string fps_Name)

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void OKW.Log.Log2ConsoleFile.LogFunctionStart ( string  fps_FunctionName,
params string[]  fpsParameter 
)

Implementiert OKW.Log.ILogger.

Definiert in Zeile 198 der Datei Log2ConsoleFile.cs.

199  {
200  this.ResOpenList("Method: " + fps_FunctionName);
201 
202  if (0 < fpsParameter.Length)
203  {
204  this.ResOpenList("Parameter...");
205 
206  for (int i = 0; i < fpsParameter.Length; i += 2)
207  {
208  this.LogPrint(fpsParameter[i] + ": >>" + fpsParameter[i + 1] + "<<");
209  }
210 
211  this.ResCloseList();
212  this.LogPrint("-------");
213  }
214 
215  return;
216  }
void ResCloseList()
Closes the outline level.
void LogPrint(string fps_Message)
LogPrint Function: Prints the values of expressions to the results file.
void ResOpenList(string fps_Name)

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void OKW.Log.Log2ConsoleFile.LogKeyWordEnd ( )

Implementiert OKW.Log.ILogger.

Definiert in Zeile 224 der Datei Log2ConsoleFile.cs.

225  {
226  this.ResCloseList();
227  }
void ResCloseList()
Closes the outline level.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void OKW.Log.Log2ConsoleFile.LogKeyWordStart ( string  fps_KeyWordName,
params string[]  fpsParameter 
)

Implementiert OKW.Log.ILogger.

Definiert in Zeile 234 der Datei Log2ConsoleFile.cs.

235  {
236  String String2Print = fps_KeyWordName;
237 
238  // Keyword without parameter
239  if (fpsParameter.Length == 0)
240  {
241  // Keyword with one Parameter
242  String2Print = String2Print + "()";
243  }
244  // Keyword with one Parameter
245  else if (fpsParameter.Length == 1)
246  {
247  String2Print = String2Print + ": \"" + fpsParameter[0] + "\"";
248  }
249  // Keyword with two Parameters
250  else if (fpsParameter.Length == 2)
251  {
252  String2Print = String2Print + ": \"" + fpsParameter[0] + "\" = \"" + fpsParameter[1] + "\"";
253  }
254  // Keyword with more then two Parameters
255  else
256  {
257  String2Print = String2Print + "(\"" + fpsParameter[0] + "\"";
258 
259  for (int i = 1; i < fpsParameter.Length; i++)
260  {
261  String2Print = String2Print + ", \"" + fpsParameter[i] + "\"";
262  }
263 
264  String2Print = String2Print + ")";
265  }
266 
267  this.ResOpenList(String2Print);
268 
269  return;
270  }
void ResOpenList(string fps_Name)

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void OKW.Log.Log2ConsoleFile.LogPrint ( string  fps_Message)

LogPrint Function: Prints the values of expressions to the results file.

Parameter
fps_Message

Implementiert OKW.Log.ILogger.

Definiert in Zeile 278 der Datei Log2ConsoleFile.cs.

279  {
280  this.FileOpen();
281 
282  this.myFile.WriteLine(this.BlanksBefore + fps_Message);
283 
284  this.FileClose();
285  }

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

void OKW.Log.Log2ConsoleFile.LogVerify ( string  fps_Actual,
string  fps_Expected 
)

Implementiert OKW.Log.ILogger.

Definiert in Zeile 292 der Datei Log2ConsoleFile.cs.

293  {
294  this.FileOpen();
295 
296  if (fps_Actual == fps_Expected)
297  {
298  this.ResOpenList("PASSED:");
299  }
300  else
301  {
302  this.ResOpenList("FAILED:");
303  }
304 
305  this.myFile.WriteLine(this.BlanksBefore + "Expected = >>" + fps_Expected + "<<");
306  this.myFile.WriteLine(this.BlanksBefore + " Actual = >>" + fps_Actual + "<<");
307 
308  this.ResCloseList();
309 
310  this.FileClose();
311  }
void ResCloseList()
Closes the outline level.
void ResOpenList(string fps_Name)

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void OKW.Log.Log2ConsoleFile.LogWarning ( string  fps_Message)

LogWarning Function: Logs a warning to the results file.

Parameter
fps_Message

Implementiert OKW.Log.ILogger.

Definiert in Zeile 318 der Datei Log2ConsoleFile.cs.

319  {
320  this.FileOpen();
321 
322  this.myFile.Write(this.BlanksBefore + "Warning: ");
323  this.myFile.WriteLine(fps_Message);
324 
325  this.FileClose();
326  }
void OKW.Log.Log2ConsoleFile.ResCloseList ( )

Closes the outline level.

Implementiert OKW.Log.ILogger.

Definiert in Zeile 333 der Datei Log2ConsoleFile.cs.

334  {
335  if (this.LevelCounter > 0)
336  {
337  this.LevelCounter--;
338  }
339  else
340  {
341  this.LevelCounter = 0;
342  }
343 
344  this.BlankBefore();
345  }

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

void OKW.Log.Log2ConsoleFile.ResOpenList ( string  fps_Name)

Implementiert OKW.Log.ILogger.

Definiert in Zeile 352 der Datei Log2ConsoleFile.cs.

353  {
354  this.FileOpen();
355 
356  this.LogPrint(fps_Name);
357  this.LevelCounter++;
358  this.BlankBefore();
359 
360  this.FileClose();
361  }
void LogPrint(string fps_Message)
LogPrint Function: Prints the values of expressions to the results file.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: