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

namespace HelloWorldDurableCLI.HelloWorldService {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="HelloWorldService.IHelloWorldService")]
    public interface IHelloWorldService {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHelloWorldService/SayHi", ReplyAction="http://tempuri.org/IHelloWorldService/SayHiResponse")]
        HelloWorldDurableCLI.HelloWorldService.SayHiResponse SayHi(HelloWorldDurableCLI.HelloWorldService.SayHiRequest request);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IHelloWorldService/SayHi", ReplyAction="http://tempuri.org/IHelloWorldService/SayHiResponse")]
        System.IAsyncResult BeginSayHi(HelloWorldDurableCLI.HelloWorldService.SayHiRequest request, System.AsyncCallback callback, object asyncState);
        
        HelloWorldDurableCLI.HelloWorldService.SayHiResponse EndSayHi(System.IAsyncResult result);
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.MessageContractAttribute(WrapperName="SayHi", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
    public partial class SayHiRequest {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
        public string workbookPath;
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=1)]
        public string recipientName;
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=2)]
        public int recipientNumber;
        
        public SayHiRequest() {
        }
        
        public SayHiRequest(string workbookPath, string recipientName, int recipientNumber) {
            this.workbookPath = workbookPath;
            this.recipientName = recipientName;
            this.recipientNumber = recipientNumber;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.MessageContractAttribute(WrapperName="SayHiResponse", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
    public partial class SayHiResponse {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
        public string SayHiResult;
        
        public SayHiResponse() {
        }
        
        public SayHiResponse(string SayHiResult) {
            this.SayHiResult = SayHiResult;
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public interface IHelloWorldServiceChannel : HelloWorldDurableCLI.HelloWorldService.IHelloWorldService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class SayHiCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public SayHiCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public HelloWorldDurableCLI.HelloWorldService.SayHiResponse Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((HelloWorldDurableCLI.HelloWorldService.SayHiResponse)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class HelloWorldServiceClient : System.ServiceModel.ClientBase<HelloWorldDurableCLI.HelloWorldService.IHelloWorldService>, HelloWorldDurableCLI.HelloWorldService.IHelloWorldService {
        
        private BeginOperationDelegate onBeginSayHiDelegate;
        
        private EndOperationDelegate onEndSayHiDelegate;
        
        private System.Threading.SendOrPostCallback onSayHiCompletedDelegate;
        
        public HelloWorldServiceClient() {
        }
        
        public HelloWorldServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public HelloWorldServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public HelloWorldServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public HelloWorldServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public event System.EventHandler<SayHiCompletedEventArgs> SayHiCompleted;
        
        public HelloWorldDurableCLI.HelloWorldService.SayHiResponse SayHi(HelloWorldDurableCLI.HelloWorldService.SayHiRequest request) {
            return base.Channel.SayHi(request);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        public System.IAsyncResult BeginSayHi(HelloWorldDurableCLI.HelloWorldService.SayHiRequest request, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginSayHi(request, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        public HelloWorldDurableCLI.HelloWorldService.SayHiResponse EndSayHi(System.IAsyncResult result) {
            return base.Channel.EndSayHi(result);
        }
        
        private System.IAsyncResult OnBeginSayHi(object[] inValues, System.AsyncCallback callback, object asyncState) {
            HelloWorldDurableCLI.HelloWorldService.SayHiRequest request = ((HelloWorldDurableCLI.HelloWorldService.SayHiRequest)(inValues[0]));
            return this.BeginSayHi(request, callback, asyncState);
        }
        
        private object[] OnEndSayHi(System.IAsyncResult result) {
            HelloWorldDurableCLI.HelloWorldService.SayHiResponse retVal = this.EndSayHi(result);
            return new object[] {
                    retVal};
        }
        
        private void OnSayHiCompleted(object state) {
            if ((this.SayHiCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.SayHiCompleted(this, new SayHiCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void SayHiAsync(HelloWorldDurableCLI.HelloWorldService.SayHiRequest request) {
            this.SayHiAsync(request, null);
        }
        
        public void SayHiAsync(HelloWorldDurableCLI.HelloWorldService.SayHiRequest request, object userState) {
            if ((this.onBeginSayHiDelegate == null)) {
                this.onBeginSayHiDelegate = new BeginOperationDelegate(this.OnBeginSayHi);
            }
            if ((this.onEndSayHiDelegate == null)) {
                this.onEndSayHiDelegate = new EndOperationDelegate(this.OnEndSayHi);
            }
            if ((this.onSayHiCompletedDelegate == null)) {
                this.onSayHiCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSayHiCompleted);
            }
            base.InvokeAsync(this.onBeginSayHiDelegate, new object[] {
                        request}, this.onEndSayHiDelegate, this.onSayHiCompletedDelegate, userState);
        }
    }
}
