Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
System.TypeLoadException
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ceri Lewis  
View profile  
 More options Jun 11 2008, 6:50 am
From: Ceri Lewis <ceri.le...@intracomm.co.nz>
Date: Wed, 11 Jun 2008 03:50:38 -0700 (PDT)
Local: Wed, Jun 11 2008 6:50 am
Subject: System.TypeLoadException
Using Rhino Mocks 3.4

I have the following in a test method:
            // Setup the mock objects
            MockRepository mocks = new MockRepository();
            IDeliveryPeriodConverterFactory
deliveryPeriodConverterFactory =
                mocks.CreateMock<IDeliveryPeriodConverterFactory>();
***        IRangeExtractor rangeExtractor =
mocks.CreateMock<IRangeExtractor>();
            IDataBlockExtractor dataBlockExtractor =
mocks.CreateMock<IDataBlockExtractor>();

When executing the line with *** I get the following:
System.TypeLoadException: Method 'ExtractRanges' in type
'IRangeExtractorProxyb07f490417024a5fb04a8dc0a2cbaa1d' from assembly
'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=a621a9e7e5c32e69' does not have an implementation..

The IRangeExtractor interface is defined as:
    /// <summary>
    /// Interface for extracting ranges from a data array.
    /// </summary>
    public interface IRangeExtractor
    {
        /// <summary>
        /// Extract data ranges from the specified array. Return
        /// any warnings in the list of strings.
        /// </summary>
        /// <param name="data">Array of <b>Object</b>s to extract the
ranges from</param>
        /// <param name="dataRanges">List to store the data ranges in</
param>
        /// <param name="dateRanges">List to store the date ranges in</
param>
        /// <param name="warnings">List to hold any warning messages</
param>
        void ExtractRanges(
            Object[,] data,
            IList<IDataRange> dataRanges,
            IList<IDateRange> dateRanges,
            IList<String> warnings);
    }

IDataRange & IDateRange just have a few getter properties on them.

Any ideas what the probelm could be?

Thanks

Stack trace:
    at System.Reflection.Emit.TypeBuilder._TermCreateClass(Int32
handle, Module module)
   at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
   at System.Reflection.Emit.TypeBuilder.CreateType()
   at
Castle.DynamicProxy.Generators.Emitters.AbstractTypeEmitter.BuildType()
   at
Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.GenerateCo de(Type
proxyTargetType, Type[] interfaces, ProxyGenerationOptions options)
   at
Castle.DynamicProxy.DefaultProxyBuilder.CreateInterfaceProxyTypeWithoutTarg et(Type
theInterface, Type[] interfaces, ProxyGenerationOptions options)
   at
Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyTypeWithoutTarget(Ty pe
theInterface, Type[] interfaces, ProxyGenerationOptions options)
   at
Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget(Type
theInterface, Type[] interfaces, ProxyGenerationOptions options,
IInterceptor[] interceptors)
   at
Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget(Type
theInterface, Type[] interfaces, IInterceptor[] interceptors)
   at Rhino.Mocks.MockRepository.MockInterface(CreateMockState
mockStateFactory, Type type, Type[] extras)
   at Rhino.Mocks.MockRepository.CreateMockObject(Type type,
CreateMockState factory, Type[] extras, Object[]
argumentsForConstructor)
   at Rhino.Mocks.MockRepository.CreateMock[T](Object[]
argumentsForConstructor)


 
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.
Ayende Rahien  
View profile  
 More options Jun 11 2008, 6:54 am
From: "Ayende Rahien" <aye...@ayende.com>
Date: Wed, 11 Jun 2008 13:54:37 +0300
Local: Wed, Jun 11 2008 6:54 am
Subject: Re: [RhinoMocks] System.TypeLoadException

Multi dimensional arrays are not supported. There is a CLR bug that prevent
this.
You RemotingMock instead, that should work

On Wed, Jun 11, 2008 at 1:50 PM, Ceri Lewis <ceri.le...@intracomm.co.nz>
wrote:


 
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.
Ceri Lewis  
View profile  
 More options Jun 11 2008, 7:02 am
From: Ceri Lewis <ceri.le...@intracomm.co.nz>
Date: Wed, 11 Jun 2008 04:02:41 -0700 (PDT)
Local: Wed, Jun 11 2008 7:02 am
Subject: Re: System.TypeLoadException
Thanks for the quick response.

So something like?
IRangeExtractor rangeExtractor =
mocks.CreateMockWithRemoting<IRangeExtractor>();

On Jun 11, 11:54 am, "Ayende Rahien" <aye...@ayende.com> wrote:


 
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.
Ayende Rahien  
View profile  
 More options Jun 11 2008, 7:13 am
From: "Ayende Rahien" <aye...@ayende.com>
Date: Wed, 11 Jun 2008 14:13:47 +0300
Local: Wed, Jun 11 2008 7:13 am
Subject: Re: [RhinoMocks] Re: System.TypeLoadException

I think so, can't recall off the top of my head

On Wed, Jun 11, 2008 at 2:02 PM, Ceri Lewis <ceri.le...@intracomm.co.nz>
wrote:


 
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.
End of messages
« Back to Discussions « Newer topic     Older topic »