我创建了WCF工作流服务,并为Receive活动的Content属性指定了一些参数。客户端应用程序中服务引用的API签名如下所示:
var client = new ServiceClient();
var id = client.NewTicket(new NewTicket {
firstName = "John",
lastName="Doe"
});
而非期望:
client.NewTicket("John", "Doe");
在传递多个参数时,我可以无论如何摆脱这个参数包装类吗?
答案 0 :(得分:0)
static void Main(string[] args)
{
WriteLine wf1 = new WriteLine();
Dictionary<String, Object> arg = new Dictionary<String, Object>();
arg.Add("Text", "Hello,world!");
WorkflowInvoker.Invoke(wf1, arg);
}