Beispiel #1
0
        public override IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
        {
            IMethodReturn         result  = null;
            Action <string, bool> logCall = (prefix, includeArguments) => LogInfoAsync(Builder.Build(input, result, includeArguments));

            using (Hole.OfTry(() => _provider, i => i.Increase(), i => i.Decrease()))
                using (Hole.OfTryFinal(() => logCall, log => log(IndentString + "Begin ", IncludesArguments), log => log(IndentString + "End ", false)))
                    return(result = getNext()(input, getNext));
        }
 public override IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
 {
     using (Hole.OfTry(() => CreateRecord(input), HangingMonitor.BeginMonitor, HangingMonitor.EndMonitor))
         return(getNext()(input, getNext));
 }