Author Topic: code gen templates - ASMOL*  (Read 2713 times)

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
code gen templates - ASMOL*
« on: September 20, 2004, 12:00:54 am »
Could anyone please explain what this does? (If anything?) In C#?

%if elemType == "Interface"%
%if opTag:"Attribute" != ""%            
%REPLACE(opTag:"Attribute", ";", "\n")
%endIf%

tia

Bruce

(* another sweet mystery of life)
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: code gen templates - ASMOL*
« Reply #1 on: September 20, 2004, 12:24:02 am »
It ouputs the .Net attributes for the current method.  So for an operation that has an "Attribute" tagged value with the text "[MyCustomAttribute("blah")];[Something]" it will produce something like this.

Code: [Select]
[MyCustomAttribute("blah")]
[Something]
private void operation1(){
}


It does this because that is the way they are reversed into the model when reverse engineering.  (Or is it that they are reverse engineered that way because the templates do this?)

Anyway, I've ignored the bit that says is this class an interface.  Up to this point, but I thought that was the relatively clear bit.

Simon.

PS.  I hope I haven't upset you by giving you the solution to this SMOL.  Don't worry, there are plenty more.

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: code gen templates - ASMOL*
« Reply #2 on: September 20, 2004, 04:01:02 pm »
Aha! I didn't see the reverse engineering side of it!
Thanks
Bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.