コード例 #1
0
		public void GetSpeakersAsync()
		{
			var speakerDataProvider = new SpeakerDataProvider();
			AsyncManager.OutstandingOperations.Increment();
			speakerDataProvider.GetSpeakers().ContinueWith(d =>
			{
				AsyncManager.Parameters["speakers"] = d.Result;
				AsyncManager.OutstandingOperations.Decrement();
			});
		}
コード例 #2
0
		public async Task<ActionResult> GetSpeakers()
		{
			var speakerDataProvider = new SpeakerDataProvider();
			var speakers = await speakerDataProvider.GetSpeakers();
			return Json(new { Result = speakers }, JsonRequestBehavior.AllowGet);
		}