Microsoft Silverlight その5at TECH
Microsoft Silverlight その5 - 暇つぶし2ch759:元634
10/03/07 23:26:01
>>757
今までは、↓のように書いていたけど、
 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();
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch