Beispiel #1
0
        public override void OnEntry(MethodExecutionArgs arg)
        {
            pObject         obj   = arg.Instance as pObject;
            DictionaryCache cache = obj.Cache;

            if (!cache.IsCached(arg.Method))
            {
                arg.ExecuteBody = true;
            }
        }
Beispiel #2
0
        public override void OnExit(MethodExecutionArgs arg)
        {
            pObject         obj   = arg.Instance as pObject;
            DictionaryCache cache = obj.Cache;

            if (arg.ExecuteBody)
            {
                cache.AddToCache(arg.Method, Channel, arg.ReturnValue);
            }
            else
            {
                arg.ReturnValue = cache.GetValue(arg.Method);
            }
        }