/// <summary> /// Initializes a new instance of the <see cref="UEManifestReader" /> class. /// </summary> /// <param name="stream">The <see cref="Stream" /> of the manifest content.</param> /// <param name="readSettings">Manifest reading settings.</param> /// <param name="writeOutputToFileWhileReading"> /// If <see langword="true" />, output is gonna be written to file while the /// manifest file is being read using default json output format. /// </param> /// <param name="outputFileName"> /// File name of the file to which the json output is written. Can be <see langword="null" /> /// if <paramref name="writeOutputToFileWhileReading" /> is <see langword="false" />. /// </param> /// <param name="outputFormat">Json output format.</param> public UESerializedManifestReader( Stream stream, CustomManifestReadSettings readSettings, bool writeOutputToFileWhileReading, string outputFileName, JsonOutputFormatFlags outputFormat) : this(readSettings, writeOutputToFileWhileReading, outputFileName, outputFormat) =>
/// <summary> /// Initializes a new instance of the <see cref="UEManifestReader" /> class. /// </summary> /// <param name="file">Path to the file to read.</param> /// <param name="readSettings">Manifest reading settings.</param> /// <param name="writeOutputToFileWhileReading"> /// If <see langword="true" />, output is gonna be written to file while the /// manifest file is being read using default json output format. /// </param> /// <param name="outputFileName"> /// File name of the file to which the json output is written. Can be <see langword="null" /> /// if <paramref name="writeOutputToFileWhileReading" /> is <see langword="false" />. /// </param> /// <param name="outputFormat">Json output format.</param> public UESerializedManifestReader( string file, CustomManifestReadSettings readSettings, bool writeOutputToFileWhileReading, string outputFileName, JsonOutputFormatFlags outputFormat) : this(readSettings, writeOutputToFileWhileReading, outputFileName, outputFormat) { if (!File.Exists(file)) { throw new FileNotFoundException(); } _fileHandle = File.OpenRead(file); _reader = new BufferedStream(_fileHandle); }
/// <summary> /// Initializes a new instance of the <see cref="UEManifestReader" /> class. /// </summary> /// <param name="manifestData">Manifest content data.</param> /// <param name="writeDataToTempFile"> /// If <see langword="true" />, write the manifest data to a file and read it from it, /// else read the content from memory. /// </param> /// <param name="fileName"> /// Name of the file to write the data to. Can be <see langword="null" /> if /// <paramref name="writeDataToTempFile" /> is <see langword="false" />. /// </param> /// <param name="readSettings">Manifest reading settings.</param> /// <param name="writeOutputToFileWhileReading"> /// If <see langword="true" />, output is gonna be written to file while the /// manifest file is being read using default json output format. /// </param> /// <param name="outputFileName"> /// File name of the file to which the json output is written. Can be <see langword="null" /> /// if <paramref name="writeOutputToFileWhileReading" /> is <see langword="false" />. /// </param> /// <param name="outputFormat">Json output format.</param> public UESerializedManifestReader( byte[] manifestData, bool writeDataToTempFile, string fileName, CustomManifestReadSettings readSettings, bool writeOutputToFileWhileReading, string outputFileName, JsonOutputFormatFlags outputFormat) : this(readSettings, writeOutputToFileWhileReading, outputFileName, outputFormat) { if (writeDataToTempFile) { File.WriteAllBytes(fileName, manifestData); _fileHandle = File.OpenRead(fileName); _reader = new BufferedStream(_fileHandle); _tempFileBuffer = fileName; } _reader = new MemoryStream(manifestData); }