using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Collections.Generic;
+using System.Linq;
using NUnit.Framework;
}
}
-#if NET_2_0 && !NET_2_1
+#if !NET_2_1
public enum ParamEnum {
None = 0,
Foo = 1,
}
#endif
+ class TestAttribute : Attribute
+ {
+ }
+
+ public static int TestCustomAttribute_Method ([Test] string arg)
+ {
+ return arg.Length;
+ }
+
+ [Test]
+ public void TestCustomAttribute ()
+ {
+ var metInfo = GetType ().GetMethod ("TestCustomAttribute_Method", new Type[] { typeof(string) });
+ var paramInfos = metInfo.GetParameters ();
+ var argParamInfo = paramInfos[0];
+
+ var custAttrs = argParamInfo.GetCustomAttributes ();
+ Assert.AreEqual (1, custAttrs.Count ());
+ }
+
class MyParameterInfo2 : ParameterInfo
{
public ParameterAttributes MyAttrsImpl;
}
#endif
Assert.IsFalse (p.IsIn, "#7");
+#if FEATURE_USE_LCID
Assert.IsFalse (p.IsLcid, "#8");
+#endif
Assert.IsFalse (p.IsOptional, "#9");
Assert.IsFalse (p.IsOut, "#10");
Assert.IsFalse (p.IsRetval, "#10");