I've got a class which is catching the System.Diagnostics.DataReceivedEventArgs
event.
I want to make this event externally available. To accomplish that currently I'm catching this internally and raising another event, which seems like a bit duplication to me.
What's the best way to this? Can I wire these events so I do not need to raise a new event?
Here is the code :
Class MyClass
Public Event OutputDataReceived(sender As Object, e As System.Diagnostics.DataReceivedEventArgs)
Public Sub Action()
....
AddHandler Process.OutputDataReceived, AddressOf ReadData
....
End Sub
Private Sub ReadData(ByVal sender As Object, ByVal e As System.Diagnostics.DataReceivedEventArgs)
RaiseEvent Me.OutputDataReceived(sender, e)
End Sub
End Class