📄 reference.cs
字号:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50215.44
//
// 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.50215.44.
//
namespace WinInformationPollingService.ProductsProxy {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Xml.Serialization;
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="ProductsServiceSoap", Namespace="http://www.wrox.com/Books/ProASPNET20XML/")]
public partial class ProductsService : System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback GetProductsOperationCompleted;
private System.Threading.SendOrPostCallback GetProductsByCategoryIDOperationCompleted;
private System.Threading.SendOrPostCallback GetProductDetailsOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
/// <remarks/>
public ProductsService() {
this.Url = WinInformationPollingService.Properties.Settings.Default.WinInformationPollingService_ProductsProxy_ProductsService;
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 GetProductsCompletedEventHandler GetProductsCompleted;
/// <remarks/>
public event GetProductsByCategoryIDCompletedEventHandler GetProductsByCategoryIDCompleted;
/// <remarks/>
public event GetProductDetailsCompletedEventHandler GetProductDetailsCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.wrox.com/Books/ProASPNET20XML/GetProducts", RequestNamespace="http://www.wrox.com/Books/ProASPNET20XML/", ResponseNamespace="http://www.wrox.com/Books/ProASPNET20XML/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public Product[] GetProducts() {
object[] results = this.Invoke("GetProducts", new object[0]);
return ((Product[])(results[0]));
}
/// <remarks/>
public void GetProductsAsync() {
this.GetProductsAsync(null);
}
/// <remarks/>
public void GetProductsAsync(object userState) {
if ((this.GetProductsOperationCompleted == null)) {
this.GetProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetProductsOperationCompleted);
}
this.InvokeAsync("GetProducts", new object[0], this.GetProductsOperationCompleted, userState);
}
private void OnGetProductsOperationCompleted(object arg) {
if ((this.GetProductsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetProductsCompleted(this, new GetProductsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.wrox.com/Books/ProASPNET20XML/GetProductsByCategoryID", RequestNamespace="http://www.wrox.com/Books/ProASPNET20XML/", ResponseNamespace="http://www.wrox.com/Books/ProASPNET20XML/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public Product[] GetProductsByCategoryID(int categoryID) {
object[] results = this.Invoke("GetProductsByCategoryID", new object[] {
categoryID});
return ((Product[])(results[0]));
}
/// <remarks/>
public void GetProductsByCategoryIDAsync(int categoryID) {
this.GetProductsByCategoryIDAsync(categoryID, null);
}
/// <remarks/>
public void GetProductsByCategoryIDAsync(int categoryID, object userState) {
if ((this.GetProductsByCategoryIDOperationCompleted == null)) {
this.GetProductsByCategoryIDOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetProductsByCategoryIDOperationCompleted);
}
this.InvokeAsync("GetProductsByCategoryID", new object[] {
categoryID}, this.GetProductsByCategoryIDOperationCompleted, userState);
}
private void OnGetProductsByCategoryIDOperationCompleted(object arg) {
if ((this.GetProductsByCategoryIDCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetProductsByCategoryIDCompleted(this, new GetProductsByCategoryIDCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.wrox.com/Books/ProASPNET20XML/GetProductDetails", RequestNamespace="http://www.wrox.com/Books/ProASPNET20XML/", ResponseNamespace="http://www.wrox.com/Books/ProASPNET20XML/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public Product[] GetProductDetails(int productID) {
object[] results = this.Invoke("GetProductDetails", new object[] {
productID});
return ((Product[])(results[0]));
}
/// <remarks/>
public void GetProductDetailsAsync(int productID) {
this.GetProductDetailsAsync(productID, null);
}
/// <remarks/>
public void GetProductDetailsAsync(int productID, object userState) {
if ((this.GetProductDetailsOperationCompleted == null)) {
this.GetProductDetailsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetProductDetailsOperationCompleted);
}
this.InvokeAsync("GetProductDetails", new object[] {
productID}, this.GetProductDetailsOperationCompleted, userState);
}
private void OnGetProductDetailsOperationCompleted(object arg) {
if ((this.GetProductDetailsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetProductDetailsCompleted(this, new GetProductDetailsCompletedEventArgs(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)
&& (wsUri.Port <= 5000))
&& (string.Compare(wsUri.Host, "localHost", true) == 0))) {
return true;
}
return false;
}
}
/// <remarks/>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.wrox.com/Books/ProASPNET20XML/")]
public partial class Product {
private int productIDField;
private int categoryIDField;
private string modelNoField;
private string modelNameField;
private string imageField;
private string priceField;
private string descriptionField;
private string onSaleField;
/// <remarks/>
public int ProductID {
get {
return this.productIDField;
}
set {
this.productIDField = value;
}
}
/// <remarks/>
public int CategoryID {
get {
return this.categoryIDField;
}
set {
this.categoryIDField = value;
}
}
/// <remarks/>
public string ModelNo {
get {
return this.modelNoField;
}
set {
this.modelNoField = value;
}
}
/// <remarks/>
public string ModelName {
get {
return this.modelNameField;
}
set {
this.modelNameField = value;
}
}
/// <remarks/>
public string Image {
get {
return this.imageField;
}
set {
this.imageField = value;
}
}
/// <remarks/>
public string Price {
get {
return this.priceField;
}
set {
this.priceField = value;
}
}
/// <remarks/>
public string Description {
get {
return this.descriptionField;
}
set {
this.descriptionField = value;
}
}
/// <remarks/>
public string OnSale {
get {
return this.onSaleField;
}
set {
this.onSaleField = value;
}
}
}
/// <remarks/>
public delegate void GetProductsCompletedEventHandler(object sender, GetProductsCompletedEventArgs e);
/// <remarks/>
public partial class GetProductsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetProductsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public Product[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((Product[])(this.results[0]));
}
}
}
/// <remarks/>
public delegate void GetProductsByCategoryIDCompletedEventHandler(object sender, GetProductsByCategoryIDCompletedEventArgs e);
/// <remarks/>
public partial class GetProductsByCategoryIDCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetProductsByCategoryIDCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public Product[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((Product[])(this.results[0]));
}
}
}
/// <remarks/>
public delegate void GetProductDetailsCompletedEventHandler(object sender, GetProductDetailsCompletedEventArgs e);
/// <remarks/>
public partial class GetProductDetailsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetProductDetailsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public Product[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((Product[])(this.results[0]));
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -