run console task asynchronously
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NewTask
{
class Program
{
static void Main(string[] args)
{
NewTask.Combine taskcombine = new NewTask.Combine();
ProfileClient profilesws = new ProfileClient();
var profileRecords = profilesws.GetAllProfiles();
foreach (var profile in profileRecords.ProfileRecords)
{
var testProfile = new NewTask.Profile();
testProfile.Id = profile.Id;
testProfile.Name = profile.Name;
var result = taskcombine.TestProfile(testProfile);
}
profilesws.Close();
taskcombine.Close();
}
}
}
I want a way to run this async. I want to hit the ruslt and once it goes
through all the records into result I want it to end the task. This will
be a consol app and once the results are filled with the required records
I would like it to close the app asynchronously.
No comments:
Post a Comment