//------------------------------------------------------------------------------
// <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>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.42.
// 
#pragma warning disable 1591

namespace UsingNillable.canopus5 {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="RepairPointSoap", Namespace="urn:other")]
    public partial class RepairPoint : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback GetEstimateOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetEstimate2OperationCompleted;
        
        private System.Threading.SendOrPostCallback GetEstimate3OperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public RepairPoint() {
            this.Url = global::UsingNillable.Properties.Settings.Default.UsingNillable_canopus5_RepairPoint;
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        public new string Url {
            get {
                return base.Url;
            }
            set {
                if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
                            && (this.useDefaultCredentialsSetExplicitly == false)) 
                            && (this.IsLocalFileSystemWebService(value) == false))) {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }
        
        public new bool UseDefaultCredentials {
            get {
                return base.UseDefaultCredentials;
            }
            set {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        /// <remarks/>
        public event GetEstimateCompletedEventHandler GetEstimateCompleted;
        
        /// <remarks/>
        public event GetEstimate2CompletedEventHandler GetEstimate2Completed;
        
        /// <remarks/>
        public event GetEstimate3CompletedEventHandler GetEstimate3Completed;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:autosGetEstimate", RequestNamespace="urn:autos", ResponseNamespace="urn:autos", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<int> GetEstimate([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string model) {
            object[] results = this.Invoke("GetEstimate", new object[] {
                        model});
            return ((System.Nullable<int>)(results[0]));
        }
        
        /// <remarks/>
        public void GetEstimateAsync(string model) {
            this.GetEstimateAsync(model, null);
        }
        
        /// <remarks/>
        public void GetEstimateAsync(string model, object userState) {
            if ((this.GetEstimateOperationCompleted == null)) {
                this.GetEstimateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEstimateOperationCompleted);
            }
            this.InvokeAsync("GetEstimate", new object[] {
                        model}, this.GetEstimateOperationCompleted, userState);
        }
        
        private void OnGetEstimateOperationCompleted(object arg) {
            if ((this.GetEstimateCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetEstimateCompleted(this, new GetEstimateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:autosGetEstimate2", RequestNamespace="urn:autos", ResponseNamespace="urn:autos", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<int> GetEstimate2([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string model, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] System.Nullable<int> m) {
            object[] results = this.Invoke("GetEstimate2", new object[] {
                        model,
                        m});
            return ((System.Nullable<int>)(results[0]));
        }
        
        /// <remarks/>
        public void GetEstimate2Async(string model, System.Nullable<int> m) {
            this.GetEstimate2Async(model, m, null);
        }
        
        /// <remarks/>
        public void GetEstimate2Async(string model, System.Nullable<int> m, object userState) {
            if ((this.GetEstimate2OperationCompleted == null)) {
                this.GetEstimate2OperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEstimate2OperationCompleted);
            }
            this.InvokeAsync("GetEstimate2", new object[] {
                        model,
                        m}, this.GetEstimate2OperationCompleted, userState);
        }
        
        private void OnGetEstimate2OperationCompleted(object arg) {
            if ((this.GetEstimate2Completed != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetEstimate2Completed(this, new GetEstimate2CompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:autosGetEstimate3", RequestNamespace="urn:autos", ResponseNamespace="urn:autos", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public GetEstimate3ResponseGetEstimate3Result GetEstimate3([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string model, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] ref System.Nullable<int> m, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] ref string s) {
            object[] results = this.Invoke("GetEstimate3", new object[] {
                        model,
                        m,
                        s});
            m = ((System.Nullable<int>)(results[1]));
            s = ((string)(results[2]));
            return ((GetEstimate3ResponseGetEstimate3Result)(results[0]));
        }
        
        /// <remarks/>
        public void GetEstimate3Async(string model, System.Nullable<int> m, string s) {
            this.GetEstimate3Async(model, m, s, null);
        }
        
        /// <remarks/>
        public void GetEstimate3Async(string model, System.Nullable<int> m, string s, object userState) {
            if ((this.GetEstimate3OperationCompleted == null)) {
                this.GetEstimate3OperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEstimate3OperationCompleted);
            }
            this.InvokeAsync("GetEstimate3", new object[] {
                        model,
                        m,
                        s}, this.GetEstimate3OperationCompleted, userState);
        }
        
        private void OnGetEstimate3OperationCompleted(object arg) {
            if ((this.GetEstimate3Completed != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetEstimate3Completed(this, new GetEstimate3CompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
        
        private bool IsLocalFileSystemWebService(string url) {
            if (((url == null) 
                        || (url == string.Empty))) {
                return false;
            }
            System.Uri wsUri = new System.Uri(url);
            if (((wsUri.Port >= 1024) 
                        && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
                return true;
            }
            return false;
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
    public partial class GetEstimate3ResponseGetEstimate3Result {
        
        private System.Xml.XmlNode[] anyField;
        
        /// <remarks/>
        [System.Xml.Serialization.XmlTextAttribute()]
        [System.Xml.Serialization.XmlAnyElementAttribute()]
        public System.Xml.XmlNode[] Any {
            get {
                return this.anyField;
            }
            set {
                this.anyField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void GetEstimateCompletedEventHandler(object sender, GetEstimateCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetEstimateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetEstimateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Nullable<int> Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Nullable<int>)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void GetEstimate2CompletedEventHandler(object sender, GetEstimate2CompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetEstimate2CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetEstimate2CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Nullable<int> Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Nullable<int>)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void GetEstimate3CompletedEventHandler(object sender, GetEstimate3CompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetEstimate3CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetEstimate3CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public GetEstimate3ResponseGetEstimate3Result Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((GetEstimate3ResponseGetEstimate3Result)(this.results[0]));
            }
        }
        
        /// <remarks/>
        public System.Nullable<int> m {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Nullable<int>)(this.results[1]));
            }
        }
        
        /// <remarks/>
        public string s {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[2]));
            }
        }
    }
}

#pragma warning restore 1591