Example #1
0
        private List<DocumentReference.ContentComponent> SetContent(GenerateDocumentReferenceOptions arguments)
        {
                var contentComponent = new DocumentReference.ContentComponent();
                var attachment = new Attachment();

                attachment.ContentType = arguments.ContentType;
                attachment.Url = $"Binary/{arguments.Id}";

                contentComponent.Attachment = attachment;

                return new List<DocumentReference.ContentComponent> { contentComponent };    
        }    
Example #2
0
        public DocumentReference GenerateDocumentReference(GenerateDocumentReferenceOptions arguments)
        {
            _logger.LogInformation($"Loading documentreference id: '{arguments.Id}'.");           

            return new DocumentReference
            {
                Id = arguments?.Id,
                Status = DocumentReferenceStatus.Current,
                Category = SetCategory(),
                Content = SetContent(arguments),
            };
        }