Пример #1
0
        public async Task <bool> RunUploadSignedDocumentActivity([ActivityTrigger] UploadSignedDocumentModel request)
        {
            await blobStorageRepository.UploadBlobAsync(System.Convert.FromBase64String(request.Content),
                                                        $"{request.ContainerName}/signedDocuments",
                                                        $"{request.BlobName}.xsig");

            return(true);
        }
        private async Task <bool> UploadSignedDocumentAsync(IDurableOrchestrationContext context, ILogger log,
                                                            string signedDocument, string containerName, string blobName)
        {
            var request = new UploadSignedDocumentModel()
            {
                ContainerName = containerName,
                BlobName      = blobName,
                Content       = signedDocument
            };

            log.LogInformation($"Orchestration {context.InstanceId}: Uploading XSIG.");
            var result = await context.CallActivityAsync <bool>(nameof(UploadSignedDocumentActivity), request);

            log.LogInformation($"Orchestration {context.InstanceId}: XSIG Uploaded.");
            return(result);
        }