次のタイプのインターフェースを使用するコンクリートはほとんどありません
interface IActivity<T>
{
bool Process(T inputInfo);
}
具体的なクラスは次のようになります
class ReportActivityManager :IActivity<DataTable>
{
public bool Process(DataTable inputInfo)
{
// Some coding here
}
}
class AnalyzerActivityManager :IActivity<string[]>
{
public bool Process(string[] inputInfo)
{
// Some coding here
}
}
次に、IActivityのようなジェネリックインターフェイスを再調整するファクトリクラスを作成するにはどうすればよいですか。
class Factory
{
public IActivity<T> Get(string module)
{
// ... How can i code here
}
}
ありがとう