//------------------------------------------------------------------------------
// <auto-generated>
//     このコードはツールによって生成されました。
//     ランタイム バージョン:2.0.50727.42
//
//     このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
//     コードが再生成されるときに損失したりします。
// </auto-generated>
//------------------------------------------------------------------------------

// 
// このソース コードは Microsoft.VSDesigner、バージョン 2.0.50727.42 によって自動生成されました。
// 
#pragma warning disable 1591

namespace BusinessWindows.ServiceReference {
    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="ServiceSoap", Namespace="http://tempuri.org/")]
    public partial class Service : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback MethodWithoutAuthenticationOperationCompleted;
        
        private System.Threading.SendOrPostCallback MethodWithAuthenticationOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public Service() {
            this.Url = global::BusinessWindows.Properties.Settings.Default.BusinessWindows_ServiceReference_Service;
            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 MethodWithoutAuthenticationCompletedEventHandler MethodWithoutAuthenticationCompleted;
        
        /// <remarks/>
        public event MethodWithAuthenticationCompletedEventHandler MethodWithAuthenticationCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/MethodWithoutAuthentication", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void MethodWithoutAuthentication() {
            this.Invoke("MethodWithoutAuthentication", new object[0]);
        }
        
        /// <remarks/>
        public void MethodWithoutAuthenticationAsync() {
            this.MethodWithoutAuthenticationAsync(null);
        }
        
        /// <remarks/>
        public void MethodWithoutAuthenticationAsync(object userState) {
            if ((this.MethodWithoutAuthenticationOperationCompleted == null)) {
                this.MethodWithoutAuthenticationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMethodWithoutAuthenticationOperationCompleted);
            }
            this.InvokeAsync("MethodWithoutAuthentication", new object[0], this.MethodWithoutAuthenticationOperationCompleted, userState);
        }
        
        private void OnMethodWithoutAuthenticationOperationCompleted(object arg) {
            if ((this.MethodWithoutAuthenticationCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.MethodWithoutAuthenticationCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/MethodWithAuthentication", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [BusinessCommon.AuthenticationExtension]
        public void MethodWithAuthentication() {
            this.Invoke("MethodWithAuthentication", new object[0]);
        }
        
        /// <remarks/>
        public void MethodWithAuthenticationAsync() {
            this.MethodWithAuthenticationAsync(null);
        }
        
        /// <remarks/>
        public void MethodWithAuthenticationAsync(object userState) {
            if ((this.MethodWithAuthenticationOperationCompleted == null)) {
                this.MethodWithAuthenticationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMethodWithAuthenticationOperationCompleted);
            }
            this.InvokeAsync("MethodWithAuthentication", new object[0], this.MethodWithAuthenticationOperationCompleted, userState);
        }
        
        private void OnMethodWithAuthenticationOperationCompleted(object arg) {
            if ((this.MethodWithAuthenticationCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.MethodWithAuthenticationCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(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.42")]
    public delegate void MethodWithoutAuthenticationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void MethodWithAuthenticationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
}

#pragma warning restore 1591