コード例 #1
0
        private List <AttachmentMold> UploadAttachment()
        {
            var response = new SetAttachment();
            var result   = new List <AttachmentMold>();

            Task.WaitAll(
                AttachmentsPath.Select(attachment => Task.Run(() =>
            {
                var reqestResult =
                    _serviceClient
                    .PostFileWithRequest <AttachmentMold>(File.OpenRead(attachment), new FileInfo(attachment).Name, response);

                result.Add(reqestResult);
            })).ToArray());

            return(result);
        }