public static SplitArray ( byte arr ) : byte[][] | ||
arr | byte | |
Résultat | byte[][] |
public static GearmanJobStatus UnpackStatusResponse(IResponsePacket response) { var args = Util.SplitArray(response.GetData()); return(new GearmanJobStatus( Encoding.UTF8.GetString(args[0]), uint.Parse(Encoding.UTF8.GetString(args[1])) == 0 ? false : true, uint.Parse(Encoding.UTF8.GetString(args[2])) == 0 ? false : true, uint.Parse(Encoding.UTF8.GetString(args[3])), uint.Parse(Encoding.UTF8.GetString(args[4])))); }
public static GearmanJobInfo UnpackJobAssignResponse(IResponsePacket response) { var args = Util.SplitArray(response.GetData()); return(new GearmanJobInfo { JobHandle = Encoding.UTF8.GetString(args[0]), FunctionName = Encoding.UTF8.GetString(args[1]), FunctionArgument = args[2] }); }
public static GearmanServerException UnpackErrorReponse(IResponsePacket response) { var args = Util.SplitArray(response.GetData()); throw new GearmanServerException(Encoding.UTF8.GetString(args[0]), Encoding.UTF8.GetString(args[1])); }
public static GearmanJobData UnpackWorkDataResponse(IResponsePacket response) { var args = Util.SplitArray(response.GetData()); return(new GearmanJobData(Encoding.UTF8.GetString(args[0]), args[1])); }