It seems to me you are re-creating C++ macros... (Like ASSERT...). Maybe you just need a C# pre-compiler embedded in your IDE ?
Benjamin Raibaud Cambridge Technology Partners, Novell +41 22 306 47 54 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of George Birbilis Sent: Thursday, 13. January 2005 16:48 To: mono; Raibaud, Benjamin Subject: Re: [Mono-list] Implementing attribute-based code generation > [Precondition("o != null")] > [Postcondition("size > 0")] > void AddObject(Object o) { > // ... do stuff ... > return; > } > > Which would then at compile time insert > > void AddObject(Object o) { > Check.Require(o != null); > // ... do stuf ... > Check.Ensure(size > 0); > return; > } a problem may be that the text in the precondition etc. would need special IDE support for IntelliSense etc. if it was in the code block instead of being a string it would be better maybe ----- George Birbilis ([EMAIL PROTECTED]) http://www.kagi.com/birbilis -------------- _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
