- MethodFlags flags = 0;
-
- if (mb.DeclaringType is TypeBuilder){
- MethodData method = (MethodData) builder_to_method [mb];
- if (method == null) {
- // FIXME: implement Obsolete attribute on Property,
- // Indexer and Event.
- return 0;
- }
-
- return method.GetMethodFlags (loc);
- }
-
-#if FIXME
- if (mb.IsInflatedGeneric) {
- MethodBase generic = mb.GetGenericMethodDefinition ();
-
- return GetMethodFlags (generic, loc);
- }
-#endif
-
- object [] attrs = mb.GetCustomAttributes (true);
- foreach (object ta in attrs){
- if (!(ta is System.Attribute)){
- Console.WriteLine ("Unknown type in GetMethodFlags: " + ta);
- continue;
- }
- System.Attribute a = (System.Attribute) ta;
- if (a.TypeId == TypeManager.obsolete_attribute_type){
- ObsoleteAttribute oa = (ObsoleteAttribute) a;
-
- string method_desc = TypeManager.CSharpSignature (mb);
-
- if (oa.IsError) {
- Report.Error (619, loc, "Method `" + method_desc +
- "' is obsolete: `" + oa.Message + "'");
- return MethodFlags.IsObsoleteError;
- } else
- Report.Warning (618, loc, "Method `" + method_desc +
- "' is obsolete: `" + oa.Message + "'");
-
- flags |= MethodFlags.IsObsolete;
-
- continue;
- }
-
- //
- // Skip over conditional code.
- //
- if (a.TypeId == TypeManager.conditional_attribute_type){
- ConditionalAttribute ca = (ConditionalAttribute) a;