using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tango.TFS { public class AttachementHandler { private Action _downloadAction; public String Name { get; set; } public string Comment { get; set; } public DateTime AttachedTimeUtc { get; set; } public string Extension { get; set; } public string FileGuid { get; set; } public long Length { get; set; } internal AttachementHandler(Action downloadAction) { _downloadAction = downloadAction; } public Task Download(String targetFile) { return Task.Factory.StartNew(() => { _downloadAction(targetFile); }); } } }