//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// 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 4.0.30319.225.
//
#pragma warning disable 1591
namespace COINSMobile.stockwebservice {
using System;
using System.Web.Services;
using System.Diagnostics;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="Stock WebserviceSoap", Namespace="http://stock.webservice.net.in")]
public partial class StockWebservice : System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback StockExistsOperationCompleted;
private System.Threading.SendOrPostCallback GetStockQuoteOperationCompleted;
private System.Threading.SendOrPostCallback GetStckChartOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
/// <remarks/>
public StockWebservice() {
this.Url = "http://stock.webservice.net.in/stockquoteservice.asmx";
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 StockExistsCompletedEventHandler StockExistsCompleted;
/// <remarks/>
public event GetStockQuoteCompletedEventHandler GetStockQuoteCompleted;
/// <remarks/>
public event GetStckChartCompletedEventHandler GetStckChartCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stock.webservice.net.in/StockExists", RequestNamespace="http://stock.webservice.net.in", ResponseNamespace="http://stock.webservice.net.in", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string StockExists(string symbol) {
object[] results = this.Invoke("StockExists", new object[] {
symbol});
return ((string)(results[0]));
}
/// <remarks/>
public void StockExistsAsync(string symbol) {
this.StockExistsAsync(symbol, null);
}
/// <remarks/>
public void StockExistsAsync(string symbol, object userState) {
if ((this.StockExistsOperationCompleted == null)) {
this.StockExistsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnStockExistsOperationCompleted);
}
this.InvokeAsync("StockExists", new object[] {
symbol}, this.StockExistsOperationCompleted, userState);
}
private void OnStockExistsOperationCompleted(object arg) {
if ((this.StockExistsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.StockExistsCompleted(this, new StockExistsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stock.webservice.net.in/GetStockQuote", RequestNamespace="http://stock.webservice.net.in", ResponseNamespace="http://stock.webservice.net.in", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string GetStockQuote(string symbol) {
object[] results = this.Invoke("GetStockQuote", new object[] {
symbol});
return ((string)(results[0]));
}
/// <remarks/>
public void GetStockQuoteAsync(string symbol) {
this.GetStockQuoteAsync(symbol, null);
}
/// <remarks/>
public void GetStockQuoteAsync(string symbol, object userState) {
if ((this.GetStockQuoteOperationCompleted == null)) {
this.GetStockQuoteOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStockQuoteOperationCompleted);
}
this.InvokeAsync("GetStockQuote", new object[] {
symbol}, this.GetStockQuoteOperationCompleted, userState);
}
private void OnGetStockQuoteOperationCompleted(object arg) {
if ((this.GetStockQuoteCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetStockQuoteCompleted(this, new GetStockQuoteCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stock.webservice.net.in/GetStckChart", RequestNamespace="http://stock.webservice.net.in", ResponseNamespace="http://stock.webservice.net.in", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
public byte[] GetStckChart(string symbol, string chartparam) {
object[] results = this.Invoke("GetStckChart", new object[] {
symbol,
chartparam});
return ((byte[])(results[0]));
}
/// <remarks/>
public void GetStckChartAsync(string symbol, string chartparam) {
this.GetStckChartAsync(symbol, chartparam, null);
}
/// <remarks/>
public void GetStckChartAsync(string symbol, string chartparam, object userState) {
if ((this.GetStckChartOperationCompleted == null)) {
this.GetStckChartOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStckChartOperationCompleted);
}
this.InvokeAsync("GetStckChart", new object[] {
symbol,
chartparam}, this.GetStckChartOperationCompleted, userState);
}
private void OnGetStckChartOperationCompleted(object arg) {
if ((this.GetStckChartCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetStckChartCompleted(this, new GetStckChartCompletedEventArgs(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.Web.Services", "4.0.30319.1")]
public delegate void StockExistsCompletedEventHandler(object sender, StockExistsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class StockExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal StockExistsCompletedEventArgs(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", "4.0.30319.1")]
public delegate void GetStockQuoteCompletedEventHandler(object sender, GetStockQuoteCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetStockQuoteCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetStockQuoteCompletedEventArgs(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", "4.0.30319.1")]
public delegate void GetStckChartCompletedEventHandler(object sender, GetStckChartCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetStckChartCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetStckChartCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public byte[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((byte[])(this.results[0]));
}
}
}
}
#pragma warning restore 1591