Home

Castle Stronghold

Table of contents

  • 1 General questions
    • 1.1 May I extend the AspectEngine class?
    • 1.2 Have you tested Aspect# against CLI 2.0?
    • 1.3 Which assemblies are necessary in my project in order to benefit from Aspect#?
    • 1.4 Is Aspect# able to do dynamic weaving, i.e. in contrary to static weaving decided at runtime whether an object shall have the given aspect or not?
    • 1.5 Aspect# and its dependent assemblies are under which licenses?
    • 1.6 Have you tested Aspect# against Mono?
  • 2 Usage Questions
    • 2.1 I'm getting a stack overflow in a specific situation. What's wrong?
    • 2.2 I'm getting an awkward proxy error when I Wrap an specific class. What can possible be wrong?
  • 3 Design Questions
    • 3.1 How to introduce AOP in a more transparent way?

FAQ

This page has a list of frequently asked questions.

General questions

May I extend the AspectEngine class?

Certainly! Why not? You'll probably have to extend the AbstractEngineBuilder, though.

Have you tested Aspect# against CLI 2.0?

Whidbey Beta 1:

Test started: Assembly: AspectSharp.Tests.dll
37 succeeded, 0 failed, 0 skipped, took 4.22 seconds.
Test started: Assembly: AspectSharp.Lang.Tests.dll
76 succeeded, 0 failed, 0 skipped, took 2.56 seconds.

Which assemblies are necessary in my project in order to benefit from Aspect#?

Is Aspect# able to do dynamic weaving, i.e. in contrary to static weaving decided at runtime whether an object shall have the given aspect or not?

Not out of the box. You can have implement something like that using custom matchers, or if you need a more complex semantic you can join our mailing list and tell us what you have in mind :-)

Aspect# and its dependent assemblies are under which licenses?

ASL or compatible. Aspect# and Avalon.DynamicProxy are under Apache Software Foundation license which basically means you can do anything you want with the code. Antlr is under Terence Parr's license which, from our understanding, is compatible with ASL.

Have you tested Aspect# against Mono?

Yes. But due a bug in the Mono Runtime(a ldtoken issue) the tests are failing.

Usage Questions

I'm getting a stack overflow in a specific situation. What's wrong?

If your method interceptor invokes a method in the proxy object which is also intercepted by the same interceptor then you'll have a stack overflow. To prevent it:

Avoid invoking methods on the proxy object in the body of an interceptor, or if you do so, think ahead if you can possible be trapped by a stack overflow situation. Try to define specific pointcuts instead of more general ones.

I'm getting an awkward proxy error when I Wrap an specific class. What can possible be wrong?

Check if your class' constructor is invoking a virtual method. This is a know bug and we plan to solve this before the beta release.

Design Questions

How to introduce AOP in a more transparent way?

You should use an inversion of control container or a similar approach to hide the components set up.

Google
Search WWW Search castleproject.org