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