开发者

Workflow Foundation: How to create Receive activity with custom message in xaml designer?

开发者 https://www.devze.com 2023-01-01 10:02 出处:网络
I need to have Receive activity which can receive my custom data. I found examples, but all use coded workflows like such

I need to have Receive activity which can receive my custom data. I found examples, but all use coded workflows like such

public class ProcessRequest : Activity
 {
     public ProcessRequest()
  {
      Variable<MyData> request = new V开发者_StackOverflowariable<MyData> { Name = "request" };

   Receive receiveRequest = new Receive
   {
       ServiceContractName = "IProcessRequest",
    OperationName = "Foo",
    CanCreateInstance = true,
    Content = ReceiveContent.Create(new OutArgument<MyData>(request))
   };
  }
 }

The main point is that Receive.Content property. It is not clear for me how I can do it in XAML designer. What I have to set in the dialog of the Content property - Message or Parameters and what to set inside those options?

Thanks for the light!


I got it :-) I have to use Message option inside the Content dialog. Then put the name of the variable (in my case request) into the field Message data and browse MyData type for the Message type field. Piece of cake ;-)

0

精彩评论

暂无评论...
验证码 换一张
取 消