// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
//
// This source code was auto-generated by Web Services Description Language Utility
//Mono Framework v2.0.50727.1433
//
/// <remarks/>
[System.Web.Services.WebServiceBinding(Name="GlobalWeatherSoap", Namespace="http://www.webserviceX.NET")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GlobalWeather : System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback GetWeatherOperationCompleted;
private System.Threading.SendOrPostCallback GetCitiesByCountryOperationCompleted;
public GlobalWeather() {
this.Url = "http://www.webservicex.net/globalweather.asmx";
}
public event GetWeatherCompletedEventHandler GetWeatherCompleted;
public event GetCitiesByCountryCompletedEventHandler GetCitiesByCountryCompleted;
/// <remarks>
///Get weather report for all major cities around the world.
///</remarks>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.webserviceX.NET/GetWeather", RequestNamespace="http://www.webserviceX.NET", ResponseNamespace="http://www.webserviceX.NET", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)]
public string GetWeather(string CityName, string CountryName) {
object[] results = this.Invoke("GetWeather", new object[] {
CityName,
CountryName});
return ((string)(results[0]));
}
public System.IAsyncResult BeginGetWeather(string CityName, string CountryName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetWeather", new object[] {
CityName,
CountryName}, callback, asyncState);
}
public string EndGetWeather(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
public void GetWeatherAsync(string CityName, string CountryName) {
this.GetWeatherAsync(CityName, CountryName, null);
}
public void GetWeatherAsync(string CityName, string CountryName, object userState) {
if ((this.GetWeatherOperationCompleted == null)) {
this.GetWeatherOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWeatherCompleted);
}
this.InvokeAsync("GetWeather", new object[] {
CityName,
CountryName}, this.GetWeatherOperationCompleted, userState);
}
private void OnGetWeatherCompleted(object arg) {
if ((this.GetWeatherCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetWeatherCompleted(this, new GetWeatherCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks>
///Get all major cities by country name(full / part).
///</remarks>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.webserviceX.NET/GetCitiesByCountry", RequestNamespace="http://www.webserviceX.NET", ResponseNamespace="http://www.webserviceX.NET", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)]
public string GetCitiesByCountry(string CountryName) {
object[] results = this.Invoke("GetCitiesByCountry", new object[] {
CountryName});
return ((string)(results[0]));
}
public System.IAsyncResult BeginGetCitiesByCountry(string CountryName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetCitiesByCountry", new object[] {
CountryName}, callback, asyncState);
}
public string EndGetCitiesByCountry(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
public void GetCitiesByCountryAsync(string CountryName) {
this.GetCitiesByCountryAsync(CountryName, null);
}
public void GetCitiesByCountryAsync(string CountryName, object userState) {
if ((this.GetCitiesByCountryOperationCompleted == null)) {
this.GetCitiesByCountryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCitiesByCountryCompleted);
}
this.InvokeAsync("GetCitiesByCountry", new object[] {
CountryName}, this.GetCitiesByCountryOperationCompleted, userState);
}
private void OnGetCitiesByCountryCompleted(object arg) {
if ((this.GetCitiesByCountryCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetCitiesByCountryCompleted(this, new GetCitiesByCountryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
}
public partial class GetWeatherCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetWeatherCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
public delegate void GetWeatherCompletedEventHandler(object sender, GetWeatherCompletedEventArgs args);
public partial class GetCitiesByCountryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetCitiesByCountryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
public delegate void GetCitiesByCountryCompletedEventHandler(object sender, GetCitiesByCountryCompletedEventArgs args);