I, I have a exception because the reflexion for the
SetPropertyAndIgnoreArgument methode fail on a property,
because this property has a new operator,
My propetty is :
public new virtual int? Value
{
get
{
return base.Value;
}
set
{
base.Value = value;
}
}
and the exception is :
{"Ambiguous match found."}
at System.RuntimeType.GetPropertyImpl(String name, BindingFlags
bindingAttr, Binder binder, Type returnType, Type[] types,
ParameterModifier[] modifiers)
at System.Type.GetProperty(String name, Type[] types)
at Rhino.Mocks.Impl.MethodOptions`1.GetPropertyFromMethod(MethodInfo method)
at Rhino.Mocks.Impl.MethodOptions`1.PropertySetterFromMethod(MethodInfo
method)
at Rhino.Mocks.Impl.MethodOptions`1.SetPropertyAndIgnoreArgument()
You can solve this solution with add this:
*
http://stackoverflow.com/questions/11443707/getproperty-reflection-results-in-ambiguous-match-found-on-new-property
*<http://stackoverflow.com/questions/11443707/getproperty-reflection-results-in-ambiguous-match-found-on-new-property>
[*^*<http://stackoverflow.com/questions/11443707/getproperty-reflection-results-in-ambiguous-match-found-on-new-property>
]
Thanks, for tell me, how to solve this problem with rhino mock, Thanks!
--
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rhinomocks/-/OwkoOT5IrcEJ.
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.