Code: Select all
namespace OSApp
{
public class response
{
public string xmlrpc_version { get; set; }
public string xmlrpc_url { get; set; }
public string application { get; set; }
public string contact { get; set; }
public string website_url { get; set; }
public int users_online_total { get; set; }
public int users_online_program { get; set; }
public int users_loggedin { get; set; }
public string users_max_alltime { get; set; }
public string users_registered { get; set; }
public string subs_downloads { get; set; }
public string subs_subtitle_files { get; set; }
public string movies_total { get; set; }
public string movies_aka { get; set; }
public string total_subtitles_languages { get; set; }
public Dictionary<string, string> last_update_strings { get; set; }
public double seconds { get; set; }
}
[XmlRpcUrl("http://api.opensubtitles.org/xml-rpc")]
public interface FlRPC : IXmlRpcProxy
{
[XmlRpcMethod("ServerInfo")]//endpoint name
response ServerInfo();
}
public class Program
{
public static void Main()
{
response testRes = new response();
FlRPC proxy = XmlRpcProxyGen.Create<FlRPC>();
proxy.ServerInfo();
}
}
}
Code: Select all
Unhandled Exception: CookComputing.XmlRpc.XmlRpcTypeMismatchException: response contains struct value with missing non-optional members: Item Keys Count Values Comparer [response : struct mapped to type response : member last_update_strings mapped to type Dictionary`2 : struct mapped to type Dictionary`2]