public TestHelper Get_PAdES()
        {
            Assert_state(_status);

            var pades = _directClient.GetPades(_status.References.Pades).Result;

            Assert.True(pades.CanRead);
            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);
            }
        }
        public async Task GetXadesAndPades()
        {
            ClientConfiguration clientConfiguration = null; //As initialized earlier
            var directClient = new DirectClient(clientConfiguration);
            JobStatusResponse jobStatusResponse = null; // Result of requesting job status

            switch (jobStatusResponse.Status)
            {
                case JobStatus.Rejected:
                    //Signature job was rejected by the signer. Xades and Pades cannot be requested.
                    break;
                case JobStatus.Failed:
                    //Signature job failed, Xades and Pades cannot be requested.
                    break;
                case JobStatus.Signed:
                    var xadesByteStream = await directClient.GetXades(jobStatusResponse.References.Xades);
                    var padesByteStream = await directClient.GetPades(jobStatusResponse.References.Pades);
                    break;
            }
        }
        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.GetSignatureFrom(new PersonalIdentificationNumber("12345678910"));

            if (signature.Equals(SignatureStatus.Signed))
            {
                var xadesByteStream = await directClient.GetXades(signature.XadesReference);
            }
        }