Prism AOP - 4
I’ve played a little more with Prism. I find it a little difficult to mentally code on two levels. Level one being the code I am writing for the aspect, and level two being the code I am writing which will executed by the target. Having said that, as soon as I ran my app and saw the output everything was worthwhile. Here is my Person class type [aspect: EcoAspects.BusinessClass(’DomainClasses.Package1’)] Person = public class private FFirstName: String; FLastName: String; protected public property FirstName : String read FFirstName write FFirstName; property LastName : String read FLastName write FLastName; end; here is the code which uses that class class method ConsoleApp.Main; var P: Person; begin P := new Person(); for A in typeOf(Package1).GetCustomAttributes(true) do Console.WriteLine(a.ToString()); P.FirstName := ’Peter’; P.LastName := ’Morris’; ShowGetValueByIndexResult(P as ILoopBack2, 0); ShowGetValueByIndexResult(P as ILoop