简体   繁体   English

在运行时设置xmlrpc.net服务URL

[英]Set xmlrpc.net service url at runtime

I like to interact with some of my wordpress blogs through xmlrpc interface. 我喜欢通过xmlrpc接口与我的一些wordpress博客进行交互。 During my research I found xml-rpc.net-Library (www.xml-rpc.net) which works really fine except for one thing. 在我的研究过程中,我发现xml-rpc.net-Library(www.xml-rpc.net)真的很不错,除了一件事。

I build my xmlrpc.net instance like this: 我像这样构建xmlrpc.net实例:

[XmlRpcUrlAttribute("http://my-example-blog.com/xmlrpc.php")]
public class WP : XmlRpcClientProtocol
{
    public WP()
    {

    }

    ...
}

But I want to set the xmlrpc-Url dynamically during runtime. 但是我想在运行时动态设置xmlrpc-Url。 So I like to add more blogs during the UI at runtime and don't want to implement each blog "hard-coded". 因此,我希望在运行时的UI期间添加更多博客,并且不想实现每个“硬编码”博客。

Does anybody had a same problem and can help me? 有人有同样的问题并且可以帮助我吗? Is there another possibility within xmlrpc.net-library or do you know another good xmlrpc library? xmlrpc.net-library中是否还有另一种可能性,或者您知道另一个好的xmlrpc库?

Greets, Raffi 问候,拉菲

您可以在运行时指定URL:

proxy.Url = "http://my-example-blog.com/xmlrpc.php";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM