This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.cjgaliana.utils | |
| import kotlinx.coroutines.delay | |
| import timber.log.Timber | |
| suspend fun <T> retryWhen( | |
| predicate: (cause: Exception, attempt: Int) -> Boolean, | |
| delayInMilliseconds: Long = 0, | |
| block: suspend () -> T | |
| ): T { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.cjgaliana.snippets | |
| import kotlinx.coroutines.Deferred | |
| import kotlinx.coroutines.awaitAll | |
| suspend fun <T> Collection<Deferred<T>>.awaitAll(parallelLimit: Int): List<T> { | |
| if(this.isEmpty()) { | |
| return emptyList() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Threading.Tasks; | |
| using Security; | |
| using Foundation; | |
| using System.Collections.Generic; | |
| namespace SecureStorageTest | |
| { | |
| public class SecureStorage | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Licence: MIT X11 | |
| // Note: This is an Objective-C to C# translation by using code from: http://code.google.com/p/toast-notifications-ios/ | |
| using MonoTouch.Foundation; | |
| using MonoTouch.UIKit; | |
| using System; | |
| using System.Drawing; | |
| namespace Tabasco.iOS.Dialog | |
| { | |
| /// <summary> |