I am trying to implement the IModuleCommunicator but it is only working in C#.
I have a menu module written in C#. It is the Listener.
I have another module that is written in C# that is a Communicator, and it works very well with the menu module.
I have a 3rd party module with source code that is written in vb.net. I tried implementing the IModuleCommunicator with the various tutorials on the web, and none of them work.
The problem is that the RaiseEvent doesn't do anything. Here is the relevant code:
Partial Class Maintenance
Inherits UserModuleBase
Implements IModuleCommunicator
Public Interface IModuleCommunicator
Event ModuleCommunication As ModuleCommunicationEventHandler
End Interface
Private Sub BuildProvSection(ByVal build As Boolean)
'the IMC message data gets stored inside
'a ModuleCommunicationEventArgs object
Dim mcArgs As New ModuleCommunicationEventArgs()
mcArgs.Sender = Me.UniqueID
mcArgs.Target = "SEARCH"
mcArgs.Text = "SEARCH"
mcArgs.Type = "SEARCH"
mcArgs.Value = build
'if ModuleCommunication is null,
'the cache settings for your module
'might need to be set to 0 (turned off)
'calling your ModuleCommunication delegate event
'will cause the event to be raised
'Try
RaiseEvent ModuleCommunication(Me, mcArgs)
'Catch ex As Exception
'End Try
End Sub
Public Event ModuleCommunication(ByVal sender As Object, ByVal e As ModuleCommunicationEventArgs) Implements IModuleCommunicator.ModuleCommunication
Like I said, the RaiseEvent does nothing. No error, no action, nothing.
Is C# to VB.Net communication via the IModuleCommunicator possible?
The 3rd party module has its own namespace, would that screw things up?
The 3rd party module inherits UserModuleBase instead of PortalModuleBase. Would that do anything to prevent the communication?
Any other ideas?
Thanks
Chad