public static IDiBindingActionBuilder <T> LinkSubscribable <T>(this IDiBindingActionBuilder <T> actionBuilder) where T : ISubscribable { actionBuilder.WhenInit((c, o) => o.Subscribe()); actionBuilder.WhenDispose((o) => o.Unsubscribe()); return(actionBuilder); }
public static IDiBindingActionBuilder <T> LinkDisposable <T>(this IDiBindingActionBuilder <T> actionBuilder) where T : IDisposable { return(actionBuilder.WhenDispose((o) => o.Dispose())); }