[Mono-devel-list] NET_2_0 attributes
Raja R Harinath
rharinath at novell.com
Tue Sep 14 06:53:27 EDT 2004
Hi,
Marek Safar <marek.safar at seznam.cz> writes:
> I implemented transformation from pseudo attributes to normal attributes
> as Microsoft changed it for NET_2_0.
>
> Could someone review my patch?
Here's one I noticed.
[snip]
> + [MonoTODO ("Missing MarshalAsAttribute")]
> + internal static object[] GetCustomAttributes (ParameterInfo parameterInfo, Type attributeType, bool inherit)
> + {
> +#if NET_2_0
> + if ((parameterInfo.Attributes & (ParameterAttributes.In | ParameterAttributes.Out | ParameterAttributes.Optional)) != 0) {
> + ArrayList al = new ArrayList (2);
> +
> + if (parameterInfo.IsIn && (attributeType == null || attributeType == typeof (InAttribute)))
> + al.Add (new InAttribute ());
> +
> + if (parameterInfo.IsOut && (attributeType == null || attributeType == typeof (OutAttribute)))
> + al.Add (new OutAttribute ());
> +
> + if (parameterInfo.IsOptional && (attributeType == null || attributeType == typeof (OptionalAttribute)))
> + al.Add (new OptionalAttribute ());
> +
> + return GetCustomAttributes (parameterInfo, attributeType, inherit, null);
ITYM
GetCustomAttributes (parameterInfo, attributeType, inherit, al);
- Hari
More information about the Mono-devel-list
mailing list