/// <summary> /// Encode /// </summary> /// <param name="target">Target</param> /// <param name="payload">Payload</param> public override byte[] Run(Target target, Payload payload) { if (payload == null) return null; return Encoding.Default.GetBytes(Convert.ToBase64String(payload.GetValue(target))); }
/// <summary> /// Runt /// </summary> /// <param name="payload">Payload</param> /// <returns>Return encoded payload</returns> public virtual byte[] Run(Payload payload) { throw (new NotImplementedException()); }
/// <summary> /// Encode /// </summary> /// <param name="input">Input</param> /// <returns>Return object</returns> public override byte[] Run(Payload payload) { if (payload == null) return null; return payload.Encoding.GetBytes(Convert.ToBase64String(payload.Value)); }