public static Task <BandTile[]> GetTilesTaskAsync(this IBandTileManager manager)
        {
            var tcs = new TaskCompletionSource <BandTile[]> ();

            manager.GetTilesAsync(tcs.AttachCompletionHandler());
            return(tcs.Task);
        }
Beispiel #2
0
        public static async Task <IEnumerable <BandTile> > GetTilesTaskAsync(this IBandTileManager manager)
        {
            var result = await manager.GetTilesAsync().AsTask();

            var tiles      = (Java.Util.ICollection)result;
            var enumerable = tiles.ToEnumerable <BandTile>();

            return(enumerable);
        }