//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.42
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;

// 
// This source code was auto-generated by wsdl, Version=2.0.50727.42.
// 


/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="LocationsSoap", Namespace="urn:other")]
public partial class Locations : System.Web.Services.Protocols.SoapHttpClientProtocol {
    
    private System.Threading.SendOrPostCallback GetLocationsOperationCompleted;
    
    /// <remarks/>
    public Locations() {
        this.Url = "http://canopus5:80/Locations";
    }
    
    /// <remarks/>
    public event GetLocationsCompletedEventHandler GetLocationsCompleted;
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:autosGetEstimate", RequestNamespace="urn:autos", ResponseElementName="Locations", ResponseNamespace="urn:autos", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("Location")]
    public LocationsLocation[] GetLocations() {
        object[] results = this.Invoke("GetLocations", new object[0]);
        return ((LocationsLocation[])(results[0]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginGetLocations(System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("GetLocations", new object[0], callback, asyncState);
    }
    
    /// <remarks/>
    public LocationsLocation[] EndGetLocations(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((LocationsLocation[])(results[0]));
    }
    
    /// <remarks/>
    public void GetLocationsAsync() {
        this.GetLocationsAsync(null);
    }
    
    /// <remarks/>
    public void GetLocationsAsync(object userState) {
        if ((this.GetLocationsOperationCompleted == null)) {
            this.GetLocationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLocationsOperationCompleted);
        }
        this.InvokeAsync("GetLocations", new object[0], this.GetLocationsOperationCompleted, userState);
    }
    
    private void OnGetLocationsOperationCompleted(object arg) {
        if ((this.GetLocationsCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.GetLocationsCompleted(this, new GetLocationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    public new void CancelAsync(object userState) {
        base.CancelAsync(userState);
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class LocationsLocation {
    
    private int idField;
    
    private string nameField;
    
    /// <remarks/>
    public int ID {
        get {
            return this.idField;
        }
        set {
            this.idField = value;
        }
    }
    
    /// <remarks/>
    public string Name {
        get {
            return this.nameField;
        }
        set {
            this.nameField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetLocationsCompletedEventHandler(object sender, GetLocationsCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetLocationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal GetLocationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
            base(exception, cancelled, userState) {
        this.results = results;
    }
    
    /// <remarks/>
    public LocationsLocation[] Result {
        get {
            this.RaiseExceptionIfNecessary();
            return ((LocationsLocation[])(this.results[0]));
        }
    }
}
