sinanews.cs

来自「asp.net经典案例资料」· CS 代码 · 共 77 行

CS
77
字号
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.0.3705.0
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

// 
// 此源代码由 wsdl, Version=1.0.3705.0 自动生成。
// 
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;


/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="SinaNewsSoap", Namespace="http://www.sina.com.cn")]
public class SinaNews : System.Web.Services.Protocols.SoapHttpClientProtocol {
    
    /// <remarks/>
    public SinaNews() {
        this.Url = "http://localhost/ASPExample/lesson46/sinanews.asmx";
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.sina.com.cn/GetNews", RequestNamespace="http://www.sina.com.cn", ResponseNamespace="http://www.sina.com.cn", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public System.Data.DataSet GetNews(string user, string password) {
        object[] results = this.Invoke("GetNews", new object[] {
                    user,
                    password});
        return ((System.Data.DataSet)(results[0]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginGetNews(string user, string password, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("GetNews", new object[] {
                    user,
                    password}, callback, asyncState);
    }
    
    /// <remarks/>
    public System.Data.DataSet EndGetNews(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((System.Data.DataSet)(results[0]));
    }
    
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.sina.com.cn/Register", RequestNamespace="http://www.sina.com.cn", ResponseNamespace="http://www.sina.com.cn", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public bool Register(string user, string password) {
        object[] results = this.Invoke("Register", new object[] {
                    user,
                    password});
        return ((bool)(results[0]));
    }
    
    /// <remarks/>
    public System.IAsyncResult BeginRegister(string user, string password, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("Register", new object[] {
                    user,
                    password}, callback, asyncState);
    }
    
    /// <remarks/>
    public bool EndRegister(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((bool)(results[0]));
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?