I believe I have all the interface registrations defined properly but get an exception when I call
container = builder.Build();
Exception:
'Common.RpcServer`2[Logic.Engine, Messages.Serializer]'
is not assignable to service
'Common.IRpcServer`2[[
Services.IEngine, Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Messages.ISerializer, Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
I have very simple registration code for IEngine and ISerializer (one and none dependency respectively).
The RpcServer is a bit more complex but all its dependencies look to be resolving fine.
builder.Register(c =>
new RpcServer<Engine, Serializer>(
c.Resolve<ISubscription>(),
c.Resolve<IService>() as Engine,
c.Resolve<ISerializer>() as Serializer)
).As<IRpcServer<IService, ISerializer>>();
Is the listing of versions something I should be concerned about in the exception, or the nesting of the square braces?
RpcServer`2[Logic.Engine, Messages.Serializer]
versus
IRpcServer`2[[ Services.IEngine ],[ Messages.ISerializer ]]
Anything else I should be looking at to diagnose this?