Click here to Skip to main content
15,892,537 members
Articles / Web Development / Apache

The platform-independent code with Mono: Client-server application sample

Rate me:
Please Sign up or sign in to vote.
4.80/5 (23 votes)
24 Mar 2010CPOL10 min read 74.4K   798   59  
This article shows how we can develop the platform-independent software with Mono usage
// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Mono Runtime Version: 2.0.50727.1433
// 
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------

// 
// This source code was auto-generated by Web Services Description Language Utility
//Mono Framework v2.0.50727.1433
//


/// <remarks/>
[System.Web.Services.WebServiceBinding(Name="InfoCenterServiceSoap", Namespace="http://tempuri.org/")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class InfoCenterService : System.Web.Services.Protocols.SoapHttpClientProtocol {
    
    private System.Threading.SendOrPostCallback AddInfoOperationCompleted;
    
    private System.Threading.SendOrPostCallback AddProcessesOperationCompleted;
    
    public InfoCenterService() {
        this.Url = "http://localhost/InfoCenter/InfoCenterService.asmx";
    }
    
    public event AddInfoCompletedEventHandler AddInfoCompleted;
    
    public event AddProcessesCompletedEventHandler AddProcessesCompleted;
    
    /// <remarks>
///This method insert information about computer
///</remarks>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddInfo", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)]
    public void AddInfo(string compressedXml) {
        this.Invoke("AddInfo", new object[] {
                    compressedXml});
    }
    
    public System.IAsyncResult BeginAddInfo(string compressedXml, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("AddInfo", new object[] {
                    compressedXml}, callback, asyncState);
    }
    
    public void EndAddInfo(System.IAsyncResult asyncResult) {
        this.EndInvoke(asyncResult);
    }
    
    public void AddInfoAsync(string compressedXml) {
        this.AddInfoAsync(compressedXml, null);
    }
    
    public void AddInfoAsync(string compressedXml, object userState) {
        if ((this.AddInfoOperationCompleted == null)) {
            this.AddInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddInfoCompleted);
        }
        this.InvokeAsync("AddInfo", new object[] {
                    compressedXml}, this.AddInfoOperationCompleted, userState);
    }
    
    private void OnAddInfoCompleted(object arg) {
        if ((this.AddInfoCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.AddInfoCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    /// <remarks>
///This method insert processes from a computer
///</remarks>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddProcesses", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)]
    public void AddProcesses(string compName, string compressedXml) {
        this.Invoke("AddProcesses", new object[] {
                    compName,
                    compressedXml});
    }
    
    public System.IAsyncResult BeginAddProcesses(string compName, string compressedXml, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("AddProcesses", new object[] {
                    compName,
                    compressedXml}, callback, asyncState);
    }
    
    public void EndAddProcesses(System.IAsyncResult asyncResult) {
        this.EndInvoke(asyncResult);
    }
    
    public void AddProcessesAsync(string compName, string compressedXml) {
        this.AddProcessesAsync(compName, compressedXml, null);
    }
    
    public void AddProcessesAsync(string compName, string compressedXml, object userState) {
        if ((this.AddProcessesOperationCompleted == null)) {
            this.AddProcessesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddProcessesCompleted);
        }
        this.InvokeAsync("AddProcesses", new object[] {
                    compName,
                    compressedXml}, this.AddProcessesOperationCompleted, userState);
    }
    
    private void OnAddProcessesCompleted(object arg) {
        if ((this.AddProcessesCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.AddProcessesCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
}

public delegate void AddInfoCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs args);

public delegate void AddProcessesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs args);

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 (Senior) Nokia
Germany Germany
Interested in design/development of framework functionality using the best patterns and practices.

Comments and Discussions