/// <summary> /// use stub to create a Product via web services /// </summary> /// <param name="Products">Array of TCreate_Input</param> /// <returns>ArrayList of TCreate_Return</returns> public ArrayList create(TCreate_Input[] Products) { TCreate_Return[] Products_out = stub.create(Products); ArrayList result = new ArrayList(); for(int i = 0; i < Products_out.Length; i++) { TCreate_Return Product_out = Products_out[i]; if (Product_out.Error == null) { Console.WriteLine("successfully created Product: " + Product_out.Path); result.Add(Product_out); } else { Console.WriteLine("an error occured (Epages Error):\n" + Product_out.Error.Message); } } return result; }
/// <summary> /// test creation of a download Product and check if method returns a true value /// </summary> public void createDownload() { TCreate_Input[] Products = new TCreate_Input[] { Product_down }; ArrayList Products_out = serviceClient.create(Products); // test if creation was successful Assert.AreEqual(1, Products_out.Count, "create result set"); TCreate_Return Product_out = (TCreate_Return)Products_out.ToArray()[0]; Assert.AreEqual(alias, Product_out.Alias, "product alias"); Assert.AreEqual(true, Product_out.created, "created?"); }
/// <remarks/> public System.IAsyncResult Begincreate(TCreate_Input[] Products, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("create", new object[] { Products}, callback, asyncState); }
public TCreate_Return[] create(TCreate_Input[] Products) { object[] results = this.Invoke("create", new object[] { Products}); return ((TCreate_Return[])(results[0])); }