Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
 public IDisposable Subscribe <M>(Action <M> subscription, ISubscriptionShaper customization)
 {
     return(_subscriber.Subscribe(subscription, customization));
 }
Ejemplo n.º 4
0
 /// <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);
 }
Ejemplo n.º 5
0
 public IDisposable Subscribe <M>(Action <M> subscription, ISubscriptionShaper shaper)
 {
     return(this);
 }