Method Signature Change results in Breaking Change for 3.0

148 views
Skip to first unread message

Colin Bowern

unread,
Mar 6, 2012, 8:31:46 AM3/6/12
to nin...@googlegroups.com
In the Ninject.Syntax namespace I'm noticing a change between 2.2 and 3.0 that might represent a breaking change.  In 2.2:

public IBindingToSyntax<object> Bind(Type service)
IBindingWhenInNamedWithOrOnSyntax<T> To(Type implementation);

By changing the method signature to the following in 3.0:

public IBindingToSyntax<object> Bind(params Type[] services);
IBindingWhenInNamedWithOrOnSyntax<T1> To(Type implementation);

My attempts to do a simple binding redirect with a project like Agatha which was built on 2.2 results in a missing method exception:

System.MissingMethodException was unhandled by user code
  HResult=-2146233069
  Message=Method not found: 'Ninject.Syntax.IBindingToSyntax`1<System.Object> Ninject.Syntax.IBindingRoot.Bind(System.Type)'.
  Source=Agatha.Ninject
  StackTrace:
       at Agatha.Ninject.Container.Register(Type componentType, Type implementationType, Lifestyle lifeStyle)
       at Agatha.ServiceLayer.ServiceLayerConfiguration.RegisterRequestHandlerInterceptor[T]() in c:\src\agatha\Agatha.ServiceLayer\ServiceLayerConfiguration.cs:line 190
....
Reply all
Reply to author
Forward
Message has been deleted
0 new messages