This is a bug in .net framework, neither a bug in RM nor in DP
This issue was fixed in .NET 4.0.

The reason was the use of [,] arrays. If you can change it, it would be
good.
 i am not sure if it making it [][] would fix but it is worth the hassle.

Tuna Toksöz
Eternal sunshine of the open source mind.

http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike




2009/7/27 [email protected] <[email protected]>

>
> I'm using such interface:
>
> public interface IDetectorsConfigurationDialog
> {
>        /// <summary>
>        /// Occurs when new detector parameters requested.
>        /// </summary>
>        /// <remarks>Occurs when detector or detector engine new
> parameters requested.</remarks>
>        event DataEventHandler<IUIDeviceData>
> NewDetectorParamsRequested;
>
>        /// <summary>
>        /// Shows controls if Detector is selected.
>        /// </summary>
>        /// <param name="configurationObject">Current configuration
> object (engine or detector).</param>
>        /// <param name="readOnlyParentMaskCollection">Mask collection
> of parent engine (if any). May be null.</param>
>        /// <param name="maskCollection">Mask collection of current
> engine or detector.</param>
>        /// <param name="lineCollection">Polyline collection of
> current engine or detector.</param>
>        /// <param name="isDetectorRemovalAllowed">Whether user can
> remove the current detector.</param>
>        void ShowControlsIfDetectorIsSelected(object
> configurationObject,
>            ICollection<bool[,]> readOnlyParentMaskCollection,
>            ICollection<bool[,]> maskCollection,
> ICollection<IDetectorProxyLine> lineCollection,
>            bool isDetectorRemovalAllowed);
>
>        /// <summary>
>        /// Shows controls if DetectorEngine is selected.
>        /// </summary>
>        /// <param name="configurationObject">Current configuration
> object (type descriptor for engine or detector).</param>
>        /// <param name="readOnlyParentMaskCollection">Mask collection
> of parent engine (if any). May be null.</param>
>        /// <param name="maskCollection">Mask collection of current
> engine or detector.</param>
>        /// <param name="lineCollection">Polyline collection of
> current engine or detector.</param>
>        /// <param name="isDetectorEngineRemovalAllowed">Whether user
> can remove the current detector engine.</param>
>        /// <param name="isDetectorCreationAllowed">Whether user can
> create new detector under the current detector engine.</param>
>        void ShowControlsIfDetectorEngineIsSelected(object
> configurationObject,
>            ICollection<bool[,]> readOnlyParentMaskCollection,
>            ICollection<bool[,]> maskCollection,
> ICollection<IDetectorProxyLine> lineCollection,
>            bool isDetectorEngineRemovalAllowed, bool
> isDetectorCreationAllowed);
>
>        /// <summary>
>        /// Shows controls if NewDetectorEngine parameters is
> selected.
>        /// </summary>
>        /// <param name="configurationObject">Configuration object for
> new detector.</param>
>        void ShowControlsIfNewDetectorEngineParamsIsSelected(object
> configurationObject);
> }
>
>
>
> I've tried to instantiate the object  _view =
> _mocks.DynamicMock<IDetectorsConfigurationDialog>();
> But I've got an error on compilation -
>
> System.TypeLoadException: There are no implementation
> "ShowControlsIfDetectorIsSelected" in the type
> "IDetectorsConfigurationDialogProxy5c367ee354cc4d5a9700e55df6a47f6b"
> in assembly "DynamicProxyGenAssembly2, Version=0.0.0.0,
> Culture=neutral, PublicKeyToken=null".
> в System.Reflection.Emit.TypeBuilder._TermCreateClass(Int32 handle,
> Module module)
> в System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
> в
> System.Reflection.Emit.TypeBuilder.CreateType()
> в
> Castle.DynamicProxy.Generators.Emitters.AbstractTypeEmitter.BuildType
> ()
> в
>
> Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.GenerateCode
> (Type proxyTargetType, Type[] interfaces, ProxyGenerationOptions
> options)
> в
>
> Castle.DynamicProxy.DefaultProxyBuilder.CreateInterfaceProxyTypeWithoutTarget
> (Type theInterface, Type[] interfaces, ProxyGenerationOptions options)
> в
> Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyTypeWithoutTarget
> (Type theInterface, Type[] interfaces, ProxyGenerationOptions options)
> в Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget
> (Type theInterface, Type[] interfaces, ProxyGenerationOptions options,
> IInterceptor[] interceptors)
> в Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget
> (Type theInterface, Type[] interfaces, IInterceptor[] interceptors)
> в Rhino.Mocks.MockRepository.MockInterface(CreateMockState
> mockStateFactory, Type type, Type[] extras)
> в Rhino.Mocks.MockRepository.CreateMockObject(Type type,
> CreateMockState factory, Type[] extras, Object[]
> argumentsForConstructor)
> в Rhino.Mocks.MockRepository.Stub(Type type, Object[]
> argumentsForConstructor)
> в Rhino.Mocks.MockRepository.Stub<T>(Object[] argumentsForConstructor)
> в
>
> ITV.System.Video.Controllers_UnitTest.DetectorConfigurationController.DetectorConfigurationControllerUT.SetUp
> ()
> в DetectorConfigurationControllerUT.cs: line 95
>
> How can I resolve this problem?
>
> With best regards,
>                                         Eugene.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to