namespace VideoBrowser.Helpers { using System.Collections.Generic; /// /// Defines the /// /// public class FFMpegResult { #region Constructors /// /// Initializes a new instance of the class. /// /// The exitCode /// The errors public FFMpegResult(int exitCode, IEnumerable errors) { this.Value = default(T); this.ExitCode = exitCode; this.Errors = new List(errors); } /// /// Initializes a new instance of the class. /// /// The result public FFMpegResult(T result) { this.Value = result; this.ExitCode = 0; this.Errors = null; } /// /// Initializes a new instance of the class. /// /// The value /// The exitCode /// The errors public FFMpegResult(T value, int exitCode, IEnumerable errors) { this.Value = value; this.ExitCode = exitCode; this.Errors = new List(errors); } #endregion Constructors #region Properties /// /// Gets the Errors /// Gets a list of errors from running FFmpeg. Returns null if there wasn't any errors. /// public List Errors { get; private set; } /// /// Gets or sets the ExitCode /// Gets the FFmpeg exit code. /// public int ExitCode { get; set; } /// /// Gets the result value. /// public T Value { get; private set; } #endregion Properties } }