void SelectedAssets(List <ALAsset> assets) { var results = new List <AssetResult> (assets.Count); foreach (var asset in assets) { var obj = asset.AssetType; if (obj == default(ALAssetType)) { continue; } var rep = asset.DefaultRepresentation; if (rep != null) { var result = new AssetResult(); UIImageOrientation orientation = UIImageOrientation.Up; var cgImage = rep.GetFullScreenImage(); result.Image = new UIImage(cgImage, 1.0f, orientation); results.Add(result); } } _TaskCompletionSource.TrySetResult(results); }
void SelectedAssets(List<ALAsset> assets) { var results = new List<AssetResult> (assets.Count); foreach (var asset in assets) { var obj = asset.AssetType; if (obj == default (ALAssetType)) continue; var rep = asset.DefaultRepresentation; if (rep != null) { var result = new AssetResult (); UIImageOrientation orientation = UIImageOrientation.Up; var cgImage = rep.GetFullScreenImage (); result.Image = new UIImage (cgImage, 1.0f, orientation); results.Add (result); } } _TaskCompletionSource.TrySetResult (results); }