[Mono-devel-list] NET_2_0 attributes

Marek Safar marek.safar at seznam.cz
Wed Sep 22 15:40:18 EDT 2004


>>>I think we need to implement this stuff in the C part of the runtime.
>>>The icalls need to be changed, too, to match the MS CLR implementation
>>>wrt attribute creation. Last time I checked:
>>>*) IsDefined() didn't cause the attributes to be created
>>>
>>>
>>>      
>>>
>>OK, but that is different story. This is all valid for normal attributes 
>>not for pseudo.
>>    
>>
>
>It needs to be done for all kinds and we want to have the logic in one
>place.
>  
>
Why ?
It will be slower a out of context. I don't understand why do you want 
to test whether type is Serializable somewhere in deep runtime, when we 
have had this code in corlib already.
I think it will be a lot of useless casts instead of simplicity of 
virtual methods in my patch.

>  
>
>>>*) GetCustomAttributes (type, ...) caused just the attributes matching
>>>type to be created
>>>
>>>
>>>      
>>>
>>For pseudo attributes this is fulfilled.
>>    
>>
>
>See above.
>
>  
>
>>>*) the attributes need to be created at each invocation (I think we
>>>might have fixed this already)
>>>
>>>
>>>      
>>>
>>For parameterless attribute it is useless.
>>    
>>
>
>It's not. Parameterless attributes may have state that can be changed as
>any other and the constructor can have any arbitrary side effect.
>  
>
OK, I thought attributes with parameterless constructor and no property 
e.g. SerializableAttribute, ComImportAttribute, InAttribute,....

Marek



More information about the Mono-devel-list mailing list