public IInterceptorChain ResolveParameterValue <TMessage, TPayload>(IMessage <object> message)
     where TMessage : IMessage <TPayload> where TPayload : class
 {
     return(CurrentUnitOfWork <TMessage, TPayload> .Map(
                uow => uow.GetResource <IInterceptorChain>(INTERCEPTOR_CHAIN_EMITTER_KEY)
                ) ?? throw new ArgumentException("InterceptorChain should have been injected"));
 }
Exemple #2
0
 public static IConflictResolver GetConflictResolver()
 {
     return(CurrentUnitOfWork.Map(uow =>
     {
         var conflictResolver = uow.GetResource <IConflictResolver>(CONFLICT_RESOLUTION_KEY);
         return conflictResolver == null ? NoConflictResolver.Instance : conflictResolver;
     }).OrElse(NoConflictResolver.Instance));
 }
 public bool ResolveParameterValue(IMessage message)
 {
     return(CurrentUnitOfWork.Map(unitOfWork => !(unitOfWork is BatchingUnitOfWork) || ((BatchingUnitOfWork)unitOfWork).IsLastMessage(message))
            .OrElse(true));
 }
 public IInterceptorChain ResolveParameterValue(IMessage message)
 {
     return(CurrentUnitOfWork.Map(uow => uow.GetResource <IInterceptorChain>(INTERCEPTOR_CHAIN_EMITTER_KEY))
            .OrElseThrow(() => new InvalidOperationException("InterceptorChain should have been injected")));
 }