【发布时间】:2014-07-29 11:13:41
【问题描述】:
我正在尝试:
request = WebRequest.Create( uri )
responseTask = request.GetResponseAsync
action = Action.new { process_request( sender, e ) }
task = Task.new( action )
responseTask.Wait( TimeSpan.new( -1 ) )
responseTask.ContinueWith( task )
但出现以下错误:
can't convert System::Threading::Tasks::Task into System::Action[System::Threading::Tasks::Task] (TypeError)
UPD
开启
responseTask = request.GetResponseAsync
action = Action[Task].new { process_request( sender, e ) }
responseTask.Wait( TimeSpan.new( -1 ) )
responseTask.ContinueWith( action )
我收到此错误:
Found multiple methods for 'ContinueWith': ContinueWith(System::Action[System::Threading::Tasks::Task]), ContinueWith(System::Action[System::Threading::Tasks::Task[System::Net::WebResponse]]) (System::Reflection::AmbiguousMatchException)
【问题讨论】:
标签: asynchronous webrequest ironruby