예제 #1
0
        private void generateOutput(Action <IActionBehavior> innerInvocation)
        {
            var resourceHash = _currentChain.ResourceHash();

            var output = _cache.Retrieve(resourceHash, () => CreateOuput(resourceHash, innerInvocation));

            _writer.Replay(output);
        }
예제 #2
0
        private IRecordedOutput storeAgainstResource(string resourceHash)
        {
            var output = getOutputWithEtag(Guid.NewGuid().ToString());

            theOutputCache.Retrieve(resourceHash, () => output);

            return(output);
        }
예제 #3
0
        protected override void invoke(Action action)
        {
            var resourceHash = _hash.CreateHash();

            bool hit = true;

            var output = _cache.Retrieve(resourceHash, () =>
            {
                hit             = false;
                var returnValue = CreateOutput(resourceHash, action);

                return(returnValue);
            });



            log(hit);

            _writer.Replay(output);
        }