namespace FFMpegCore.Extend { internal static class KeyValuePairExtensions { /// /// Concat the two members of a /// /// Input object /// /// If true encloses the value part between quotes if contains an space character. If false use the /// value unmodified /// /// The formatted string public static string FormatArgumentPair(this KeyValuePair pair, bool enclose) { var key = pair.Key; var value = enclose ? StringExtensions.EncloseIfContainsSpace(pair.Value) : pair.Value; return $"{key}={value}"; } } }