locked
Passing a boolean into a ReceiveAndSendReply activity RRS feed

  • Question

  • I have a ReceiveAndSendReply activity where I want to pass a boolean value in (true or false), do some work, and then have a different boolean value returned.

    Whenever I set this up, what I see as a parameter to the operation call is ref bool? boolean. I'm not trying to pass anything by reference.

    I then tried to add a parameter of a boolean value and then .Net seemed to 'type' the boolean.

    I must be missing something simple here because all I want is to pass a boolean value in and get a boolean out. How can I do this?

    Thanks!

    Friday, December 24, 2010 7:39 PM

Answers

  • Do you want to define a Service like "bool GetData(bool boolValue);" ?

    If so,

    1. In ReceiveRequest, define a parameter of Boolean type

    2. In SendReply, define a parameter of name "GetDataResult" with Boolean type. Usually, the return value's name is constructed by method name and "Result".

    Sunday, December 26, 2010 10:50 PM

All replies

  • Do you want to define a Service like "bool GetData(bool boolValue);" ?

    If so,

    1. In ReceiveRequest, define a parameter of Boolean type

    2. In SendReply, define a parameter of name "GetDataResult" with Boolean type. Usually, the return value's name is constructed by method name and "Result".

    Sunday, December 26, 2010 10:50 PM
  • You can pass Boolean.TrueString or Boolean.FalseString . This might only be available in .Net 4.0
    Thursday, February 3, 2011 10:09 PM