开发者

Pass Interface into function for use with Create<T>

开发者 https://www.devze.com 2023-01-18 10:28 出处:网络
I have this code : var proxy = XmlRpcProxyGen.Create<IMessageRpc>(); var proxy2 = XmlRpcProxyGen.Create<ITestRpc>();

I have this code :

var proxy = XmlRpcProxyGen.Create<IMessageRpc>();
var proxy2 = XmlRpcProxyGen.Create<ITestRpc>();

Create prototype is XmlRpcProxyGen.Create<T>

I would like use a function like this :

public object GetProxy(XXX)
{
    return mlRpc开发者_开发问答ProxyGen.Create<XXX>();
}


public object GetProxy<T>()
{
    return XmlRpcProxyGen.Create<T>();
}
0

精彩评论

暂无评论...
验证码 换一张
取 消