Passing schema messages via channel to a class

Uzamčený Passing schema messages via channel to a class

  • 20. září 2010 8:14
     
      Obsahuje kód

    Hi all! So, I'm using the following code in an isolated class (.qcs) to poll a channel: 

     

    while(true) 
    { 
     // awoods: log. resultType = OverlordData.DataType.Log;
     string resultString = null;
     m_xServiceChannel.Log.TryGet(out resultString);
     if(resultString != null) { result = resultString; break; }
    
     // awoods: new client. resultType = DataType.NewConnection;
     ClientInformation resultCI = null;
     m_xServiceChannel.NewConnection.TryGet(out resultCI);
     if(resultCI != null) { result = resultCI; break; } 
    }
    

    'ClientInformation' is a schema which is in another namespace but is referenced into this file. It compiles fine.

    The code in the domain looks like this:

     // Sends a message to the Log port of the control channel.<br/>
    private void WriteLog(string strMessage)
    {
     if(m_xServiceControlChannel != null)
    	 m_xServiceControlChannel::Log <-- strMessage;
    }
     
    // Sends in the details of a new client.<br/>
    private void SubmitNewClientRequest(ClientInformation newClient)
    {
     if(m_xServiceControlChannel != null)
    	 m_xServiceControlChannel::NewConnection <-- newClient; 
    }
    

    Now, the 'Log' port is receiving strings without issue, after 'WriteLog' is called, but when 'SubmitNewClientRequest' is called, the message is sent but never picked up by the class. 'resultCI' is always null.

    Any idea why the schema would be any different to the string?

     

    Thanks

     

Všechny reakce

  • 29. září 2010 8:59
     
     
    This just started to work.... :/