/***** conversion functions ****/ /// <summary> Converts a byte array to escaped string. </summary> /// <param name="byteArray"> Array of bytes. </param> /// <returns> input value as an escaped string. </returns> private static string BytesToEscapedString(byte[] byteArray) { try { string stringValue = _stringEncoder.GetString(byteArray); return(Escaping.Escape(stringValue)); } catch (Exception) { return(null); } }
// ***** Binary **** / /// <summary> Adds a binary command argument. </summary> /// <param name="argument"> The argument. </param> public void AddBinArgument(string argument) { _arguments.Add(Escaping.Escape(argument)); }
// ***** Binary **** / /// <summary> Adds a binary command argument. </summary> /// <param name="argument"> The argument. </param> public void AddBinArgument(string argument) { _lazyArguments.Add(() => CmdArgs.Add(Escaping.Escape(argument))); }