//------------------------------------------------------------------------------
// <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 code was auto-generated by Microsoft.Silverlight.ServiceReference, version 4.0.50401.0
// 
namespace Translator.TranslatorService {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://api.microsofttranslator.com/v1/soap.svc", ConfigurationName="TranslatorService.LanguageService")]
    public interface LanguageService {
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://api.microsofttranslator.com/v1/soap.svc/LanguageService/GetLanguages", ReplyAction="http://api.microsofttranslator.com/v1/soap.svc/LanguageService/GetLanguagesRespon" +
            "se")]
        System.IAsyncResult BeginGetLanguages(string appId, System.AsyncCallback callback, object asyncState);
        
        System.Collections.ObjectModel.ObservableCollection<string> EndGetLanguages(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://api.microsofttranslator.com/v1/soap.svc/LanguageService/GetLanguageNames", ReplyAction="http://api.microsofttranslator.com/v1/soap.svc/LanguageService/GetLanguageNamesRe" +
            "sponse")]
        System.IAsyncResult BeginGetLanguageNames(string appId, string locale, System.AsyncCallback callback, object asyncState);
        
        System.Collections.ObjectModel.ObservableCollection<string> EndGetLanguageNames(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://api.microsofttranslator.com/v1/soap.svc/LanguageService/Detect", ReplyAction="http://api.microsofttranslator.com/v1/soap.svc/LanguageService/DetectResponse")]
        System.IAsyncResult BeginDetect(string appId, string text, System.AsyncCallback callback, object asyncState);
        
        string EndDetect(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://api.microsofttranslator.com/v1/soap.svc/LanguageService/Translate", ReplyAction="http://api.microsofttranslator.com/v1/soap.svc/LanguageService/TranslateResponse")]
        System.IAsyncResult BeginTranslate(string appId, string text, string from, string to, System.AsyncCallback callback, object asyncState);
        
        string EndTranslate(System.IAsyncResult result);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface LanguageServiceChannel : Translator.TranslatorService.LanguageService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetLanguagesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public System.Collections.ObjectModel.ObservableCollection<string> Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((System.Collections.ObjectModel.ObservableCollection<string>)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetLanguageNamesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetLanguageNamesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public System.Collections.ObjectModel.ObservableCollection<string> Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((System.Collections.ObjectModel.ObservableCollection<string>)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class DetectCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public DetectCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public string Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class TranslateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public TranslateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public string Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class LanguageServiceClient : System.ServiceModel.ClientBase<Translator.TranslatorService.LanguageService>, Translator.TranslatorService.LanguageService {
        
        private BeginOperationDelegate onBeginGetLanguagesDelegate;
        
        private EndOperationDelegate onEndGetLanguagesDelegate;
        
        private System.Threading.SendOrPostCallback onGetLanguagesCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetLanguageNamesDelegate;
        
        private EndOperationDelegate onEndGetLanguageNamesDelegate;
        
        private System.Threading.SendOrPostCallback onGetLanguageNamesCompletedDelegate;
        
        private BeginOperationDelegate onBeginDetectDelegate;
        
        private EndOperationDelegate onEndDetectDelegate;
        
        private System.Threading.SendOrPostCallback onDetectCompletedDelegate;
        
        private BeginOperationDelegate onBeginTranslateDelegate;
        
        private EndOperationDelegate onEndTranslateDelegate;
        
        private System.Threading.SendOrPostCallback onTranslateCompletedDelegate;
        
        private BeginOperationDelegate onBeginOpenDelegate;
        
        private EndOperationDelegate onEndOpenDelegate;
        
        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
        
        private BeginOperationDelegate onBeginCloseDelegate;
        
        private EndOperationDelegate onEndCloseDelegate;
        
        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
        
        public LanguageServiceClient() {
        }
        
        public LanguageServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public LanguageServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public LanguageServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public LanguageServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public System.Net.CookieContainer CookieContainer {
            get {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    return httpCookieContainerManager.CookieContainer;
                }
                else {
                    return null;
                }
            }
            set {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    httpCookieContainerManager.CookieContainer = value;
                }
                else {
                    throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" +
                            "ookieContainerBindingElement.");
                }
            }
        }
        
        public event System.EventHandler<GetLanguagesCompletedEventArgs> GetLanguagesCompleted;
        
        public event System.EventHandler<GetLanguageNamesCompletedEventArgs> GetLanguageNamesCompleted;
        
        public event System.EventHandler<DetectCompletedEventArgs> DetectCompleted;
        
        public event System.EventHandler<TranslateCompletedEventArgs> TranslateCompleted;
        
        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;
        
        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult Translator.TranslatorService.LanguageService.BeginGetLanguages(string appId, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetLanguages(appId, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Collections.ObjectModel.ObservableCollection<string> Translator.TranslatorService.LanguageService.EndGetLanguages(System.IAsyncResult result) {
            return base.Channel.EndGetLanguages(result);
        }
        
        private System.IAsyncResult OnBeginGetLanguages(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string appId = ((string)(inValues[0]));
            return ((Translator.TranslatorService.LanguageService)(this)).BeginGetLanguages(appId, callback, asyncState);
        }
        
        private object[] OnEndGetLanguages(System.IAsyncResult result) {
            System.Collections.ObjectModel.ObservableCollection<string> retVal = ((Translator.TranslatorService.LanguageService)(this)).EndGetLanguages(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetLanguagesCompleted(object state) {
            if ((this.GetLanguagesCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetLanguagesCompleted(this, new GetLanguagesCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetLanguagesAsync(string appId) {
            this.GetLanguagesAsync(appId, null);
        }
        
        public void GetLanguagesAsync(string appId, object userState) {
            if ((this.onBeginGetLanguagesDelegate == null)) {
                this.onBeginGetLanguagesDelegate = new BeginOperationDelegate(this.OnBeginGetLanguages);
            }
            if ((this.onEndGetLanguagesDelegate == null)) {
                this.onEndGetLanguagesDelegate = new EndOperationDelegate(this.OnEndGetLanguages);
            }
            if ((this.onGetLanguagesCompletedDelegate == null)) {
                this.onGetLanguagesCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetLanguagesCompleted);
            }
            base.InvokeAsync(this.onBeginGetLanguagesDelegate, new object[] {
                        appId}, this.onEndGetLanguagesDelegate, this.onGetLanguagesCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult Translator.TranslatorService.LanguageService.BeginGetLanguageNames(string appId, string locale, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetLanguageNames(appId, locale, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Collections.ObjectModel.ObservableCollection<string> Translator.TranslatorService.LanguageService.EndGetLanguageNames(System.IAsyncResult result) {
            return base.Channel.EndGetLanguageNames(result);
        }
        
        private System.IAsyncResult OnBeginGetLanguageNames(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string appId = ((string)(inValues[0]));
            string locale = ((string)(inValues[1]));
            return ((Translator.TranslatorService.LanguageService)(this)).BeginGetLanguageNames(appId, locale, callback, asyncState);
        }
        
        private object[] OnEndGetLanguageNames(System.IAsyncResult result) {
            System.Collections.ObjectModel.ObservableCollection<string> retVal = ((Translator.TranslatorService.LanguageService)(this)).EndGetLanguageNames(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetLanguageNamesCompleted(object state) {
            if ((this.GetLanguageNamesCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetLanguageNamesCompleted(this, new GetLanguageNamesCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetLanguageNamesAsync(string appId, string locale) {
            this.GetLanguageNamesAsync(appId, locale, null);
        }
        
        public void GetLanguageNamesAsync(string appId, string locale, object userState) {
            if ((this.onBeginGetLanguageNamesDelegate == null)) {
                this.onBeginGetLanguageNamesDelegate = new BeginOperationDelegate(this.OnBeginGetLanguageNames);
            }
            if ((this.onEndGetLanguageNamesDelegate == null)) {
                this.onEndGetLanguageNamesDelegate = new EndOperationDelegate(this.OnEndGetLanguageNames);
            }
            if ((this.onGetLanguageNamesCompletedDelegate == null)) {
                this.onGetLanguageNamesCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetLanguageNamesCompleted);
            }
            base.InvokeAsync(this.onBeginGetLanguageNamesDelegate, new object[] {
                        appId,
                        locale}, this.onEndGetLanguageNamesDelegate, this.onGetLanguageNamesCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult Translator.TranslatorService.LanguageService.BeginDetect(string appId, string text, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginDetect(appId, text, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        string Translator.TranslatorService.LanguageService.EndDetect(System.IAsyncResult result) {
            return base.Channel.EndDetect(result);
        }
        
        private System.IAsyncResult OnBeginDetect(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string appId = ((string)(inValues[0]));
            string text = ((string)(inValues[1]));
            return ((Translator.TranslatorService.LanguageService)(this)).BeginDetect(appId, text, callback, asyncState);
        }
        
        private object[] OnEndDetect(System.IAsyncResult result) {
            string retVal = ((Translator.TranslatorService.LanguageService)(this)).EndDetect(result);
            return new object[] {
                    retVal};
        }
        
        private void OnDetectCompleted(object state) {
            if ((this.DetectCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.DetectCompleted(this, new DetectCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void DetectAsync(string appId, string text) {
            this.DetectAsync(appId, text, null);
        }
        
        public void DetectAsync(string appId, string text, object userState) {
            if ((this.onBeginDetectDelegate == null)) {
                this.onBeginDetectDelegate = new BeginOperationDelegate(this.OnBeginDetect);
            }
            if ((this.onEndDetectDelegate == null)) {
                this.onEndDetectDelegate = new EndOperationDelegate(this.OnEndDetect);
            }
            if ((this.onDetectCompletedDelegate == null)) {
                this.onDetectCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnDetectCompleted);
            }
            base.InvokeAsync(this.onBeginDetectDelegate, new object[] {
                        appId,
                        text}, this.onEndDetectDelegate, this.onDetectCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult Translator.TranslatorService.LanguageService.BeginTranslate(string appId, string text, string from, string to, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginTranslate(appId, text, from, to, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        string Translator.TranslatorService.LanguageService.EndTranslate(System.IAsyncResult result) {
            return base.Channel.EndTranslate(result);
        }
        
        private System.IAsyncResult OnBeginTranslate(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string appId = ((string)(inValues[0]));
            string text = ((string)(inValues[1]));
            string from = ((string)(inValues[2]));
            string to = ((string)(inValues[3]));
            return ((Translator.TranslatorService.LanguageService)(this)).BeginTranslate(appId, text, from, to, callback, asyncState);
        }
        
        private object[] OnEndTranslate(System.IAsyncResult result) {
            string retVal = ((Translator.TranslatorService.LanguageService)(this)).EndTranslate(result);
            return new object[] {
                    retVal};
        }
        
        private void OnTranslateCompleted(object state) {
            if ((this.TranslateCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.TranslateCompleted(this, new TranslateCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void TranslateAsync(string appId, string text, string from, string to) {
            this.TranslateAsync(appId, text, from, to, null);
        }
        
        public void TranslateAsync(string appId, string text, string from, string to, object userState) {
            if ((this.onBeginTranslateDelegate == null)) {
                this.onBeginTranslateDelegate = new BeginOperationDelegate(this.OnBeginTranslate);
            }
            if ((this.onEndTranslateDelegate == null)) {
                this.onEndTranslateDelegate = new EndOperationDelegate(this.OnEndTranslate);
            }
            if ((this.onTranslateCompletedDelegate == null)) {
                this.onTranslateCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnTranslateCompleted);
            }
            base.InvokeAsync(this.onBeginTranslateDelegate, new object[] {
                        appId,
                        text,
                        from,
                        to}, this.onEndTranslateDelegate, this.onTranslateCompletedDelegate, userState);
        }
        
        private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState);
        }
        
        private object[] OnEndOpen(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result);
            return null;
        }
        
        private void OnOpenCompleted(object state) {
            if ((this.OpenCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void OpenAsync() {
            this.OpenAsync(null);
        }
        
        public void OpenAsync(object userState) {
            if ((this.onBeginOpenDelegate == null)) {
                this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen);
            }
            if ((this.onEndOpenDelegate == null)) {
                this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen);
            }
            if ((this.onOpenCompletedDelegate == null)) {
                this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted);
            }
            base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState);
        }
        
        private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState);
        }
        
        private object[] OnEndClose(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result);
            return null;
        }
        
        private void OnCloseCompleted(object state) {
            if ((this.CloseCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void CloseAsync() {
            this.CloseAsync(null);
        }
        
        public void CloseAsync(object userState) {
            if ((this.onBeginCloseDelegate == null)) {
                this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose);
            }
            if ((this.onEndCloseDelegate == null)) {
                this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose);
            }
            if ((this.onCloseCompletedDelegate == null)) {
                this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted);
            }
            base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState);
        }
        
        protected override Translator.TranslatorService.LanguageService CreateChannel() {
            return new LanguageServiceClientChannel(this);
        }
        
        private class LanguageServiceClientChannel : ChannelBase<Translator.TranslatorService.LanguageService>, Translator.TranslatorService.LanguageService {
            
            public LanguageServiceClientChannel(System.ServiceModel.ClientBase<Translator.TranslatorService.LanguageService> client) : 
                    base(client) {
            }
            
            public System.IAsyncResult BeginGetLanguages(string appId, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = appId;
                System.IAsyncResult _result = base.BeginInvoke("GetLanguages", _args, callback, asyncState);
                return _result;
            }
            
            public System.Collections.ObjectModel.ObservableCollection<string> EndGetLanguages(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.ObjectModel.ObservableCollection<string> _result = ((System.Collections.ObjectModel.ObservableCollection<string>)(base.EndInvoke("GetLanguages", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetLanguageNames(string appId, string locale, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[2];
                _args[0] = appId;
                _args[1] = locale;
                System.IAsyncResult _result = base.BeginInvoke("GetLanguageNames", _args, callback, asyncState);
                return _result;
            }
            
            public System.Collections.ObjectModel.ObservableCollection<string> EndGetLanguageNames(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.ObjectModel.ObservableCollection<string> _result = ((System.Collections.ObjectModel.ObservableCollection<string>)(base.EndInvoke("GetLanguageNames", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginDetect(string appId, string text, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[2];
                _args[0] = appId;
                _args[1] = text;
                System.IAsyncResult _result = base.BeginInvoke("Detect", _args, callback, asyncState);
                return _result;
            }
            
            public string EndDetect(System.IAsyncResult result) {
                object[] _args = new object[0];
                string _result = ((string)(base.EndInvoke("Detect", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginTranslate(string appId, string text, string from, string to, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[4];
                _args[0] = appId;
                _args[1] = text;
                _args[2] = from;
                _args[3] = to;
                System.IAsyncResult _result = base.BeginInvoke("Translate", _args, callback, asyncState);
                return _result;
            }
            
            public string EndTranslate(System.IAsyncResult result) {
                object[] _args = new object[0];
                string _result = ((string)(base.EndInvoke("Translate", _args, result)));
                return _result;
            }
        }
    }
}
