コード例 #1
0
        async public Task <string> GetProofDocumentUrl(string citizenIdentifier)
        {
            var           proofDocSvcEndpoint = ServiceEndPointResolver.GetServiceEndPoint(ServiceEndpoints.proofsvcEndPoint, null);
            ProofDocProxy proofDocSvc         = new ProofDocProxy(proofDocSvcEndpoint, new HttpClient());

            return(await proofDocSvc.GetProofDocAsync(citizenIdentifier, citizenIdentifier));
        }
コード例 #2
0
        async public Task <bool> ValidateHash(string citizenIdentifier, string hash)
        {
            var           proofDocSvcEndpoint = ServiceEndPointResolver.GetServiceEndPoint(ServiceEndpoints.proofsvcEndPoint, null);
            ProofDocProxy proofDocSvc         = new ProofDocProxy(proofDocSvcEndpoint, new HttpClient());

            return(await proofDocSvc.ValidateFileWithHashAsync(citizenIdentifier, citizenIdentifier, hash));
        }
コード例 #3
0
        async public Task <HealthcareBC.ProofDocSvc.DocProof> PutProofDoc(string fileName, Stream fileStream, string citizenIdentifier)
        {
            if (fileStream.Length == 0)
            {
                return(null);
            }

            FileParameter file = null;

            file = new FileParameter(fileStream, fileName);

            var           proofDocSvcEndpoint = ServiceEndPointResolver.GetServiceEndPoint(ServiceEndpoints.proofsvcEndPoint, null);
            ProofDocProxy proofDocSvc         = new ProofDocProxy(proofDocSvcEndpoint, new HttpClient());

            return(await proofDocSvc.PutProofDocAsync(file, citizenIdentifier, citizenIdentifier));
        }