0

Can you make custom annotations,something like

[MyAnnotation]  
public int Random {get; set;}

The reason I'm asking is I'm using T4 templates from Steven Sanderson Scaffolder and I'm trying to use my custom annotations so I can mark which property to scaffold and which not and many other things. Can I make my own annotations and how can I read them inside T4 file.

Thanks

EDIT:
I realised that my annotation should look something like

[MyAnnotation(some string)]  

how can I check (in T4) to what is that string set for my annotation?

Medo
  • 968
  • 1
  • 11
  • 26
  • Yes you can create a class deriving from `ValidationAttribute` and override `isValid` – PSL Dec 06 '13 at 23:03
  • I learned how to make my own annotations but getting it's value in T4 is beyond my power :( – Medo Dec 15 '13 at 01:26

0 Answers0