//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

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

// 
// This source code was auto-generated by wsdl, Version=4.0.30319.33440.
// 


/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="BasicHttpBinding_ISampleService", Namespace="http://tempuri.org/")]
public partial class SampleService : System.Web.Services.Protocols.SoapHttpClientProtocol {
    
    private System.Threading.SendOrPostCallback GetMatchesOperationCompleted;
    
    private System.Threading.SendOrPostCallback GetMatchingFieldsOperationCompleted;
    
    private System.Threading.SendOrPostCallback InitOperationCompleted;
    
    private System.Threading.SendOrPostCallback IsRunningOperationCompleted;
    
    private System.Threading.SendOrPostCallback UnloadOperationCompleted;
    
    private System.Threading.SendOrPostCallback InsertRecordOperationCompleted;
    
    private System.Threading.SendOrPostCallback UpdateRecordOperationCompleted;
    
    private System.Threading.SendOrPostCallback DeleteRecordOperationCompleted;
    
    private System.Threading.SendOrPostCallback GetCommonNameOperationCompleted;
    
    /// <remarks/>
    public SampleService() {
        this.Url = "http://localhost/SelfHostedServiceConsole";
    }
    
    /// <remarks/>
    public event GetMatchesCompletedEventHandler GetMatchesCompleted;
    
    /// <remarks/>
    public event GetMatchingFieldsCompletedEventHandler GetMatchingFieldsCompleted;
    
    /// <remarks/>
    public event InitCompletedEventHandler InitCompleted;
    
    /// <remarks/>
    public event IsRunningCompletedEventHandler IsRunningCompleted;
    
    /// <remarks/>
    public event UnloadCompletedEventHandler UnloadCompleted;
    
    /// <remarks/>
    public event InsertRecordCompletedEventHandler InsertRecordCompleted;
    
    /// <remarks/>
    public event UpdateRecordCompletedEventHandler UpdateRecordCompleted;
    
    /// <remarks/>
    public event DeleteRecordCompletedEventHandler DeleteRecordCompleted;
    
    /// <remarks/>
    public event GetCommonNameCompletedEventHandler GetCommonNameCompleted;
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ISampleService/GetMatches", 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[] GetMatches([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string hash, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string tableName, [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] string[] values, int records, [System.Xml.Serialization.XmlIgnoreAttribute()] bool recordsSpecified) {
        object[] results = this.Invoke("GetMatches", new object[] {
                    hash,
                    tableName,
                    values,
                    records,
                    recordsSpecified});
        return ((string[])(results[0]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginGetMatches(string hash, string tableName, string[] values, int records, bool recordsSpecified, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("GetMatches", new object[] {
                    hash,
                    tableName,
                    values,
                    records,
                    recordsSpecified}, callback, asyncState);
    }
    
    /// <remarks/>
    public string[] EndGetMatches(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((string[])(results[0]));
    }
    
    /// <remarks/>
    public void GetMatchesAsync(string hash, string tableName, string[] values, int records, bool recordsSpecified) {
        this.GetMatchesAsync(hash, tableName, values, records, recordsSpecified, null);
    }
    
    /// <remarks/>
    public void GetMatchesAsync(string hash, string tableName, string[] values, int records, bool recordsSpecified, object userState) {
        if ((this.GetMatchesOperationCompleted == null)) {
            this.GetMatchesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMatchesOperationCompleted);
        }
        this.InvokeAsync("GetMatches", new object[] {
                    hash,
                    tableName,
                    values,
                    records,
                    recordsSpecified}, this.GetMatchesOperationCompleted, userState);
    }
    
    private void OnGetMatchesOperationCompleted(object arg) {
        if ((this.GetMatchesCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.GetMatchesCompleted(this, new GetMatchesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ISampleService/GetMatchingFields", 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[] GetMatchingFields([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string hash, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string tableName) {
        object[] results = this.Invoke("GetMatchingFields", new object[] {
                    hash,
                    tableName});
        return ((string[])(results[0]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginGetMatchingFields(string hash, string tableName, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("GetMatchingFields", new object[] {
                    hash,
                    tableName}, callback, asyncState);
    }
    
    /// <remarks/>
    public string[] EndGetMatchingFields(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((string[])(results[0]));
    }
    
    /// <remarks/>
    public void GetMatchingFieldsAsync(string hash, string tableName) {
        this.GetMatchingFieldsAsync(hash, tableName, null);
    }
    
    /// <remarks/>
    public void GetMatchingFieldsAsync(string hash, string tableName, object userState) {
        if ((this.GetMatchingFieldsOperationCompleted == null)) {
            this.GetMatchingFieldsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMatchingFieldsOperationCompleted);
        }
        this.InvokeAsync("GetMatchingFields", new object[] {
                    hash,
                    tableName}, this.GetMatchingFieldsOperationCompleted, userState);
    }
    
    private void OnGetMatchingFieldsOperationCompleted(object arg) {
        if ((this.GetMatchingFieldsCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.GetMatchingFieldsCompleted(this, new GetMatchingFieldsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ISampleService/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([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string hash, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string tableName, bool useLog, [System.Xml.Serialization.XmlIgnoreAttribute()] bool useLogSpecified, bool doTransformation, [System.Xml.Serialization.XmlIgnoreAttribute()] bool doTransformationSpecified, out bool InitResult, [System.Xml.Serialization.XmlIgnoreAttribute()] out bool InitResultSpecified) {
        object[] results = this.Invoke("Init", new object[] {
                    hash,
                    tableName,
                    useLog,
                    useLogSpecified,
                    doTransformation,
                    doTransformationSpecified});
        InitResult = ((bool)(results[0]));
        InitResultSpecified = ((bool)(results[1]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginInit(string hash, string tableName, bool useLog, bool useLogSpecified, bool doTransformation, bool doTransformationSpecified, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("Init", new object[] {
                    hash,
                    tableName,
                    useLog,
                    useLogSpecified,
                    doTransformation,
                    doTransformationSpecified}, callback, asyncState);
    }
    
    /// <remarks/>
    public void EndInit(System.IAsyncResult asyncResult, out bool InitResult, out bool InitResultSpecified) {
        object[] results = this.EndInvoke(asyncResult);
        InitResult = ((bool)(results[0]));
        InitResultSpecified = ((bool)(results[1]));
    }
    
    /// <remarks/>
    public void InitAsync(string hash, string tableName, bool useLog, bool useLogSpecified, bool doTransformation, bool doTransformationSpecified) {
        this.InitAsync(hash, tableName, useLog, useLogSpecified, doTransformation, doTransformationSpecified, null);
    }
    
    /// <remarks/>
    public void InitAsync(string hash, string tableName, bool useLog, bool useLogSpecified, bool doTransformation, bool doTransformationSpecified, object userState) {
        if ((this.InitOperationCompleted == null)) {
            this.InitOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInitOperationCompleted);
        }
        this.InvokeAsync("Init", new object[] {
                    hash,
                    tableName,
                    useLog,
                    useLogSpecified,
                    doTransformation,
                    doTransformationSpecified}, 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 InitCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ISampleService/IsRunning", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public void IsRunning([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string hash, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string tableName, out bool IsRunningResult, [System.Xml.Serialization.XmlIgnoreAttribute()] out bool IsRunningResultSpecified) {
        object[] results = this.Invoke("IsRunning", new object[] {
                    hash,
                    tableName});
        IsRunningResult = ((bool)(results[0]));
        IsRunningResultSpecified = ((bool)(results[1]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginIsRunning(string hash, string tableName, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("IsRunning", new object[] {
                    hash,
                    tableName}, callback, asyncState);
    }
    
    /// <remarks/>
    public void EndIsRunning(System.IAsyncResult asyncResult, out bool IsRunningResult, out bool IsRunningResultSpecified) {
        object[] results = this.EndInvoke(asyncResult);
        IsRunningResult = ((bool)(results[0]));
        IsRunningResultSpecified = ((bool)(results[1]));
    }
    
    /// <remarks/>
    public void IsRunningAsync(string hash, string tableName) {
        this.IsRunningAsync(hash, tableName, null);
    }
    
    /// <remarks/>
    public void IsRunningAsync(string hash, string tableName, object userState) {
        if ((this.IsRunningOperationCompleted == null)) {
            this.IsRunningOperationCompleted = new System.Threading.SendOrPostCallback(this.OnIsRunningOperationCompleted);
        }
        this.InvokeAsync("IsRunning", new object[] {
                    hash,
                    tableName}, this.IsRunningOperationCompleted, userState);
    }
    
    private void OnIsRunningOperationCompleted(object arg) {
        if ((this.IsRunningCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.IsRunningCompleted(this, new IsRunningCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ISampleService/Unload", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public void Unload([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string hash, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string tableName, out bool UnloadResult, [System.Xml.Serialization.XmlIgnoreAttribute()] out bool UnloadResultSpecified) {
        object[] results = this.Invoke("Unload", new object[] {
                    hash,
                    tableName});
        UnloadResult = ((bool)(results[0]));
        UnloadResultSpecified = ((bool)(results[1]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginUnload(string hash, string tableName, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("Unload", new object[] {
                    hash,
                    tableName}, callback, asyncState);
    }
    
    /// <remarks/>
    public void EndUnload(System.IAsyncResult asyncResult, out bool UnloadResult, out bool UnloadResultSpecified) {
        object[] results = this.EndInvoke(asyncResult);
        UnloadResult = ((bool)(results[0]));
        UnloadResultSpecified = ((bool)(results[1]));
    }
    
    /// <remarks/>
    public void UnloadAsync(string hash, string tableName) {
        this.UnloadAsync(hash, tableName, null);
    }
    
    /// <remarks/>
    public void UnloadAsync(string hash, string tableName, object userState) {
        if ((this.UnloadOperationCompleted == null)) {
            this.UnloadOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUnloadOperationCompleted);
        }
        this.InvokeAsync("Unload", new object[] {
                    hash,
                    tableName}, this.UnloadOperationCompleted, userState);
    }
    
    private void OnUnloadOperationCompleted(object arg) {
        if ((this.UnloadCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.UnloadCompleted(this, new UnloadCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ISampleService/InsertRecord", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public void InsertRecord([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string hash, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string tableName, [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] string[] values, out bool InsertRecordResult, [System.Xml.Serialization.XmlIgnoreAttribute()] out bool InsertRecordResultSpecified, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] out string error) {
        object[] results = this.Invoke("InsertRecord", new object[] {
                    hash,
                    tableName,
                    values});
        InsertRecordResult = ((bool)(results[0]));
        InsertRecordResultSpecified = ((bool)(results[1]));
        error = ((string)(results[2]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginInsertRecord(string hash, string tableName, string[] values, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("InsertRecord", new object[] {
                    hash,
                    tableName,
                    values}, callback, asyncState);
    }
    
    /// <remarks/>
    public void EndInsertRecord(System.IAsyncResult asyncResult, out bool InsertRecordResult, out bool InsertRecordResultSpecified, out string error) {
        object[] results = this.EndInvoke(asyncResult);
        InsertRecordResult = ((bool)(results[0]));
        InsertRecordResultSpecified = ((bool)(results[1]));
        error = ((string)(results[2]));
    }
    
    /// <remarks/>
    public void InsertRecordAsync(string hash, string tableName, string[] values) {
        this.InsertRecordAsync(hash, tableName, values, null);
    }
    
    /// <remarks/>
    public void InsertRecordAsync(string hash, string tableName, string[] values, object userState) {
        if ((this.InsertRecordOperationCompleted == null)) {
            this.InsertRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInsertRecordOperationCompleted);
        }
        this.InvokeAsync("InsertRecord", new object[] {
                    hash,
                    tableName,
                    values}, this.InsertRecordOperationCompleted, userState);
    }
    
    private void OnInsertRecordOperationCompleted(object arg) {
        if ((this.InsertRecordCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.InsertRecordCompleted(this, new InsertRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ISampleService/UpdateRecord", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public void UpdateRecord([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string hash, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string tableName, [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] string[] values, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string id, out bool UpdateRecordResult, [System.Xml.Serialization.XmlIgnoreAttribute()] out bool UpdateRecordResultSpecified, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] out string error) {
        object[] results = this.Invoke("UpdateRecord", new object[] {
                    hash,
                    tableName,
                    values,
                    id});
        UpdateRecordResult = ((bool)(results[0]));
        UpdateRecordResultSpecified = ((bool)(results[1]));
        error = ((string)(results[2]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginUpdateRecord(string hash, string tableName, string[] values, string id, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("UpdateRecord", new object[] {
                    hash,
                    tableName,
                    values,
                    id}, callback, asyncState);
    }
    
    /// <remarks/>
    public void EndUpdateRecord(System.IAsyncResult asyncResult, out bool UpdateRecordResult, out bool UpdateRecordResultSpecified, out string error) {
        object[] results = this.EndInvoke(asyncResult);
        UpdateRecordResult = ((bool)(results[0]));
        UpdateRecordResultSpecified = ((bool)(results[1]));
        error = ((string)(results[2]));
    }
    
    /// <remarks/>
    public void UpdateRecordAsync(string hash, string tableName, string[] values, string id) {
        this.UpdateRecordAsync(hash, tableName, values, id, null);
    }
    
    /// <remarks/>
    public void UpdateRecordAsync(string hash, string tableName, string[] values, string id, object userState) {
        if ((this.UpdateRecordOperationCompleted == null)) {
            this.UpdateRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateRecordOperationCompleted);
        }
        this.InvokeAsync("UpdateRecord", new object[] {
                    hash,
                    tableName,
                    values,
                    id}, this.UpdateRecordOperationCompleted, userState);
    }
    
    private void OnUpdateRecordOperationCompleted(object arg) {
        if ((this.UpdateRecordCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.UpdateRecordCompleted(this, new UpdateRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ISampleService/DeleteRecord", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public void DeleteRecord([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string hash, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string tableName, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string id, out bool DeleteRecordResult, [System.Xml.Serialization.XmlIgnoreAttribute()] out bool DeleteRecordResultSpecified, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] out string error) {
        object[] results = this.Invoke("DeleteRecord", new object[] {
                    hash,
                    tableName,
                    id});
        DeleteRecordResult = ((bool)(results[0]));
        DeleteRecordResultSpecified = ((bool)(results[1]));
        error = ((string)(results[2]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginDeleteRecord(string hash, string tableName, string id, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("DeleteRecord", new object[] {
                    hash,
                    tableName,
                    id}, callback, asyncState);
    }
    
    /// <remarks/>
    public void EndDeleteRecord(System.IAsyncResult asyncResult, out bool DeleteRecordResult, out bool DeleteRecordResultSpecified, out string error) {
        object[] results = this.EndInvoke(asyncResult);
        DeleteRecordResult = ((bool)(results[0]));
        DeleteRecordResultSpecified = ((bool)(results[1]));
        error = ((string)(results[2]));
    }
    
    /// <remarks/>
    public void DeleteRecordAsync(string hash, string tableName, string id) {
        this.DeleteRecordAsync(hash, tableName, id, null);
    }
    
    /// <remarks/>
    public void DeleteRecordAsync(string hash, string tableName, string id, object userState) {
        if ((this.DeleteRecordOperationCompleted == null)) {
            this.DeleteRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteRecordOperationCompleted);
        }
        this.InvokeAsync("DeleteRecord", new object[] {
                    hash,
                    tableName,
                    id}, this.DeleteRecordOperationCompleted, userState);
    }
    
    private void OnDeleteRecordOperationCompleted(object arg) {
        if ((this.DeleteRecordCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.DeleteRecordCompleted(this, new DeleteRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ISampleService/GetCommonName", 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 GetCommonName([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string firstname) {
        object[] results = this.Invoke("GetCommonName", new object[] {
                    firstname});
        return ((string)(results[0]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginGetCommonName(string firstname, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("GetCommonName", new object[] {
                    firstname}, callback, asyncState);
    }
    
    /// <remarks/>
    public string EndGetCommonName(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((string)(results[0]));
    }
    
    /// <remarks/>
    public void GetCommonNameAsync(string firstname) {
        this.GetCommonNameAsync(firstname, null);
    }
    
    /// <remarks/>
    public void GetCommonNameAsync(string firstname, object userState) {
        if ((this.GetCommonNameOperationCompleted == null)) {
            this.GetCommonNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCommonNameOperationCompleted);
        }
        this.InvokeAsync("GetCommonName", new object[] {
                    firstname}, this.GetCommonNameOperationCompleted, userState);
    }
    
    private void OnGetCommonNameOperationCompleted(object arg) {
        if ((this.GetCommonNameCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.GetCommonNameCompleted(this, new GetCommonNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks/>
    public new void CancelAsync(object userState) {
        base.CancelAsync(userState);
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
public delegate void GetMatchesCompletedEventHandler(object sender, GetMatchesCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetMatchesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal GetMatchesCompletedEventArgs(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("wsdl", "4.0.30319.33440")]
public delegate void GetMatchingFieldsCompletedEventHandler(object sender, GetMatchingFieldsCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetMatchingFieldsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal GetMatchingFieldsCompletedEventArgs(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("wsdl", "4.0.30319.33440")]
public delegate void InitCompletedEventHandler(object sender, InitCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class InitCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal InitCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
            base(exception, cancelled, userState) {
        this.results = results;
    }
    
    /// <remarks/>
    public bool InitResult {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[0]));
        }
    }
    
    /// <remarks/>
    public bool InitResultSpecified {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[1]));
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
public delegate void IsRunningCompletedEventHandler(object sender, IsRunningCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class IsRunningCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal IsRunningCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
            base(exception, cancelled, userState) {
        this.results = results;
    }
    
    /// <remarks/>
    public bool IsRunningResult {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[0]));
        }
    }
    
    /// <remarks/>
    public bool IsRunningResultSpecified {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[1]));
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
public delegate void UnloadCompletedEventHandler(object sender, UnloadCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UnloadCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal UnloadCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
            base(exception, cancelled, userState) {
        this.results = results;
    }
    
    /// <remarks/>
    public bool UnloadResult {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[0]));
        }
    }
    
    /// <remarks/>
    public bool UnloadResultSpecified {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[1]));
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
public delegate void InsertRecordCompletedEventHandler(object sender, InsertRecordCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class InsertRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal InsertRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
            base(exception, cancelled, userState) {
        this.results = results;
    }
    
    /// <remarks/>
    public bool InsertRecordResult {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[0]));
        }
    }
    
    /// <remarks/>
    public bool InsertRecordResultSpecified {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[1]));
        }
    }
    
    /// <remarks/>
    public string error {
        get {
            this.RaiseExceptionIfNecessary();
            return ((string)(this.results[2]));
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
public delegate void UpdateRecordCompletedEventHandler(object sender, UpdateRecordCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdateRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal UpdateRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
            base(exception, cancelled, userState) {
        this.results = results;
    }
    
    /// <remarks/>
    public bool UpdateRecordResult {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[0]));
        }
    }
    
    /// <remarks/>
    public bool UpdateRecordResultSpecified {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[1]));
        }
    }
    
    /// <remarks/>
    public string error {
        get {
            this.RaiseExceptionIfNecessary();
            return ((string)(this.results[2]));
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
public delegate void DeleteRecordCompletedEventHandler(object sender, DeleteRecordCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal DeleteRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
            base(exception, cancelled, userState) {
        this.results = results;
    }
    
    /// <remarks/>
    public bool DeleteRecordResult {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[0]));
        }
    }
    
    /// <remarks/>
    public bool DeleteRecordResultSpecified {
        get {
            this.RaiseExceptionIfNecessary();
            return ((bool)(this.results[1]));
        }
    }
    
    /// <remarks/>
    public string error {
        get {
            this.RaiseExceptionIfNecessary();
            return ((string)(this.results[2]));
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
public delegate void GetCommonNameCompletedEventHandler(object sender, GetCommonNameCompletedEventArgs e);

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.33440")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetCommonNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal GetCommonNameCompletedEventArgs(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]));
        }
    }
}
