示例#1
0
 private async Task FillAttachment(MimePart attachment, ApifyTaskResult atr)
 {
     attachment.Content                 = new MimeContent(atr.TaskResult, ContentEncoding.Default);
     attachment.ContentDisposition      = new ContentDisposition(ContentDisposition.Attachment);
     attachment.ContentTransferEncoding = ContentEncoding.Base64;
     attachment.FileName                = atr.Name;
 }
        public async Task <ApifyTaskResult> GetApifyTaskResult(string task, MimeTypeEnum format)
        {
            ApifyTaskResult atr = new ApifyTaskResult();

            atr.TaskResult = await GetTaskResult(task, format);

            atr.MimeType = format;
            var taskObject = await GetTaskObject(task);

            atr.Name = taskObject.data.name;

            return(atr);
        }