public TestHelper Expect_job_to_have_status(JobStatus expectedJobStatus, params KeyValuePair <SignerIdentifier, SignatureStatus>[] expectedSignatureStatuses) { Assert_state(_status); Assert.Equal(expectedJobStatus, _status.Status); foreach (var expectedSignatureStatus in expectedSignatureStatuses) { Assert.Equal(expectedSignatureStatus.Value, _status.GetSignatureFor(expectedSignatureStatus.Key).SignatureStatus); } return(this); }
public async Task GetXadesAndPades() { ClientConfiguration clientConfiguration = null; //As initialized earlier var directClient = new DirectClient(clientConfiguration); JobStatusResponse jobStatusResponse = null; // Result of requesting job status if (jobStatusResponse.Status == JobStatus.CompletedSuccessfully) { var padesByteStream = await directClient.GetPades(jobStatusResponse.References.Pades); } var signature = jobStatusResponse.GetSignatureFor(new PersonalIdentificationNumber("00000000000")); if (signature.Equals(SignatureStatus.Signed)) { var xadesByteStream = await directClient.GetXades(signature.XadesReference); } }