Ejemplo n.º 1
0
 internal static async void Upload(ListItem listItem, HtmlCollection <File> files)
 {
     for (int i = 0; i < files.Length; i++)
     {
         if (!await LazyWindow.ShowWaiting(string.Format("{0}: uploading...", files[i].Name),
                                           delegate(CancellationToken cancellationToken)
         {
             return(listItem.AddAttachment(UriUtility.GetFileName(files[i].Name), files[i], cancellationToken));
         }))
         {
             break;
         }
     }
 }