Hello Leo,
It was easy to track the problem, your class must expose virtual methods =
to=20
be intercepted. It will be a really complex situation if you wrap a concr=
ete=20
class with some virtual methods and some non-virtual. This ought to be=20
documented in the caveats section in the documentation
http://aspectsharp.sourceforge.net/doc_aspectengine.html
The best way is to use interface and wrap interfaces (see the docs). But =
in=20
your case, just mark all methods as virtual and all will be fine.
Cheers!
hammett
----- Original Message -----=20
From: "Wang Yu (Sh)" <Leo...@gr...>
To: "hammett" <ha...@uo...>
Sent: Thursday, October 14, 2004 7:47 PM
Subject: re: Aspect#
Hi,hammett:
Thanks for your reply! And an little project is attached in this mail. Th=
ere=20
are only three simple classes in this project, the first is Entiy which=20
should be intercepted; the second is MethodInterceptor which is designed =
to=20
intercept the method MethodSample of Entiy; and the last one is Class1 to=
=20
run this case. everything seems ok, except the interceptor can no be "bou=
nd"=20
to the Entiy.
Thanks for yours viewing of my code, and hope for your reply.
Best wishes,
Yours leo
-----=D3=CA=BC=FE=D4=AD=BC=FE-----
=B7=A2=BC=FE=C8=CB: hammett [mailto:ha...@uo...]
=B7=A2=CB=CD=CA=B1=BC=E4: 2004=C4=EA10=D4=C215=C8=D5 02:32
=CA=D5=BC=FE=C8=CB: Wang Yu (Sh)
=B3=AD=CB=CD: asp...@li...
=D6=F7=CC=E2: Aspect#
Hello Leo,
You've published the follow comment on my blog:
" hi, thanks for your great job!
I just downloaded the Aspect# from Sourceforge, and tasted it:) the Mixin
works well but the Interceptor I wrote can not run on the right way... ev=
en
the config script was copied from the sample code. would you please tell =
me
the email of you and help me to solve this issue? I will send you the sou=
rce
code I wrote. Thanks in advance!!! "
Well, what's wrong. Can you please post the source code on this list?
Cheers
hammett
|