Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...IModuleCommunicator works in C# but not in VB.NETIModuleCommunicator works in C# but not in VB.NET
Previous
 
Next
New Post
12/9/2009 6:31 PM
 

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

 
New Post
12/10/2009 12:21 PM
 

I'm pretty sure in VB you still need to use the keywork  WithEvents  So if I'm thinking right...

Dim WithEvents mcArgs As New ModuleCommunicationEventArgs()

maybe I'm off.. not sure here.

 

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...IModuleCommunicator works in C# but not in VB.NETIModuleCommunicator works in C# but not in VB.NET


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out