Пример #1
0
        public void IndexAsync(string id)
        {
            HttpContext.Items.Add(IntegrationTestTab.Expected, id);

            AsyncManager.OutstandingOperations.Increment();

            var waitService = new WaitService();
            waitService.GetHeadlinesCompleted += result =>
            {
                AsyncManager.Parameters["id"] = result;
                AsyncManager.OutstandingOperations.Decrement();
            };
            waitService.GetHeadlinesAsync(id);
        }
Пример #2
0
        public void IndexAsync(string id)
        {
            HttpContext.Items.Add(IntegrationTestTab.Expected, id);

            AsyncManager.OutstandingOperations.Increment();

            var waitService = new WaitService();

            waitService.GetHeadlinesCompleted += result =>
            {
                AsyncManager.Parameters["id"] = result;
                AsyncManager.OutstandingOperations.Decrement();
            };
            waitService.GetHeadlinesAsync(id);
        }