You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
170 lines
7.0 KiB
170 lines
7.0 KiB
//------------------------------------------------------------------------------ |
|
// <auto-generated> |
|
// This code was generated by a tool. |
|
// Runtime Version:4.0.30319.1 |
|
// |
|
// 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.1. |
|
// |
|
#pragma warning disable 1591 |
|
|
|
namespace CodeConvertServiceClient.ICSharpCode.OnlineConverter { |
|
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="ConvertServiceSoap", Namespace="http://developer.sharpdevelop.net/CodeConverter.NET/")] |
|
public partial class ConvertService : System.Web.Services.Protocols.SoapHttpClientProtocol { |
|
|
|
private System.Threading.SendOrPostCallback PerformConversionOperationCompleted; |
|
|
|
private bool useDefaultCredentialsSetExplicitly; |
|
|
|
/// <remarks/> |
|
public ConvertService() { |
|
this.Url = global::CodeConvertServiceClient.Properties.Settings.Default.CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService; |
|
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 PerformConversionCompletedEventHandler PerformConversionCompleted; |
|
|
|
/// <remarks/> |
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://developer.sharpdevelop.net/CodeConverter.NET/PerformConversion", RequestNamespace="http://developer.sharpdevelop.net/CodeConverter.NET/", ResponseNamespace="http://developer.sharpdevelop.net/CodeConverter.NET/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] |
|
public bool PerformConversion(string TypeOfConversion, string SourceCode, out string ConvertedCode, out string ErrorMessage) { |
|
object[] results = this.Invoke("PerformConversion", new object[] { |
|
TypeOfConversion, |
|
SourceCode}); |
|
ConvertedCode = ((string)(results[1])); |
|
ErrorMessage = ((string)(results[2])); |
|
return ((bool)(results[0])); |
|
} |
|
|
|
/// <remarks/> |
|
public void PerformConversionAsync(string TypeOfConversion, string SourceCode) { |
|
this.PerformConversionAsync(TypeOfConversion, SourceCode, null); |
|
} |
|
|
|
/// <remarks/> |
|
public void PerformConversionAsync(string TypeOfConversion, string SourceCode, object userState) { |
|
if ((this.PerformConversionOperationCompleted == null)) { |
|
this.PerformConversionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPerformConversionOperationCompleted); |
|
} |
|
this.InvokeAsync("PerformConversion", new object[] { |
|
TypeOfConversion, |
|
SourceCode}, this.PerformConversionOperationCompleted, userState); |
|
} |
|
|
|
private void OnPerformConversionOperationCompleted(object arg) { |
|
if ((this.PerformConversionCompleted != null)) { |
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); |
|
this.PerformConversionCompleted(this, new PerformConversionCompletedEventArgs(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 PerformConversionCompletedEventHandler(object sender, PerformConversionCompletedEventArgs e); |
|
|
|
/// <remarks/> |
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] |
|
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|
[System.ComponentModel.DesignerCategoryAttribute("code")] |
|
public partial class PerformConversionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { |
|
|
|
private object[] results; |
|
|
|
internal PerformConversionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : |
|
base(exception, cancelled, userState) { |
|
this.results = results; |
|
} |
|
|
|
/// <remarks/> |
|
public bool Result { |
|
get { |
|
this.RaiseExceptionIfNecessary(); |
|
return ((bool)(this.results[0])); |
|
} |
|
} |
|
|
|
/// <remarks/> |
|
public string ConvertedCode { |
|
get { |
|
this.RaiseExceptionIfNecessary(); |
|
return ((string)(this.results[1])); |
|
} |
|
} |
|
|
|
/// <remarks/> |
|
public string ErrorMessage { |
|
get { |
|
this.RaiseExceptionIfNecessary(); |
|
return ((string)(this.results[2])); |
|
} |
|
} |
|
} |
|
} |
|
|
|
#pragma warning restore 1591
|