Google Groups Home
Help | Sign in
Message from discussion TypeLoadException with generic interface declaring generic method
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
michael.r  
View profile
 More options Mar 6 2007, 10:53 am
From: "michael.r" <michael.k.rubi...@lycos.at>
Date: Tue, 06 Mar 2007 07:53:55 -0800
Local: Tues, Mar 6 2007 10:53 am
Subject: Re: TypeLoadException with generic interface declaring generic method
Hello Ayende,

The problem definitely exists in Beta 4.

Regards, Michael

On Mar 6, 4:34 pm, "Ayende Rahien" <aye...@ayende.com> wrote:

> Please try with the Beta 4 version.
> I run into an issue committing the latest changes, so it is about a day old
> in the repository.

> On 3/6/07, Fabian Schmied <fabian.schm...@gmail.com> wrote:

> > Hi,

> > Another issue with the current RhinoMocks revision from SVN:

> > System.TypeLoadException: The generic type 'InvocationMethod_11' was
> > used with the wrong number of generic arguments in assembly
> > 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture
> > =neutral, PublicKeyToken=null'.
> >    at IDoubleGeneric`1Proxy309f413febfc481095f519d1eb1df17e.Method[T]
> > (One one, T two)
> >    at Tests.Test.Execute() in C:\...\Test.cs:line 36

> > This exception is thrown when calling a generic method on a mock
> > object with a generic interface, e.g. with the following code:

> >   [TestFixture]
> >   public class Test
> >   {
> >     [Test]
> >     public void Execute ()
> >     {
> >       MockRepository mocks = new MockRepository();
> >       IDoubleGeneric<int> mock =
> > mocks.CreateMock<IDoubleGeneric<int>>();
> >       Expect.Call(mock.Method(1, ""));
> >     }
> >   }

> >   public interface IDoubleGeneric<One>
> >   {
> >     object Method<T> (One one, T two);
> >   }

> > (Again, I'm suspecting DynamicProxy 2 to be the culprit.)

> > Best regards,
> > Fabian


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google