Hi

If we are to keep the cache as a field in the proxy type, we might as
well instead of creating another type (SelectionResultCache) create an
IInterceptor[] field per each cached method, simiar to the way its done
in my patch
BUT, instead of code-gening selection, pass the field by ref to the
Invocation object, along with the selector and then if the field is null
perform the selection. This adds the minimal anmount of code that should
be generated (an additional field per proxied method) while not having
the cost of dictionary lookup at runtime.

Other than that, back to your suggestion:
Selector's cache must not be static. That is because each INSTANCE can
have different interceptors, and as such, can have different
interceptors for different methods. You'd have to keep mapping
ProxyInstance-->MethodInfo-->interceptors but then You'd keep static
reference to potentially short-lived object.

Krzysztof

CONFIDENTIALITY NOTICE
This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged, confidential or otherwise legally exempt from disclosure. If you 
are not the named addressee, you are not authorized to read, print, retain, 
copy or disseminate this message or any part of it. If you have received this 
message in error, please delete all copies of this message and notify the 
sender immediately by return mail or fax ATSI S.A.(+4812) 285 36 04.
Any email attachment may contain software viruses which could damage your own 
computer system. Whilst reasonable precaution has been taken to minimise this 
risk, we cannot accept liability for any damage which you sustain as a result 
of software viruses. You should therefore carry out your own virus checks 
before opening any attachments.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to