/// <summary> /// Say that this subscription must run on a UI thread /// </summary> public SubscriptionCustomizer <M> DispatchOnUiThread() { if (_services.Get <TaskScheduler>() == null) { throw new InvalidOperationException("No knowledge of a UI thread is available. This method cannot be called. Please setup your bus for a UI scenario with RichClientFrontend"); } _uiInvokeshape = new ShapeToUiDispatch(_services.Get <TaskScheduler>()); return(this); }
public IDisposable Subscribe <M>(Action <M> subscription, ISubscriptionShaper customization) { CheckDisposed(); var sShapeAgg = new SubscriptionShaperAggregate() { customization }; sShapeAgg.Add(new ShapeToDispose()); var sub = sShapeAgg.EnhanceSubscription(new MethodInvocation <M>(subscription)); _resolvers.Add(sub); return(sub.TryReturnDisposerOfSubscription()); }
public IDisposable Subscribe <M>(Action <M> subscription, ISubscriptionShaper customization) { return(_subscriber.Subscribe(subscription, customization)); }
/// <summary> /// Specify a filter to be put in front of the subscription. /// </summary> public SubscriptionCustomizer <M> SetFilter(Func <M, bool> filter) { _filterShape = new ShapeToFilter <M>(filter); return(this); }
public IDisposable Subscribe <M>(Action <M> subscription, ISubscriptionShaper shaper) { return(this); }