//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     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 4.0.30319.42000.
// 

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

#pragma warning disable 1591

namespace ExceptionReporter.Web_References.ua.com.artpoint.bug {
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.6.1584.0")]
    [DebuggerStepThrough()]
    [DesignerCategory("code")]
    [WebServiceBinding(Name="ReportSoap", Namespace="http://bug.artpoint.com.ua/")]
    public partial class Report : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback CallServiceReportOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public Report() {
            this.Url = global::ExceptionReporter.Properties.Settings.Default.ExceptionReporter_Core_ua_com_artpoint_bug_Report;
            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 CallServiceReportCompletedEventHandler CallServiceReportCompleted;
        
        /// <remarks/>
        [SoapDocumentMethod("http://bug.artpoint.com.ua/CallServiceReport", RequestNamespace="http://bug.artpoint.com.ua/", ResponseNamespace="http://bug.artpoint.com.ua/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public bool CallServiceReport([XmlElement(DataType="base64Binary")] byte[] data) {
            object[] results = this.Invoke("CallServiceReport", new object[] {
                        data});
            return ((bool)(results[0]));
        }
        
        /// <remarks/>
        public void CallServiceReportAsync(byte[] data) {
            this.CallServiceReportAsync(data, null);
        }
        
        /// <remarks/>
        public void CallServiceReportAsync(byte[] data, object userState) {
            if ((this.CallServiceReportOperationCompleted == null)) {
                this.CallServiceReportOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCallServiceReportOperationCompleted);
            }
            this.InvokeAsync("CallServiceReport", new object[] {
                        data}, this.CallServiceReportOperationCompleted, userState);
        }
        
        private void OnCallServiceReportOperationCompleted(object arg) {
            if ((this.CallServiceReportCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.CallServiceReportCompleted(this, new CallServiceReportCompletedEventArgs(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", "4.6.1584.0")]
    public delegate void CallServiceReportCompletedEventHandler(object sender, CallServiceReportCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.6.1584.0")]
    [DebuggerStepThrough()]
    [DesignerCategory("code")]
    public partial class CallServiceReportCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal CallServiceReportCompletedEventArgs(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]));
            }
        }
    }
}

#pragma warning restore 1591