?? upserver.cs
字號:
namespace Codematic.UpServer
{
using Codematic.Properties;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Web.Services;
using System.Web.Services.Description;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
[DesignerCategory("code"), WebServiceBinding(Name="UpServerSoap", Namespace="http://tempuri.org/"), GeneratedCode("System.Web.Services", "2.0.50727.42"), DebuggerStepThrough]
public class UpServer : SoapHttpClientProtocol
{
private SendOrPostCallback ErrInfoOperationCompleted;
private SendOrPostCallback GetFileListOperationCompleted;
private SendOrPostCallback GetNewFilePathOperationCompleted;
private SendOrPostCallback GetServerUrlOperationCompleted;
private SendOrPostCallback GetVersionOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
public event ErrInfoCompletedEventHandler ErrInfoCompleted;
public event GetFileListCompletedEventHandler GetFileListCompleted;
public event GetNewFilePathCompletedEventHandler GetNewFilePathCompleted;
public event GetServerUrlCompletedEventHandler GetServerUrlCompleted;
public event GetVersionCompletedEventHandler GetVersionCompleted;
public UpServer()
{
this.Url = Settings.Default.Codematic_UpServer_UpServer;
if (this.IsLocalFileSystemWebService(this.Url))
{
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else
{
this.useDefaultCredentialsSetExplicitly = true;
}
}
public void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
[SoapDocumentMethod("http://tempuri.org/ErrInfo", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
public void ErrInfo(string softname, string sysinfo, [XmlElement("errinfo")] string errinfo1)
{
base.Invoke("ErrInfo", new object[] { softname, sysinfo, errinfo1 });
}
public void ErrInfoAsync(string softname, string sysinfo, string errinfo1)
{
this.ErrInfoAsync(softname, sysinfo, errinfo1, null);
}
public void ErrInfoAsync(string softname, string sysinfo, string errinfo1, object userState)
{
if (this.ErrInfoOperationCompleted == null)
{
this.ErrInfoOperationCompleted = new SendOrPostCallback(this.OnErrInfoOperationCompleted);
}
base.InvokeAsync("ErrInfo", new object[] { softname, sysinfo, errinfo1 }, this.ErrInfoOperationCompleted, userState);
}
[SoapDocumentMethod("http://tempuri.org/GetFileList", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
public string GetFileList()
{
return (string) base.Invoke("GetFileList", new object[0])[0];
}
public void GetFileListAsync()
{
this.GetFileListAsync(null);
}
public void GetFileListAsync(object userState)
{
if (this.GetFileListOperationCompleted == null)
{
this.GetFileListOperationCompleted = new SendOrPostCallback(this.OnGetFileListOperationCompleted);
}
base.InvokeAsync("GetFileList", new object[0], this.GetFileListOperationCompleted, userState);
}
[SoapDocumentMethod("http://tempuri.org/GetNewFilePath", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
public string GetNewFilePath()
{
return (string) base.Invoke("GetNewFilePath", new object[0])[0];
}
public void GetNewFilePathAsync()
{
this.GetNewFilePathAsync(null);
}
public void GetNewFilePathAsync(object userState)
{
if (this.GetNewFilePathOperationCompleted == null)
{
this.GetNewFilePathOperationCompleted = new SendOrPostCallback(this.OnGetNewFilePathOperationCompleted);
}
base.InvokeAsync("GetNewFilePath", new object[0], this.GetNewFilePathOperationCompleted, userState);
}
[SoapDocumentMethod("http://tempuri.org/GetServerUrl", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
public string GetServerUrl()
{
return (string) base.Invoke("GetServerUrl", new object[0])[0];
}
public void GetServerUrlAsync()
{
this.GetServerUrlAsync(null);
}
public void GetServerUrlAsync(object userState)
{
if (this.GetServerUrlOperationCompleted == null)
{
this.GetServerUrlOperationCompleted = new SendOrPostCallback(this.OnGetServerUrlOperationCompleted);
}
base.InvokeAsync("GetServerUrl", new object[0], this.GetServerUrlOperationCompleted, userState);
}
[SoapDocumentMethod("http://tempuri.org/GetVersion", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
public string GetVersion()
{
return (string) base.Invoke("GetVersion", new object[0])[0];
}
public void GetVersionAsync()
{
this.GetVersionAsync(null);
}
public void GetVersionAsync(object userState)
{
if (this.GetVersionOperationCompleted == null)
{
this.GetVersionOperationCompleted = new SendOrPostCallback(this.OnGetVersionOperationCompleted);
}
base.InvokeAsync("GetVersion", new object[0], this.GetVersionOperationCompleted, userState);
}
private bool IsLocalFileSystemWebService(string url)
{
if ((url == null) || (url == string.Empty))
{
return false;
}
Uri uri = new Uri(url);
return ((uri.Port >= 0x400) && (string.Compare(uri.Host, "localHost", StringComparison.OrdinalIgnoreCase) == 0));
}
private void OnErrInfoOperationCompleted(object arg)
{
if (this.ErrInfoCompleted != null)
{
InvokeCompletedEventArgs args = (InvokeCompletedEventArgs) arg;
this.ErrInfoCompleted(this, new AsyncCompletedEventArgs(args.Error, args.Cancelled, args.UserState));
}
}
private void OnGetFileListOperationCompleted(object arg)
{
if (this.GetFileListCompleted != null)
{
InvokeCompletedEventArgs args = (InvokeCompletedEventArgs) arg;
this.GetFileListCompleted(this, new GetFileListCompletedEventArgs(args.Results, args.Error, args.Cancelled, args.UserState));
}
}
private void OnGetNewFilePathOperationCompleted(object arg)
{
if (this.GetNewFilePathCompleted != null)
{
InvokeCompletedEventArgs args = (InvokeCompletedEventArgs) arg;
this.GetNewFilePathCompleted(this, new GetNewFilePathCompletedEventArgs(args.Results, args.Error, args.Cancelled, args.UserState));
}
}
private void OnGetServerUrlOperationCompleted(object arg)
{
if (this.GetServerUrlCompleted != null)
{
InvokeCompletedEventArgs args = (InvokeCompletedEventArgs) arg;
this.GetServerUrlCompleted(this, new GetServerUrlCompletedEventArgs(args.Results, args.Error, args.Cancelled, args.UserState));
}
}
private void OnGetVersionOperationCompleted(object arg)
{
if (this.GetVersionCompleted != null)
{
InvokeCompletedEventArgs args = (InvokeCompletedEventArgs) arg;
this.GetVersionCompleted(this, new GetVersionCompletedEventArgs(args.Results, args.Error, args.Cancelled, args.UserState));
}
}
public string Url
{
get
{
return base.Url;
}
set
{
if ((this.IsLocalFileSystemWebService(base.Url) && !this.useDefaultCredentialsSetExplicitly) && !this.IsLocalFileSystemWebService(value))
{
base.UseDefaultCredentials = false;
}
base.Url = value;
}
}
public bool UseDefaultCredentials
{
get
{
return base.UseDefaultCredentials;
}
set
{
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
}
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -