次のコードのように呼び出すことができるサードパーティコンポーネントのメソッドがあります。
ICustomer log = Axis.GetInstance<ICustomer>();
上記のサードパーティコンポーネントをすべての呼び出し元に直接公開したくないので、サードパーティ「Axis.GetInstance()」を呼び出すラッパーメソッドを作成することにしました。私の問題は、タイプTを渡して、一般的なメソッド内のメソッド
呼び出しコード:
var result = Util.MyCustomWrapper<ICustomer>();
public class Util
{
public static T MyCustomWrapper<T>()
{
1.call Axis.GetInstance<T>(); // **how to pass the type T**
2.return T
}
}