Not that I know of .. but there are many people around here who are alot
"eacsub" <eacsub@discussions.microsoft.com> wrote in message
news:75588B47-3DEE-4BC7-9F57-5C8645505DF7@microsoft.com...
> Thank you Greg. Although, I don't think I wan't to substitute microsoft
> compiler for a third party compiler and I don't want to create my own
> compiler. Is there a middle way where i can intercept the compilation
> process
> so that I read the attributes and convert them into code in the message
> body
> and compile that code and produce the final assembly. maybe:
>
> - compile into assembly with the attributes
> - load the assembly, read the attributes and produce the code in the
> method
> body
> - compile the final code and generate the final assemble that has the
> assertions.
>
> "Greg Young" wrote:
>
>> Is this what you were looking at from microsoft?
>>
http://research.microsoft.com/research/pubs/view.aspx?msr_tr_id=MSR-TR-2003-32 >>
>> There is also an extensible commercial compiler XC#
>>
http://www.resolvecorp.com/ which might suit your needs; in fact they
>> have
>> an example of almost exactly what you are trying to do here
>>
http://www.resolvecorp.com/products.aspx >>
>> Cheers,
>>
>> Greg Young
>> MVP - C#
>> "eacsub" <eacsub@discussions.microsoft.com> wrote in message
>> news:794FB233-CFE3-410B-A0AB-F42143A8FC17@microsoft.com...
>> >I would like to solve the problem of method parameter verfication in
>> >order
>> >to
>> > avoid to writing repetitive code to validate method parameters, for
>> > example:
>> >
>> > void method(object param)
>> > {
>> > if (param = null)
>> > {
>> > throw new ArgumentNullException("param");
>> > }
>> > }
>> >
>> > and do it throw attibutes that decorate the mothods. but the I don't
>> > want
>> > the preformance hit associated with reflection especially when it's
>> > associated with each method invocation.
>> >
>> > Is it possible to some how make the complire produce the code by
>> > reading
>> > the
>> > attributes? Is it possible to extend the compiler some how? I remeber
>> > reading
>> > something about extending the compiler in MSDN but i can't find it. is
>> > this
>> > doable?
>>
>>
>>