Example #1
0
        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);
        }
Example #2
0
 public static IDiBindingActionBuilder <T> LinkDisposable <T>(this IDiBindingActionBuilder <T> actionBuilder)
     where T : IDisposable
 {
     return(actionBuilder.WhenDispose((o) => o.Dispose()));
 }