Managing remote application users

This commit is contained in:
vfedosevich 2014-12-17 05:53:53 -08:00
parent 53aff75c14
commit 1c4b8c1006
17 changed files with 881 additions and 6 deletions

View file

@ -65,6 +65,10 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback CheckServerAvailabilityOperationCompleted;
private System.Threading.SendOrPostCallback GetApplicationUsersOperationCompleted;
private System.Threading.SendOrPostCallback SetApplicationUsersOperationCompleted;
/// <remarks/>
public RemoteDesktopServices() {
this.Url = "http://localhost:9003/RemoteDesktopServices.asmx";
@ -124,6 +128,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/>
public event CheckServerAvailabilityCompletedEventHandler CheckServerAvailabilityCompleted;
/// <remarks/>
public event GetApplicationUsersCompletedEventHandler GetApplicationUsersCompleted;
/// <remarks/>
public event SetApplicationUsersCompletedEventHandler SetApplicationUsersCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -918,6 +928,99 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetApplicationUsers", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string[] GetApplicationUsers(string collectionName, string applicationName) {
object[] results = this.Invoke("GetApplicationUsers", new object[] {
collectionName,
applicationName});
return ((string[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetApplicationUsers(string collectionName, string applicationName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetApplicationUsers", new object[] {
collectionName,
applicationName}, callback, asyncState);
}
/// <remarks/>
public string[] EndGetApplicationUsers(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string[])(results[0]));
}
/// <remarks/>
public void GetApplicationUsersAsync(string collectionName, string applicationName) {
this.GetApplicationUsersAsync(collectionName, applicationName, null);
}
/// <remarks/>
public void GetApplicationUsersAsync(string collectionName, string applicationName, object userState) {
if ((this.GetApplicationUsersOperationCompleted == null)) {
this.GetApplicationUsersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetApplicationUsersOperationCompleted);
}
this.InvokeAsync("GetApplicationUsers", new object[] {
collectionName,
applicationName}, this.GetApplicationUsersOperationCompleted, userState);
}
private void OnGetApplicationUsersOperationCompleted(object arg) {
if ((this.GetApplicationUsersCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetApplicationUsersCompleted(this, new GetApplicationUsersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetApplicationUsers", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool SetApplicationUsers(string collectionName, RemoteApplication remoteApp, string[] users) {
object[] results = this.Invoke("SetApplicationUsers", new object[] {
collectionName,
remoteApp,
users});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSetApplicationUsers(string collectionName, RemoteApplication remoteApp, string[] users, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetApplicationUsers", new object[] {
collectionName,
remoteApp,
users}, callback, asyncState);
}
/// <remarks/>
public bool EndSetApplicationUsers(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void SetApplicationUsersAsync(string collectionName, RemoteApplication remoteApp, string[] users) {
this.SetApplicationUsersAsync(collectionName, remoteApp, users, null);
}
/// <remarks/>
public void SetApplicationUsersAsync(string collectionName, RemoteApplication remoteApp, string[] users, object userState) {
if ((this.SetApplicationUsersOperationCompleted == null)) {
this.SetApplicationUsersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetApplicationUsersOperationCompleted);
}
this.InvokeAsync("SetApplicationUsers", new object[] {
collectionName,
remoteApp,
users}, this.SetApplicationUsersOperationCompleted, userState);
}
private void OnSetApplicationUsersOperationCompleted(object arg) {
if ((this.SetApplicationUsersCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetApplicationUsersCompleted(this, new SetApplicationUsersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
@ -1281,4 +1384,56 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetApplicationUsersCompletedEventHandler(object sender, GetApplicationUsersCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetApplicationUsersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetApplicationUsersCompletedEventArgs(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("wsdl", "2.0.50727.3038")]
public delegate void SetApplicationUsersCompletedEventHandler(object sender, SetApplicationUsersCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetApplicationUsersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SetApplicationUsersCompletedEventArgs(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]));
}
}
}
}