arnaud.giuliani
03/13/2019, 3:12 PM/**
* Bind given scope to current LifecycleOwner
* @param scope
* @param event
*/
fun LifecycleOwner.bindScope(scope: Scope, event : Lifecycle.Event = Lifecycle.Event.ON_DESTROY) {
lifecycle.addObserver(ScopeObserver(event, this, scope))
}