📄 stockwebservice.cs
字号:
// StockWebService.cs
// Developing Microsoft ASP.NET Server Controls and Components
// Copyright © 2002, Nikhil Kothari and Vandana Datye
//
namespace MSPress.ServerComponents.Proxy {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="StockWebServiceSoap", Namespace="http://localhost/BookWeb/Chapter18/StockWebService")]
public class StockWebService : System.Web.Services.Protocols.SoapHttpClientProtocol {
/// <remarks/>
public StockWebService() {
this.Url = "http://localhost/BookWeb/Chapter18/StockWebService.asmx";
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost/BookWeb/Chapter18/StockWebService/GetCurrentStockData", RequestNamespace="http://localhost/BookWeb/Chapter18/StockWebService", ResponseNamespace="http://localhost/BookWeb/Chapter18/StockWebService", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public StockDataSnapShot GetCurrentStockData(string stockSymbols) {
object[] results = this.Invoke("GetCurrentStockData", new object[] { stockSymbols });
return ((StockDataSnapShot)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetCurrentStockData(string stockSymbols, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetCurrentStockData", new object[] { stockSymbols }, callback, asyncState);
}
/// <remarks/>
public StockDataSnapShot EndGetCurrentStockData(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((StockDataSnapShot)(results[0]));
}
}
/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://localhost/BookWeb/Chapter18/StockWebService")]
public class StockDataSnapShot {
/// <remarks/>
public System.DateTime SnapShotTime;
/// <remarks/>
public StockData[] Stocks;
}
/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://localhost/BookWeb/Chapter18/StockWebService")]
public class StockData {
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string Symbol;
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public System.Double Value;
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool ValueSpecified;
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public System.Double Change;
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool ChangeSpecified;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -