ServiceContractAttribute in the interface, not concrete, class

Apr 11, 2011 at 3:49 PM

Hello

I was experimenting with RestCake and it looks good except for one thing: when my service implements an interface containing the ServiceContract attribute, the RestCake code throws an exception.  It seems that I must have everything in the concrete class because otherwise ReflectionHelper can't see the ServiceContract attribute if it's in the interface class only.

Is there a work-around so that interfaces can still be used?  If not, will a future piece of functionality allow this?

Cheers

Nic

Coordinator
Apr 11, 2011 at 4:30 PM
Hi Nic, thanks for reporting the issue. I'm leaving for work right now, and I'll take a look at it as soon as I get there. I think there will be a simple fix.

Sam

On Mon, Apr 11, 2011 at 8:49 AM, nicolaasburgers <notifications@codeplex.com> wrote:

From: nicolaasburgers

Hello

I was experimenting with RestCake and it looks good except for one thing: when my service implements an interface containing the ServiceContract attribute, the RestCake code throws an exception. It seems that I must have everything in the concrete class because otherwise ReflectionHelper can't see the ServiceContract attribute if it's in the interface class only.

Is there a work-around so that interfaces can still be used? If not, will a future piece of functionality allow this?

Cheers

Nic

Read the full discussion online.

To add a post to this discussion, reply to this email (rest@discussions.codeplex.com)

To start a new discussion for this project, email rest@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Apr 12, 2011 at 9:47 AM

Hi Sam

Thanks for your prompt reply - I look forward to seeing your response after you've had a chance to look at the issue.

Cheers!

Nic

Coordinator
Apr 12, 2011 at 4:31 PM
I took a look at the code that gets the attributes on a type (uses Type.GetCustomAttributes()), and I do tell it to look through the whole inheritance chain. I will have to try to reproduce the problem to see why it's not working.

On Tue, Apr 12, 2011 at 2:47 AM, nicolaasburgers <notifications@codeplex.com> wrote:

From: nicolaasburgers

Hi Sam

Thanks for your prompt reply - I look forward to seeing your response after you've had a chance to look at the issue.

Cheers!

Nic

Read the full discussion online.

To add a post to this discussion, reply to this email (rest@discussions.codeplex.com)

To start a new discussion for this project, email rest@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com