示例#1
0
 void IConfigureSubscription.ShapeOutwards(params ISubscriptionShaper[] shapers)
 {
     foreach (var s in shapers)
     {
         s.TryInvoke(d => d.Services = _services);
         _shaperAggregate.Add(s);
     }
 }
示例#2
0
 void IConfigureSubscription.ShapeOutwards(params ISubscriptionShaper[] shapers)
 {
     foreach (var s in shapers)
     {
         s.Being <IRequireServices>(d => d.AddServices(_services));
         _shaperAggregate.Add(s);
     }
 }
示例#3
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());
        }