Click here to Skip to main content
15,886,362 members
Articles / Programming Languages / C#

RemoteConsole

Rate me:
Please Sign up or sign in to vote.
3.20/5 (2 votes)
27 Aug 2007CPOL2 min read 33K   674   26  
Remote console allows to send commands to a remote computer located on the Internet
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.42
//
//     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 2.0.50727.42.
// 
#pragma warning disable 1591

namespace JHC.Rambase.RemoteControl.RemoteAdminWS {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="RemoteAdminWebServiceSoap", Namespace="http://webservices/")]
    public partial class RemoteAdminWebService : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback PollForCommandOperationCompleted;
        
        private System.Threading.SendOrPostCallback ReturnOutputOperationCompleted;
        
        private System.Threading.SendOrPostCallback StationCloseOperationCompleted;
        
        private System.Threading.SendOrPostCallback StationStartOperationCompleted;
        
        private System.Threading.SendOrPostCallback PollOperationCompleted;
        
        private System.Threading.SendOrPostCallback SetOutputOperationCompleted;
        
        private System.Threading.SendOrPostCallback StationDownOperationCompleted;
        
        private System.Threading.SendOrPostCallback StationUpOperationCompleted;
        
        private System.Threading.SendOrPostCallback SendCommandOperationCompleted;
        
        private System.Threading.SendOrPostCallback PollForResponseOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetAllStationOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public RemoteAdminWebService() {
            this.Url = global::JHC.Rambase.RemoteControl.Properties.Settings.Default.RemoteControl_RemoteAdminWS_RemoteAdminWebService;
            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 PollForCommandCompletedEventHandler PollForCommandCompleted;
        
        /// <remarks/>
        public event ReturnOutputCompletedEventHandler ReturnOutputCompleted;
        
        /// <remarks/>
        public event StationCloseCompletedEventHandler StationCloseCompleted;
        
        /// <remarks/>
        public event StationStartCompletedEventHandler StationStartCompleted;
        
        /// <remarks/>
        public event PollCompletedEventHandler PollCompleted;
        
        /// <remarks/>
        public event SetOutputCompletedEventHandler SetOutputCompleted;
        
        /// <remarks/>
        public event StationDownCompletedEventHandler StationDownCompleted;
        
        /// <remarks/>
        public event StationUpCompletedEventHandler StationUpCompleted;
        
        /// <remarks/>
        public event SendCommandCompletedEventHandler SendCommandCompleted;
        
        /// <remarks/>
        public event PollForResponseCompletedEventHandler PollForResponseCompleted;
        
        /// <remarks/>
        public event GetAllStationCompletedEventHandler GetAllStationCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/PollForCommand", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string PollForCommand(string output) {
            object[] results = this.Invoke("PollForCommand", new object[] {
                        output});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginPollForCommand(string output, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("PollForCommand", new object[] {
                        output}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndPollForCommand(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void PollForCommandAsync(string output) {
            this.PollForCommandAsync(output, null);
        }
        
        /// <remarks/>
        public void PollForCommandAsync(string output, object userState) {
            if ((this.PollForCommandOperationCompleted == null)) {
                this.PollForCommandOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPollForCommandOperationCompleted);
            }
            this.InvokeAsync("PollForCommand", new object[] {
                        output}, this.PollForCommandOperationCompleted, userState);
        }
        
        private void OnPollForCommandOperationCompleted(object arg) {
            if ((this.PollForCommandCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.PollForCommandCompleted(this, new PollForCommandCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/ReturnOutput", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void ReturnOutput(string output) {
            this.Invoke("ReturnOutput", new object[] {
                        output});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginReturnOutput(string output, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("ReturnOutput", new object[] {
                        output}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndReturnOutput(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        public void ReturnOutputAsync(string output) {
            this.ReturnOutputAsync(output, null);
        }
        
        /// <remarks/>
        public void ReturnOutputAsync(string output, object userState) {
            if ((this.ReturnOutputOperationCompleted == null)) {
                this.ReturnOutputOperationCompleted = new System.Threading.SendOrPostCallback(this.OnReturnOutputOperationCompleted);
            }
            this.InvokeAsync("ReturnOutput", new object[] {
                        output}, this.ReturnOutputOperationCompleted, userState);
        }
        
        private void OnReturnOutputOperationCompleted(object arg) {
            if ((this.ReturnOutputCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ReturnOutputCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/StationClose", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void StationClose() {
            this.Invoke("StationClose", new object[0]);
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginStationClose(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("StationClose", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public void EndStationClose(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        public void StationCloseAsync() {
            this.StationCloseAsync(null);
        }
        
        /// <remarks/>
        public void StationCloseAsync(object userState) {
            if ((this.StationCloseOperationCompleted == null)) {
                this.StationCloseOperationCompleted = new System.Threading.SendOrPostCallback(this.OnStationCloseOperationCompleted);
            }
            this.InvokeAsync("StationClose", new object[0], this.StationCloseOperationCompleted, userState);
        }
        
        private void OnStationCloseOperationCompleted(object arg) {
            if ((this.StationCloseCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.StationCloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/StationStart", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void StationStart() {
            this.Invoke("StationStart", new object[0]);
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginStationStart(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("StationStart", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public void EndStationStart(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        public void StationStartAsync() {
            this.StationStartAsync(null);
        }
        
        /// <remarks/>
        public void StationStartAsync(object userState) {
            if ((this.StationStartOperationCompleted == null)) {
                this.StationStartOperationCompleted = new System.Threading.SendOrPostCallback(this.OnStationStartOperationCompleted);
            }
            this.InvokeAsync("StationStart", new object[0], this.StationStartOperationCompleted, userState);
        }
        
        private void OnStationStartOperationCompleted(object arg) {
            if ((this.StationStartCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.StationStartCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/Poll", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string Poll(string output, string address) {
            object[] results = this.Invoke("Poll", new object[] {
                        output,
                        address});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginPoll(string output, string address, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("Poll", new object[] {
                        output,
                        address}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndPoll(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void PollAsync(string output, string address) {
            this.PollAsync(output, address, null);
        }
        
        /// <remarks/>
        public void PollAsync(string output, string address, object userState) {
            if ((this.PollOperationCompleted == null)) {
                this.PollOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPollOperationCompleted);
            }
            this.InvokeAsync("Poll", new object[] {
                        output,
                        address}, this.PollOperationCompleted, userState);
        }
        
        private void OnPollOperationCompleted(object arg) {
            if ((this.PollCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.PollCompleted(this, new PollCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/SetOutput", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void SetOutput(string output, string address) {
            this.Invoke("SetOutput", new object[] {
                        output,
                        address});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginSetOutput(string output, string address, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("SetOutput", new object[] {
                        output,
                        address}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndSetOutput(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        public void SetOutputAsync(string output, string address) {
            this.SetOutputAsync(output, address, null);
        }
        
        /// <remarks/>
        public void SetOutputAsync(string output, string address, object userState) {
            if ((this.SetOutputOperationCompleted == null)) {
                this.SetOutputOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOutputOperationCompleted);
            }
            this.InvokeAsync("SetOutput", new object[] {
                        output,
                        address}, this.SetOutputOperationCompleted, userState);
        }
        
        private void OnSetOutputOperationCompleted(object arg) {
            if ((this.SetOutputCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.SetOutputCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/StationDown", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void StationDown(string address) {
            this.Invoke("StationDown", new object[] {
                        address});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginStationDown(string address, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("StationDown", new object[] {
                        address}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndStationDown(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        public void StationDownAsync(string address) {
            this.StationDownAsync(address, null);
        }
        
        /// <remarks/>
        public void StationDownAsync(string address, object userState) {
            if ((this.StationDownOperationCompleted == null)) {
                this.StationDownOperationCompleted = new System.Threading.SendOrPostCallback(this.OnStationDownOperationCompleted);
            }
            this.InvokeAsync("StationDown", new object[] {
                        address}, this.StationDownOperationCompleted, userState);
        }
        
        private void OnStationDownOperationCompleted(object arg) {
            if ((this.StationDownCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.StationDownCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/StationUp", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void StationUp(string address) {
            this.Invoke("StationUp", new object[] {
                        address});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginStationUp(string address, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("StationUp", new object[] {
                        address}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndStationUp(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        public void StationUpAsync(string address) {
            this.StationUpAsync(address, null);
        }
        
        /// <remarks/>
        public void StationUpAsync(string address, object userState) {
            if ((this.StationUpOperationCompleted == null)) {
                this.StationUpOperationCompleted = new System.Threading.SendOrPostCallback(this.OnStationUpOperationCompleted);
            }
            this.InvokeAsync("StationUp", new object[] {
                        address}, this.StationUpOperationCompleted, userState);
        }
        
        private void OnStationUpOperationCompleted(object arg) {
            if ((this.StationUpCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.StationUpCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/SendCommand", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void SendCommand(string address, string command) {
            this.Invoke("SendCommand", new object[] {
                        address,
                        command});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginSendCommand(string address, string command, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("SendCommand", new object[] {
                        address,
                        command}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndSendCommand(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        public void SendCommandAsync(string address, string command) {
            this.SendCommandAsync(address, command, null);
        }
        
        /// <remarks/>
        public void SendCommandAsync(string address, string command, object userState) {
            if ((this.SendCommandOperationCompleted == null)) {
                this.SendCommandOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendCommandOperationCompleted);
            }
            this.InvokeAsync("SendCommand", new object[] {
                        address,
                        command}, this.SendCommandOperationCompleted, userState);
        }
        
        private void OnSendCommandOperationCompleted(object arg) {
            if ((this.SendCommandCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.SendCommandCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/PollForResponse", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string PollForResponse(string address) {
            object[] results = this.Invoke("PollForResponse", new object[] {
                        address});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginPollForResponse(string address, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("PollForResponse", new object[] {
                        address}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndPollForResponse(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void PollForResponseAsync(string address) {
            this.PollForResponseAsync(address, null);
        }
        
        /// <remarks/>
        public void PollForResponseAsync(string address, object userState) {
            if ((this.PollForResponseOperationCompleted == null)) {
                this.PollForResponseOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPollForResponseOperationCompleted);
            }
            this.InvokeAsync("PollForResponse", new object[] {
                        address}, this.PollForResponseOperationCompleted, userState);
        }
        
        private void OnPollForResponseOperationCompleted(object arg) {
            if ((this.PollForResponseCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.PollForResponseCompleted(this, new PollForResponseCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservices/GetAllStation", RequestNamespace="http://webservices/", ResponseNamespace="http://webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public Station[] GetAllStation() {
            object[] results = this.Invoke("GetAllStation", new object[0]);
            return ((Station[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginGetAllStation(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("GetAllStation", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public Station[] EndGetAllStation(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((Station[])(results[0]));
        }
        
        /// <remarks/>
        public void GetAllStationAsync() {
            this.GetAllStationAsync(null);
        }
        
        /// <remarks/>
        public void GetAllStationAsync(object userState) {
            if ((this.GetAllStationOperationCompleted == null)) {
                this.GetAllStationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAllStationOperationCompleted);
            }
            this.InvokeAsync("GetAllStation", new object[0], this.GetAllStationOperationCompleted, userState);
        }
        
        private void OnGetAllStationOperationCompleted(object arg) {
            if ((this.GetAllStationCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetAllStationCompleted(this, new GetAllStationCompletedEventArgs(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.Xml", "2.0.50727.42")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://webservices/")]
    public partial class Station {
        
        private string addressField;
        
        private string stateField;
        
        private string commandField;
        
        private string outputField;
        
        private string fileBufferField;
        
        private string reqDateField;
        
        private System.DateTime startDateField;
        
        /// <remarks/>
        public string Address {
            get {
                return this.addressField;
            }
            set {
                this.addressField = value;
            }
        }
        
        /// <remarks/>
        public string State {
            get {
                return this.stateField;
            }
            set {
                this.stateField = value;
            }
        }
        
        /// <remarks/>
        public string Command {
            get {
                return this.commandField;
            }
            set {
                this.commandField = value;
            }
        }
        
        /// <remarks/>
        public string Output {
            get {
                return this.outputField;
            }
            set {
                this.outputField = value;
            }
        }
        
        /// <remarks/>
        public string FileBuffer {
            get {
                return this.fileBufferField;
            }
            set {
                this.fileBufferField = value;
            }
        }
        
        /// <remarks/>
        public string ReqDate {
            get {
                return this.reqDateField;
            }
            set {
                this.reqDateField = value;
            }
        }
        
        /// <remarks/>
        public System.DateTime StartDate {
            get {
                return this.startDateField;
            }
            set {
                this.startDateField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void PollForCommandCompletedEventHandler(object sender, PollForCommandCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class PollForCommandCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal PollForCommandCompletedEventArgs(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", "2.0.50727.42")]
    public delegate void ReturnOutputCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void StationCloseCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void StationStartCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void PollCompletedEventHandler(object sender, PollCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class PollCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal PollCompletedEventArgs(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", "2.0.50727.42")]
    public delegate void SetOutputCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void StationDownCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void StationUpCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void SendCommandCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void PollForResponseCompletedEventHandler(object sender, PollForResponseCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class PollForResponseCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal PollForResponseCompletedEventArgs(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", "2.0.50727.42")]
    public delegate void GetAllStationCompletedEventHandler(object sender, GetAllStationCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetAllStationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetAllStationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public Station[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((Station[])(this.results[0]));
            }
        }
    }
}

#pragma warning restore 1591

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Romania Romania
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions