I know VB.Net does not allow implicit interface implementation like C#. And thus code like the following has no direct VB.Net correlation:
public interface I
I think, as with the subs you've already shown, you need to pass all of your calls down to the same calls in the base class. The trickiest are the event handlers, but DoWork
can be implemented as:
Public Shadows Custom Event DoWork As DoWorkEventHandler Implements IBackgroundWorkerAdapter.DoWork
AddHandler(Value As DoWorkEventHandler)
AddHandler MyBase.DoWork, Value
End AddHandler
RemoveHandler(Value As DoWorkEventHandler)
RemoveHandler MyBase.DoWork, Value
End RemoveHandler
RaiseEvent(sender As Object, e As DoWorkEventArgs)
MyBase.OnDoWork(e)
End RaiseEvent
End Event
And similarly for the other event handlers. In this way, event handlers added through your DoWork
event are actually added to your base classes DoWork
event.