سلام دوست عزیز با wcf میشه ایکارو کرد انجوری که من از سوالات فهمیدم فکر کنم باید به صورت asynchronous اطلاعات ارسال باشه در کل بحث جوری نیست که به راحتی بشه بهش پاسخ داد ولی یه نمونه کد براتون میذارم
try
{
EvalServiceLibrary.Eval eval =
new EvalServiceLibrary.Eval("helo", "I'm really liking this");
channel.SubmitEval(eval);
channel.SubmitEval(eval);
List<Eval> evals = channel.GetEvals();
Console.WriteLine("Number of evals: {0}", evals.Count);
#region async example
channel.GetEvalsCompleted += new EventHandler<GetEvalsCompletedEventArgs>(channel_G etEvalsCompleted);
channel.GetEvalsAsync();
Console.WriteLine("Waiting...");
Console.ReadLine();
#endregion
channel.Close();
}
catch (FaultException fe)
{
Console.WriteLine("FaultException handler: {0}",
fe.GetType());
channel.Abort();
}
catch (CommunicationException ce)
{
Console.WriteLine("CommunicationException handler: {0}",
ce.GetType());
channel.Abort();
}
catch (TimeoutException te)
{
Console.WriteLine("TimeoutException handler: {0}",
te.GetType());
channel.Abort();
}
//}
}
static void channel_GetEvalsCompleted(object sender, GetEvalsCompletedEventArgs e)
{
Console.WriteLine("Number of evals: {0}", e.Result.Count);
}