Microsoft Silverlight その5
■ このスレッドは過去ログ倉庫に格納されています
0759元634
2010/03/07(日) 23:26:01今までは、↓のように書いていたけど、
ServiceClient sc = new ServiceClient();
sc.〜Completed += new … (sc_〜Completed);
sc.〜Async();
sc.CloseAsync();
さっき、↓の様に sc_〜Completed()内でCloseAsync()を呼ぶ様にプロジェクト全体を書き換えたら
安定度がアップしたけど、気のせいなのかな。
void sc_〜Completed ( sender, e )
{
if ( !e.Canceled ) {
if ( e.Error == null ) {
if ( e.Result … ) {
正常系 期待結果処理 ;
}
else {
正常系 非期待結果処理 ;
}
}
else {
異常系 例外結果処理 ;
}
}
else {
ユーザ操作キャンセル 例外処理 ;
}
((ServiceClient)sender).CloseAsync();
}
■ このスレッドは過去ログ倉庫に格納されています