//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.1
//
//     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 wsdl, Version=4.0.30319.1.
// 
namespace AlfredoLotar.Livro.Aspnet {
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.ComponentModel;
    using System.Xml.Serialization;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="ConcatenarSoap", Namespace="http://www.novatec.com.br/")]
    public partial class Concatenar : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback ConcatOperationCompleted;
        
        /// <remarks/>
        public Concatenar() {
            this.Url = "http://localhost/capitulo23/concatena.asmx";
        }
        
        /// <remarks/>
        public event ConcatCompletedEventHandler ConcatCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.novatec.com.br/Concat", RequestNamespace="http://www.novatec.com.br/", ResponseNamespace="http://www.novatec.com.br/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string Concat(string y, string x) {
            object[] results = this.Invoke("Concat", new object[] {
                        y,
                        x});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginConcat(string y, string x, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("Concat", new object[] {
                        y,
                        x}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndConcat(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void ConcatAsync(string y, string x) {
            this.ConcatAsync(y, x, null);
        }
        
        /// <remarks/>
        public void ConcatAsync(string y, string x, object userState) {
            if ((this.ConcatOperationCompleted == null)) {
                this.ConcatOperationCompleted = new System.Threading.SendOrPostCallback(this.OnConcatOperationCompleted);
            }
            this.InvokeAsync("Concat", new object[] {
                        y,
                        x}, this.ConcatOperationCompleted, userState);
        }
        
        private void OnConcatOperationCompleted(object arg) {
            if ((this.ConcatCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ConcatCompleted(this, new ConcatCompletedEventArgs(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.1")]
    public delegate void ConcatCompletedEventHandler(object sender, ConcatCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class ConcatCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal ConcatCompletedEventArgs(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]));
            }
        }
    }
}
