Open Rails

STFReader Constructor

[This is preliminary documentation and subject to change.]

Use an open stream for STF parsing, this constructor assumes that the SIMIS signature has already been gathered (or there isn't one)

STFReader(
   Stream inputStream,
   string fileName,
   Encoding encoding,
   bool useTree
);

Parameters

inputStream
Stream that will be parsed.
fileName
Is only used for error reporting.
encoding
One of the Encoding formats, defined as static members in Encoding which return an Encoding type. Eg. Encoding.ASCII or Encoding.Unicode
useTree

true - if the consumer is going to use the Tree Property as it's parsing method (MSTS wagons & engines)

false - if Tree is not used which signicantly reduces GC

See Also

STFReader Class | Orts.Parsers.Msts Namespace | STFReader Constructor Overload List