public void Method1()
        {
            ITest proxy             = (ITest)XmlRpcProxyGen.Create(typeof(ITest));
            XmlRpcClientProtocol cp = (XmlRpcClientProtocol)proxy;

            Assert.IsTrue(cp is ITest);
            Assert.IsTrue(cp is XmlRpcClientProtocol);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        private IAria2 BuildClient(Aria2Settings settings)
        {
            var client = XmlRpcProxyGen.Create <IAria2>();

            client.Url = GetURL(settings);

            return(client);
        }
예제 #4
0
        // 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 }));
        }
예제 #5
0
        // 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 }));
        }
예제 #6
0
        // 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;
 }
예제 #8
0
        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));
        }
예제 #9
0
        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));
        }
예제 #10
0
        //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));
        }
예제 #11
0
        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));
        }
예제 #12
0
        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));
        }
예제 #13
0
        static void Main()
        {
            var ljClient = XmlRpcProxyGen.Create <ILiveJournalClient>();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
예제 #14
0
        // 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));
        }
예제 #15
0
        // 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));
        }
예제 #16
0
        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));
        }
예제 #17
0
        // 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));
        }
예제 #18
0
        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));
        }
예제 #19
0
        public void MakeCall()
        {
            IStateName proxy = XmlRpcProxyGen.Create <IStateName>();

            proxy.Url = "http://127.0.0.1:11000/";
            proxy.AllowAutoRedirect = false;
            string name = proxy.GetStateName(1);
        }
예제 #20
0
        // 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));
        }
예제 #21
0
        // 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));
        }
예제 #22
0
 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;
 }
예제 #23
0
        // 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 }));
        }
예제 #24
0
        // 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 }));
        }
예제 #25
0
        /// <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);
        }
예제 #26
0
        // 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 }));
        }
예제 #27
0
 /// <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;
 }
예제 #28
0
        // 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));
        }
예제 #29
0
        // 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));
        }
예제 #30
0
        static void Main(string[] args)
        {
            var proxy = XmlRpcProxyGen.Create <IIsEven>();
            var x     = proxy.IsEven(4);

            Console.WriteLine(x);
            Console.ReadLine();
        }