public static PDF From(FormattedFile file) { return(PDF.deserialize(file.serialize())); }
private PDF verificationRequest(FormattedFile file, string key) { // TODO: Connect to JEE Message messageToSend = new Message("verificationFile", "0.1", new string[] { file.serialize() }); // Mock the response PDF pdf = new PDF(); pdf.path = file.path; pdf.filename = file.filename; pdf.content = file.content; pdf.validity = false; pdf.pourcentage = 24.5; pdf.tested = 200; pdf.recognized = 49; Message mockedResponse = new Message("verificationFile", "0.1", new string[] { pdf.serialize() }); PDF receivedFile = PDF.deserialize((string)mockedResponse.data[0]); receivedFile.key = key; if (receivedFile.validity) { return(receivedFile); } return(null); }