//------------------------------------------------------------------------------
// <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.
// 
#pragma warning disable 1591

namespace ServiceWrapper.ApiWebServiceReference {
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.Xml.Serialization;
    using System.ComponentModel;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="BasicHttpBinding_IDmeApiWebService", Namespace="http://tempuri.org/")]
    public partial class ApiWebService : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback InitOperationCompleted;
        
        private System.Threading.SendOrPostCallback ReInitOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetErorsOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetLoadedProjectsOperationCompleted;
        
        private System.Threading.SendOrPostCallback MatchAndInsertOperationCompleted;
        
        private System.Threading.SendOrPostCallback AddToCachedTableOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetVersionOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public ApiWebService() {
            this.Url = global::ServiceWrapper.Properties.Settings.Default.ServiceWrapper_ApiWebServiceReference_ApiWebService;
            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 InitCompletedEventHandler InitCompleted;
        
        /// <remarks/>
        public event ReInitCompletedEventHandler ReInitCompleted;
        
        /// <remarks/>
        public event GetErorsCompletedEventHandler GetErorsCompleted;
        
        /// <remarks/>
        public event GetLoadedProjectsCompletedEventHandler GetLoadedProjectsCompleted;
        
        /// <remarks/>
        public event MatchAndInsertCompletedEventHandler MatchAndInsertCompleted;
        
        /// <remarks/>
        public event AddToCachedTableCompletedEventHandler AddToCachedTableCompleted;
        
        /// <remarks/>
        public event GetVersionCompletedEventHandler GetVersionCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/IDmeApiWebService/Init", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void Init() {
            this.Invoke("Init", new object[0]);
        }
        
        /// <remarks/>
        public void InitAsync() {
            this.InitAsync(null);
        }
        
        /// <remarks/>
        public void InitAsync(object userState) {
            if ((this.InitOperationCompleted == null)) {
                this.InitOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInitOperationCompleted);
            }
            this.InvokeAsync("Init", new object[0], this.InitOperationCompleted, userState);
        }
        
        private void OnInitOperationCompleted(object arg) {
            if ((this.InitCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.InitCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/IDmeApiWebService/ReInit", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void ReInit() {
            this.Invoke("ReInit", new object[0]);
        }
        
        /// <remarks/>
        public void ReInitAsync() {
            this.ReInitAsync(null);
        }
        
        /// <remarks/>
        public void ReInitAsync(object userState) {
            if ((this.ReInitOperationCompleted == null)) {
                this.ReInitOperationCompleted = new System.Threading.SendOrPostCallback(this.OnReInitOperationCompleted);
            }
            this.InvokeAsync("ReInit", new object[0], this.ReInitOperationCompleted, userState);
        }
        
        private void OnReInitOperationCompleted(object arg) {
            if ((this.ReInitCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ReInitCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/IDmeApiWebService/GetErors", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")]
        public string[] GetErors() {
            object[] results = this.Invoke("GetErors", new object[0]);
            return ((string[])(results[0]));
        }
        
        /// <remarks/>
        public void GetErorsAsync() {
            this.GetErorsAsync(null);
        }
        
        /// <remarks/>
        public void GetErorsAsync(object userState) {
            if ((this.GetErorsOperationCompleted == null)) {
                this.GetErorsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetErorsOperationCompleted);
            }
            this.InvokeAsync("GetErors", new object[0], this.GetErorsOperationCompleted, userState);
        }
        
        private void OnGetErorsOperationCompleted(object arg) {
            if ((this.GetErorsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetErorsCompleted(this, new GetErorsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/IDmeApiWebService/GetLoadedProjects", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")]
        public string[] GetLoadedProjects() {
            object[] results = this.Invoke("GetLoadedProjects", new object[0]);
            return ((string[])(results[0]));
        }
        
        /// <remarks/>
        public void GetLoadedProjectsAsync() {
            this.GetLoadedProjectsAsync(null);
        }
        
        /// <remarks/>
        public void GetLoadedProjectsAsync(object userState) {
            if ((this.GetLoadedProjectsOperationCompleted == null)) {
                this.GetLoadedProjectsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLoadedProjectsOperationCompleted);
            }
            this.InvokeAsync("GetLoadedProjects", new object[0], this.GetLoadedProjectsOperationCompleted, userState);
        }
        
        private void OnGetLoadedProjectsOperationCompleted(object arg) {
            if ((this.GetLoadedProjectsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetLoadedProjectsCompleted(this, new GetLoadedProjectsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/IDmeApiWebService/MatchAndInsert", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void MatchAndInsert([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string projName, long id, [System.Xml.Serialization.XmlIgnoreAttribute()] bool idSpecified, [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] string[] values) {
            this.Invoke("MatchAndInsert", new object[] {
                        projName,
                        id,
                        idSpecified,
                        values});
        }
        
        /// <remarks/>
        public void MatchAndInsertAsync(string projName, long id, bool idSpecified, string[] values) {
            this.MatchAndInsertAsync(projName, id, idSpecified, values, null);
        }
        
        /// <remarks/>
        public void MatchAndInsertAsync(string projName, long id, bool idSpecified, string[] values, object userState) {
            if ((this.MatchAndInsertOperationCompleted == null)) {
                this.MatchAndInsertOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMatchAndInsertOperationCompleted);
            }
            this.InvokeAsync("MatchAndInsert", new object[] {
                        projName,
                        id,
                        idSpecified,
                        values}, this.MatchAndInsertOperationCompleted, userState);
        }
        
        private void OnMatchAndInsertOperationCompleted(object arg) {
            if ((this.MatchAndInsertCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.MatchAndInsertCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/IDmeApiWebService/AddToCachedTable", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void AddToCachedTable([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string projName, [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] string[] matchihgValues, out bool AddToCachedTableResult, [System.Xml.Serialization.XmlIgnoreAttribute()] out bool AddToCachedTableResultSpecified) {
            object[] results = this.Invoke("AddToCachedTable", new object[] {
                        projName,
                        matchihgValues});
            AddToCachedTableResult = ((bool)(results[0]));
            AddToCachedTableResultSpecified = ((bool)(results[1]));
        }
        
        /// <remarks/>
        public void AddToCachedTableAsync(string projName, string[] matchihgValues) {
            this.AddToCachedTableAsync(projName, matchihgValues, null);
        }
        
        /// <remarks/>
        public void AddToCachedTableAsync(string projName, string[] matchihgValues, object userState) {
            if ((this.AddToCachedTableOperationCompleted == null)) {
                this.AddToCachedTableOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddToCachedTableOperationCompleted);
            }
            this.InvokeAsync("AddToCachedTable", new object[] {
                        projName,
                        matchihgValues}, this.AddToCachedTableOperationCompleted, userState);
        }
        
        private void OnAddToCachedTableOperationCompleted(object arg) {
            if ((this.AddToCachedTableCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.AddToCachedTableCompleted(this, new AddToCachedTableCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/IDmeApiWebService/GetVersion", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public string GetVersion() {
            object[] results = this.Invoke("GetVersion", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void GetVersionAsync() {
            this.GetVersionAsync(null);
        }
        
        /// <remarks/>
        public void GetVersionAsync(object userState) {
            if ((this.GetVersionOperationCompleted == null)) {
                this.GetVersionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetVersionOperationCompleted);
            }
            this.InvokeAsync("GetVersion", new object[0], this.GetVersionOperationCompleted, userState);
        }
        
        private void OnGetVersionOperationCompleted(object arg) {
            if ((this.GetVersionCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetVersionCompleted(this, new GetVersionCompletedEventArgs(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.7.2558.0")]
    public delegate void InitCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    public delegate void ReInitCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    public delegate void GetErorsCompletedEventHandler(object sender, GetErorsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetErorsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetErorsCompletedEventArgs(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]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    public delegate void GetLoadedProjectsCompletedEventHandler(object sender, GetLoadedProjectsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetLoadedProjectsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetLoadedProjectsCompletedEventArgs(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]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    public delegate void MatchAndInsertCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    public delegate void AddToCachedTableCompletedEventHandler(object sender, AddToCachedTableCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class AddToCachedTableCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal AddToCachedTableCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public bool AddToCachedTableResult {
            get {
                this.RaiseExceptionIfNecessary();
                return ((bool)(this.results[0]));
            }
        }
        
        /// <remarks/>
        public bool AddToCachedTableResultSpecified {
            get {
                this.RaiseExceptionIfNecessary();
                return ((bool)(this.results[1]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    public delegate void GetVersionCompletedEventHandler(object sender, GetVersionCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2558.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetVersionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetVersionCompletedEventArgs(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