public void Method1() { ITest proxy = (ITest)XmlRpcProxyGen.Create(typeof(ITest)); XmlRpcClientProtocol cp = (XmlRpcClientProtocol)proxy; Assert.IsTrue(cp is ITest); Assert.IsTrue(cp is XmlRpcClientProtocol); }
/// <summary> /// The get proxy. /// </summary> /// <returns> /// The Proxy /// </returns> internal static IBlogSpamNet GetProxy() { IBlogSpamNet _proxy = (IBlogSpamNet)XmlRpcProxyGen.Create(typeof(IBlogSpamNet)); XmlRpcClientProtocol _server = (XmlRpcClientProtocol)_proxy; _server.Url = (Url == null) ? _Url : Url.ToString(); return(_proxy); }
private IAria2 BuildClient(Aria2Settings settings) { var client = XmlRpcProxyGen.Create <IAria2>(); client.Url = GetURL(settings); return(client); }
// method to create a customer public static string Create(string apiUrl, string sessionId, Customer customer) { ICustomer proxy = (ICustomer)XmlRpcProxyGen.Create(typeof(ICustomer)); proxy.Url = apiUrl; return(proxy.Create(sessionId, _customer_create, new object[] { customer })); }
// method to delete a customer public static bool Delete(string apiUrl, string sessionId, int customerid) { ICustomer proxy = (ICustomer)XmlRpcProxyGen.Create(typeof(ICustomer)); proxy.Url = apiUrl; return(proxy.Update(sessionId, _customer_delete, new object[] { customerid })); }
// method to get regions public static Region[] List(string apiUrl, string sessionId, object[] args) { IRegion proxy = (IRegion)XmlRpcProxyGen.Create(typeof(IRegion)); proxy.Url = apiUrl; return(proxy.List(sessionId, _region_list, args)); }
public OpenNebulaAccessor(string ServerUrl, string Session) { VmManagementProxy = XmlRpcProxyGen.Create <IVmManagement>(); VmTemplateManagementProxy = XmlRpcProxyGen.Create <IVmTemplateManagement>(); VmManagementProxy.Url = ServerUrl; VmTemplateManagementProxy.Url = ServerUrl; _Session = Session; }
public static bool cartProductAdd(string apiUrl, string sessionId, object[] args) { ICart proxy = (ICart)XmlRpcProxyGen.Create(typeof(ICart)); proxy.Url = apiUrl; return(proxy.cartProductAdd(sessionId, _cart_product_add, args)); }
public static string cartOrder(string apiUrl, string sessionId, object[] args) { ICart proxy = (ICart)XmlRpcProxyGen.Create(typeof(ICart)); proxy.Url = apiUrl; return(proxy.cartOrder(sessionId, _cart_order, args)); }
//qua vanno mappati i parametri delle funzioni del modulo #endregion #region Private Properties #endregion #region Constructor #endregion #region Private Methods #endregion #region Public Methods // method to get orders public static int create(string apiUrl, string sessionId) { ICart proxy = (ICart)XmlRpcProxyGen.Create(typeof(ICart)); proxy.Url = apiUrl; return(proxy.create(sessionId, _cart_create)); }
public static string[] totals(string apiUrl, string sessionId, object[] args) { ICart proxy = (ICart)XmlRpcProxyGen.Create(typeof(ICart)); proxy.Url = apiUrl; return(proxy.totals(sessionId, _cart_totals, args)); }
public static bool cartPaymentMethod(string apiUrl, string sessionId, object[] args) { ICart proxy = (ICart)XmlRpcProxyGen.Create(typeof(ICart)); proxy.Url = apiUrl; return(proxy.cartPaymentMethod(sessionId, _cart_payment_method, args)); }
static void Main() { var ljClient = XmlRpcProxyGen.Create <ILiveJournalClient>(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); }
// method to end session public static bool EndSession(string apiUrl, string sessionId) { IConnection proxyLogin = (IConnection)XmlRpcProxyGen.Create(typeof(IConnection)); proxyLogin.Url = apiUrl; return(proxyLogin.EndSesion(sessionId)); }
// method to get category attribute options public static CategoryAttributeOption[] Options(string apiUrl, string sessionId, object[] args) { ICategoryAttributes proxy = (ICategoryAttributes)XmlRpcProxyGen.Create(typeof(ICategoryAttributes)); proxy.Url = apiUrl; return(proxy.Options(sessionId, _catalog_category_attribute_options, args)); }
public static bool cartCustomerAddresses(string apiUrl, string sessionId, object[] args) { ICart proxy = (ICart)XmlRpcProxyGen.Create(typeof(ICart)); proxy.Url = apiUrl; return(proxy.cartCustomerAddresses(sessionId, _cart_customer_addresses, args)); }
// method to get category attributes public static string CurrentStore(string apiUrl, string sessionId) { ICategoryAttributes proxy = (ICategoryAttributes)XmlRpcProxyGen.Create(typeof(ICategoryAttributes)); proxy.Url = apiUrl; return(proxy.CurrentStore(sessionId, _catalog_category_attribute_currentStore)); }
public static ShippingMethod[] cartShippingList(string apiUrl, string sessionId, object[] args) { ICart proxy = (ICart)XmlRpcProxyGen.Create(typeof(ICart)); proxy.Url = apiUrl; return(proxy.cartShippingList(sessionId, _cart_shipping_list, args)); }
public void MakeCall() { IStateName proxy = XmlRpcProxyGen.Create <IStateName>(); proxy.Url = "http://127.0.0.1:11000/"; proxy.AllowAutoRedirect = false; string name = proxy.GetStateName(1); }
// method to get countries public static Country[] List(string apiUrl, string sessionId, object[] args) { ICountry proxy = (ICountry)XmlRpcProxyGen.Create(typeof(ICountry)); proxy.Url = apiUrl; return(proxy.List(sessionId, _country_list, args)); }
// method to get customers public static Customer[] List(string apiUrl, string sessionId, object[] args) { ICustomer proxy = (ICustomer)XmlRpcProxyGen.Create(typeof(ICustomer)); proxy.Url = apiUrl; return(proxy.List(sessionId, _customer_list, args)); }
public MetaWeblogWrapper(string url, string username, string password) : this(url, username, password, "1") { _wrapper = (IMetaWeblogXmlRpc)XmlRpcProxyGen.Create(typeof(IMetaWeblogXmlRpc)); _wrapper.KeepAlive = true; _wrapper.UserAgent = "Markdown-Monster"; _wrapper.Url = Url; }
// method to get a customer public static Customer Info(string apiUrl, string sessionId, int customerId) { ICustomer proxy = (ICustomer)XmlRpcProxyGen.Create(typeof(ICustomer)); proxy.Url = apiUrl; return(proxy.Info(sessionId, _customer_info, new object[] { customerId })); }
// method to get a customer address public static CustomerAddress Info(string apiUrl, string sessionId, int customerAddressid) { ICustomerAddress proxyCustomer = (ICustomerAddress)XmlRpcProxyGen.Create(typeof(ICustomerAddress)); proxyCustomer.Url = apiUrl; return(proxyCustomer.Info(sessionId, _customer_info, new object[] { customerAddressid })); }
/// <summary> /// Gets the Bitmessage RPC component with the given Configuration vbalues /// </summary> /// <param name="C"></param> /// <returns></returns> public static BitmessageRPC GetRPC(ApiConfig C) { var RPC = (BitmessageRPC)XmlRpcProxyGen.Create(typeof(BitmessageRPC)); RPC.Url = string.Format("http://{0}:{1}/", C.IpOrHostname, C.Port); RPC.Headers.Add("Authorization", "Basic " + string.Format("{0}:{1}", C.Username, C.Password).UTF().B64()); return(RPC); }
// method to update a customer address public static bool Update(string apiUrl, string sessionId, int customerAddressid, CustomerAddress customer) { ICustomerAddress proxyCustomer = (ICustomerAddress)XmlRpcProxyGen.Create(typeof(ICustomerAddress)); proxyCustomer.Url = apiUrl; return(proxyCustomer.Update(sessionId, _customer_update, new object[] { customerAddressid, customer })); }
/// <summary> /// Initializes a new instance of the <see cref="WordPressWrapper"/> class. /// </summary> /// <param name="url">The URL.</param> /// <param name="username">The username.</param> /// <param name="password">The password.</param> /// <param name="blogID">The blog ID.</param> public WordPressWrapper(string url, string username, string password, object blogId) : base(url, username, password, blogId) { _wrapper = (IWordPressXmlRpc)XmlRpcProxyGen.Create(typeof(IWordPressXmlRpc)); _wrapper.KeepAlive = true; _wrapper.UserAgent = "Markdown-Monster"; _wrapper.Url = url; }
// method to list category attributes public static CategoryAttribute[] List(string apiUrl, string sessionId) { ICategoryAttributes proxy = (ICategoryAttributes)XmlRpcProxyGen.Create(typeof(ICategoryAttributes)); proxy.Url = apiUrl; return(proxy.List(sessionId, _catalog_category_attribute_list)); }
// method to create an invoice public static string Create(string apiUrl, string sessionId, object[] args) { IInvoice proxy = (IInvoice)XmlRpcProxyGen.Create(typeof(IInvoice)); proxy.Url = apiUrl; return(proxy.Create(sessionId, _sales_order_invoice_create, args)); }
static void Main(string[] args) { var proxy = XmlRpcProxyGen.Create <IIsEven>(); var x = proxy.IsEven(4); Console.WriteLine(x); Console.ReadLine(); }