in

DotNetMarche

.NET Framework User Group delle Marche

Castle AOP e attributi classe

Last post 21 Dec 2010 8:06 by ciamberlini. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11 Dec 2010 19:38

    Castle AOP e attributi classe

    Salve a tutti! Sto implementando anche io a furia di letture screencast webcast imprecazioni ed euforia a tratti, il mio primo domain model :-) In particolare ho questa situazione: [Something("Pippo", "Pluto")] class Customer { .... } ora il problema è: come faccio con un aspetto ad acchiappare quel custom attribute Something? Ho visto che l'interfaccia IInvocation dell'interceptor espone una proprietà TargetType ma ho provando a debuggare gli attributes e mi dice che sono in totale zero :-(
    Simone Ciamberlini
    Cazzaro
    Filed under:
  • 21 Dec 2010 8:06 In reply to

    Re: Castle AOP e attributi classe

    Come non detto, risolto tramite reflection sulla proprietà TargetType di IInvocation, poi ho cachato il tutto in un dictionary per velocizzare le successive chiamate. :-)
    Simone Ciamberlini
    Cazzaro
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems