前提・実現したいこと
(初心者です)
C#で開発した業務アプリにて、Seasar2使用部分を削除しなければならないのですが、
修正箇所はおそらく突き止められたと思っているのですが、
では具体的な修正・追加方法がわからずにいます。
知恵をお貸しいただけないでしょうか?
発生している問題・エラーメッセージ
S2containerが今後使用できないため、代替処理のコードが必要
該当のソースコード
C#
1 2// S2コンテナからアンケート情報検索のためのコンポーネントを取得する. 3var selectHogeFlow = (BaseHogeSelectFlow)Seasar.Framework.Container.Factory. 4 SingletonS2ContainerFactory.Container.GetComponent(typeof(BaseHogeSelectFlow)); 5 6namespace Hoge.BusinessLogic 7{ 8 /// <summary> 9 /// HogeDB検索フロー. 10 /// </summary> 11 internal class HogeDbSelectFlow : BaseHogeSelectFlow 12 { 13 /// <summary> 14 /// コンストラクタ. 15 /// </summary> 16 public HogeDbSelectFlow() : base() 17 { 18 } 19 20 /// <summary> 21 /// 検索. 22 /// </summary> 23 /// <param name="HogeType">Hoge種別</param> 24 public override void Select(string HogeType) 25 { 26 var dbAccessor = new DbAccessor(); 27 28 // Hoge情報の取得DAO. 29 var selHogeDao = new SelectHogeDao(); 30 selHogeDao.HogeType = HogeType; 31 dbAccessor.AddDao(selHogeDao); 32 33 // DBアクセス実行. 34 dbAccessor.Execute(); 35 36 // 一度クリアする. 37 dbAccessor.ClearDao(); 38 39 // 問題情報の取得DAO. 40 var selQDao = new SelectQDao(); 41 selQDao.HogeId = selHogeDao.Hoge.HogeId; 42 dbAccessor.AddDao(selQDao); 43 44 // 解答方式の取得DAO. 45 var selAMDao = new SelectAMDao(); 46 selAMDao.HogeId = selHogeDao.Hoge.HogeId; 47 dbAccessor.AddDao(selAMDao); 48 49 // DBアクセス実行. 50 dbAccessor.Execute(); 51 52 Hoge = selHogeDao.Hoge; 53 QList = selQDao.QList; 54 AMList = selAMDao.AMList; 55 } 56 } 57} 58 59namespace Hoge.BusinessLogic 60{ 61 /// <summary> 62 /// 問題検索フロー基底. 63 /// </summary> 64 internal abstract class BaseHogeSelectFlow 65 { 66 /// <summary> 67 /// 問題情報. 68 /// </summary> 69 public Hoge Hoge { get; set; } 70 71 /// <summary> 72 /// 問題リスト. 73 /// </summary> 74 public List<Q> QList { get; set; } 75 76 /// <summary> 77 /// 解答方式リスト. 78 /// </summary> 79 public List<AM> AMList { get; set; } 80 81 /// <summary> 82 /// コンストラクタ. 83 /// </summary> 84 public BaseHogeSelectFlow() 85 { 86 QList = new List<Q>(); 87 AMList = new List<AM>(); 88 } 89 90 /// <summary> 91 /// 検索. 92 /// </summary> 93 /// <param name="HogeType">問題種別.</param> 94 public abstract void Select(string HogeType); 95 } 96} 97 98<?xml version="1.0" encoding="utf-8" ?> 99 100【app.dicon】 -------------------------------- 101 102<components> 103 104 <!-- ************************************************************ 105 Hoge.BusinessLogic.SurveyManager内で取得するコンポーネント. 106 ************************************************************ --> 107 108 <!-- 各質問情報の一括取得DAO --> 109 <component instance="prototype" class="Hoge.BusinessLogic.HogeDbSelectFlow"/> 110 <!-- 各質問情報を模擬データから取得 --> 111 <!-- <component instance="prototype" class="Hoge.BusinessLogic.HogeFileSelectFlow"/> --> 112 113 114 <!-- ************************************************************ 115 Hoge.HogeUI.Util.ARRProxy内で取得する 116 コンポーネント. 117 ************************************************************ --> 118 <!-- 解答結果DB登録フロー --> 119 <component instance="prototype" class="Hoge.BusinessLogic.ARDbRFlow"/> 120 <!-- 解答結果ファイル登録フロー --> 121 <!-- <component instance="prototype" class="Hoge.BusinessLogic.ARFileRFlow"/> --> 122 123</components> 124
試したこと
修正個所の特定まではできた(つもりでいます)。
回答3件
あなたの回答
tips
プレビュー