o.Write (GetTypeName (t));
o.Write (" (");
OutlineParams (method.GetParameters ());
- o.WriteLine (")");
+ o.Write (")");
#if NET_2_0
WriteGenericConstraints (t.GetGenericArguments ());
#endif
-
+
+ o.WriteLine (";");
return;
}
{
if (method.IsStatic)
return "static ";
+
+ if (method.IsFinal) {
+ // This will happen if you have
+ // class X : IA {
+ // public void A () {}
+ // static void Main () {}
+ // }
+ // interface IA {
+ // void A ();
+ // }
+ //
+ // A needs to be virtual (the CLR requires
+ // methods implementing an iface be virtual),
+ // but can not be inherited. It also can not
+ // be inherited. In C# this is represented
+ // with no special modifiers
+
+ if (method.IsVirtual)
+ return null;
+ return "sealed ";
+ }
// all interface methods are "virtual" but we don't say that in c#
if (method.IsVirtual && !method.DeclaringType.IsInterface) {
GenericParameterAttributes attrs = t.GenericParameterAttributes & GenericParameterAttributes.SpecialConstraintMask;
GenericParameterAttributes [] interesting = {
GenericParameterAttributes.ReferenceTypeConstraint,
- GenericParameterAttributes.ValueTypeConstraint,
+ GenericParameterAttributes.NotNullableValueTypeConstraint,
GenericParameterAttributes.DefaultConstructorConstraint
};
case GenericParameterAttributes.ReferenceTypeConstraint:
o.Write ("class");
break;
- case GenericParameterAttributes.ValueTypeConstraint:
+ case GenericParameterAttributes.NotNullableValueTypeConstraint:
o.Write ("struct");
break;
case GenericParameterAttributes.DefaultConstructorConstraint:
if (options.ShowPrivate)
return true;
+
+ if (options.FilterObsolete && mi.IsDefined (typeof (ObsoleteAttribute), false))
+ return false;
switch (mi.MemberType) {
case MemberTypes.Constructor: