我有一个通过 WCF 连接到 Windows 服务并调用方法的 Web 应用程序。在该方法返回其结果后(并且一切都成功 - 请参见下面的 **?? 行),我希望服务继续并做一些其他工作。
最简单的方法是什么?
谢谢达摩
C# 代码
//Add Files To Control Manager
public ReturnClass FilesToControl(List<Item> lstNewItems,string ReferenceNumber,string Type,String Description)
{
try
{
String ThisisAnItemToControl = "";
String ThisIsItsType = "";
for (int i = 0; i < lstNewItems.Count; i++) // Loop through List with for
{
ThisisAnItemToControl = lstNewItems[i].Paramater;
ThisIsItsType = lstNewItems[i].Type;
// Do a pre check on the item
// Does File Exist
if (!File.Exists(ThisisAnItemToControl))
return new ReturnClass(-1, ThisisAnItemToControl + " does not exist", String.Empty, null, null, null);
}
return new ReturnClass(1, "", String.Empty, null, null, null);
// Now that we have returned a result to the web application we can get to work and modify the items under control but how can i do this?
// **??
}
catch (Exception ex)
{
return new ReturnClass(-1, ex.Message.ToString(), "", null, null, null);
}