Reference.cs 8.8 KB
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行库版本:2.0.50727.1433
//
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

// 
// 此源代码是由 Microsoft.VSDesigner 2.0.50727.1433 版自动生成。
// 
#pragma warning disable 1591

namespace App.BaseSvc {
    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.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="BaseSvcSoap", Namespace="http://www.Shixintech.com/MyCMMI/")]
    public partial class BaseSvc : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback TestServiceUrlOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetServiceVersionOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public BaseSvc() {
            this.Url = global::App.Properties.Settings.Default.App_BaseSvc_BaseSvc;
            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 TestServiceUrlCompletedEventHandler TestServiceUrlCompleted;
        
        /// <remarks/>
        public event GetServiceVersionCompletedEventHandler GetServiceVersionCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.Shixintech.com/MyCMMI/TestServiceUrl", RequestNamespace="http://www.Shixintech.com/MyCMMI/", ResponseNamespace="http://www.Shixintech.com/MyCMMI/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public bool TestServiceUrl() {
            object[] results = this.Invoke("TestServiceUrl", new object[0]);
            return ((bool)(results[0]));
        }
        
        /// <remarks/>
        public void TestServiceUrlAsync() {
            this.TestServiceUrlAsync(null);
        }
        
        /// <remarks/>
        public void TestServiceUrlAsync(object userState) {
            if ((this.TestServiceUrlOperationCompleted == null)) {
                this.TestServiceUrlOperationCompleted = new System.Threading.SendOrPostCallback(this.OnTestServiceUrlOperationCompleted);
            }
            this.InvokeAsync("TestServiceUrl", new object[0], this.TestServiceUrlOperationCompleted, userState);
        }
        
        private void OnTestServiceUrlOperationCompleted(object arg) {
            if ((this.TestServiceUrlCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.TestServiceUrlCompleted(this, new TestServiceUrlCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.Shixintech.com/MyCMMI/GetServiceVersion", RequestNamespace="http://www.Shixintech.com/MyCMMI/", ResponseNamespace="http://www.Shixintech.com/MyCMMI/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string GetServiceVersion() {
            object[] results = this.Invoke("GetServiceVersion", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void GetServiceVersionAsync() {
            this.GetServiceVersionAsync(null);
        }
        
        /// <remarks/>
        public void GetServiceVersionAsync(object userState) {
            if ((this.GetServiceVersionOperationCompleted == null)) {
                this.GetServiceVersionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServiceVersionOperationCompleted);
            }
            this.InvokeAsync("GetServiceVersion", new object[0], this.GetServiceVersionOperationCompleted, userState);
        }
        
        private void OnGetServiceVersionOperationCompleted(object arg) {
            if ((this.GetServiceVersionCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetServiceVersionCompleted(this, new GetServiceVersionCompletedEventArgs(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.Web.Services", "2.0.50727.1433")]
    public delegate void TestServiceUrlCompletedEventHandler(object sender, TestServiceUrlCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class TestServiceUrlCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal TestServiceUrlCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public bool Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((bool)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void GetServiceVersionCompletedEventHandler(object sender, GetServiceVersionCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetServiceVersionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetServiceVersionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
}

#pragma warning restore 1591