[Mono-bugs] [Bug 666413] New: Subclassing Attributes, not being generated in Manifest...

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jan 22 17:29:37 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=666413

https://bugzilla.novell.com/show_bug.cgi?id=666413#c0


           Summary: Subclassing Attributes, not being generated in
                    Manifest...
    Classification: Mono
           Product: MonoDroid
           Version: SVN
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: mkestner at novell.com
        ReportedBy: jondick at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10

Not sure this is even possible, but this isn't working so I'll file a bug.
Here's the code I've made:
    public class C2dmReceiverAttribute : BroadcastReceiverAttribute
    {
        public C2dmReceiverAttribute()
            : base()
        {
            Permission = "com.google.android.c2dm.permission.SEND";
        }
    }

    public class C2dmReceiveIntentFilterAttribute : IntentFilterAttribute
    {
        public C2dmReceiveIntentFilterAttribute(string packageName)
            : base(new string[] { "com.google.android.c2dm.intent.RECEIVE" })
        {
            Categories = new string[] { packageName };
        }
    }

    public class C2dmRegistrationIntentFilterAttribute : IntentFilterAttribute
    {
        public C2dmRegistrationIntentFilterAttribute(string packageName)
            : base(new string[] { "com.google.android.c2dm.intent.REGISTRATION"
})
        {
            Categories = new string[] { packageName };
        }
    }


    Here's what I'd like the implementation to look like.  Essentially I'm
trying to abstract some of the attribute declaration out:

    [C2dmReceiver]
    [C2dmReceiveIntentFilter("c2dmsharp.client.sample")]
    [C2dmRegistrationIntentFilter("c2dmsharp.client.sample")]
    public class SampleBroadcastReceiver : C2dmBroadcastReceiver<SampleService>
    {
    }


    So the problem is, when I do it that way, the <broadcast-receiver> and
<intent-filter> tags aren't generated in the manifest...



Reproducible: Always

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list