Lean
$LEAN_TAG$
|
This class wraps a StreamWriter so that the StreamWriter is only instantiated until WriteLine() is called. This ensures that the file the StreamWriter is writing to is only created if something is written to it. A StreamWriter will create a empty file as soon as it is instantiated. More...
Public Member Functions | |
LazyStreamWriter (string path) | |
Constructor for the LazyStreamWriter More... | |
void | WriteLine (string line) |
Wraps the WriteLine method of the StreamWriter. More... | |
void | Flush () |
Wraps the StreamWriter.Flush() method More... | |
void | Close () |
Wraps the StreamWriter.Close() method More... | |
This class wraps a StreamWriter so that the StreamWriter is only instantiated until WriteLine() is called. This ensures that the file the StreamWriter is writing to is only created if something is written to it. A StreamWriter will create a empty file as soon as it is instantiated.
Definition at line 25 of file LazyStreamWriter.cs.
QuantConnect.ToolBox.LazyStreamWriter.LazyStreamWriter | ( | string | path | ) |
Constructor for the LazyStreamWriter
path | Path to the file that should be created |
Definition at line 34 of file LazyStreamWriter.cs.
void QuantConnect.ToolBox.LazyStreamWriter.WriteLine | ( | string | line | ) |
Wraps the WriteLine method of the StreamWriter.
line | The line to write |
Will instantiate the StreamWriter if this is the first time this method is called
Definition at line 44 of file LazyStreamWriter.cs.
void QuantConnect.ToolBox.LazyStreamWriter.Flush | ( | ) |
Wraps the StreamWriter.Flush() method
Definition at line 54 of file LazyStreamWriter.cs.
void QuantConnect.ToolBox.LazyStreamWriter.Close | ( | ) |
Wraps the StreamWriter.Close() method
Definition at line 65 of file LazyStreamWriter.cs.