I am currently working on a project which uses the AutoFac Inversion of Control container.
I am attempting to convert some example code from C# into a codebase of an existing project of mine which is written in VB.NET and I've hit a problem.
The original line of code is:
EventHub.Subscribe<HandshakingEvent>(container.Resolve<HandshakeAuthenticator>().CheckHandshake);
Which I have converted to:
EventHub.Subscribe(Of HandshakingEvent)(Container.Resolve(Of HandshakeAuthenticator)().CheckHandshake)
But - this is causing an error, "Argument not specified for parameter 'ev' of CheckHandshake".
The type of the parameter for the EventHub.Subscribe(Of HandshakingEvent) procedure is System.Action (of HandshakingEvent)
I can see what the problem is, I'm just not really sure what to do about it! I've tried using 'AddressOf', but that doesn't seem to work, either.
Thanks in advance... - Chris
CheckHandshake?