diff --git a/WebsitePanel.Installer/Sources/Setup.SchedulerService/Config.wxi b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Config.wxi new file mode 100644 index 00000000..9883f33b --- /dev/null +++ b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Config.wxi @@ -0,0 +1,6 @@ + + + + + + diff --git a/WebsitePanel.Installer/Sources/Setup.SchedulerService/License.rtf b/WebsitePanel.Installer/Sources/Setup.SchedulerService/License.rtf new file mode 100644 index 00000000..8f1b4211 Binary files /dev/null and b/WebsitePanel.Installer/Sources/Setup.SchedulerService/License.rtf differ diff --git a/WebsitePanel.Installer/Sources/Setup.SchedulerService/Product.wxs b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Product.wxs new file mode 100644 index 00000000..f66dd59c --- /dev/null +++ b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Product.wxs @@ -0,0 +1,132 @@ + + + + + + + + + + + bannrbmp + + + + + + + + + + + + + + + + + 1 + + + 1 + CORRECTCONNECTION = "0" + CORRECTCONNECTION = "1" + + + 1 + + + + + + + + + + + + + + + + + + AUTHENTICATIONTYPE = "Windows Authentication" + NOT(AUTHENTICATIONTYPE = "Windows Authentication") + + + + + + + + + 1 + + + Connection not valid. + + + + + 1 + + + 1 + + + 1 + + + + + + + + + + + LicenseAccepted = "1" + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/Setup.SchedulerService/Setup.SchedulerService.wixproj b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Setup.SchedulerService.wixproj new file mode 100644 index 00000000..e067c9b7 --- /dev/null +++ b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Setup.SchedulerService.wixproj @@ -0,0 +1,52 @@ + + + + Debug + x86 + 3.7 + {ead7c528-ea3d-40e8-9688-9f1d8dc8d758} + 2.0 + Websitepanel-SchedulerService + Package + $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets + + + bin\ + obj\$(Configuration)\ + Debug;BUILD=debug + False + + + + + + + + + bin\$(Configuration)\ + obj\$(Configuration)\ + BUILD=release + + + + + + + + + + ..\..\..\tools\WIX\WixUIExtension.dll + WixUIExtension + + + + + \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/Setup.SchedulerService/WebSitePanel.ico b/WebsitePanel.Installer/Sources/Setup.SchedulerService/WebSitePanel.ico new file mode 100644 index 00000000..bf9c0b86 Binary files /dev/null and b/WebsitePanel.Installer/Sources/Setup.SchedulerService/WebSitePanel.ico differ diff --git a/WebsitePanel.Installer/Sources/Setup.SchedulerService/bannrbmp.bmp b/WebsitePanel.Installer/Sources/Setup.SchedulerService/bannrbmp.bmp new file mode 100644 index 00000000..9ac7e922 Binary files /dev/null and b/WebsitePanel.Installer/Sources/Setup.SchedulerService/bannrbmp.bmp differ diff --git a/WebsitePanel.Installer/Sources/Setup.SchedulerService/dlgbmp.bmp b/WebsitePanel.Installer/Sources/Setup.SchedulerService/dlgbmp.bmp new file mode 100644 index 00000000..dbf9959b Binary files /dev/null and b/WebsitePanel.Installer/Sources/Setup.SchedulerService/dlgbmp.bmp differ diff --git a/WebsitePanel.Installer/Sources/VersionInfo.cs b/WebsitePanel.Installer/Sources/VersionInfo.cs index 8ca7c4b0..9ec60861 100644 --- a/WebsitePanel.Installer/Sources/VersionInfo.cs +++ b/WebsitePanel.Installer/Sources/VersionInfo.cs @@ -1,7 +1,35 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18010 +// Runtime Version:4.0.30319.18033 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.sln b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.sln index 8253af7f..6ded8966 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.sln +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{129305D5-A9E6-4DCE-BFF6-41809E13EEEE}" ProjectSection(SolutionItems) = preProject ..\..\WebsitePanel\build.xml = ..\..\WebsitePanel\build.xml @@ -24,6 +24,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Installer.Core EndProject Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup.WIX", "Setup.WIX\Setup.WIX.wixproj", "{F963A4AF-CC72-4512-B636-829345C35318}" EndProject +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup.SchedulerService", "Setup.SchedulerService\Setup.SchedulerService.wixproj", "{EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.SchedulerServiceInstaller", "WebsitePanel.SchedulerServiceInstaller\WebsitePanel.SchedulerServiceInstaller.csproj", "{24A4C231-73A9-4F03-ABAD-9A8FE5324495}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -96,6 +100,26 @@ Global {F963A4AF-CC72-4512-B636-829345C35318}.Release|Mixed Platforms.Build.0 = Release|x86 {F963A4AF-CC72-4512-B636-829345C35318}.Release|x86.ActiveCfg = Release|x86 {F963A4AF-CC72-4512-B636-829345C35318}.Release|x86.Build.0 = Release|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Debug|Any CPU.ActiveCfg = Debug|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Debug|x86.ActiveCfg = Debug|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Debug|x86.Build.0 = Debug|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Release|Any CPU.ActiveCfg = Release|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Release|Mixed Platforms.Build.0 = Release|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Release|x86.ActiveCfg = Release|x86 + {EAD7C528-EA3D-40E8-9688-9F1D8DC8D758}.Release|x86.Build.0 = Release|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Debug|Any CPU.ActiveCfg = Debug|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Debug|x86.ActiveCfg = Debug|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Debug|x86.Build.0 = Debug|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|Any CPU.ActiveCfg = Release|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|Mixed Platforms.Build.0 = Release|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|x86.ActiveCfg = Release|x86 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.config b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.config new file mode 100644 index 00000000..233c44d7 --- /dev/null +++ b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.config @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.cs b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.cs new file mode 100644 index 00000000..f5655efd --- /dev/null +++ b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.cs @@ -0,0 +1,170 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Configuration.Install; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.ServiceProcess; +using System.Text.RegularExpressions; +using Microsoft.Deployment.WindowsInstaller; + +namespace WebsitePanel.SchedulerServiceInstaller +{ + public class CustomActions + { + [CustomAction] + public static ActionResult CheckConnection(Session session) + { + string testConnectionString = session["AUTHENTICATIONTYPE"].Equals("Windows Authentication") ? GetConnectionString(session["SERVERNAME"], "master") : GetConnectionString(session["SERVERNAME"], "master", session["LOGIN"], session["PASSWORD"]); + + if (CheckConnection(testConnectionString)) + { + session["CORRECTCONNECTION"] = "1"; + session["CONNECTIONSTRING"] = session["AUTHENTICATIONTYPE"].Equals("Windows Authentication") ? GetConnectionString(session["SERVERNAME"], session["DATABASENAME"]) : GetConnectionString(session["SERVERNAME"], session["DATABASENAME"], session["LOGIN"], session["PASSWORD"]); + } + else + { + session["CORRECTCONNECTION"] = "0"; + } + + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult FinalizeInstall(Session session) + { + ChangeConfigString("installer.connectionstring", session["CONNECTIONSTRING"], session["INSTALLFOLDER"]); + ChangeCryptoKey(session["INSTALLFOLDER"]); + InstallService(session["INSTALLFOLDER"]); + + return ActionResult.Success; + } + + private static void InstallService(string installFolder) + { + try + { + if (!ServiceController.GetServices().Any(s => s.DisplayName.Equals("WebsitePanel Scheduler", StringComparison.CurrentCultureIgnoreCase))) + { + ManagedInstallerClass.InstallHelper(new[] {"/i", Path.Combine(installFolder, "WebsitePanel.SchedulerService.exe")}); + } + + StartService("WebsitePanel Scheduler"); + } + catch (Exception) + { + } + } + + private static void ChangeCryptoKey(string installFolder) + { + string path = Path.Combine(installFolder.Replace("SchedulerService", "Enterprise Server"), "web.config"); + string cryptoKey = "0123456789"; + + if (File.Exists(path)) + { + using (var reader = new StreamReader(path)) + { + string content = reader.ReadToEnd(); + var pattern = new Regex(@"(?<=)"); + Match match = pattern.Match(content); + cryptoKey = match.Value; + } + } + + ChangeConfigString("installer.cryptokey", cryptoKey, installFolder); + } + + private static void ChangeConfigString(string searchString, string replaceValue, string installFolder) + { + string content; + string path = Path.Combine(installFolder, "WebsitePanel.SchedulerService.exe.config"); + + using (var reader = new StreamReader(path)) + { + content = reader.ReadToEnd(); + } + + var re = new Regex("\\$\\{" + searchString + "\\}+", RegexOptions.IgnoreCase); + content = re.Replace(content, replaceValue); + + using (var writer = new StreamWriter(path)) + { + writer.Write(content); + } + } + + private static void StartService(string serviceName) + { + var sc = new ServiceController(serviceName); + + if (sc.Status == ServiceControllerStatus.Stopped) + { + sc.Start(); + sc.WaitForStatus(ServiceControllerStatus.Running); + } + } + + private static string GetConnectionString(string serverName, string databaseName) + { + return string.Format("Server={0};database={1};Trusted_Connection=true;", serverName, databaseName); + } + + private static string GetConnectionString(string serverName, string databaseName, string login, string password) + { + return string.Format("Server={0};database={1};uid={2};password={3};", serverName, databaseName, login, password); + } + + private static bool CheckConnection(string connectionString) + { + var connection = new SqlConnection(connectionString); + bool result = true; + + try + { + connection.Open(); + } + catch (Exception) + { + result = false; + } + finally + { + if (connection != null && connection.State == ConnectionState.Open) + { + connection.Close(); + } + } + + return result; + } + } +} \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/Properties/AssemblyInfo.cs b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..78fe3faf --- /dev/null +++ b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/Properties/AssemblyInfo.cs @@ -0,0 +1,63 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WebsitePanel.SchedulerServiceInstaller")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WebsitePanel.SchedulerServiceInstaller")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("64885563-cef3-4553-9006-31282c033b3b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/WebsitePanel.SchedulerServiceInstaller.csproj b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/WebsitePanel.SchedulerServiceInstaller.csproj new file mode 100644 index 00000000..22f11548 --- /dev/null +++ b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/WebsitePanel.SchedulerServiceInstaller.csproj @@ -0,0 +1,52 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {24A4C231-73A9-4F03-ABAD-9A8FE5324495} + Library + Properties + WebsitePanel.SchedulerServiceInstaller + WebsitePanel.SchedulerServiceInstaller + v4.0 + 512 + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets + + + true + full + false + ..\Setup.SchedulerService\bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Setup.SchedulerService\bin\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs index 6952cf21..f1d608b8 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs @@ -28,8 +28,12 @@ using System; using System.Collections.Generic; +using System.Configuration.Install; +using System.Linq; +using System.ServiceProcess; using System.Text; using System.IO; +using System.Text.RegularExpressions; using System.Xml; namespace WebsitePanel.Setup.Actions @@ -99,6 +103,74 @@ namespace WebsitePanel.Setup.Actions } } + public class InstallSchedulerServiceAction : Action, IInstallAction, IUninstallAction + { + public const string LogStartInstallMessage = "Installing Scheduler Windows Service..."; + public const string LogStartUninstallMessage = "Uninstalling Scheduler Windows Service..."; + + void IInstallAction.Run(SetupVariables vars) + { + try + { + + Begin(LogStartInstallMessage); + + Log.WriteStart(LogStartInstallMessage); + Log.WriteInfo(String.Format("Scheduler Service Name: \"{0}\"", Global.Parameters.SchedulerServiceName)); + + if (ServiceController.GetServices().Any(s => s.DisplayName.Equals(Global.Parameters.SchedulerServiceName, StringComparison.CurrentCultureIgnoreCase))) + { + Log.WriteEnd("Scheduler Service Already Installed."); + InstallLog.AppendLine(String.Format("- Scheduler Service \"{0}\" Already Installed.", Global.Parameters.SchedulerServiceName)); + return; + } + + ManagedInstallerClass.InstallHelper(new[] { "/i", Path.Combine(vars.InstallationFolder, "bin", Global.Parameters.SchedulerServiceFileName) }); + Utils.StartService(Global.Parameters.SchedulerServiceName); + } + catch (Exception ex) + { + UninstallService(vars); + + if (Utils.IsThreadAbortException(ex)) + { + return; + } + + Log.WriteError("Installing scheduler service error.", ex); + throw; + } + } + + void IUninstallAction.Run(SetupVariables vars) + { + try + { + Log.WriteStart(LogStartUninstallMessage); + UninstallService(vars); + Log.WriteEnd("Scheduler Service Uninstalled."); + } + catch (Exception ex) + { + if (Utils.IsThreadAbortException(ex)) + { + return; + } + + Log.WriteError("Uninstalling scheduler service error.", ex); + throw; + } + } + + private void UninstallService(SetupVariables vars) + { + if (ServiceController.GetServices().Any(s => s.ServiceName.Equals(Global.Parameters.SchedulerServiceName, StringComparison.CurrentCultureIgnoreCase))) + { + ManagedInstallerClass.InstallHelper(new[] { "/u", Path.Combine(vars.InstallationFolder, "bin", Global.Parameters.SchedulerServiceFileName) }); + } + } + } + public class CreateDatabaseAction : Action, IInstallAction, IUninstallAction { public const string LogStartInstallMessage = "Creating SQL Server database..."; @@ -348,6 +420,91 @@ namespace WebsitePanel.Setup.Actions } } + public class SaveSchedulerServiceConnectionStringAction : Action, IInstallAction + { + void IInstallAction.Run(SetupVariables vars) + { + Log.WriteStart(string.Format("Updating {0}.config file (connection string)", Global.Parameters.SchedulerServiceFileName)); + var file = Path.Combine(vars.InstallationFolder, "bin", string.Format("{0}.config", Global.Parameters.SchedulerServiceFileName)); + string content; + + using (var reader = new StreamReader(file)) + { + content = reader.ReadToEnd(); + } + + vars.ConnectionString = String.Format(vars.ConnectionString, vars.DatabaseServer, vars.Database, vars.Database, vars.DatabaseUserPassword); + content = Utils.ReplaceScriptVariable(content, "installer.connectionstring", vars.ConnectionString); + + using (var writer = new StreamWriter(file)) + { + writer.Write(content); + } + + Log.WriteEnd(string.Format("Updated {0}.config file (connection string)", Global.Parameters.SchedulerServiceFileName)); + } + } + + public class SaveSchedulerServiceCryptoKeyAction : Action, IInstallAction + { + void IInstallAction.Run(SetupVariables vars) + { + Log.WriteStart(string.Format("Updating {0}.config file (crypto key)", Global.Parameters.SchedulerServiceFileName)); + + try + { + UpdateCryptoKey(vars.InstallationFolder); + } + catch (Exception) + { + } + + Log.WriteEnd(string.Format("Updated {0}.config file (connection string)", Global.Parameters.SchedulerServiceFileName)); + } + + private static void UpdateCryptoKey(string installFolder) + { + string path = Path.Combine(installFolder, "web.config"); + string cryptoKey = "0123456789"; + + if (File.Exists(path)) + { + using (var reader = new StreamReader(path)) + { + string content = reader.ReadToEnd(); + var pattern = new Regex(@"(?<=)"); + Match match = pattern.Match(content); + cryptoKey = match.Value; + } + } + + ChangeConfigString("installer.cryptokey", cryptoKey, installFolder); + } + + private static void ChangeConfigString(string searchString, string replaceValue, string installFolder) + { + string path = Path.Combine(installFolder, "bin", string.Format("{0}.config", Global.Parameters.SchedulerServiceFileName)); + + if (File.Exists(path)) + { + string content; + + using (var reader = new StreamReader(path)) + { + content = reader.ReadToEnd(); + } + + var re = new Regex("\\$\\{" + searchString + "\\}+", RegexOptions.IgnoreCase); + content = re.Replace(content, replaceValue); + + using (var writer = new StreamWriter(path)) + { + writer.Write(content); + } + } + } + } + public class SaveEntServerConfigSettingsAction : Action, IInstallAction { void IInstallAction.Run(SetupVariables vars) @@ -390,7 +547,10 @@ namespace WebsitePanel.Setup.Actions new UpdateServeradminPasswAction(), new SaveAspNetDbConnectionStringAction(), new SaveComponentConfigSettingsAction(), - new SaveEntServerConfigSettingsAction() + new SaveEntServerConfigSettingsAction(), + new SaveSchedulerServiceConnectionStringAction(), + new SaveSchedulerServiceCryptoKeyAction(), + new InstallSchedulerServiceAction() }; public EntServerActionManager(SetupVariables sessionVars) : base(sessionVars) diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Global.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Global.cs index 52affc1e..63112bdc 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Global.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Global.cs @@ -76,7 +76,9 @@ namespace WebsitePanel.Setup public const string DatabaseName = "DatabaseName"; public const string ConnectionString = "ConnectionString"; public const string InstallConnectionString = "InstallConnectionString"; - public const string Release = "Release"; + public const string Release = "Release"; + public const string SchedulerServiceFileName = "WebsitePanel.SchedulerService.exe"; + public const string SchedulerServiceName = "WebsitePanel Scheduler"; } public abstract class Messages diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/WebsitePanel.Setup.csproj b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/WebsitePanel.Setup.csproj index 6b9d839d..f8a058bc 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/WebsitePanel.Setup.csproj +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/WebsitePanel.Setup.csproj @@ -74,6 +74,7 @@ + diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs index f9e34dfa..08a97db0 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs @@ -27,11 +27,14 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using System; +using System.Configuration.Install; using System.IO; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; +using System.Linq; +using System.ServiceProcess; using System.Text; using System.Threading; using System.Windows.Forms; @@ -208,17 +211,19 @@ namespace WebsitePanel.Setup Log.WriteError("Windows service stop error", ex); } - int exitCode = Utils.RunProcess(path, "/u"); - if (exitCode == 0) - { - Log.WriteEnd("Removed Windows service"); - InstallLog.AppendLine(string.Format("- Removed \"{0}\" Windows service", serviceName)); - } - else - { - Log.WriteError(string.Format("Unable to remove \"{0}\" Windows service. Error code: {1}", serviceName, exitCode), null); - InstallLog.AppendLine(string.Format("- Failed to remove \"{0}\" Windows service", serviceName)); - } + try + { + ManagedInstallerClass.InstallHelper(new[] {"/u", path}); + } + catch(Exception) + { + Log.WriteError(string.Format("Unable to remove \"{0}\" Windows service.", serviceName), null); + InstallLog.AppendLine(string.Format("- Failed to remove \"{0}\" Windows service", serviceName)); + throw; + } + + Log.WriteEnd("Removed Windows service"); + InstallLog.AppendLine(string.Format("- Removed \"{0}\" Windows service", serviceName)); } catch (Exception ex) { @@ -268,7 +273,7 @@ namespace WebsitePanel.Setup internal List GetUninstallActions(string componentId) { - List list = new List(); + var list = new List(); InstallAction action = null; //windows service @@ -285,6 +290,12 @@ namespace WebsitePanel.Setup list.Add(action); } + if (ServiceController.GetServices().Any(s => s.DisplayName.Equals(Global.Parameters.SchedulerServiceName, StringComparison.CurrentCultureIgnoreCase))) + { + action = new InstallAction(ActionTypes.UnregisterWindowsService) { Path = Path.Combine(installFolder, "bin", Global.Parameters.SchedulerServiceFileName), Name = Global.Parameters.SchedulerServiceName, Description = "Removing Windows service..." }; + action.Log = string.Format("- Remove {0} Windows service", action.Name); + list.Add(action); + } //database bool deleteDatabase = AppConfig.GetComponentSettingBooleanValue(componentId, "NewDatabase"); diff --git a/WebsitePanel.WHMCSModule/modules/servers/websitepanel/websitepanel.class.php b/WebsitePanel.WHMCSModule/modules/servers/websitepanel/websitepanel.class.php index cde28ae6..0187c5ed 100644 --- a/WebsitePanel.WHMCSModule/modules/servers/websitepanel/websitepanel.class.php +++ b/WebsitePanel.WHMCSModule/modules/servers/websitepanel/websitepanel.class.php @@ -418,7 +418,7 @@ class WebsitePanel $esUrl = (($this->_esUseSsl ? "https" : "http") . "://{$this->_esServerUrl}:{$this->_esServerPort}/{$serviceFile}?WSDL"); $soapParams = array('login' => $this->_esUsername, 'password' => $this->_esPassword, - 'cache_wsdl' => WSDL_CACHE_NONE, // WSDL caching is an annoying nightmare - we will disable it + 'cache_wsdl' => WSDL_CACHE_NONE // WSDL caching is an annoying nightmare - we will disable it ); try { @@ -432,7 +432,7 @@ class WebsitePanel } catch (Exception $e) { - throw; + throw new Exception($e->getMessage()); } } } \ No newline at end of file diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 83559c7b..0231b023 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -450,13 +450,1198 @@ INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName] VALUES (1401, 41, N'Lync2013', N'Microsoft Lync Server 2013 Multitenant Hosting Pack', N'WebsitePanel.Providers.HostedSolution.Lync2013, WebsitePanel.Providers.HostedSolution.Lync2013', N'Lync', NULL) END GO - -- add Application Pools Restart Quota -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (411, 2, 13, N'Web.AppPoolsRestart', N'Application Pools Restart', 1, 0, NULL, NULL) + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE ([QuotaName] = N'Web.AppPoolsRestart')) +BEGIN + INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (411, 2, 13, N'Web.AppPoolsRestart', N'Application Pools Restart', 1, 0, NULL, NULL) +END GO +-------------------------------- Scheduler Service------------------------------------------------------ + +IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS + WHERE TABLE_NAME = 'Schedule' + AND COLUMN_NAME = 'LastFinish') +ALTER TABLE Schedule +DROP COLUMN LastFinish +GO + +ALTER PROCEDURE [dbo].[GetSchedule] +( + @ActorID int, + @ScheduleID int +) +AS + +-- select schedule +SELECT TOP 1 + S.ScheduleID, + S.TaskID, + S.PackageID, + S.ScheduleName, + S.ScheduleTypeID, + S.Interval, + S.FromTime, + S.ToTime, + S.StartTime, + S.LastRun, + S.NextRun, + S.Enabled, + S.HistoriesNumber, + S.PriorityID, + S.MaxExecutionTime, + S.WeekMonthDay, + 1 AS StatusID +FROM Schedule AS S +WHERE + S.ScheduleID = @ScheduleID + AND dbo.CheckActorPackageRights(@ActorID, S.PackageID) = 1 + +-- select task +SELECT + ST.TaskID, + ST.TaskType, + ST.RoleID +FROM Schedule AS S +INNER JOIN ScheduleTasks AS ST ON S.TaskID = ST.TaskID +WHERE + S.ScheduleID = @ScheduleID + AND dbo.CheckActorPackageRights(@ActorID, S.PackageID) = 1 + +-- select schedule parameters +SELECT + S.ScheduleID, + STP.ParameterID, + STP.DataTypeID, + ISNULL(SP.ParameterValue, STP.DefaultValue) AS ParameterValue +FROM Schedule AS S +INNER JOIN ScheduleTaskParameters AS STP ON S.TaskID = STP.TaskID +LEFT OUTER JOIN ScheduleParameters AS SP ON STP.ParameterID = SP.ParameterID AND SP.ScheduleID = S.ScheduleID +WHERE + S.ScheduleID = @ScheduleID + AND dbo.CheckActorPackageRights(@ActorID, S.PackageID) = 1 + +RETURN +GO + +ALTER PROCEDURE [dbo].[GetScheduleInternal] +( + @ScheduleID int +) +AS + +-- select schedule +SELECT + S.ScheduleID, + S.TaskID, + ST.TaskType, + ST.RoleID, + S.PackageID, + S.ScheduleName, + S.ScheduleTypeID, + S.Interval, + S.FromTime, + S.ToTime, + S.StartTime, + S.LastRun, + S.NextRun, + S.Enabled, + 1 AS StatusID, + S.PriorityID, + S.HistoriesNumber, + S.MaxExecutionTime, + S.WeekMonthDay +FROM Schedule AS S +INNER JOIN ScheduleTasks AS ST ON S.TaskID = ST.TaskID +WHERE ScheduleID = @ScheduleID +RETURN +GO + +ALTER PROCEDURE [dbo].[GetSchedules] +( + @ActorID int, + @PackageID int, + @Recursive bit +) +AS + +-- check rights +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +DECLARE @Schedules TABLE +( + ScheduleID int +) + +INSERT INTO @Schedules (ScheduleID) +SELECT + S.ScheduleID +FROM Schedule AS S +INNER JOIN PackagesTree(@PackageID, @Recursive) AS PT ON S.PackageID = PT.PackageID +ORDER BY S.Enabled DESC, S.NextRun + + +-- select schedules +SELECT + S.ScheduleID, + S.TaskID, + ST.TaskType, + ST.RoleID, + S.PackageID, + S.ScheduleName, + S.ScheduleTypeID, + S.Interval, + S.FromTime, + S.ToTime, + S.StartTime, + S.LastRun, + S.NextRun, + S.Enabled, + 1 AS StatusID, + S.PriorityID, + S.MaxExecutionTime, + S.WeekMonthDay, + ISNULL(0, (SELECT TOP 1 SeverityID FROM AuditLog WHERE ItemID = S.ScheduleID AND SourceName = 'SCHEDULER' ORDER BY StartDate DESC)) AS LastResult, + + U.Username, + U.FirstName, + U.LastName, + U.FullName, + U.RoleID, + U.Email +FROM @Schedules AS STEMP +INNER JOIN Schedule AS S ON STEMP.ScheduleID = S.ScheduleID +INNER JOIN Packages AS P ON S.PackageID = P.PackageID +INNER JOIN ScheduleTasks AS ST ON S.TaskID = ST.TaskID +INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID + +-- select schedule parameters +SELECT + S.ScheduleID, + STP.ParameterID, + STP.DataTypeID, + ISNULL(SP.ParameterValue, STP.DefaultValue) AS ParameterValue +FROM @Schedules AS STEMP +INNER JOIN Schedule AS S ON STEMP.ScheduleID = S.ScheduleID +INNER JOIN ScheduleTaskParameters AS STP ON S.TaskID = STP.TaskID +LEFT OUTER JOIN ScheduleParameters AS SP ON STP.ParameterID = SP.ParameterID AND SP.ScheduleID = S.ScheduleID +RETURN +GO + +ALTER PROCEDURE [dbo].[GetSchedulesPaged] +( + @ActorID int, + @PackageID int, + @Recursive bit, + @FilterColumn nvarchar(50) = '', + @FilterValue nvarchar(50) = '', + @SortColumn nvarchar(50), + @StartRow int, + @MaximumRows int +) +AS +BEGIN + +-- check rights +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +DECLARE @condition nvarchar(400) +SET @condition = ' 1 = 1 ' + +IF @FilterColumn <> '' AND @FilterColumn IS NOT NULL +AND @FilterValue <> '' AND @FilterValue IS NOT NULL +SET @condition = @condition + ' AND ' + @FilterColumn + ' LIKE ''' + @FilterValue + '''' + +IF @SortColumn IS NULL OR @SortColumn = '' +SET @SortColumn = 'S.ScheduleName ASC' + +DECLARE @sql nvarchar(3500) + +set @sql = ' +SELECT COUNT(S.ScheduleID) FROM Schedule AS S +INNER JOIN PackagesTree(@PackageID, @Recursive) AS PT ON S.PackageID = PT.PackageID +INNER JOIN Packages AS P ON S.PackageID = P.PackageID +INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID +WHERE ' + @condition + ' + +DECLARE @Schedules AS TABLE +( + ScheduleID int +); + +WITH TempSchedules AS ( + SELECT ROW_NUMBER() OVER (ORDER BY ' + @SortColumn + ') as Row, + S.ScheduleID + FROM Schedule AS S + INNER JOIN Packages AS P ON S.PackageID = P.PackageID + INNER JOIN PackagesTree(@PackageID, @Recursive) AS PT ON S.PackageID = PT.PackageID + INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID + WHERE ' + @condition + ' +) + +INSERT INTO @Schedules +SELECT ScheduleID FROM TempSchedules +WHERE TempSchedules.Row BETWEEN @StartRow and @StartRow + @MaximumRows - 1 + +SELECT + S.ScheduleID, + S.TaskID, + ST.TaskType, + ST.RoleID, + S.ScheduleName, + S.ScheduleTypeID, + S.Interval, + S.FromTime, + S.ToTime, + S.StartTime, + S.LastRun, + S.NextRun, + S.Enabled, + 1 AS StatusID, + S.PriorityID, + S.MaxExecutionTime, + S.WeekMonthDay, + ISNULL(0, (SELECT TOP 1 SeverityID FROM AuditLog WHERE ItemID = S.ScheduleID AND SourceName = ''SCHEDULER'' ORDER BY StartDate DESC)) AS LastResult, + + -- packages + P.PackageID, + P.PackageName, + + -- user + P.UserID, + U.Username, + U.FirstName, + U.LastName, + U.FullName, + U.RoleID, + U.Email +FROM @Schedules AS STEMP +INNER JOIN Schedule AS S ON STEMP.ScheduleID = S.ScheduleID +INNER JOIN ScheduleTasks AS ST ON S.TaskID = ST.TaskID +INNER JOIN Packages AS P ON S.PackageID = P.PackageID +INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID' + +exec sp_executesql @sql, N'@PackageID int, @StartRow int, @MaximumRows int, @Recursive bit', +@PackageID, @StartRow, @MaximumRows, @Recursive + +END +RETURN +GO + +ALTER PROCEDURE [dbo].[UpdateSchedule] +( + @ActorID int, + @ScheduleID int, + @TaskID nvarchar(100), + @ScheduleName nvarchar(100), + @ScheduleTypeID nvarchar(50), + @Interval int, + @FromTime datetime, + @ToTime datetime, + @StartTime datetime, + @LastRun datetime, + @NextRun datetime, + @Enabled bit, + @PriorityID nvarchar(50), + @HistoriesNumber int, + @MaxExecutionTime int, + @WeekMonthDay int, + @XmlParameters ntext +) +AS + +-- check rights +DECLARE @PackageID int +SELECT @PackageID = PackageID FROM Schedule +WHERE ScheduleID = @ScheduleID + +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +BEGIN TRAN + +UPDATE Schedule +SET + TaskID = @TaskID, + ScheduleName = @ScheduleName, + ScheduleTypeID = @ScheduleTypeID, + Interval = @Interval, + FromTime = @FromTime, + ToTime = @ToTime, + StartTime = @StartTime, + LastRun = @LastRun, + NextRun = @NextRun, + Enabled = @Enabled, + PriorityID = @PriorityID, + HistoriesNumber = @HistoriesNumber, + MaxExecutionTime = @MaxExecutionTime, + WeekMonthDay = @WeekMonthDay +WHERE + ScheduleID = @ScheduleID + +DECLARE @idoc int +--Create an internal representation of the XML document. +EXEC sp_xml_preparedocument @idoc OUTPUT, @XmlParameters + +-- Execute a SELECT statement that uses the OPENXML rowset provider. +DELETE FROM ScheduleParameters +WHERE ScheduleID = @ScheduleID + +INSERT INTO ScheduleParameters +( + ScheduleID, + ParameterID, + ParameterValue +) +SELECT + @ScheduleID, + ParameterID, + ParameterValue +FROM OPENXML(@idoc, '/parameters/parameter',1) WITH +( + ParameterID nvarchar(50) '@id', + ParameterValue nvarchar(3000) '@value' +) as PV + +-- remove document +exec sp_xml_removedocument @idoc + +COMMIT TRAN +RETURN +GO + +UPDATE ScheduleTasks SET TaskType = RTRIM(TaskType) + '.Code' +WHERE SUBSTRING(RTRIM(TaskType), LEN(RTRIM(TaskType)) - 3, 4) <> 'Code' +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRunningSchedules') +DROP PROCEDURE GetRunningSchedules +GO + +IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'BackgroundTaskStack') +DROP TABLE BackgroundTaskStack +GO + +IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'BackgroundTaskLogs') +DROP TABLE BackgroundTaskLogs +GO + +IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'BackgroundTaskParameters') +DROP TABLE BackgroundTaskParameters +GO + +IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'BackgroundTasks') +DROP TABLE BackgroundTasks +GO + +CREATE TABLE BackgroundTasks +( + ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY, + Guid UNIQUEIDENTIFIER NOT NULL, + TaskID NVARCHAR(255), + ScheduleID INT NOT NULL, + PackageID INT NOT NULL, + UserID INT NOT NULL, + EffectiveUserID INT NOT NULL, + TaskName NVARCHAR(255), + ItemID INT, + ItemName NVARCHAR(255), + StartDate DATETIME NOT NULL, + FinishDate DATETIME, + IndicatorCurrent INT NOT NULL, + IndicatorMaximum INT NOT NULL, + MaximumExecutionTime INT NOT NULL, + Source NVARCHAR(MAX), + Severity INT NOT NULL, + Completed BIT, + NotifyOnComplete BIT, + Status INT NOT NULL +) +GO + +CREATE TABLE BackgroundTaskParameters +( + ParameterID INT IDENTITY(1,1) NOT NULL PRIMARY KEY, + TaskID INT NOT NULL, + Name NVARCHAR(255), + SerializerValue NTEXT, + TypeName NVARCHAR(255), + FOREIGN KEY (TaskID) REFERENCES BackgroundTasks (ID) +) +GO + +CREATE TABLE BackgroundTaskLogs +( + LogID INT IDENTITY(1,1) NOT NULL PRIMARY KEY, + TaskID INT NOT NULL, + Date DATETIME, + ExceptionStackTrace NTEXT, + InnerTaskStart INT, + Severity INT, + Text NTEXT, + TextIdent INT, + XmlParameters NTEXT, + FOREIGN KEY (TaskID) REFERENCES BackgroundTasks (ID) +) +GO + +CREATE TABLE BackgroundTaskStack +( + TaskStackID INT IDENTITY(1,1) NOT NULL PRIMARY KEY, + TaskID INT NOT NULL, + FOREIGN KEY (TaskID) REFERENCES BackgroundTasks (ID) +) +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddBackgroundTask') +DROP PROCEDURE AddBackgroundTask +GO + +CREATE PROCEDURE [dbo].[AddBackgroundTask] +( + @BackgroundTaskID INT OUTPUT, + @Guid UNIQUEIDENTIFIER, + @TaskID NVARCHAR(255), + @ScheduleID INT, + @PackageID INT, + @UserID INT, + @EffectiveUserID INT, + @TaskName NVARCHAR(255), + @ItemID INT, + @ItemName NVARCHAR(255), + @StartDate DATETIME, + @IndicatorCurrent INT, + @IndicatorMaximum INT, + @MaximumExecutionTime INT, + @Source NVARCHAR(MAX), + @Severity INT, + @Completed BIT, + @NotifyOnComplete BIT, + @Status INT +) +AS + +INSERT INTO BackgroundTasks +( + Guid, + TaskID, + ScheduleID, + PackageID, + UserID, + EffectiveUserID, + TaskName, + ItemID, + ItemName, + StartDate, + IndicatorCurrent, + IndicatorMaximum, + MaximumExecutionTime, + Source, + Severity, + Completed, + NotifyOnComplete, + Status +) +VALUES +( + @Guid, + @TaskID, + @ScheduleID, + @PackageID, + @UserID, + @EffectiveUserID, + @TaskName, + @ItemID, + @ItemName, + @StartDate, + @IndicatorCurrent, + @IndicatorMaximum, + @MaximumExecutionTime, + @Source, + @Severity, + @Completed, + @NotifyOnComplete, + @Status +) + +SET @BackgroundTaskID = SCOPE_IDENTITY() + +RETURN +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetBackgroundTask') +DROP PROCEDURE GetBackgroundTask +GO + +CREATE PROCEDURE [dbo].[GetBackgroundTask] +( + @TaskID NVARCHAR(255) +) +AS + +SELECT TOP 1 + T.ID, + T.Guid, + T.TaskID, + T.ScheduleID, + T.PackageID, + T.UserID, + T.EffectiveUserID, + T.TaskName, + T.ItemID, + T.ItemName, + T.StartDate, + T.FinishDate, + T.IndicatorCurrent, + T.IndicatorMaximum, + T.MaximumExecutionTime, + T.Source, + T.Severity, + T.Completed, + T.NotifyOnComplete, + T.Status +FROM BackgroundTasks AS T +INNER JOIN BackgroundTaskStack AS TS + ON TS.TaskId = T.ID +WHERE T.TaskID = @TaskID +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetBackgroundTasks') +DROP PROCEDURE GetBackgroundTasks +GO + +CREATE PROCEDURE [dbo].[GetBackgroundTasks] +( + @ActorID INT +) +AS + + with GetChildUsersId(id) as ( + select UserID + from Users + where UserID = @ActorID + union all + select C.UserId + from GetChildUsersId P + inner join Users C on P.id = C.OwnerID +) + +SELECT + T.ID, + T.Guid, + T.TaskID, + T.ScheduleId, + T.PackageId, + T.UserId, + T.EffectiveUserId, + T.TaskName, + T.ItemId, + T.ItemName, + T.StartDate, + T.FinishDate, + T.IndicatorCurrent, + T.IndicatorMaximum, + T.MaximumExecutionTime, + T.Source, + T.Severity, + T.Completed, + T.NotifyOnComplete, + T.Status +FROM BackgroundTasks AS T +INNER JOIN (SELECT T.Guid, MIN(T.StartDate) AS Date + FROM BackgroundTasks AS T + INNER JOIN BackgroundTaskStack AS TS + ON TS.TaskId = T.ID + WHERE T.UserID in (select id from GetChildUsersId) + GROUP BY T.Guid) AS TT ON TT.Guid = T.Guid AND TT.Date = T.StartDate +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetThreadBackgroundTasks') +DROP PROCEDURE GetThreadBackgroundTasks +GO + +CREATE PROCEDURE [dbo].GetThreadBackgroundTasks +( + @Guid UNIQUEIDENTIFIER +) +AS + +SELECT + T.ID, + T.Guid, + T.TaskID, + T.ScheduleId, + T.PackageId, + T.UserId, + T.EffectiveUserId, + T.TaskName, + T.ItemId, + T.ItemName, + T.StartDate, + T.FinishDate, + T.IndicatorCurrent, + T.IndicatorMaximum, + T.MaximumExecutionTime, + T.Source, + T.Severity, + T.Completed, + T.NotifyOnComplete, + T.Status +FROM BackgroundTasks AS T +INNER JOIN BackgroundTaskStack AS TS + ON TS.TaskId = T.ID +WHERE T.Guid = @Guid +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetBackgroundTopTask') +DROP PROCEDURE GetBackgroundTopTask +GO + +CREATE PROCEDURE [dbo].[GetBackgroundTopTask] +( + @Guid UNIQUEIDENTIFIER +) +AS + +SELECT TOP 1 + T.ID, + T.Guid, + T.TaskID, + T.ScheduleId, + T.PackageId, + T.UserId, + T.EffectiveUserId, + T.TaskName, + T.ItemId, + T.ItemName, + T.StartDate, + T.FinishDate, + T.IndicatorCurrent, + T.IndicatorMaximum, + T.MaximumExecutionTime, + T.Source, + T.Severity, + T.Completed, + T.NotifyOnComplete, + T.Status +FROM BackgroundTasks AS T +INNER JOIN BackgroundTaskStack AS TS + ON TS.TaskId = T.ID +WHERE T.Guid = @Guid +ORDER BY T.StartDate ASC +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddBackgroundTaskLog') +DROP PROCEDURE AddBackgroundTaskLog +GO + +CREATE PROCEDURE [dbo].[AddBackgroundTaskLog] +( + @TaskID INT, + @Date DATETIME, + @ExceptionStackTrace NTEXT, + @InnerTaskStart INT, + @Severity INT, + @Text NTEXT, + @TextIdent INT, + @XmlParameters NTEXT +) +AS + +INSERT INTO BackgroundTaskLogs +( + TaskID, + Date, + ExceptionStackTrace, + InnerTaskStart, + Severity, + Text, + TextIdent, + XmlParameters +) +VALUES +( + @TaskID, + @Date, + @ExceptionStackTrace, + @InnerTaskStart, + @Severity, + @Text, + @TextIdent, + @XmlParameters +) +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetBackgroundTaskLogs') +DROP PROCEDURE GetBackgroundTaskLogs +GO + +CREATE PROCEDURE [dbo].[GetBackgroundTaskLogs] +( + @TaskID INT, + @StartLogTime DATETIME +) +AS + +SELECT + L.LogID, + L.TaskID, + L.Date, + L.ExceptionStackTrace, + L.InnerTaskStart, + L.Severity, + L.Text, + L.XmlParameters +FROM BackgroundTaskLogs AS L +WHERE L.TaskID = @TaskID AND L.Date >= @StartLogTime +ORDER BY L.Date +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateBackgroundTask') +DROP PROCEDURE UpdateBackgroundTask +GO + +CREATE PROCEDURE [dbo].[UpdateBackgroundTask] +( + @Guid UNIQUEIDENTIFIER, + @TaskID INT, + @ScheduleID INT, + @PackageID INT, + @TaskName NVARCHAR(255), + @ItemID INT, + @ItemName NVARCHAR(255), + @FinishDate DATETIME, + @IndicatorCurrent INT, + @IndicatorMaximum INT, + @MaximumExecutionTime INT, + @Source NVARCHAR(MAX), + @Severity INT, + @Completed BIT, + @NotifyOnComplete BIT, + @Status INT +) +AS + +UPDATE BackgroundTasks +SET + Guid = @Guid, + ScheduleID = @ScheduleID, + PackageID = @PackageID, + TaskName = @TaskName, + ItemID = @ItemID, + ItemName = @ItemName, + FinishDate = @FinishDate, + IndicatorCurrent = @IndicatorCurrent, + IndicatorMaximum = @IndicatorMaximum, + MaximumExecutionTime = @MaximumExecutionTime, + Source = @Source, + Severity = @Severity, + Completed = @Completed, + NotifyOnComplete = @NotifyOnComplete, + Status = @Status +WHERE ID = @TaskID +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetBackgroundTaskParams') +DROP PROCEDURE GetBackgroundTaskParams +GO + +CREATE PROCEDURE [dbo].[GetBackgroundTaskParams] +( + @TaskID INT +) +AS + +SELECT + P.ParameterID, + P.TaskID, + P.Name, + P.SerializerValue, + P.TypeName +FROM BackgroundTaskParameters AS P +WHERE P.TaskID = @TaskID +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddBackgroundTaskParam') +DROP PROCEDURE AddBackgroundTaskParam +GO + +CREATE PROCEDURE [dbo].[AddBackgroundTaskParam] +( + @TaskID INT, + @Name NVARCHAR(255), + @Value NTEXT, + @TypeName NVARCHAR(255) +) +AS + +INSERT INTO BackgroundTaskParameters +( + TaskID, + Name, + SerializerValue, + TypeName +) +VALUES +( + @TaskID, + @Name, + @Value, + @TypeName +) +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteBackgroundTaskParams') +DROP PROCEDURE DeleteBackgroundTaskParams +GO + +CREATE PROCEDURE [dbo].[DeleteBackgroundTaskParams] +( + @TaskID INT +) +AS + +DELETE FROM BackgroundTaskParameters +WHERE TaskID = @TaskID +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddBackgroundTaskStack') +DROP PROCEDURE AddBackgroundTaskStack +GO + +CREATE PROCEDURE [dbo].[AddBackgroundTaskStack] +( + @TaskID INT +) +AS + +INSERT INTO BackgroundTaskStack +( + TaskID +) +VALUES +( + @TaskID +) +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteBackgroundTasks') +DROP PROCEDURE DeleteBackgroundTasks +GO + +CREATE PROCEDURE [dbo].[DeleteBackgroundTasks] +( + @Guid UNIQUEIDENTIFIER +) +AS + +DELETE FROM BackgroundTaskStack +WHERE TaskID IN (SELECT ID FROM BackgroundTasks WHERE Guid = @Guid) + +DELETE FROM BackgroundTaskLogs +WHERE TaskID IN (SELECT ID FROM BackgroundTasks WHERE Guid = @Guid) + +DELETE FROM BackgroundTaskParameters +WHERE TaskID IN (SELECT ID FROM BackgroundTasks WHERE Guid = @Guid) + +DELETE FROM BackgroundTasks +WHERE ID IN (SELECT ID FROM BackgroundTasks WHERE Guid = @Guid) +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteBackgroundTask') +DROP PROCEDURE DeleteBackgroundTask +GO + +CREATE PROCEDURE [dbo].[DeleteBackgroundTask] +( + @ID INT +) +AS + +DELETE FROM BackgroundTaskStack +WHERE TaskID = @ID + +DELETE FROM BackgroundTaskLogs +WHERE TaskID = @ID + +DELETE FROM BackgroundTaskParameters +WHERE TaskID = @ID + +DELETE FROM BackgroundTasks +WHERE ID = @ID +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetProcessBackgroundTasks') +DROP PROCEDURE GetProcessBackgroundTasks +GO + +CREATE PROCEDURE [dbo].[GetProcessBackgroundTasks] +( + @Status INT +) +AS + +SELECT + T.ID, + T.TaskID, + T.ScheduleId, + T.PackageId, + T.UserId, + T.EffectiveUserId, + T.TaskName, + T.ItemId, + T.ItemName, + T.StartDate, + T.FinishDate, + T.IndicatorCurrent, + T.IndicatorMaximum, + T.MaximumExecutionTime, + T.Source, + T.Severity, + T.Completed, + T.NotifyOnComplete, + T.Status +FROM BackgroundTasks AS T +WHERE T.Completed = 0 AND T.Status = @Status +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetScheduleBackgroundTasks') +DROP PROCEDURE GetScheduleBackgroundTasks +GO + +CREATE PROCEDURE [dbo].[GetScheduleBackgroundTasks] +( + @ScheduleID INT +) +AS + +SELECT + T.ID, + T.Guid, + T.TaskID, + T.ScheduleId, + T.PackageId, + T.UserId, + T.EffectiveUserId, + T.TaskName, + T.ItemId, + T.ItemName, + T.StartDate, + T.FinishDate, + T.IndicatorCurrent, + T.IndicatorMaximum, + T.MaximumExecutionTime, + T.Source, + T.Severity, + T.Completed, + T.NotifyOnComplete, + T.Status +FROM BackgroundTasks AS T +WHERE T.Guid = ( + SELECT Guid FROM BackgroundTasks + WHERE ScheduleID = @ScheduleID + AND Completed = 0 AND Status IN (1, 3)) +GO + +-- Disclaimers + + +GO +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO + +IF NOT EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'ExchangeDisclaimers') + +CREATE TABLE [dbo].[ExchangeDisclaimers]( + [ExchangeDisclaimerId] [int] IDENTITY(1,1) NOT NULL, + [ItemID] [int] NOT NULL, + [DisclaimerName] [nvarchar](300) NOT NULL, + [DisclaimerText] [nvarchar](1024), + CONSTRAINT [PK_ExchangeDisclaimers] PRIMARY KEY CLUSTERED +( + [ExchangeDisclaimerId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +) + +GO + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeDisclaimers') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetExchangeDisclaimers] +( + @ItemID int +) +AS +SELECT + ExchangeDisclaimerId, + ItemID, + DisclaimerName, + DisclaimerText +FROM + ExchangeDisclaimers +WHERE + ItemID = @ItemID +ORDER BY DisclaimerName +RETURN' +END +GO + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'DeleteExchangeDisclaimer') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[DeleteExchangeDisclaimer] +( + @ExchangeDisclaimerId int +) +AS + +DELETE FROM ExchangeDisclaimers +WHERE ExchangeDisclaimerId = @ExchangeDisclaimerId + +RETURN' +END +GO + +-- + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'UpdateExchangeDisclaimer') +BEGIN +EXEC sp_executesql N' CREATE PROCEDURE [dbo].[UpdateExchangeDisclaimer] +( + @ExchangeDisclaimerId int, + @DisclaimerName nvarchar(300), + @DisclaimerText nvarchar(1024) +) +AS + +UPDATE ExchangeDisclaimers SET + DisclaimerName = @DisclaimerName, + DisclaimerText = @DisclaimerText + +WHERE ExchangeDisclaimerId = @ExchangeDisclaimerId + +RETURN' +END +GO + +-- + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'AddExchangeDisclaimer') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddExchangeDisclaimer] +( + @ExchangeDisclaimerId int OUTPUT, + @ItemID int, + @DisclaimerName nvarchar(300), + @DisclaimerText nvarchar(1024) +) +AS + +INSERT INTO ExchangeDisclaimers +( + ItemID, + DisclaimerName, + DisclaimerText +) +VALUES +( + @ItemID, + @DisclaimerName, + @DisclaimerText +) + +SET @ExchangeDisclaimerId = SCOPE_IDENTITY() + +RETURN' +END +GO + +-- + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeDisclaimer') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetExchangeDisclaimer] +( + @ExchangeDisclaimerId int +) +AS +SELECT + ExchangeDisclaimerId, + ItemID, + DisclaimerName, + DisclaimerText +FROM + ExchangeDisclaimers +WHERE + ExchangeDisclaimerId = @ExchangeDisclaimerId +RETURN' +END +GO + + + +IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='ExchangeAccounts' AND COLS.name='ExchangeDisclaimerId') +BEGIN + +ALTER TABLE [dbo].[ExchangeAccounts] ADD + +[ExchangeDisclaimerId] [int] NULL + +END +Go + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SetExchangeAccountDisclaimerId') +BEGIN +EXEC sp_executesql N' CREATE PROCEDURE [dbo].[SetExchangeAccountDisclaimerId] +( + @AccountID int, + @ExchangeDisclaimerId int +) +AS +UPDATE ExchangeAccounts SET + ExchangeDisclaimerId = @ExchangeDisclaimerId +WHERE AccountID = @AccountID + +RETURN' +END +GO + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeAccountDisclaimerId') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetExchangeAccountDisclaimerId] +( + @AccountID int +) +AS +SELECT + ExchangeDisclaimerId +FROM + ExchangeAccounts +WHERE + AccountID= @AccountID +RETURN' +END +GO + + +-- add Disclaimers Quota +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE ([QuotaName] = N'Exchange2007.DisclaimersAllowed')) +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (422, 12, 26, N'Exchange2007.DisclaimersAllowed', N'Disclaimers Allowed', 1, 0, NULL, NULL) +END +GO -- Lync Enterprise Voice +IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='LyncUserPlans' AND COLS.name='TelephonyVoicePolicy') BEGIN ALTER TABLE [dbo].[LyncUserPlans] ADD diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/WebsitePanel.Import.Enterprise.csproj b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/WebsitePanel.Import.Enterprise.csproj index 46b74405..32738387 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/WebsitePanel.Import.Enterprise.csproj +++ b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/WebsitePanel.Import.Enterprise.csproj @@ -74,6 +74,9 @@ ..\..\..\Bin\WebsitePanel.EnterpriseServer.Client.dll + + ..\..\..\Bin\WebsitePanel.EnterpriseServer.Code.dll + ..\..\..\Bin\WebsitePanel.Providers.Base.dll diff --git a/WebsitePanel/Sources/VersionInfo.cs b/WebsitePanel/Sources/VersionInfo.cs index 8ca7c4b0..9ec60861 100644 --- a/WebsitePanel/Sources/VersionInfo.cs +++ b/WebsitePanel/Sources/VersionInfo.cs @@ -1,7 +1,35 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18010 +// Runtime Version:4.0.30319.18033 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/WebsitePanel/Sources/VersionInfo.vb b/WebsitePanel/Sources/VersionInfo.vb index 556fbffa..6c033d5e 100644 --- a/WebsitePanel/Sources/VersionInfo.vb +++ b/WebsitePanel/Sources/VersionInfo.vb @@ -1,7 +1,7 @@ -'------------------------------------------------------------------------------ +'------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.18010 +' Runtime Version:4.0.30319.18033 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -15,9 +15,9 @@ Imports System Imports System.Reflection Imports System.Runtime.CompilerServices Imports System.Runtime.InteropServices - diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs index 34bb6a4c..58a410ac 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs @@ -117,7 +117,8 @@ order by rg.groupOrder public const string EXCHANGE2007_ENABLEDPLANSEDITING = "Exchange2007.EnablePlansEditing"; // Enabled plans editing public const string EXCHANGE2007_ALLOWLITIGATIONHOLD = "Exchange2007.AllowLitigationHold"; public const string EXCHANGE2007_RECOVERABLEITEMSSPACE = "Exchange2007.RecoverableItemsSpace"; - public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases + public const string EXCHANGE2007_DISCLAIMERSALLOWED = "Exchange2007.DisclaimersAllowed"; + public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size public const string MSSQL2000_BACKUP = "MsSQL2000.Backup"; // Database Backups diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTask.cs index 8ea92110..bfe596f1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTask.cs @@ -36,162 +36,171 @@ using System.Xml.Serialization; namespace WebsitePanel.EnterpriseServer { + public class BackgroundTask { - private string taskId; - private int userId; - private int packageId; - private int effectiveUserId; - private DateTime startDate = DateTime.MinValue; - private DateTime finishDate = DateTime.MinValue; - private int maximumExecutionTime = -1; // seconds - private string source; - private string taskName; - private int scheduleId; - private string itemName; - private int itemId = 0; - private int severity = 0; /* 0 - Info, 1 - Warning, 2 - Error */ - private List logRecords = new List(); - private List lastLogRecords = new List(); - private BackgroundTaskLogRecord lastLogRecord; - private Hashtable parameters = new Hashtable(); - private int indicatorMaximum; - private int indicatorCurrent; - private bool completed; - private bool notifyOnComplete; - private Thread taskThread; + #region Fields - public System.DateTime StartDate + public List Params = new List(); + + public List Logs = new List(); + + #endregion + + #region Properties + + public int Id { get; set; } + + public Guid Guid { get; set; } + + public string TaskId { get; set; } + + public int ScheduleId { get; set; } + + public int PackageId { get; set; } + + public int UserId { get; set; } + + public int EffectiveUserId { get; set; } + + public string TaskName { get; set; } + + public int ItemId { get; set; } + + public string ItemName { get; set; } + + public DateTime StartDate { get; set; } + + public DateTime FinishDate { get; set; } + + public int IndicatorCurrent { get; set; } + + public int IndicatorMaximum { get; set; } + + public int MaximumExecutionTime { get; set; } + + public string Source { get; set; } + + public int Severity { get; set; } + + public bool Completed { get; set; } + + public bool NotifyOnComplete { get; set; } + + public BackgroundTaskStatus Status { get; set; } + + #endregion + + #region Constructors + + public BackgroundTask() { - get { return this.startDate; } - set { this.startDate = value; } + StartDate = DateTime.Now; + Severity = 0; + IndicatorCurrent = 0; + IndicatorMaximum = 0; + Status = BackgroundTaskStatus.Run; + + Completed = false; + NotifyOnComplete = false; } - public System.DateTime FinishDate + public BackgroundTask(Guid guid, String taskId, int userId, int effectiveUserId, String source, String taskName, String itemName, + int itemId, int scheduleId, int packageId, int maximumExecutionTime, List parameters) + : this() { - get { return this.finishDate; } - set { this.finishDate = value; } + Guid = guid; + TaskId = taskId; + UserId = userId; + EffectiveUserId = effectiveUserId; + Source = source; + TaskName = taskName; + ItemName = itemName; + ItemId = itemId; + ScheduleId = scheduleId; + PackageId = packageId; + MaximumExecutionTime = maximumExecutionTime; + Params = parameters; } - public string Source + #endregion + + #region Methods + + public List GetLogs() { - get { return this.source; } - set { this.source = value; } + return Logs; } - public string TaskName + public Object GetParamValue(String name) { - get { return this.taskName; } - set { this.taskName = value; } + foreach(BackgroundTaskParameter param in Params) + { + if (param.Name == name) + return param.Value; + } + + return null; } - public int ItemId + public void UpdateParamValue(String name, object value) { - get { return this.itemId; } - set { this.itemId = value; } + foreach (BackgroundTaskParameter param in Params) + { + if (param.Name == name) + { + param.Value = value; + + return; + + } + } + + Params.Add(new BackgroundTaskParameter(name, value)); } - public int PackageId + public bool ContainsParam(String name) { - get { return this.packageId; } - set { this.packageId = value; } + foreach (BackgroundTaskParameter param in Params) + { + if (param.Name == name) + return true; + } + + return false; } - public int Severity + #endregion + } + + public class BackgroundTaskParameter + { + #region Properties + + public int ParameterId { get; set; } + + public int TaskId { get; set; } + + public String Name { get; set; } + + public Object Value { get; set; } + + public String TypeName { get; set; } + + public String SerializerValue { get; set; } + + #endregion + + #region Constructors + + public BackgroundTaskParameter() { } + + public BackgroundTaskParameter(String name, Object value) { - get { return this.severity; } - set { this.severity = value; } + Name = name; + Value = value; } - [XmlIgnore] - public List LogRecords - { - get { return this.logRecords; } - set { this.logRecords = value; } - } - - public List LastLogRecords - { - get { return this.lastLogRecords; } - } - - public string ItemName - { - get { return this.itemName; } - set { this.itemName = value; } - } - - public BackgroundTaskLogRecord LastLogRecord - { - get { return this.lastLogRecord; } - set { this.lastLogRecord = value; } - } - - public string TaskId - { - get { return this.taskId; } - set { this.taskId = value; } - } - - public int UserId - { - get { return this.userId; } - set { this.userId = value; } - } - - [XmlIgnore] - public Hashtable Parameters - { - get { return this.parameters; } - } - - public int IndicatorMaximum - { - get { return this.indicatorMaximum; } - set { this.indicatorMaximum = value; } - } - - public int IndicatorCurrent - { - get { return this.indicatorCurrent; } - set { this.indicatorCurrent = value; } - } - - public bool Completed - { - get { return this.completed; } - set { this.completed = value; } - } - - public bool NotifyOnComplete - { - get { return this.notifyOnComplete; } - set { this.notifyOnComplete = value; } - } - - public int EffectiveUserId - { - get { return this.effectiveUserId; } - set { this.effectiveUserId = value; } - } - - [XmlIgnore] - public System.Threading.Thread TaskThread - { - get { return this.taskThread; } - set { this.taskThread = value; } - } - - public int ScheduleId - { - get { return this.scheduleId; } - set { this.scheduleId = value; } - } - - public int MaximumExecutionTime - { - get { return this.maximumExecutionTime; } - set { this.maximumExecutionTime = value; } - } + #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskLogRecord.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskLogRecord.cs index d6ef3ab4..afccc7d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskLogRecord.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskLogRecord.cs @@ -34,54 +34,54 @@ namespace WebsitePanel.EnterpriseServer { public class BackgroundTaskLogRecord { - private DateTime date = DateTime.Now; - private string text; - private int severity; /* 0 - Info, 1 - Warning, 2 - Error */ - private string[] textParameters; - private int textIdent = 0; - private bool innerTaskStart; - private string exceptionStackTrace; + #region Properties - public System.DateTime Date + public int LogId { get; set; } + + public int TaskId { get; set; } + + public DateTime Date { get; set; } + + public String ExceptionStackTrace { get; set; } + + public bool InnerTaskStart { get; set; } + + public int Severity { get; set; } + + public String Text { get; set; } + + public int TextIdent { get; set; } + + public string[] TextParameters { get; set; } + + public string XmlParameters { get; set; } + + #endregion + + #region Constructors + + public BackgroundTaskLogRecord() { - get { return this.date; } - set { this.date = value; } + Date = DateTime.Now; } - public string Text + public BackgroundTaskLogRecord(int taskId, int textIdent, bool innerTaskStart, String text, string[] textParameters) + : this() { - get { return this.text; } - set { this.text = value; } + TaskId = taskId; + TextIdent = textIdent; + Text = text; + InnerTaskStart = innerTaskStart; + TextParameters = textParameters; } - public int Severity + public BackgroundTaskLogRecord(int taskId, int textIdent, bool innerTaskStart, String text, + String exceptionStackTrace, string[] textParameters) + : this(taskId, textIdent, innerTaskStart, text, textParameters) { - get { return this.severity; } - set { this.severity = value; } + ExceptionStackTrace = exceptionStackTrace; } - public string[] TextParameters - { - get { return this.textParameters; } - set { this.textParameters = value; } - } - - public int TextIdent - { - get { return this.textIdent; } - set { this.textIdent = value; } - } - - public bool InnerTaskStart - { - get { return this.innerTaskStart; } - set { this.innerTaskStart = value; } - } - - public string ExceptionStackTrace - { - get { return this.exceptionStackTrace; } - set { this.exceptionStackTrace = value; } - } + #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskStatus.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskStatus.cs new file mode 100644 index 00000000..74747641 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskStatus.cs @@ -0,0 +1,10 @@ +namespace WebsitePanel.EnterpriseServer +{ + public enum BackgroundTaskStatus + { + Run = 1, + Abort = 2, + Starting = 3, + Stopping = 4 + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj index 2168e6e3..dde357fa 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj @@ -156,6 +156,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs index e6ead22e..c2434558 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs @@ -25,10 +25,11 @@ // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.6387 +// Runtime Version:2.0.50727.5466 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -36,9 +37,10 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by wsdl, Version=2.0.50727.3038. +// This source code was auto-generated by wsdl, Version=2.0.50727.42. // -namespace WebsitePanel.EnterpriseServer { +namespace WebsitePanel.EnterpriseServer +{ using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; @@ -52,439 +54,1869 @@ namespace WebsitePanel.EnterpriseServer { using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.ResultObjects; - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="esExchangeServerSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")] + [System.Web.Services.WebServiceBindingAttribute(Name = "esExchangeServerSoap", Namespace = "http://smbsaas/websitepanel/enterpriseserver")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(BaseStatistics))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class esExchangeServer : Microsoft.Web.Services3.WebServicesClientProtocol { - - private System.Threading.SendOrPostCallback GetRawExchangeOrganizationsPagedOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeOrganizationsPagedOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeOrganizationsOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationStatisticsOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationStatisticsByOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationStorageLimitsOperationCompleted; - - private System.Threading.SendOrPostCallback SetOrganizationStorageLimitsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxesStatisticsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxStatisticsOperationCompleted; - - private System.Threading.SendOrPostCallback CalculateOrganizationDiskspaceOperationCompleted; - - private System.Threading.SendOrPostCallback GetActiveSyncPolicyOperationCompleted; - - private System.Threading.SendOrPostCallback SetActiveSyncPolicyOperationCompleted; - - private System.Threading.SendOrPostCallback AddAuthoritativeDomainOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteAuthoritativeDomainOperationCompleted; - - private System.Threading.SendOrPostCallback GetAccountsPagedOperationCompleted; - - private System.Threading.SendOrPostCallback GetAccountsOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeAccountByMailboxPlanIdOperationCompleted; - - private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted; - - private System.Threading.SendOrPostCallback GetAccountOperationCompleted; - - private System.Threading.SendOrPostCallback SearchAccountOperationCompleted; - - private System.Threading.SendOrPostCallback CheckAccountCredentialsOperationCompleted; - - private System.Threading.SendOrPostCallback CreateMailboxOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteMailboxOperationCompleted; - - private System.Threading.SendOrPostCallback DisableMailboxOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxAdvancedSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback AddMailboxEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxPrimaryEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteMailboxEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetExchangeMailboxPlanOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxSetupInstructionsOperationCompleted; - - private System.Threading.SendOrPostCallback SendMailboxSetupInstructionsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxManagerSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback CreateContactOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteContactOperationCompleted; - - private System.Threading.SendOrPostCallback GetContactGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetContactGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetContactMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetContactMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback CreateDistributionListOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteDistributionListOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback AddDistributionListEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListPrimaryEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteDistributionListEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMobileDevicesOperationCompleted; - - private System.Threading.SendOrPostCallback GetMobileDeviceOperationCompleted; - - private System.Threading.SendOrPostCallback WipeDataFromDeviceOperationCompleted; - - private System.Threading.SendOrPostCallback CancelRemoteWipeRequestOperationCompleted; - - private System.Threading.SendOrPostCallback RemoveDeviceOperationCompleted; - + public partial class esExchangeServer : Microsoft.Web.Services3.WebServicesClientProtocol + { + private System.Threading.SendOrPostCallback GetExchangeMailboxPlansOperationCompleted; - + private System.Threading.SendOrPostCallback GetExchangeMailboxPlanOperationCompleted; - + private System.Threading.SendOrPostCallback AddExchangeMailboxPlanOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateExchangeMailboxPlanOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteExchangeMailboxPlanOperationCompleted; - + private System.Threading.SendOrPostCallback SetOrganizationDefaultExchangeMailboxPlanOperationCompleted; - + private System.Threading.SendOrPostCallback CreatePublicFolderOperationCompleted; - + private System.Threading.SendOrPostCallback DeletePublicFoldersOperationCompleted; - + private System.Threading.SendOrPostCallback DeletePublicFolderOperationCompleted; - + private System.Threading.SendOrPostCallback EnableMailPublicFolderOperationCompleted; - + private System.Threading.SendOrPostCallback DisableMailPublicFolderOperationCompleted; - + private System.Threading.SendOrPostCallback GetPublicFolderGeneralSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback SetPublicFolderGeneralSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback GetPublicFolderMailFlowSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback SetPublicFolderMailFlowSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback GetPublicFolderEmailAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback AddPublicFolderEmailAddressOperationCompleted; - + private System.Threading.SendOrPostCallback SetPublicFolderPrimaryEmailAddressOperationCompleted; - + private System.Threading.SendOrPostCallback DeletePublicFolderEmailAddressesOperationCompleted; - + + private System.Threading.SendOrPostCallback AddExchangeDisclaimerOperationCompleted; + + private System.Threading.SendOrPostCallback UpdateExchangeDisclaimerOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteExchangeDisclaimerOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeDisclaimerOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeDisclaimersOperationCompleted; + + private System.Threading.SendOrPostCallback SetExchangeAccountDisclaimerIdOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeAccountDisclaimerIdOperationCompleted; + + private System.Threading.SendOrPostCallback GetRawExchangeOrganizationsPagedOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeOrganizationsPagedOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeOrganizationsOperationCompleted; + + private System.Threading.SendOrPostCallback GetOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback GetOrganizationStatisticsOperationCompleted; + + private System.Threading.SendOrPostCallback GetOrganizationStatisticsByOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback GetOrganizationStorageLimitsOperationCompleted; + + private System.Threading.SendOrPostCallback SetOrganizationStorageLimitsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxesStatisticsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxStatisticsOperationCompleted; + + private System.Threading.SendOrPostCallback CalculateOrganizationDiskspaceOperationCompleted; + + private System.Threading.SendOrPostCallback GetActiveSyncPolicyOperationCompleted; + + private System.Threading.SendOrPostCallback SetActiveSyncPolicyOperationCompleted; + + private System.Threading.SendOrPostCallback AddAuthoritativeDomainOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteAuthoritativeDomainOperationCompleted; + + private System.Threading.SendOrPostCallback GetAccountsPagedOperationCompleted; + + private System.Threading.SendOrPostCallback GetAccountsOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeAccountByMailboxPlanIdOperationCompleted; + + private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted; + + private System.Threading.SendOrPostCallback GetAccountOperationCompleted; + + private System.Threading.SendOrPostCallback SearchAccountOperationCompleted; + + private System.Threading.SendOrPostCallback CheckAccountCredentialsOperationCompleted; + + private System.Threading.SendOrPostCallback CreateMailboxOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteMailboxOperationCompleted; + + private System.Threading.SendOrPostCallback DisableMailboxOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxAdvancedSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback AddMailboxEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxPrimaryEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteMailboxEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxSetupInstructionsOperationCompleted; + + private System.Threading.SendOrPostCallback SendMailboxSetupInstructionsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxManagerSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback CreateContactOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteContactOperationCompleted; + + private System.Threading.SendOrPostCallback GetContactGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetContactGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetContactMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetContactMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback CreateDistributionListOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteDistributionListOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback AddDistributionListEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListPrimaryEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteDistributionListEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMobileDevicesOperationCompleted; + + private System.Threading.SendOrPostCallback GetMobileDeviceOperationCompleted; + + private System.Threading.SendOrPostCallback WipeDataFromDeviceOperationCompleted; + + private System.Threading.SendOrPostCallback CancelRemoteWipeRequestOperationCompleted; + + private System.Threading.SendOrPostCallback RemoveDeviceOperationCompleted; + /// - public esExchangeServer() { + public esExchangeServer() + { this.Url = "http://localhost:9002/esExchangeServer.asmx"; } - - /// - public event GetRawExchangeOrganizationsPagedCompletedEventHandler GetRawExchangeOrganizationsPagedCompleted; - - /// - public event GetExchangeOrganizationsPagedCompletedEventHandler GetExchangeOrganizationsPagedCompleted; - - /// - public event GetExchangeOrganizationsCompletedEventHandler GetExchangeOrganizationsCompleted; - - /// - public event GetOrganizationCompletedEventHandler GetOrganizationCompleted; - - /// - public event GetOrganizationStatisticsCompletedEventHandler GetOrganizationStatisticsCompleted; - - /// - public event GetOrganizationStatisticsByOrganizationCompletedEventHandler GetOrganizationStatisticsByOrganizationCompleted; - - /// - public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; - - /// - public event GetOrganizationStorageLimitsCompletedEventHandler GetOrganizationStorageLimitsCompleted; - - /// - public event SetOrganizationStorageLimitsCompletedEventHandler SetOrganizationStorageLimitsCompleted; - - /// - public event GetMailboxesStatisticsCompletedEventHandler GetMailboxesStatisticsCompleted; - - /// - public event GetMailboxStatisticsCompletedEventHandler GetMailboxStatisticsCompleted; - - /// - public event CalculateOrganizationDiskspaceCompletedEventHandler CalculateOrganizationDiskspaceCompleted; - - /// - public event GetActiveSyncPolicyCompletedEventHandler GetActiveSyncPolicyCompleted; - - /// - public event SetActiveSyncPolicyCompletedEventHandler SetActiveSyncPolicyCompleted; - - /// - public event AddAuthoritativeDomainCompletedEventHandler AddAuthoritativeDomainCompleted; - - /// - public event DeleteAuthoritativeDomainCompletedEventHandler DeleteAuthoritativeDomainCompleted; - - /// - public event GetAccountsPagedCompletedEventHandler GetAccountsPagedCompleted; - - /// - public event GetAccountsCompletedEventHandler GetAccountsCompleted; - - /// - public event GetExchangeAccountByMailboxPlanIdCompletedEventHandler GetExchangeAccountByMailboxPlanIdCompleted; - - /// - public event SearchAccountsCompletedEventHandler SearchAccountsCompleted; - - /// - public event GetAccountCompletedEventHandler GetAccountCompleted; - - /// - public event SearchAccountCompletedEventHandler SearchAccountCompleted; - - /// - public event CheckAccountCredentialsCompletedEventHandler CheckAccountCredentialsCompleted; - - /// - public event CreateMailboxCompletedEventHandler CreateMailboxCompleted; - - /// - public event DeleteMailboxCompletedEventHandler DeleteMailboxCompleted; - - /// - public event DisableMailboxCompletedEventHandler DisableMailboxCompleted; - - /// - public event GetMailboxAdvancedSettingsCompletedEventHandler GetMailboxAdvancedSettingsCompleted; - - /// - public event GetMailboxGeneralSettingsCompletedEventHandler GetMailboxGeneralSettingsCompleted; - - /// - public event SetMailboxGeneralSettingsCompletedEventHandler SetMailboxGeneralSettingsCompleted; - - /// - public event GetMailboxEmailAddressesCompletedEventHandler GetMailboxEmailAddressesCompleted; - - /// - public event AddMailboxEmailAddressCompletedEventHandler AddMailboxEmailAddressCompleted; - - /// - public event SetMailboxPrimaryEmailAddressCompletedEventHandler SetMailboxPrimaryEmailAddressCompleted; - - /// - public event DeleteMailboxEmailAddressesCompletedEventHandler DeleteMailboxEmailAddressesCompleted; - - /// - public event GetMailboxMailFlowSettingsCompletedEventHandler GetMailboxMailFlowSettingsCompleted; - - /// - public event SetMailboxMailFlowSettingsCompletedEventHandler SetMailboxMailFlowSettingsCompleted; - - /// - public event SetExchangeMailboxPlanCompletedEventHandler SetExchangeMailboxPlanCompleted; - - /// - public event GetMailboxSetupInstructionsCompletedEventHandler GetMailboxSetupInstructionsCompleted; - - /// - public event SendMailboxSetupInstructionsCompletedEventHandler SendMailboxSetupInstructionsCompleted; - - /// - public event SetMailboxManagerSettingsCompletedEventHandler SetMailboxManagerSettingsCompleted; - - /// - public event GetMailboxPermissionsCompletedEventHandler GetMailboxPermissionsCompleted; - - /// - public event SetMailboxPermissionsCompletedEventHandler SetMailboxPermissionsCompleted; - - /// - public event CreateContactCompletedEventHandler CreateContactCompleted; - - /// - public event DeleteContactCompletedEventHandler DeleteContactCompleted; - - /// - public event GetContactGeneralSettingsCompletedEventHandler GetContactGeneralSettingsCompleted; - - /// - public event SetContactGeneralSettingsCompletedEventHandler SetContactGeneralSettingsCompleted; - - /// - public event GetContactMailFlowSettingsCompletedEventHandler GetContactMailFlowSettingsCompleted; - - /// - public event SetContactMailFlowSettingsCompletedEventHandler SetContactMailFlowSettingsCompleted; - - /// - public event CreateDistributionListCompletedEventHandler CreateDistributionListCompleted; - - /// - public event DeleteDistributionListCompletedEventHandler DeleteDistributionListCompleted; - - /// - public event GetDistributionListGeneralSettingsCompletedEventHandler GetDistributionListGeneralSettingsCompleted; - - /// - public event SetDistributionListGeneralSettingsCompletedEventHandler SetDistributionListGeneralSettingsCompleted; - - /// - public event GetDistributionListMailFlowSettingsCompletedEventHandler GetDistributionListMailFlowSettingsCompleted; - - /// - public event SetDistributionListMailFlowSettingsCompletedEventHandler SetDistributionListMailFlowSettingsCompleted; - - /// - public event GetDistributionListEmailAddressesCompletedEventHandler GetDistributionListEmailAddressesCompleted; - - /// - public event AddDistributionListEmailAddressCompletedEventHandler AddDistributionListEmailAddressCompleted; - - /// - public event SetDistributionListPrimaryEmailAddressCompletedEventHandler SetDistributionListPrimaryEmailAddressCompleted; - - /// - public event DeleteDistributionListEmailAddressesCompletedEventHandler DeleteDistributionListEmailAddressesCompleted; - - /// - public event SetDistributionListPermissionsCompletedEventHandler SetDistributionListPermissionsCompleted; - - /// - public event GetDistributionListPermissionsCompletedEventHandler GetDistributionListPermissionsCompleted; - - /// - public event GetMobileDevicesCompletedEventHandler GetMobileDevicesCompleted; - - /// - public event GetMobileDeviceCompletedEventHandler GetMobileDeviceCompleted; - - /// - public event WipeDataFromDeviceCompletedEventHandler WipeDataFromDeviceCompleted; - - /// - public event CancelRemoteWipeRequestCompletedEventHandler CancelRemoteWipeRequestCompleted; - - /// - public event RemoveDeviceCompletedEventHandler RemoveDeviceCompleted; - + /// public event GetExchangeMailboxPlansCompletedEventHandler GetExchangeMailboxPlansCompleted; - + /// public event GetExchangeMailboxPlanCompletedEventHandler GetExchangeMailboxPlanCompleted; - + /// public event AddExchangeMailboxPlanCompletedEventHandler AddExchangeMailboxPlanCompleted; - + /// public event UpdateExchangeMailboxPlanCompletedEventHandler UpdateExchangeMailboxPlanCompleted; - + /// public event DeleteExchangeMailboxPlanCompletedEventHandler DeleteExchangeMailboxPlanCompleted; - + /// public event SetOrganizationDefaultExchangeMailboxPlanCompletedEventHandler SetOrganizationDefaultExchangeMailboxPlanCompleted; - + /// public event CreatePublicFolderCompletedEventHandler CreatePublicFolderCompleted; - + /// public event DeletePublicFoldersCompletedEventHandler DeletePublicFoldersCompleted; - + /// public event DeletePublicFolderCompletedEventHandler DeletePublicFolderCompleted; - + /// public event EnableMailPublicFolderCompletedEventHandler EnableMailPublicFolderCompleted; - + /// public event DisableMailPublicFolderCompletedEventHandler DisableMailPublicFolderCompleted; - + /// public event GetPublicFolderGeneralSettingsCompletedEventHandler GetPublicFolderGeneralSettingsCompleted; - + /// public event SetPublicFolderGeneralSettingsCompletedEventHandler SetPublicFolderGeneralSettingsCompleted; - + /// public event GetPublicFolderMailFlowSettingsCompletedEventHandler GetPublicFolderMailFlowSettingsCompleted; - + /// public event SetPublicFolderMailFlowSettingsCompletedEventHandler SetPublicFolderMailFlowSettingsCompleted; - + /// public event GetPublicFolderEmailAddressesCompletedEventHandler GetPublicFolderEmailAddressesCompleted; - + /// public event AddPublicFolderEmailAddressCompletedEventHandler AddPublicFolderEmailAddressCompleted; - + /// public event SetPublicFolderPrimaryEmailAddressCompletedEventHandler SetPublicFolderPrimaryEmailAddressCompleted; - + /// public event DeletePublicFolderEmailAddressesCompletedEventHandler DeletePublicFolderEmailAddressesCompleted; - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawExchangeOrganizationsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public event AddExchangeDisclaimerCompletedEventHandler AddExchangeDisclaimerCompleted; + + /// + public event UpdateExchangeDisclaimerCompletedEventHandler UpdateExchangeDisclaimerCompleted; + + /// + public event DeleteExchangeDisclaimerCompletedEventHandler DeleteExchangeDisclaimerCompleted; + + /// + public event GetExchangeDisclaimerCompletedEventHandler GetExchangeDisclaimerCompleted; + + /// + public event GetExchangeDisclaimersCompletedEventHandler GetExchangeDisclaimersCompleted; + + /// + public event SetExchangeAccountDisclaimerIdCompletedEventHandler SetExchangeAccountDisclaimerIdCompleted; + + /// + public event GetExchangeAccountDisclaimerIdCompletedEventHandler GetExchangeAccountDisclaimerIdCompleted; + + /// + public event GetRawExchangeOrganizationsPagedCompletedEventHandler GetRawExchangeOrganizationsPagedCompleted; + + /// + public event GetExchangeOrganizationsPagedCompletedEventHandler GetExchangeOrganizationsPagedCompleted; + + /// + public event GetExchangeOrganizationsCompletedEventHandler GetExchangeOrganizationsCompleted; + + /// + public event GetOrganizationCompletedEventHandler GetOrganizationCompleted; + + /// + public event GetOrganizationStatisticsCompletedEventHandler GetOrganizationStatisticsCompleted; + + /// + public event GetOrganizationStatisticsByOrganizationCompletedEventHandler GetOrganizationStatisticsByOrganizationCompleted; + + /// + public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; + + /// + public event GetOrganizationStorageLimitsCompletedEventHandler GetOrganizationStorageLimitsCompleted; + + /// + public event SetOrganizationStorageLimitsCompletedEventHandler SetOrganizationStorageLimitsCompleted; + + /// + public event GetMailboxesStatisticsCompletedEventHandler GetMailboxesStatisticsCompleted; + + /// + public event GetMailboxStatisticsCompletedEventHandler GetMailboxStatisticsCompleted; + + /// + public event CalculateOrganizationDiskspaceCompletedEventHandler CalculateOrganizationDiskspaceCompleted; + + /// + public event GetActiveSyncPolicyCompletedEventHandler GetActiveSyncPolicyCompleted; + + /// + public event SetActiveSyncPolicyCompletedEventHandler SetActiveSyncPolicyCompleted; + + /// + public event AddAuthoritativeDomainCompletedEventHandler AddAuthoritativeDomainCompleted; + + /// + public event DeleteAuthoritativeDomainCompletedEventHandler DeleteAuthoritativeDomainCompleted; + + /// + public event GetAccountsPagedCompletedEventHandler GetAccountsPagedCompleted; + + /// + public event GetAccountsCompletedEventHandler GetAccountsCompleted; + + /// + public event GetExchangeAccountByMailboxPlanIdCompletedEventHandler GetExchangeAccountByMailboxPlanIdCompleted; + + /// + public event SearchAccountsCompletedEventHandler SearchAccountsCompleted; + + /// + public event GetAccountCompletedEventHandler GetAccountCompleted; + + /// + public event SearchAccountCompletedEventHandler SearchAccountCompleted; + + /// + public event CheckAccountCredentialsCompletedEventHandler CheckAccountCredentialsCompleted; + + /// + public event CreateMailboxCompletedEventHandler CreateMailboxCompleted; + + /// + public event DeleteMailboxCompletedEventHandler DeleteMailboxCompleted; + + /// + public event DisableMailboxCompletedEventHandler DisableMailboxCompleted; + + /// + public event GetMailboxAdvancedSettingsCompletedEventHandler GetMailboxAdvancedSettingsCompleted; + + /// + public event GetMailboxGeneralSettingsCompletedEventHandler GetMailboxGeneralSettingsCompleted; + + /// + public event SetMailboxGeneralSettingsCompletedEventHandler SetMailboxGeneralSettingsCompleted; + + /// + public event GetMailboxEmailAddressesCompletedEventHandler GetMailboxEmailAddressesCompleted; + + /// + public event AddMailboxEmailAddressCompletedEventHandler AddMailboxEmailAddressCompleted; + + /// + public event SetMailboxPrimaryEmailAddressCompletedEventHandler SetMailboxPrimaryEmailAddressCompleted; + + /// + public event DeleteMailboxEmailAddressesCompletedEventHandler DeleteMailboxEmailAddressesCompleted; + + /// + public event GetMailboxMailFlowSettingsCompletedEventHandler GetMailboxMailFlowSettingsCompleted; + + /// + public event SetMailboxMailFlowSettingsCompletedEventHandler SetMailboxMailFlowSettingsCompleted; + + /// + public event SetExchangeMailboxPlanCompletedEventHandler SetExchangeMailboxPlanCompleted; + + /// + public event GetMailboxSetupInstructionsCompletedEventHandler GetMailboxSetupInstructionsCompleted; + + /// + public event SendMailboxSetupInstructionsCompletedEventHandler SendMailboxSetupInstructionsCompleted; + + /// + public event SetMailboxManagerSettingsCompletedEventHandler SetMailboxManagerSettingsCompleted; + + /// + public event GetMailboxPermissionsCompletedEventHandler GetMailboxPermissionsCompleted; + + /// + public event SetMailboxPermissionsCompletedEventHandler SetMailboxPermissionsCompleted; + + /// + public event CreateContactCompletedEventHandler CreateContactCompleted; + + /// + public event DeleteContactCompletedEventHandler DeleteContactCompleted; + + /// + public event GetContactGeneralSettingsCompletedEventHandler GetContactGeneralSettingsCompleted; + + /// + public event SetContactGeneralSettingsCompletedEventHandler SetContactGeneralSettingsCompleted; + + /// + public event GetContactMailFlowSettingsCompletedEventHandler GetContactMailFlowSettingsCompleted; + + /// + public event SetContactMailFlowSettingsCompletedEventHandler SetContactMailFlowSettingsCompleted; + + /// + public event CreateDistributionListCompletedEventHandler CreateDistributionListCompleted; + + /// + public event DeleteDistributionListCompletedEventHandler DeleteDistributionListCompleted; + + /// + public event GetDistributionListGeneralSettingsCompletedEventHandler GetDistributionListGeneralSettingsCompleted; + + /// + public event SetDistributionListGeneralSettingsCompletedEventHandler SetDistributionListGeneralSettingsCompleted; + + /// + public event GetDistributionListMailFlowSettingsCompletedEventHandler GetDistributionListMailFlowSettingsCompleted; + + /// + public event SetDistributionListMailFlowSettingsCompletedEventHandler SetDistributionListMailFlowSettingsCompleted; + + /// + public event GetDistributionListEmailAddressesCompletedEventHandler GetDistributionListEmailAddressesCompleted; + + /// + public event AddDistributionListEmailAddressCompletedEventHandler AddDistributionListEmailAddressCompleted; + + /// + public event SetDistributionListPrimaryEmailAddressCompletedEventHandler SetDistributionListPrimaryEmailAddressCompleted; + + /// + public event DeleteDistributionListEmailAddressesCompletedEventHandler DeleteDistributionListEmailAddressesCompleted; + + /// + public event SetDistributionListPermissionsCompletedEventHandler SetDistributionListPermissionsCompleted; + + /// + public event GetDistributionListPermissionsCompletedEventHandler GetDistributionListPermissionsCompleted; + + /// + public event GetMobileDevicesCompletedEventHandler GetMobileDevicesCompleted; + + /// + public event GetMobileDeviceCompletedEventHandler GetMobileDeviceCompleted; + + /// + public event WipeDataFromDeviceCompletedEventHandler WipeDataFromDeviceCompleted; + + /// + public event CancelRemoteWipeRequestCompletedEventHandler CancelRemoteWipeRequestCompleted; + + /// + public event RemoveDeviceCompletedEventHandler RemoveDeviceCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlans", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxPlan[] GetExchangeMailboxPlans(int itemId) + { + object[] results = this.Invoke("GetExchangeMailboxPlans", new object[] { + itemId}); + return ((ExchangeMailboxPlan[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeMailboxPlans(int itemId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetExchangeMailboxPlans", new object[] { + itemId}, callback, asyncState); + } + + /// + public ExchangeMailboxPlan[] EndGetExchangeMailboxPlans(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeMailboxPlan[])(results[0])); + } + + /// + public void GetExchangeMailboxPlansAsync(int itemId) + { + this.GetExchangeMailboxPlansAsync(itemId, null); + } + + /// + public void GetExchangeMailboxPlansAsync(int itemId, object userState) + { + if ((this.GetExchangeMailboxPlansOperationCompleted == null)) + { + this.GetExchangeMailboxPlansOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeMailboxPlansOperationCompleted); + } + this.InvokeAsync("GetExchangeMailboxPlans", new object[] { + itemId}, this.GetExchangeMailboxPlansOperationCompleted, userState); + } + + private void OnGetExchangeMailboxPlansOperationCompleted(object arg) + { + if ((this.GetExchangeMailboxPlansCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeMailboxPlansCompleted(this, new GetExchangeMailboxPlansCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxPlan GetExchangeMailboxPlan(int itemId, int mailboxPlanId) + { + object[] results = this.Invoke("GetExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}); + return ((ExchangeMailboxPlan)(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, callback, asyncState); + } + + /// + public ExchangeMailboxPlan EndGetExchangeMailboxPlan(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeMailboxPlan)(results[0])); + } + + /// + public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) + { + this.GetExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); + } + + /// + public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) + { + if ((this.GetExchangeMailboxPlanOperationCompleted == null)) + { + this.GetExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeMailboxPlanOperationCompleted); + } + this.InvokeAsync("GetExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, this.GetExchangeMailboxPlanOperationCompleted, userState); + } + + private void OnGetExchangeMailboxPlanOperationCompleted(object arg) + { + if ((this.GetExchangeMailboxPlanCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeMailboxPlanCompleted(this, new GetExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) + { + object[] results = this.Invoke("AddExchangeMailboxPlan", new object[] { + itemId, + mailboxPlan}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginAddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("AddExchangeMailboxPlan", new object[] { + itemId, + mailboxPlan}, callback, asyncState); + } + + /// + public int EndAddExchangeMailboxPlan(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan) + { + this.AddExchangeMailboxPlanAsync(itemId, mailboxPlan, null); + } + + /// + public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan, object userState) + { + if ((this.AddExchangeMailboxPlanOperationCompleted == null)) + { + this.AddExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddExchangeMailboxPlanOperationCompleted); + } + this.InvokeAsync("AddExchangeMailboxPlan", new object[] { + itemId, + mailboxPlan}, this.AddExchangeMailboxPlanOperationCompleted, userState); + } + + private void OnAddExchangeMailboxPlanOperationCompleted(object arg) + { + if ((this.AddExchangeMailboxPlanCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddExchangeMailboxPlanCompleted(this, new AddExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) + { + object[] results = this.Invoke("UpdateExchangeMailboxPlan", new object[] { + itemId, + mailboxPlan}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginUpdateExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("UpdateExchangeMailboxPlan", new object[] { + itemId, + mailboxPlan}, callback, asyncState); + } + + /// + public int EndUpdateExchangeMailboxPlan(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void UpdateExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan) + { + this.UpdateExchangeMailboxPlanAsync(itemId, mailboxPlan, null); + } + + /// + public void UpdateExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan, object userState) + { + if ((this.UpdateExchangeMailboxPlanOperationCompleted == null)) + { + this.UpdateExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateExchangeMailboxPlanOperationCompleted); + } + this.InvokeAsync("UpdateExchangeMailboxPlan", new object[] { + itemId, + mailboxPlan}, this.UpdateExchangeMailboxPlanOperationCompleted, userState); + } + + private void OnUpdateExchangeMailboxPlanOperationCompleted(object arg) + { + if ((this.UpdateExchangeMailboxPlanCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.UpdateExchangeMailboxPlanCompleted(this, new UpdateExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteExchangeMailboxPlan(int itemId, int mailboxPlanId) + { + object[] results = this.Invoke("DeleteExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DeleteExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, callback, asyncState); + } + + /// + public int EndDeleteExchangeMailboxPlan(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) + { + this.DeleteExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); + } + + /// + public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) + { + if ((this.DeleteExchangeMailboxPlanOperationCompleted == null)) + { + this.DeleteExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeMailboxPlanOperationCompleted); + } + this.InvokeAsync("DeleteExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, this.DeleteExchangeMailboxPlanOperationCompleted, userState); + } + + private void OnDeleteExchangeMailboxPlanOperationCompleted(object arg) + { + if ((this.DeleteExchangeMailboxPlanCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteExchangeMailboxPlanCompleted(this, new DeleteExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetOrganizationDefaultExchangeMailbo" + + "xPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) + { + this.Invoke("SetOrganizationDefaultExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}); + } + + /// + public System.IAsyncResult BeginSetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("SetOrganizationDefaultExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, callback, asyncState); + } + + /// + public void EndSetOrganizationDefaultExchangeMailboxPlan(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) + { + this.SetOrganizationDefaultExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); + } + + /// + public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) + { + if ((this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted == null)) + { + this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationDefaultExchangeMailboxPlanOperationCompleted); + } + this.InvokeAsync("SetOrganizationDefaultExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted, userState); + } + + private void OnSetOrganizationDefaultExchangeMailboxPlanOperationCompleted(object arg) + { + if ((this.SetOrganizationDefaultExchangeMailboxPlanCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetOrganizationDefaultExchangeMailboxPlanCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreatePublicFolder", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreatePublicFolder(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain) + { + object[] results = this.Invoke("CreatePublicFolder", new object[] { + itemId, + parentFolder, + folderName, + mailEnabled, + accountName, + domain}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginCreatePublicFolder(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("CreatePublicFolder", new object[] { + itemId, + parentFolder, + folderName, + mailEnabled, + accountName, + domain}, callback, asyncState); + } + + /// + public int EndCreatePublicFolder(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void CreatePublicFolderAsync(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain) + { + this.CreatePublicFolderAsync(itemId, parentFolder, folderName, mailEnabled, accountName, domain, null); + } + + /// + public void CreatePublicFolderAsync(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain, object userState) + { + if ((this.CreatePublicFolderOperationCompleted == null)) + { + this.CreatePublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreatePublicFolderOperationCompleted); + } + this.InvokeAsync("CreatePublicFolder", new object[] { + itemId, + parentFolder, + folderName, + mailEnabled, + accountName, + domain}, this.CreatePublicFolderOperationCompleted, userState); + } + + private void OnCreatePublicFolderOperationCompleted(object arg) + { + if ((this.CreatePublicFolderCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CreatePublicFolderCompleted(this, new CreatePublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolders", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeletePublicFolders(int itemId, int[] accountIds) + { + object[] results = this.Invoke("DeletePublicFolders", new object[] { + itemId, + accountIds}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeletePublicFolders(int itemId, int[] accountIds, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DeletePublicFolders", new object[] { + itemId, + accountIds}, callback, asyncState); + } + + /// + public int EndDeletePublicFolders(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeletePublicFoldersAsync(int itemId, int[] accountIds) + { + this.DeletePublicFoldersAsync(itemId, accountIds, null); + } + + /// + public void DeletePublicFoldersAsync(int itemId, int[] accountIds, object userState) + { + if ((this.DeletePublicFoldersOperationCompleted == null)) + { + this.DeletePublicFoldersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFoldersOperationCompleted); + } + this.InvokeAsync("DeletePublicFolders", new object[] { + itemId, + accountIds}, this.DeletePublicFoldersOperationCompleted, userState); + } + + private void OnDeletePublicFoldersOperationCompleted(object arg) + { + if ((this.DeletePublicFoldersCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeletePublicFoldersCompleted(this, new DeletePublicFoldersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolder", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeletePublicFolder(int itemId, int accountId) + { + object[] results = this.Invoke("DeletePublicFolder", new object[] { + itemId, + accountId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeletePublicFolder(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DeletePublicFolder", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public int EndDeletePublicFolder(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeletePublicFolderAsync(int itemId, int accountId) + { + this.DeletePublicFolderAsync(itemId, accountId, null); + } + + /// + public void DeletePublicFolderAsync(int itemId, int accountId, object userState) + { + if ((this.DeletePublicFolderOperationCompleted == null)) + { + this.DeletePublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFolderOperationCompleted); + } + this.InvokeAsync("DeletePublicFolder", new object[] { + itemId, + accountId}, this.DeletePublicFolderOperationCompleted, userState); + } + + private void OnDeletePublicFolderOperationCompleted(object arg) + { + if ((this.DeletePublicFolderCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeletePublicFolderCompleted(this, new DeletePublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/EnableMailPublicFolder", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int EnableMailPublicFolder(int itemId, int accountId, string name, string domain) + { + object[] results = this.Invoke("EnableMailPublicFolder", new object[] { + itemId, + accountId, + name, + domain}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginEnableMailPublicFolder(int itemId, int accountId, string name, string domain, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("EnableMailPublicFolder", new object[] { + itemId, + accountId, + name, + domain}, callback, asyncState); + } + + /// + public int EndEnableMailPublicFolder(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void EnableMailPublicFolderAsync(int itemId, int accountId, string name, string domain) + { + this.EnableMailPublicFolderAsync(itemId, accountId, name, domain, null); + } + + /// + public void EnableMailPublicFolderAsync(int itemId, int accountId, string name, string domain, object userState) + { + if ((this.EnableMailPublicFolderOperationCompleted == null)) + { + this.EnableMailPublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnableMailPublicFolderOperationCompleted); + } + this.InvokeAsync("EnableMailPublicFolder", new object[] { + itemId, + accountId, + name, + domain}, this.EnableMailPublicFolderOperationCompleted, userState); + } + + private void OnEnableMailPublicFolderOperationCompleted(object arg) + { + if ((this.EnableMailPublicFolderCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.EnableMailPublicFolderCompleted(this, new EnableMailPublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableMailPublicFolder", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DisableMailPublicFolder(int itemId, int accountId) + { + object[] results = this.Invoke("DisableMailPublicFolder", new object[] { + itemId, + accountId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDisableMailPublicFolder(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DisableMailPublicFolder", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public int EndDisableMailPublicFolder(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DisableMailPublicFolderAsync(int itemId, int accountId) + { + this.DisableMailPublicFolderAsync(itemId, accountId, null); + } + + /// + public void DisableMailPublicFolderAsync(int itemId, int accountId, object userState) + { + if ((this.DisableMailPublicFolderOperationCompleted == null)) + { + this.DisableMailPublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableMailPublicFolderOperationCompleted); + } + this.InvokeAsync("DisableMailPublicFolder", new object[] { + itemId, + accountId}, this.DisableMailPublicFolderOperationCompleted, userState); + } + + private void OnDisableMailPublicFolderOperationCompleted(object arg) + { + if ((this.DisableMailPublicFolderCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DisableMailPublicFolderCompleted(this, new DisableMailPublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangePublicFolder GetPublicFolderGeneralSettings(int itemId, int accountId) + { + object[] results = this.Invoke("GetPublicFolderGeneralSettings", new object[] { + itemId, + accountId}); + return ((ExchangePublicFolder)(results[0])); + } + + /// + public System.IAsyncResult BeginGetPublicFolderGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetPublicFolderGeneralSettings", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public ExchangePublicFolder EndGetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangePublicFolder)(results[0])); + } + + /// + public void GetPublicFolderGeneralSettingsAsync(int itemId, int accountId) + { + this.GetPublicFolderGeneralSettingsAsync(itemId, accountId, null); + } + + /// + public void GetPublicFolderGeneralSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetPublicFolderGeneralSettingsOperationCompleted == null)) + { + this.GetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderGeneralSettingsOperationCompleted); + } + this.InvokeAsync("GetPublicFolderGeneralSettings", new object[] { + itemId, + accountId}, this.GetPublicFolderGeneralSettingsOperationCompleted, userState); + } + + private void OnGetPublicFolderGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetPublicFolderGeneralSettingsCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetPublicFolderGeneralSettingsCompleted(this, new GetPublicFolderGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) + { + object[] results = this.Invoke("SetPublicFolderGeneralSettings", new object[] { + itemId, + accountId, + newName, + hideAddressBook, + accounts}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginSetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("SetPublicFolderGeneralSettings", new object[] { + itemId, + accountId, + newName, + hideAddressBook, + accounts}, callback, asyncState); + } + + /// + public int EndSetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) + { + this.SetPublicFolderGeneralSettingsAsync(itemId, accountId, newName, hideAddressBook, accounts, null); + } + + /// + public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, object userState) + { + if ((this.SetPublicFolderGeneralSettingsOperationCompleted == null)) + { + this.SetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderGeneralSettingsOperationCompleted); + } + this.InvokeAsync("SetPublicFolderGeneralSettings", new object[] { + itemId, + accountId, + newName, + hideAddressBook, + accounts}, this.SetPublicFolderGeneralSettingsOperationCompleted, userState); + } + + private void OnSetPublicFolderGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetPublicFolderGeneralSettingsCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetPublicFolderGeneralSettingsCompleted(this, new SetPublicFolderGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangePublicFolder GetPublicFolderMailFlowSettings(int itemId, int accountId) + { + object[] results = this.Invoke("GetPublicFolderMailFlowSettings", new object[] { + itemId, + accountId}); + return ((ExchangePublicFolder)(results[0])); + } + + /// + public System.IAsyncResult BeginGetPublicFolderMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetPublicFolderMailFlowSettings", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public ExchangePublicFolder EndGetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangePublicFolder)(results[0])); + } + + /// + public void GetPublicFolderMailFlowSettingsAsync(int itemId, int accountId) + { + this.GetPublicFolderMailFlowSettingsAsync(itemId, accountId, null); + } + + /// + public void GetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetPublicFolderMailFlowSettingsOperationCompleted == null)) + { + this.GetPublicFolderMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderMailFlowSettingsOperationCompleted); + } + this.InvokeAsync("GetPublicFolderMailFlowSettings", new object[] { + itemId, + accountId}, this.GetPublicFolderMailFlowSettingsOperationCompleted, userState); + } + + private void OnGetPublicFolderMailFlowSettingsOperationCompleted(object arg) + { + if ((this.GetPublicFolderMailFlowSettingsCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetPublicFolderMailFlowSettingsCompleted(this, new GetPublicFolderMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetPublicFolderMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { + object[] results = this.Invoke("SetPublicFolderMailFlowSettings", new object[] { + itemId, + accountId, + acceptAccounts, + rejectAccounts, + requireSenderAuthentication}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginSetPublicFolderMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("SetPublicFolderMailFlowSettings", new object[] { + itemId, + accountId, + acceptAccounts, + rejectAccounts, + requireSenderAuthentication}, callback, asyncState); + } + + /// + public int EndSetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void SetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { + this.SetPublicFolderMailFlowSettingsAsync(itemId, accountId, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); + } + + /// + public void SetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) + { + if ((this.SetPublicFolderMailFlowSettingsOperationCompleted == null)) + { + this.SetPublicFolderMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderMailFlowSettingsOperationCompleted); + } + this.InvokeAsync("SetPublicFolderMailFlowSettings", new object[] { + itemId, + accountId, + acceptAccounts, + rejectAccounts, + requireSenderAuthentication}, this.SetPublicFolderMailFlowSettingsOperationCompleted, userState); + } + + private void OnSetPublicFolderMailFlowSettingsOperationCompleted(object arg) + { + if ((this.SetPublicFolderMailFlowSettingsCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetPublicFolderMailFlowSettingsCompleted(this, new SetPublicFolderMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeEmailAddress[] GetPublicFolderEmailAddresses(int itemId, int accountId) + { + object[] results = this.Invoke("GetPublicFolderEmailAddresses", new object[] { + itemId, + accountId}); + return ((ExchangeEmailAddress[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetPublicFolderEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetPublicFolderEmailAddresses", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public ExchangeEmailAddress[] EndGetPublicFolderEmailAddresses(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeEmailAddress[])(results[0])); + } + + /// + public void GetPublicFolderEmailAddressesAsync(int itemId, int accountId) + { + this.GetPublicFolderEmailAddressesAsync(itemId, accountId, null); + } + + /// + public void GetPublicFolderEmailAddressesAsync(int itemId, int accountId, object userState) + { + if ((this.GetPublicFolderEmailAddressesOperationCompleted == null)) + { + this.GetPublicFolderEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderEmailAddressesOperationCompleted); + } + this.InvokeAsync("GetPublicFolderEmailAddresses", new object[] { + itemId, + accountId}, this.GetPublicFolderEmailAddressesOperationCompleted, userState); + } + + private void OnGetPublicFolderEmailAddressesOperationCompleted(object arg) + { + if ((this.GetPublicFolderEmailAddressesCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetPublicFolderEmailAddressesCompleted(this, new GetPublicFolderEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddPublicFolderEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress) + { + object[] results = this.Invoke("AddPublicFolderEmailAddress", new object[] { + itemId, + accountId, + emailAddress}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginAddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("AddPublicFolderEmailAddress", new object[] { + itemId, + accountId, + emailAddress}, callback, asyncState); + } + + /// + public int EndAddPublicFolderEmailAddress(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddPublicFolderEmailAddressAsync(int itemId, int accountId, string emailAddress) + { + this.AddPublicFolderEmailAddressAsync(itemId, accountId, emailAddress, null); + } + + /// + public void AddPublicFolderEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) + { + if ((this.AddPublicFolderEmailAddressOperationCompleted == null)) + { + this.AddPublicFolderEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddPublicFolderEmailAddressOperationCompleted); + } + this.InvokeAsync("AddPublicFolderEmailAddress", new object[] { + itemId, + accountId, + emailAddress}, this.AddPublicFolderEmailAddressOperationCompleted, userState); + } + + private void OnAddPublicFolderEmailAddressOperationCompleted(object arg) + { + if ((this.AddPublicFolderEmailAddressCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddPublicFolderEmailAddressCompleted(this, new AddPublicFolderEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderPrimaryEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress) + { + object[] results = this.Invoke("SetPublicFolderPrimaryEmailAddress", new object[] { + itemId, + accountId, + emailAddress}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginSetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("SetPublicFolderPrimaryEmailAddress", new object[] { + itemId, + accountId, + emailAddress}, callback, asyncState); + } + + /// + public int EndSetPublicFolderPrimaryEmailAddress(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void SetPublicFolderPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) + { + this.SetPublicFolderPrimaryEmailAddressAsync(itemId, accountId, emailAddress, null); + } + + /// + public void SetPublicFolderPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) + { + if ((this.SetPublicFolderPrimaryEmailAddressOperationCompleted == null)) + { + this.SetPublicFolderPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderPrimaryEmailAddressOperationCompleted); + } + this.InvokeAsync("SetPublicFolderPrimaryEmailAddress", new object[] { + itemId, + accountId, + emailAddress}, this.SetPublicFolderPrimaryEmailAddressOperationCompleted, userState); + } + + private void OnSetPublicFolderPrimaryEmailAddressOperationCompleted(object arg) + { + if ((this.SetPublicFolderPrimaryEmailAddressCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetPublicFolderPrimaryEmailAddressCompleted(this, new SetPublicFolderPrimaryEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolderEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses) + { + object[] results = this.Invoke("DeletePublicFolderEmailAddresses", new object[] { + itemId, + accountId, + emailAddresses}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DeletePublicFolderEmailAddresses", new object[] { + itemId, + accountId, + emailAddresses}, callback, asyncState); + } + + /// + public int EndDeletePublicFolderEmailAddresses(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeletePublicFolderEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) + { + this.DeletePublicFolderEmailAddressesAsync(itemId, accountId, emailAddresses, null); + } + + /// + public void DeletePublicFolderEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) + { + if ((this.DeletePublicFolderEmailAddressesOperationCompleted == null)) + { + this.DeletePublicFolderEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFolderEmailAddressesOperationCompleted); + } + this.InvokeAsync("DeletePublicFolderEmailAddresses", new object[] { + itemId, + accountId, + emailAddresses}, this.DeletePublicFolderEmailAddressesOperationCompleted, userState); + } + + private void OnDeletePublicFolderEmailAddressesOperationCompleted(object arg) + { + if ((this.DeletePublicFolderEmailAddressesCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeletePublicFolderEmailAddressesCompleted(this, new DeletePublicFolderEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeDisclaimer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer) + { + object[] results = this.Invoke("AddExchangeDisclaimer", new object[] { + itemId, + disclaimer}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginAddExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("AddExchangeDisclaimer", new object[] { + itemId, + disclaimer}, callback, asyncState); + } + + /// + public int EndAddExchangeDisclaimer(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer) + { + this.AddExchangeDisclaimerAsync(itemId, disclaimer, null); + } + + /// + public void AddExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer, object userState) + { + if ((this.AddExchangeDisclaimerOperationCompleted == null)) + { + this.AddExchangeDisclaimerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddExchangeDisclaimerOperationCompleted); + } + this.InvokeAsync("AddExchangeDisclaimer", new object[] { + itemId, + disclaimer}, this.AddExchangeDisclaimerOperationCompleted, userState); + } + + private void OnAddExchangeDisclaimerOperationCompleted(object arg) + { + if ((this.AddExchangeDisclaimerCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddExchangeDisclaimerCompleted(this, new AddExchangeDisclaimerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeDisclaimer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer) + { + object[] results = this.Invoke("UpdateExchangeDisclaimer", new object[] { + itemId, + disclaimer}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginUpdateExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("UpdateExchangeDisclaimer", new object[] { + itemId, + disclaimer}, callback, asyncState); + } + + /// + public int EndUpdateExchangeDisclaimer(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void UpdateExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer) + { + this.UpdateExchangeDisclaimerAsync(itemId, disclaimer, null); + } + + /// + public void UpdateExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer, object userState) + { + if ((this.UpdateExchangeDisclaimerOperationCompleted == null)) + { + this.UpdateExchangeDisclaimerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateExchangeDisclaimerOperationCompleted); + } + this.InvokeAsync("UpdateExchangeDisclaimer", new object[] { + itemId, + disclaimer}, this.UpdateExchangeDisclaimerOperationCompleted, userState); + } + + private void OnUpdateExchangeDisclaimerOperationCompleted(object arg) + { + if ((this.UpdateExchangeDisclaimerCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.UpdateExchangeDisclaimerCompleted(this, new UpdateExchangeDisclaimerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeDisclaimer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteExchangeDisclaimer(int itemId, int exchangeDisclaimerId) + { + object[] results = this.Invoke("DeleteExchangeDisclaimer", new object[] { + itemId, + exchangeDisclaimerId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteExchangeDisclaimer(int itemId, int exchangeDisclaimerId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DeleteExchangeDisclaimer", new object[] { + itemId, + exchangeDisclaimerId}, callback, asyncState); + } + + /// + public int EndDeleteExchangeDisclaimer(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeleteExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId) + { + this.DeleteExchangeDisclaimerAsync(itemId, exchangeDisclaimerId, null); + } + + /// + public void DeleteExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId, object userState) + { + if ((this.DeleteExchangeDisclaimerOperationCompleted == null)) + { + this.DeleteExchangeDisclaimerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeDisclaimerOperationCompleted); + } + this.InvokeAsync("DeleteExchangeDisclaimer", new object[] { + itemId, + exchangeDisclaimerId}, this.DeleteExchangeDisclaimerOperationCompleted, userState); + } + + private void OnDeleteExchangeDisclaimerOperationCompleted(object arg) + { + if ((this.DeleteExchangeDisclaimerCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteExchangeDisclaimerCompleted(this, new DeleteExchangeDisclaimerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeDisclaimer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDisclaimer GetExchangeDisclaimer(int itemId, int exchangeDisclaimerId) + { + object[] results = this.Invoke("GetExchangeDisclaimer", new object[] { + itemId, + exchangeDisclaimerId}); + return ((ExchangeDisclaimer)(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeDisclaimer(int itemId, int exchangeDisclaimerId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetExchangeDisclaimer", new object[] { + itemId, + exchangeDisclaimerId}, callback, asyncState); + } + + /// + public ExchangeDisclaimer EndGetExchangeDisclaimer(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeDisclaimer)(results[0])); + } + + /// + public void GetExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId) + { + this.GetExchangeDisclaimerAsync(itemId, exchangeDisclaimerId, null); + } + + /// + public void GetExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId, object userState) + { + if ((this.GetExchangeDisclaimerOperationCompleted == null)) + { + this.GetExchangeDisclaimerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeDisclaimerOperationCompleted); + } + this.InvokeAsync("GetExchangeDisclaimer", new object[] { + itemId, + exchangeDisclaimerId}, this.GetExchangeDisclaimerOperationCompleted, userState); + } + + private void OnGetExchangeDisclaimerOperationCompleted(object arg) + { + if ((this.GetExchangeDisclaimerCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeDisclaimerCompleted(this, new GetExchangeDisclaimerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeDisclaimers", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDisclaimer[] GetExchangeDisclaimers(int itemId) + { + object[] results = this.Invoke("GetExchangeDisclaimers", new object[] { + itemId}); + return ((ExchangeDisclaimer[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeDisclaimers(int itemId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetExchangeDisclaimers", new object[] { + itemId}, callback, asyncState); + } + + /// + public ExchangeDisclaimer[] EndGetExchangeDisclaimers(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeDisclaimer[])(results[0])); + } + + /// + public void GetExchangeDisclaimersAsync(int itemId) + { + this.GetExchangeDisclaimersAsync(itemId, null); + } + + /// + public void GetExchangeDisclaimersAsync(int itemId, object userState) + { + if ((this.GetExchangeDisclaimersOperationCompleted == null)) + { + this.GetExchangeDisclaimersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeDisclaimersOperationCompleted); + } + this.InvokeAsync("GetExchangeDisclaimers", new object[] { + itemId}, this.GetExchangeDisclaimersOperationCompleted, userState); + } + + private void OnGetExchangeDisclaimersOperationCompleted(object arg) + { + if ((this.GetExchangeDisclaimersCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeDisclaimersCompleted(this, new GetExchangeDisclaimersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetExchangeAccountDisclaimerId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetExchangeAccountDisclaimerId(int itemId, int AccountID, int ExchangeDisclaimerId) + { + object[] results = this.Invoke("SetExchangeAccountDisclaimerId", new object[] { + itemId, + AccountID, + ExchangeDisclaimerId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginSetExchangeAccountDisclaimerId(int itemId, int AccountID, int ExchangeDisclaimerId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("SetExchangeAccountDisclaimerId", new object[] { + itemId, + AccountID, + ExchangeDisclaimerId}, callback, asyncState); + } + + /// + public int EndSetExchangeAccountDisclaimerId(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void SetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID, int ExchangeDisclaimerId) + { + this.SetExchangeAccountDisclaimerIdAsync(itemId, AccountID, ExchangeDisclaimerId, null); + } + + /// + public void SetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID, int ExchangeDisclaimerId, object userState) + { + if ((this.SetExchangeAccountDisclaimerIdOperationCompleted == null)) + { + this.SetExchangeAccountDisclaimerIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetExchangeAccountDisclaimerIdOperationCompleted); + } + this.InvokeAsync("SetExchangeAccountDisclaimerId", new object[] { + itemId, + AccountID, + ExchangeDisclaimerId}, this.SetExchangeAccountDisclaimerIdOperationCompleted, userState); + } + + private void OnSetExchangeAccountDisclaimerIdOperationCompleted(object arg) + { + if ((this.SetExchangeAccountDisclaimerIdCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetExchangeAccountDisclaimerIdCompleted(this, new SetExchangeAccountDisclaimerIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeAccountDisclaimerId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int GetExchangeAccountDisclaimerId(int itemId, int AccountID) + { + object[] results = this.Invoke("GetExchangeAccountDisclaimerId", new object[] { + itemId, + AccountID}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeAccountDisclaimerId(int itemId, int AccountID, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetExchangeAccountDisclaimerId", new object[] { + itemId, + AccountID}, callback, asyncState); + } + + /// + public int EndGetExchangeAccountDisclaimerId(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void GetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID) + { + this.GetExchangeAccountDisclaimerIdAsync(itemId, AccountID, null); + } + + /// + public void GetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID, object userState) + { + if ((this.GetExchangeAccountDisclaimerIdOperationCompleted == null)) + { + this.GetExchangeAccountDisclaimerIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeAccountDisclaimerIdOperationCompleted); + } + this.InvokeAsync("GetExchangeAccountDisclaimerId", new object[] { + itemId, + AccountID}, this.GetExchangeAccountDisclaimerIdOperationCompleted, userState); + } + + private void OnGetExchangeAccountDisclaimerIdOperationCompleted(object arg) + { + if ((this.GetExchangeAccountDisclaimerIdCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeAccountDisclaimerIdCompleted(this, new GetExchangeAccountDisclaimerIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawExchangeOrganizationsPaged", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { object[] results = this.Invoke("GetRawExchangeOrganizationsPaged", new object[] { packageId, recursive, @@ -495,9 +1927,10 @@ namespace WebsitePanel.EnterpriseServer { maximumRows}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawExchangeOrganizationsPaged", new object[] { packageId, recursive, @@ -507,21 +1940,25 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawExchangeOrganizationsPaged(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawExchangeOrganizationsPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public void GetRawExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { this.GetRawExchangeOrganizationsPagedAsync(packageId, recursive, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetRawExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { - if ((this.GetRawExchangeOrganizationsPagedOperationCompleted == null)) { + public void GetRawExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetRawExchangeOrganizationsPagedOperationCompleted == null)) + { this.GetRawExchangeOrganizationsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawExchangeOrganizationsPagedOperationCompleted); } this.InvokeAsync("GetRawExchangeOrganizationsPaged", new object[] { @@ -533,17 +1970,20 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, this.GetRawExchangeOrganizationsPagedOperationCompleted, userState); } - - private void OnGetRawExchangeOrganizationsPagedOperationCompleted(object arg) { - if ((this.GetRawExchangeOrganizationsPagedCompleted != null)) { + + private void OnGetRawExchangeOrganizationsPagedOperationCompleted(object arg) + { + if ((this.GetRawExchangeOrganizationsPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawExchangeOrganizationsPagedCompleted(this, new GetRawExchangeOrganizationsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizationsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationsPaged GetExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizationsPaged", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationsPaged GetExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { object[] results = this.Invoke("GetExchangeOrganizationsPaged", new object[] { packageId, recursive, @@ -554,9 +1994,10 @@ namespace WebsitePanel.EnterpriseServer { maximumRows}); return ((OrganizationsPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetExchangeOrganizationsPaged", new object[] { packageId, recursive, @@ -566,21 +2007,25 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, callback, asyncState); } - + /// - public OrganizationsPaged EndGetExchangeOrganizationsPaged(System.IAsyncResult asyncResult) { + public OrganizationsPaged EndGetExchangeOrganizationsPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationsPaged)(results[0])); } - + /// - public void GetExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public void GetExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { this.GetExchangeOrganizationsPagedAsync(packageId, recursive, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { - if ((this.GetExchangeOrganizationsPagedOperationCompleted == null)) { + public void GetExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetExchangeOrganizationsPagedOperationCompleted == null)) + { this.GetExchangeOrganizationsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeOrganizationsPagedOperationCompleted); } this.InvokeAsync("GetExchangeOrganizationsPaged", new object[] { @@ -592,267 +2037,318 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, this.GetExchangeOrganizationsPagedOperationCompleted, userState); } - - private void OnGetExchangeOrganizationsPagedOperationCompleted(object arg) { - if ((this.GetExchangeOrganizationsPagedCompleted != null)) { + + private void OnGetExchangeOrganizationsPagedOperationCompleted(object arg) + { + if ((this.GetExchangeOrganizationsPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeOrganizationsPagedCompleted(this, new GetExchangeOrganizationsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizations", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization[] GetExchangeOrganizations(int packageId, bool recursive) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizations", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization[] GetExchangeOrganizations(int packageId, bool recursive) + { object[] results = this.Invoke("GetExchangeOrganizations", new object[] { packageId, recursive}); return ((Organization[])(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeOrganizations(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetExchangeOrganizations(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetExchangeOrganizations", new object[] { packageId, recursive}, callback, asyncState); } - + /// - public Organization[] EndGetExchangeOrganizations(System.IAsyncResult asyncResult) { + public Organization[] EndGetExchangeOrganizations(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization[])(results[0])); } - + /// - public void GetExchangeOrganizationsAsync(int packageId, bool recursive) { + public void GetExchangeOrganizationsAsync(int packageId, bool recursive) + { this.GetExchangeOrganizationsAsync(packageId, recursive, null); } - + /// - public void GetExchangeOrganizationsAsync(int packageId, bool recursive, object userState) { - if ((this.GetExchangeOrganizationsOperationCompleted == null)) { + public void GetExchangeOrganizationsAsync(int packageId, bool recursive, object userState) + { + if ((this.GetExchangeOrganizationsOperationCompleted == null)) + { this.GetExchangeOrganizationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeOrganizationsOperationCompleted); } this.InvokeAsync("GetExchangeOrganizations", new object[] { packageId, recursive}, this.GetExchangeOrganizationsOperationCompleted, userState); } - - private void OnGetExchangeOrganizationsOperationCompleted(object arg) { - if ((this.GetExchangeOrganizationsCompleted != null)) { + + private void OnGetExchangeOrganizationsOperationCompleted(object arg) + { + if ((this.GetExchangeOrganizationsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeOrganizationsCompleted(this, new GetExchangeOrganizationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization GetOrganization(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganization", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization GetOrganization(int itemId) + { object[] results = this.Invoke("GetOrganization", new object[] { itemId}); return ((Organization)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganization(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganization(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganization", new object[] { itemId}, callback, asyncState); } - + /// - public Organization EndGetOrganization(System.IAsyncResult asyncResult) { + public Organization EndGetOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization)(results[0])); } - + /// - public void GetOrganizationAsync(int itemId) { + public void GetOrganizationAsync(int itemId) + { this.GetOrganizationAsync(itemId, null); } - + /// - public void GetOrganizationAsync(int itemId, object userState) { - if ((this.GetOrganizationOperationCompleted == null)) { + public void GetOrganizationAsync(int itemId, object userState) + { + if ((this.GetOrganizationOperationCompleted == null)) + { this.GetOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationOperationCompleted); } this.InvokeAsync("GetOrganization", new object[] { itemId}, this.GetOrganizationOperationCompleted, userState); } - - private void OnGetOrganizationOperationCompleted(object arg) { - if ((this.GetOrganizationCompleted != null)) { + + private void OnGetOrganizationOperationCompleted(object arg) + { + if ((this.GetOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationCompleted(this, new GetOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationStatistics", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationStatistics GetOrganizationStatistics(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationStatistics", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationStatistics GetOrganizationStatistics(int itemId) + { object[] results = this.Invoke("GetOrganizationStatistics", new object[] { itemId}); return ((OrganizationStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationStatistics(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationStatistics(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationStatistics", new object[] { itemId}, callback, asyncState); } - + /// - public OrganizationStatistics EndGetOrganizationStatistics(System.IAsyncResult asyncResult) { + public OrganizationStatistics EndGetOrganizationStatistics(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationStatistics)(results[0])); } - + /// - public void GetOrganizationStatisticsAsync(int itemId) { + public void GetOrganizationStatisticsAsync(int itemId) + { this.GetOrganizationStatisticsAsync(itemId, null); } - + /// - public void GetOrganizationStatisticsAsync(int itemId, object userState) { - if ((this.GetOrganizationStatisticsOperationCompleted == null)) { + public void GetOrganizationStatisticsAsync(int itemId, object userState) + { + if ((this.GetOrganizationStatisticsOperationCompleted == null)) + { this.GetOrganizationStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationStatisticsOperationCompleted); } this.InvokeAsync("GetOrganizationStatistics", new object[] { itemId}, this.GetOrganizationStatisticsOperationCompleted, userState); } - - private void OnGetOrganizationStatisticsOperationCompleted(object arg) { - if ((this.GetOrganizationStatisticsCompleted != null)) { + + private void OnGetOrganizationStatisticsOperationCompleted(object arg) + { + if ((this.GetOrganizationStatisticsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationStatisticsCompleted(this, new GetOrganizationStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationStatisticsByOrganizat" + - "ion", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId) { + "ion", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId) + { object[] results = this.Invoke("GetOrganizationStatisticsByOrganization", new object[] { itemId}); return ((OrganizationStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationStatisticsByOrganization(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationStatisticsByOrganization(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationStatisticsByOrganization", new object[] { itemId}, callback, asyncState); } - + /// - public OrganizationStatistics EndGetOrganizationStatisticsByOrganization(System.IAsyncResult asyncResult) { + public OrganizationStatistics EndGetOrganizationStatisticsByOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationStatistics)(results[0])); } - + /// - public void GetOrganizationStatisticsByOrganizationAsync(int itemId) { + public void GetOrganizationStatisticsByOrganizationAsync(int itemId) + { this.GetOrganizationStatisticsByOrganizationAsync(itemId, null); } - + /// - public void GetOrganizationStatisticsByOrganizationAsync(int itemId, object userState) { - if ((this.GetOrganizationStatisticsByOrganizationOperationCompleted == null)) { + public void GetOrganizationStatisticsByOrganizationAsync(int itemId, object userState) + { + if ((this.GetOrganizationStatisticsByOrganizationOperationCompleted == null)) + { this.GetOrganizationStatisticsByOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationStatisticsByOrganizationOperationCompleted); } this.InvokeAsync("GetOrganizationStatisticsByOrganization", new object[] { itemId}, this.GetOrganizationStatisticsByOrganizationOperationCompleted, userState); } - - private void OnGetOrganizationStatisticsByOrganizationOperationCompleted(object arg) { - if ((this.GetOrganizationStatisticsByOrganizationCompleted != null)) { + + private void OnGetOrganizationStatisticsByOrganizationOperationCompleted(object arg) + { + if ((this.GetOrganizationStatisticsByOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationStatisticsByOrganizationCompleted(this, new GetOrganizationStatisticsByOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteOrganization(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteOrganization", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteOrganization(int itemId) + { object[] results = this.Invoke("DeleteOrganization", new object[] { itemId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteOrganization(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteOrganization(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteOrganization", new object[] { itemId}, callback, asyncState); } - + /// - public int EndDeleteOrganization(System.IAsyncResult asyncResult) { + public int EndDeleteOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteOrganizationAsync(int itemId) { + public void DeleteOrganizationAsync(int itemId) + { this.DeleteOrganizationAsync(itemId, null); } - + /// - public void DeleteOrganizationAsync(int itemId, object userState) { - if ((this.DeleteOrganizationOperationCompleted == null)) { + public void DeleteOrganizationAsync(int itemId, object userState) + { + if ((this.DeleteOrganizationOperationCompleted == null)) + { this.DeleteOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationOperationCompleted); } this.InvokeAsync("DeleteOrganization", new object[] { itemId}, this.DeleteOrganizationOperationCompleted, userState); } - - private void OnDeleteOrganizationOperationCompleted(object arg) { - if ((this.DeleteOrganizationCompleted != null)) { + + private void OnDeleteOrganizationOperationCompleted(object arg) + { + if ((this.DeleteOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteOrganizationCompleted(this, new DeleteOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationStorageLimits", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization GetOrganizationStorageLimits(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationStorageLimits", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization GetOrganizationStorageLimits(int itemId) + { object[] results = this.Invoke("GetOrganizationStorageLimits", new object[] { itemId}); return ((Organization)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationStorageLimits(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationStorageLimits(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationStorageLimits", new object[] { itemId}, callback, asyncState); } - + /// - public Organization EndGetOrganizationStorageLimits(System.IAsyncResult asyncResult) { + public Organization EndGetOrganizationStorageLimits(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization)(results[0])); } - + /// - public void GetOrganizationStorageLimitsAsync(int itemId) { + public void GetOrganizationStorageLimitsAsync(int itemId) + { this.GetOrganizationStorageLimitsAsync(itemId, null); } - + /// - public void GetOrganizationStorageLimitsAsync(int itemId, object userState) { - if ((this.GetOrganizationStorageLimitsOperationCompleted == null)) { + public void GetOrganizationStorageLimitsAsync(int itemId, object userState) + { + if ((this.GetOrganizationStorageLimitsOperationCompleted == null)) + { this.GetOrganizationStorageLimitsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationStorageLimitsOperationCompleted); } this.InvokeAsync("GetOrganizationStorageLimits", new object[] { itemId}, this.GetOrganizationStorageLimitsOperationCompleted, userState); } - - private void OnGetOrganizationStorageLimitsOperationCompleted(object arg) { - if ((this.GetOrganizationStorageLimitsCompleted != null)) { + + private void OnGetOrganizationStorageLimitsOperationCompleted(object arg) + { + if ((this.GetOrganizationStorageLimitsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationStorageLimitsCompleted(this, new GetOrganizationStorageLimitsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetOrganizationStorageLimits", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetOrganizationStorageLimits", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) + { object[] results = this.Invoke("SetOrganizationStorageLimits", new object[] { itemId, issueWarningKB, @@ -862,9 +2358,10 @@ namespace WebsitePanel.EnterpriseServer { applyToMailboxes}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetOrganizationStorageLimits", new object[] { itemId, issueWarningKB, @@ -873,21 +2370,25 @@ namespace WebsitePanel.EnterpriseServer { keepDeletedItemsDays, applyToMailboxes}, callback, asyncState); } - + /// - public int EndSetOrganizationStorageLimits(System.IAsyncResult asyncResult) { + public int EndSetOrganizationStorageLimits(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetOrganizationStorageLimitsAsync(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) { + public void SetOrganizationStorageLimitsAsync(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) + { this.SetOrganizationStorageLimitsAsync(itemId, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, applyToMailboxes, null); } - + /// - public void SetOrganizationStorageLimitsAsync(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes, object userState) { - if ((this.SetOrganizationStorageLimitsOperationCompleted == null)) { + public void SetOrganizationStorageLimitsAsync(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes, object userState) + { + if ((this.SetOrganizationStorageLimitsOperationCompleted == null)) + { this.SetOrganizationStorageLimitsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationStorageLimitsOperationCompleted); } this.InvokeAsync("SetOrganizationStorageLimits", new object[] { @@ -898,201 +2399,236 @@ namespace WebsitePanel.EnterpriseServer { keepDeletedItemsDays, applyToMailboxes}, this.SetOrganizationStorageLimitsOperationCompleted, userState); } - - private void OnSetOrganizationStorageLimitsOperationCompleted(object arg) { - if ((this.SetOrganizationStorageLimitsCompleted != null)) { + + private void OnSetOrganizationStorageLimitsOperationCompleted(object arg) + { + if ((this.SetOrganizationStorageLimitsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetOrganizationStorageLimitsCompleted(this, new SetOrganizationStorageLimitsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxesStatistics", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeItemStatistics[] GetMailboxesStatistics(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxesStatistics", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeItemStatistics[] GetMailboxesStatistics(int itemId) + { object[] results = this.Invoke("GetMailboxesStatistics", new object[] { itemId}); return ((ExchangeItemStatistics[])(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxesStatistics(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxesStatistics(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxesStatistics", new object[] { itemId}, callback, asyncState); } - + /// - public ExchangeItemStatistics[] EndGetMailboxesStatistics(System.IAsyncResult asyncResult) { + public ExchangeItemStatistics[] EndGetMailboxesStatistics(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeItemStatistics[])(results[0])); } - + /// - public void GetMailboxesStatisticsAsync(int itemId) { + public void GetMailboxesStatisticsAsync(int itemId) + { this.GetMailboxesStatisticsAsync(itemId, null); } - + /// - public void GetMailboxesStatisticsAsync(int itemId, object userState) { - if ((this.GetMailboxesStatisticsOperationCompleted == null)) { + public void GetMailboxesStatisticsAsync(int itemId, object userState) + { + if ((this.GetMailboxesStatisticsOperationCompleted == null)) + { this.GetMailboxesStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxesStatisticsOperationCompleted); } this.InvokeAsync("GetMailboxesStatistics", new object[] { itemId}, this.GetMailboxesStatisticsOperationCompleted, userState); } - - private void OnGetMailboxesStatisticsOperationCompleted(object arg) { - if ((this.GetMailboxesStatisticsCompleted != null)) { + + private void OnGetMailboxesStatisticsOperationCompleted(object arg) + { + if ((this.GetMailboxesStatisticsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxesStatisticsCompleted(this, new GetMailboxesStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxStatistics", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxStatistics", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId) + { object[] results = this.Invoke("GetMailboxStatistics", new object[] { itemId, accountId}); return ((ExchangeMailboxStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxStatistics(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxStatistics(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxStatistics", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailboxStatistics EndGetMailboxStatistics(System.IAsyncResult asyncResult) { + public ExchangeMailboxStatistics EndGetMailboxStatistics(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailboxStatistics)(results[0])); } - + /// - public void GetMailboxStatisticsAsync(int itemId, int accountId) { + public void GetMailboxStatisticsAsync(int itemId, int accountId) + { this.GetMailboxStatisticsAsync(itemId, accountId, null); } - + /// - public void GetMailboxStatisticsAsync(int itemId, int accountId, object userState) { - if ((this.GetMailboxStatisticsOperationCompleted == null)) { + public void GetMailboxStatisticsAsync(int itemId, int accountId, object userState) + { + if ((this.GetMailboxStatisticsOperationCompleted == null)) + { this.GetMailboxStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxStatisticsOperationCompleted); } this.InvokeAsync("GetMailboxStatistics", new object[] { itemId, accountId}, this.GetMailboxStatisticsOperationCompleted, userState); } - - private void OnGetMailboxStatisticsOperationCompleted(object arg) { - if ((this.GetMailboxStatisticsCompleted != null)) { + + private void OnGetMailboxStatisticsOperationCompleted(object arg) + { + if ((this.GetMailboxStatisticsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxStatisticsCompleted(this, new GetMailboxStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CalculateOrganizationDiskspace", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CalculateOrganizationDiskspace(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CalculateOrganizationDiskspace", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CalculateOrganizationDiskspace(int itemId) + { object[] results = this.Invoke("CalculateOrganizationDiskspace", new object[] { itemId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCalculateOrganizationDiskspace(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCalculateOrganizationDiskspace(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CalculateOrganizationDiskspace", new object[] { itemId}, callback, asyncState); } - + /// - public int EndCalculateOrganizationDiskspace(System.IAsyncResult asyncResult) { + public int EndCalculateOrganizationDiskspace(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CalculateOrganizationDiskspaceAsync(int itemId) { + public void CalculateOrganizationDiskspaceAsync(int itemId) + { this.CalculateOrganizationDiskspaceAsync(itemId, null); } - + /// - public void CalculateOrganizationDiskspaceAsync(int itemId, object userState) { - if ((this.CalculateOrganizationDiskspaceOperationCompleted == null)) { + public void CalculateOrganizationDiskspaceAsync(int itemId, object userState) + { + if ((this.CalculateOrganizationDiskspaceOperationCompleted == null)) + { this.CalculateOrganizationDiskspaceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCalculateOrganizationDiskspaceOperationCompleted); } this.InvokeAsync("CalculateOrganizationDiskspace", new object[] { itemId}, this.CalculateOrganizationDiskspaceOperationCompleted, userState); } - - private void OnCalculateOrganizationDiskspaceOperationCompleted(object arg) { - if ((this.CalculateOrganizationDiskspaceCompleted != null)) { + + private void OnCalculateOrganizationDiskspaceOperationCompleted(object arg) + { + if ((this.CalculateOrganizationDiskspaceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CalculateOrganizationDiskspaceCompleted(this, new CalculateOrganizationDiskspaceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetActiveSyncPolicy", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeActiveSyncPolicy GetActiveSyncPolicy(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetActiveSyncPolicy", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeActiveSyncPolicy GetActiveSyncPolicy(int itemId) + { object[] results = this.Invoke("GetActiveSyncPolicy", new object[] { itemId}); return ((ExchangeActiveSyncPolicy)(results[0])); } - + /// - public System.IAsyncResult BeginGetActiveSyncPolicy(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetActiveSyncPolicy(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetActiveSyncPolicy", new object[] { itemId}, callback, asyncState); } - + /// - public ExchangeActiveSyncPolicy EndGetActiveSyncPolicy(System.IAsyncResult asyncResult) { + public ExchangeActiveSyncPolicy EndGetActiveSyncPolicy(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeActiveSyncPolicy)(results[0])); } - + /// - public void GetActiveSyncPolicyAsync(int itemId) { + public void GetActiveSyncPolicyAsync(int itemId) + { this.GetActiveSyncPolicyAsync(itemId, null); } - + /// - public void GetActiveSyncPolicyAsync(int itemId, object userState) { - if ((this.GetActiveSyncPolicyOperationCompleted == null)) { + public void GetActiveSyncPolicyAsync(int itemId, object userState) + { + if ((this.GetActiveSyncPolicyOperationCompleted == null)) + { this.GetActiveSyncPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetActiveSyncPolicyOperationCompleted); } this.InvokeAsync("GetActiveSyncPolicy", new object[] { itemId}, this.GetActiveSyncPolicyOperationCompleted, userState); } - - private void OnGetActiveSyncPolicyOperationCompleted(object arg) { - if ((this.GetActiveSyncPolicyCompleted != null)) { + + private void OnGetActiveSyncPolicyOperationCompleted(object arg) + { + if ((this.GetActiveSyncPolicyCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetActiveSyncPolicyCompleted(this, new GetActiveSyncPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetActiveSyncPolicy", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetActiveSyncPolicy", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetActiveSyncPolicy( - int itemId, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInteval) { + int itemId, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInteval) + { object[] results = this.Invoke("SetActiveSyncPolicy", new object[] { itemId, allowNonProvisionableDevices, @@ -1113,28 +2649,29 @@ namespace WebsitePanel.EnterpriseServer { refreshInteval}); return ((int)(results[0])); } - + /// public System.IAsyncResult BeginSetActiveSyncPolicy( - int itemId, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInteval, - System.AsyncCallback callback, - object asyncState) { + int itemId, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInteval, + System.AsyncCallback callback, + object asyncState) + { return this.BeginInvoke("SetActiveSyncPolicy", new object[] { itemId, allowNonProvisionableDevices, @@ -1154,56 +2691,60 @@ namespace WebsitePanel.EnterpriseServer { passwordHistory, refreshInteval}, callback, asyncState); } - + /// - public int EndSetActiveSyncPolicy(System.IAsyncResult asyncResult) { + public int EndSetActiveSyncPolicy(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// public void SetActiveSyncPolicyAsync( - int itemId, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInteval) { + int itemId, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInteval) + { this.SetActiveSyncPolicyAsync(itemId, allowNonProvisionableDevices, attachmentsEnabled, maxAttachmentSizeKB, uncAccessEnabled, wssAccessEnabled, devicePasswordEnabled, alphanumericPasswordRequired, passwordRecoveryEnabled, deviceEncryptionEnabled, allowSimplePassword, maxPasswordFailedAttempts, minPasswordLength, inactivityLockMin, passwordExpirationDays, passwordHistory, refreshInteval, null); } - + /// public void SetActiveSyncPolicyAsync( - int itemId, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInteval, - object userState) { - if ((this.SetActiveSyncPolicyOperationCompleted == null)) { + int itemId, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInteval, + object userState) + { + if ((this.SetActiveSyncPolicyOperationCompleted == null)) + { this.SetActiveSyncPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetActiveSyncPolicyOperationCompleted); } this.InvokeAsync("SetActiveSyncPolicy", new object[] { @@ -1225,105 +2766,124 @@ namespace WebsitePanel.EnterpriseServer { passwordHistory, refreshInteval}, this.SetActiveSyncPolicyOperationCompleted, userState); } - - private void OnSetActiveSyncPolicyOperationCompleted(object arg) { - if ((this.SetActiveSyncPolicyCompleted != null)) { + + private void OnSetActiveSyncPolicyOperationCompleted(object arg) + { + if ((this.SetActiveSyncPolicyCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetActiveSyncPolicyCompleted(this, new SetActiveSyncPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddAuthoritativeDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddAuthoritativeDomain(int itemId, int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddAuthoritativeDomain", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddAuthoritativeDomain(int itemId, int domainId) + { object[] results = this.Invoke("AddAuthoritativeDomain", new object[] { itemId, domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddAuthoritativeDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddAuthoritativeDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddAuthoritativeDomain", new object[] { itemId, domainId}, callback, asyncState); } - + /// - public int EndAddAuthoritativeDomain(System.IAsyncResult asyncResult) { + public int EndAddAuthoritativeDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddAuthoritativeDomainAsync(int itemId, int domainId) { + public void AddAuthoritativeDomainAsync(int itemId, int domainId) + { this.AddAuthoritativeDomainAsync(itemId, domainId, null); } - + /// - public void AddAuthoritativeDomainAsync(int itemId, int domainId, object userState) { - if ((this.AddAuthoritativeDomainOperationCompleted == null)) { + public void AddAuthoritativeDomainAsync(int itemId, int domainId, object userState) + { + if ((this.AddAuthoritativeDomainOperationCompleted == null)) + { this.AddAuthoritativeDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddAuthoritativeDomainOperationCompleted); } this.InvokeAsync("AddAuthoritativeDomain", new object[] { itemId, domainId}, this.AddAuthoritativeDomainOperationCompleted, userState); } - - private void OnAddAuthoritativeDomainOperationCompleted(object arg) { - if ((this.AddAuthoritativeDomainCompleted != null)) { + + private void OnAddAuthoritativeDomainOperationCompleted(object arg) + { + if ((this.AddAuthoritativeDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddAuthoritativeDomainCompleted(this, new AddAuthoritativeDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteAuthoritativeDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteAuthoritativeDomain(int itemId, int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteAuthoritativeDomain", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteAuthoritativeDomain(int itemId, int domainId) + { object[] results = this.Invoke("DeleteAuthoritativeDomain", new object[] { itemId, domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteAuthoritativeDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteAuthoritativeDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteAuthoritativeDomain", new object[] { itemId, domainId}, callback, asyncState); } - + /// - public int EndDeleteAuthoritativeDomain(System.IAsyncResult asyncResult) { + public int EndDeleteAuthoritativeDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteAuthoritativeDomainAsync(int itemId, int domainId) { + public void DeleteAuthoritativeDomainAsync(int itemId, int domainId) + { this.DeleteAuthoritativeDomainAsync(itemId, domainId, null); } - + /// - public void DeleteAuthoritativeDomainAsync(int itemId, int domainId, object userState) { - if ((this.DeleteAuthoritativeDomainOperationCompleted == null)) { + public void DeleteAuthoritativeDomainAsync(int itemId, int domainId, object userState) + { + if ((this.DeleteAuthoritativeDomainOperationCompleted == null)) + { this.DeleteAuthoritativeDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteAuthoritativeDomainOperationCompleted); } this.InvokeAsync("DeleteAuthoritativeDomain", new object[] { itemId, domainId}, this.DeleteAuthoritativeDomainOperationCompleted, userState); } - - private void OnDeleteAuthoritativeDomainOperationCompleted(object arg) { - if ((this.DeleteAuthoritativeDomainCompleted != null)) { + + private void OnDeleteAuthoritativeDomainOperationCompleted(object arg) + { + if ((this.DeleteAuthoritativeDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteAuthoritativeDomainCompleted(this, new DeleteAuthoritativeDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccountsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccountsPaged", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { object[] results = this.Invoke("GetAccountsPaged", new object[] { itemId, accountTypes, @@ -1334,9 +2894,10 @@ namespace WebsitePanel.EnterpriseServer { maximumRows}); return ((ExchangeAccountsPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetAccountsPaged", new object[] { itemId, accountTypes, @@ -1346,21 +2907,25 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, callback, asyncState); } - + /// - public ExchangeAccountsPaged EndGetAccountsPaged(System.IAsyncResult asyncResult) { + public ExchangeAccountsPaged EndGetAccountsPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccountsPaged)(results[0])); } - + /// - public void GetAccountsPagedAsync(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public void GetAccountsPagedAsync(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { this.GetAccountsPagedAsync(itemId, accountTypes, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetAccountsPagedAsync(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { - if ((this.GetAccountsPagedOperationCompleted == null)) { + public void GetAccountsPagedAsync(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetAccountsPagedOperationCompleted == null)) + { this.GetAccountsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccountsPagedOperationCompleted); } this.InvokeAsync("GetAccountsPaged", new object[] { @@ -1372,105 +2937,124 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, this.GetAccountsPagedOperationCompleted, userState); } - - private void OnGetAccountsPagedOperationCompleted(object arg) { - if ((this.GetAccountsPagedCompleted != null)) { + + private void OnGetAccountsPagedOperationCompleted(object arg) + { + if ((this.GetAccountsPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAccountsPagedCompleted(this, new GetAccountsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccounts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount[] GetAccounts(int itemId, ExchangeAccountType accountType) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccounts", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] GetAccounts(int itemId, ExchangeAccountType accountType) + { object[] results = this.Invoke("GetAccounts", new object[] { itemId, accountType}); return ((ExchangeAccount[])(results[0])); } - + /// - public System.IAsyncResult BeginGetAccounts(int itemId, ExchangeAccountType accountType, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetAccounts(int itemId, ExchangeAccountType accountType, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetAccounts", new object[] { itemId, accountType}, callback, asyncState); } - + /// - public ExchangeAccount[] EndGetAccounts(System.IAsyncResult asyncResult) { + public ExchangeAccount[] EndGetAccounts(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount[])(results[0])); } - + /// - public void GetAccountsAsync(int itemId, ExchangeAccountType accountType) { + public void GetAccountsAsync(int itemId, ExchangeAccountType accountType) + { this.GetAccountsAsync(itemId, accountType, null); } - + /// - public void GetAccountsAsync(int itemId, ExchangeAccountType accountType, object userState) { - if ((this.GetAccountsOperationCompleted == null)) { + public void GetAccountsAsync(int itemId, ExchangeAccountType accountType, object userState) + { + if ((this.GetAccountsOperationCompleted == null)) + { this.GetAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccountsOperationCompleted); } this.InvokeAsync("GetAccounts", new object[] { itemId, accountType}, this.GetAccountsOperationCompleted, userState); } - - private void OnGetAccountsOperationCompleted(object arg) { - if ((this.GetAccountsCompleted != null)) { + + private void OnGetAccountsOperationCompleted(object arg) + { + if ((this.GetAccountsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAccountsCompleted(this, new GetAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeAccountByMailboxPlanId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount[] GetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeAccountByMailboxPlanId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] GetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId) + { object[] results = this.Invoke("GetExchangeAccountByMailboxPlanId", new object[] { itemId, mailboxPlanId}); return ((ExchangeAccount[])(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetExchangeAccountByMailboxPlanId", new object[] { itemId, mailboxPlanId}, callback, asyncState); } - + /// - public ExchangeAccount[] EndGetExchangeAccountByMailboxPlanId(System.IAsyncResult asyncResult) { + public ExchangeAccount[] EndGetExchangeAccountByMailboxPlanId(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount[])(results[0])); } - + /// - public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId) { + public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId) + { this.GetExchangeAccountByMailboxPlanIdAsync(itemId, mailboxPlanId, null); } - + /// - public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId, object userState) { - if ((this.GetExchangeAccountByMailboxPlanIdOperationCompleted == null)) { + public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId, object userState) + { + if ((this.GetExchangeAccountByMailboxPlanIdOperationCompleted == null)) + { this.GetExchangeAccountByMailboxPlanIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeAccountByMailboxPlanIdOperationCompleted); } this.InvokeAsync("GetExchangeAccountByMailboxPlanId", new object[] { itemId, mailboxPlanId}, this.GetExchangeAccountByMailboxPlanIdOperationCompleted, userState); } - - private void OnGetExchangeAccountByMailboxPlanIdOperationCompleted(object arg) { - if ((this.GetExchangeAccountByMailboxPlanIdCompleted != null)) { + + private void OnGetExchangeAccountByMailboxPlanIdOperationCompleted(object arg) + { + if ((this.GetExchangeAccountByMailboxPlanIdCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeAccountByMailboxPlanIdCompleted(this, new GetExchangeAccountByMailboxPlanIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccounts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount[] SearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccounts", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] SearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn) + { object[] results = this.Invoke("SearchAccounts", new object[] { itemId, includeMailboxes, @@ -1483,9 +3067,10 @@ namespace WebsitePanel.EnterpriseServer { sortColumn}); return ((ExchangeAccount[])(results[0])); } - + /// - public System.IAsyncResult BeginSearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SearchAccounts", new object[] { itemId, includeMailboxes, @@ -1497,21 +3082,25 @@ namespace WebsitePanel.EnterpriseServer { filterValue, sortColumn}, callback, asyncState); } - + /// - public ExchangeAccount[] EndSearchAccounts(System.IAsyncResult asyncResult) { + public ExchangeAccount[] EndSearchAccounts(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount[])(results[0])); } - + /// - public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn) { + public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn) + { this.SearchAccountsAsync(itemId, includeMailboxes, includeContacts, includeDistributionLists, includeRooms, includeEquipment, filterColumn, filterValue, sortColumn, null); } - + /// - public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn, object userState) { - if ((this.SearchAccountsOperationCompleted == null)) { + public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn, object userState) + { + if ((this.SearchAccountsOperationCompleted == null)) + { this.SearchAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchAccountsOperationCompleted); } this.InvokeAsync("SearchAccounts", new object[] { @@ -1525,134 +3114,158 @@ namespace WebsitePanel.EnterpriseServer { filterValue, sortColumn}, this.SearchAccountsOperationCompleted, userState); } - - private void OnSearchAccountsOperationCompleted(object arg) { - if ((this.SearchAccountsCompleted != null)) { + + private void OnSearchAccountsOperationCompleted(object arg) + { + if ((this.SearchAccountsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SearchAccountsCompleted(this, new SearchAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccount", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount GetAccount(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccount", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount GetAccount(int itemId, int accountId) + { object[] results = this.Invoke("GetAccount", new object[] { itemId, accountId}); return ((ExchangeAccount)(results[0])); } - + /// - public System.IAsyncResult BeginGetAccount(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetAccount(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetAccount", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeAccount EndGetAccount(System.IAsyncResult asyncResult) { + public ExchangeAccount EndGetAccount(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount)(results[0])); } - + /// - public void GetAccountAsync(int itemId, int accountId) { + public void GetAccountAsync(int itemId, int accountId) + { this.GetAccountAsync(itemId, accountId, null); } - + /// - public void GetAccountAsync(int itemId, int accountId, object userState) { - if ((this.GetAccountOperationCompleted == null)) { + public void GetAccountAsync(int itemId, int accountId, object userState) + { + if ((this.GetAccountOperationCompleted == null)) + { this.GetAccountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccountOperationCompleted); } this.InvokeAsync("GetAccount", new object[] { itemId, accountId}, this.GetAccountOperationCompleted, userState); } - - private void OnGetAccountOperationCompleted(object arg) { - if ((this.GetAccountCompleted != null)) { + + private void OnGetAccountOperationCompleted(object arg) + { + if ((this.GetAccountCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAccountCompleted(this, new GetAccountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccount", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount SearchAccount(ExchangeAccountType accountType, string primaryEmailAddress) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccount", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount SearchAccount(ExchangeAccountType accountType, string primaryEmailAddress) + { object[] results = this.Invoke("SearchAccount", new object[] { accountType, primaryEmailAddress}); return ((ExchangeAccount)(results[0])); } - + /// - public System.IAsyncResult BeginSearchAccount(ExchangeAccountType accountType, string primaryEmailAddress, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSearchAccount(ExchangeAccountType accountType, string primaryEmailAddress, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SearchAccount", new object[] { accountType, primaryEmailAddress}, callback, asyncState); } - + /// - public ExchangeAccount EndSearchAccount(System.IAsyncResult asyncResult) { + public ExchangeAccount EndSearchAccount(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount)(results[0])); } - + /// - public void SearchAccountAsync(ExchangeAccountType accountType, string primaryEmailAddress) { + public void SearchAccountAsync(ExchangeAccountType accountType, string primaryEmailAddress) + { this.SearchAccountAsync(accountType, primaryEmailAddress, null); } - + /// - public void SearchAccountAsync(ExchangeAccountType accountType, string primaryEmailAddress, object userState) { - if ((this.SearchAccountOperationCompleted == null)) { + public void SearchAccountAsync(ExchangeAccountType accountType, string primaryEmailAddress, object userState) + { + if ((this.SearchAccountOperationCompleted == null)) + { this.SearchAccountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchAccountOperationCompleted); } this.InvokeAsync("SearchAccount", new object[] { accountType, primaryEmailAddress}, this.SearchAccountOperationCompleted, userState); } - - private void OnSearchAccountOperationCompleted(object arg) { - if ((this.SearchAccountCompleted != null)) { + + private void OnSearchAccountOperationCompleted(object arg) + { + if ((this.SearchAccountCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SearchAccountCompleted(this, new SearchAccountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckAccountCredentials", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool CheckAccountCredentials(int itemId, string email, string password) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckAccountCredentials", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CheckAccountCredentials(int itemId, string email, string password) + { object[] results = this.Invoke("CheckAccountCredentials", new object[] { itemId, email, password}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckAccountCredentials(int itemId, string email, string password, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCheckAccountCredentials(int itemId, string email, string password, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CheckAccountCredentials", new object[] { itemId, email, password}, callback, asyncState); } - + /// - public bool EndCheckAccountCredentials(System.IAsyncResult asyncResult) { + public bool EndCheckAccountCredentials(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckAccountCredentialsAsync(int itemId, string email, string password) { + public void CheckAccountCredentialsAsync(int itemId, string email, string password) + { this.CheckAccountCredentialsAsync(itemId, email, password, null); } - + /// - public void CheckAccountCredentialsAsync(int itemId, string email, string password, object userState) { - if ((this.CheckAccountCredentialsOperationCompleted == null)) { + public void CheckAccountCredentialsAsync(int itemId, string email, string password, object userState) + { + if ((this.CheckAccountCredentialsOperationCompleted == null)) + { this.CheckAccountCredentialsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckAccountCredentialsOperationCompleted); } this.InvokeAsync("CheckAccountCredentials", new object[] { @@ -1660,17 +3273,20 @@ namespace WebsitePanel.EnterpriseServer { email, password}, this.CheckAccountCredentialsOperationCompleted, userState); } - - private void OnCheckAccountCredentialsOperationCompleted(object arg) { - if ((this.CheckAccountCredentialsCompleted != null)) { + + private void OnCheckAccountCredentialsOperationCompleted(object arg) + { + if ((this.CheckAccountCredentialsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckAccountCredentialsCompleted(this, new CheckAccountCredentialsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateMailbox", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateMailbox", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) + { object[] results = this.Invoke("CreateMailbox", new object[] { itemId, accountId, @@ -1686,9 +3302,10 @@ namespace WebsitePanel.EnterpriseServer { subscriberNumber}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateMailbox", new object[] { itemId, accountId, @@ -1703,21 +3320,25 @@ namespace WebsitePanel.EnterpriseServer { mailboxPlanId, subscriberNumber}, callback, asyncState); } - + /// - public int EndCreateMailbox(System.IAsyncResult asyncResult) { + public int EndCreateMailbox(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) { + public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) + { this.CreateMailboxAsync(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, subscriberNumber, null); } - + /// - public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber, object userState) { - if ((this.CreateMailboxOperationCompleted == null)) { + public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber, object userState) + { + if ((this.CreateMailboxOperationCompleted == null)) + { this.CreateMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateMailboxOperationCompleted); } this.InvokeAsync("CreateMailbox", new object[] { @@ -1734,193 +3355,228 @@ namespace WebsitePanel.EnterpriseServer { mailboxPlanId, subscriberNumber}, this.CreateMailboxOperationCompleted, userState); } - - private void OnCreateMailboxOperationCompleted(object arg) { - if ((this.CreateMailboxCompleted != null)) { + + private void OnCreateMailboxOperationCompleted(object arg) + { + if ((this.CreateMailboxCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateMailboxCompleted(this, new CreateMailboxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMailbox", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteMailbox(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMailbox", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteMailbox(int itemId, int accountId) + { object[] results = this.Invoke("DeleteMailbox", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteMailbox(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteMailbox(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteMailbox", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDeleteMailbox(System.IAsyncResult asyncResult) { + public int EndDeleteMailbox(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteMailboxAsync(int itemId, int accountId) { + public void DeleteMailboxAsync(int itemId, int accountId) + { this.DeleteMailboxAsync(itemId, accountId, null); } - + /// - public void DeleteMailboxAsync(int itemId, int accountId, object userState) { - if ((this.DeleteMailboxOperationCompleted == null)) { + public void DeleteMailboxAsync(int itemId, int accountId, object userState) + { + if ((this.DeleteMailboxOperationCompleted == null)) + { this.DeleteMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteMailboxOperationCompleted); } this.InvokeAsync("DeleteMailbox", new object[] { itemId, accountId}, this.DeleteMailboxOperationCompleted, userState); } - - private void OnDeleteMailboxOperationCompleted(object arg) { - if ((this.DeleteMailboxCompleted != null)) { + + private void OnDeleteMailboxOperationCompleted(object arg) + { + if ((this.DeleteMailboxCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteMailboxCompleted(this, new DeleteMailboxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableMailbox", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DisableMailbox(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableMailbox", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DisableMailbox(int itemId, int accountId) + { object[] results = this.Invoke("DisableMailbox", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDisableMailbox(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDisableMailbox(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DisableMailbox", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDisableMailbox(System.IAsyncResult asyncResult) { + public int EndDisableMailbox(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DisableMailboxAsync(int itemId, int accountId) { + public void DisableMailboxAsync(int itemId, int accountId) + { this.DisableMailboxAsync(itemId, accountId, null); } - + /// - public void DisableMailboxAsync(int itemId, int accountId, object userState) { - if ((this.DisableMailboxOperationCompleted == null)) { + public void DisableMailboxAsync(int itemId, int accountId, object userState) + { + if ((this.DisableMailboxOperationCompleted == null)) + { this.DisableMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableMailboxOperationCompleted); } this.InvokeAsync("DisableMailbox", new object[] { itemId, accountId}, this.DisableMailboxOperationCompleted, userState); } - - private void OnDisableMailboxOperationCompleted(object arg) { - if ((this.DisableMailboxCompleted != null)) { + + private void OnDisableMailboxOperationCompleted(object arg) + { + if ((this.DisableMailboxCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DisableMailboxCompleted(this, new DisableMailboxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxAdvancedSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailbox GetMailboxAdvancedSettings(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxAdvancedSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailbox GetMailboxAdvancedSettings(int itemId, int accountId) + { object[] results = this.Invoke("GetMailboxAdvancedSettings", new object[] { itemId, accountId}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxAdvancedSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxAdvancedSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxAdvancedSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxAdvancedSettings(System.IAsyncResult asyncResult) { + public ExchangeMailbox EndGetMailboxAdvancedSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId) { + public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId) + { this.GetMailboxAdvancedSettingsAsync(itemId, accountId, null); } - + /// - public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetMailboxAdvancedSettingsOperationCompleted == null)) { + public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetMailboxAdvancedSettingsOperationCompleted == null)) + { this.GetMailboxAdvancedSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxAdvancedSettingsOperationCompleted); } this.InvokeAsync("GetMailboxAdvancedSettings", new object[] { itemId, accountId}, this.GetMailboxAdvancedSettingsOperationCompleted, userState); } - - private void OnGetMailboxAdvancedSettingsOperationCompleted(object arg) { - if ((this.GetMailboxAdvancedSettingsCompleted != null)) { + + private void OnGetMailboxAdvancedSettingsOperationCompleted(object arg) + { + if ((this.GetMailboxAdvancedSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxAdvancedSettingsCompleted(this, new GetMailboxAdvancedSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailbox GetMailboxGeneralSettings(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailbox GetMailboxGeneralSettings(int itemId, int accountId) + { object[] results = this.Invoke("GetMailboxGeneralSettings", new object[] { itemId, accountId}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxGeneralSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxGeneralSettings(System.IAsyncResult asyncResult) { + public ExchangeMailbox EndGetMailboxGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxGeneralSettingsAsync(int itemId, int accountId) { + public void GetMailboxGeneralSettingsAsync(int itemId, int accountId) + { this.GetMailboxGeneralSettingsAsync(itemId, accountId, null); } - + /// - public void GetMailboxGeneralSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetMailboxGeneralSettingsOperationCompleted == null)) { + public void GetMailboxGeneralSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetMailboxGeneralSettingsOperationCompleted == null)) + { this.GetMailboxGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxGeneralSettingsOperationCompleted); } this.InvokeAsync("GetMailboxGeneralSettings", new object[] { itemId, accountId}, this.GetMailboxGeneralSettingsOperationCompleted, userState); } - - private void OnGetMailboxGeneralSettingsOperationCompleted(object arg) { - if ((this.GetMailboxGeneralSettingsCompleted != null)) { + + private void OnGetMailboxGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetMailboxGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxGeneralSettingsCompleted(this, new GetMailboxGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled) + { object[] results = this.Invoke("SetMailboxGeneralSettings", new object[] { itemId, accountId, @@ -1928,30 +3584,35 @@ namespace WebsitePanel.EnterpriseServer { disabled}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxGeneralSettings", new object[] { itemId, accountId, hideAddressBook, disabled}, callback, asyncState); } - + /// - public int EndSetMailboxGeneralSettings(System.IAsyncResult asyncResult) { + public int EndSetMailboxGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled) { + public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled) + { this.SetMailboxGeneralSettingsAsync(itemId, accountId, hideAddressBook, disabled, null); } - + /// - public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled, object userState) { - if ((this.SetMailboxGeneralSettingsOperationCompleted == null)) { + public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled, object userState) + { + if ((this.SetMailboxGeneralSettingsOperationCompleted == null)) + { this.SetMailboxGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxGeneralSettingsOperationCompleted); } this.InvokeAsync("SetMailboxGeneralSettings", new object[] { @@ -1960,90 +3621,106 @@ namespace WebsitePanel.EnterpriseServer { hideAddressBook, disabled}, this.SetMailboxGeneralSettingsOperationCompleted, userState); } - - private void OnSetMailboxGeneralSettingsOperationCompleted(object arg) { - if ((this.SetMailboxGeneralSettingsCompleted != null)) { + + private void OnSetMailboxGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetMailboxGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxGeneralSettingsCompleted(this, new SetMailboxGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId) + { object[] results = this.Invoke("GetMailboxEmailAddresses", new object[] { itemId, accountId}); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxEmailAddresses", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeEmailAddress[] EndGetMailboxEmailAddresses(System.IAsyncResult asyncResult) { + public ExchangeEmailAddress[] EndGetMailboxEmailAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public void GetMailboxEmailAddressesAsync(int itemId, int accountId) { + public void GetMailboxEmailAddressesAsync(int itemId, int accountId) + { this.GetMailboxEmailAddressesAsync(itemId, accountId, null); } - + /// - public void GetMailboxEmailAddressesAsync(int itemId, int accountId, object userState) { - if ((this.GetMailboxEmailAddressesOperationCompleted == null)) { + public void GetMailboxEmailAddressesAsync(int itemId, int accountId, object userState) + { + if ((this.GetMailboxEmailAddressesOperationCompleted == null)) + { this.GetMailboxEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxEmailAddressesOperationCompleted); } this.InvokeAsync("GetMailboxEmailAddresses", new object[] { itemId, accountId}, this.GetMailboxEmailAddressesOperationCompleted, userState); } - - private void OnGetMailboxEmailAddressesOperationCompleted(object arg) { - if ((this.GetMailboxEmailAddressesCompleted != null)) { + + private void OnGetMailboxEmailAddressesOperationCompleted(object arg) + { + if ((this.GetMailboxEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxEmailAddressesCompleted(this, new GetMailboxEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddMailboxEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddMailboxEmailAddress(int itemId, int accountId, string emailAddress) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddMailboxEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddMailboxEmailAddress(int itemId, int accountId, string emailAddress) + { object[] results = this.Invoke("AddMailboxEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddMailboxEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddMailboxEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddMailboxEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndAddMailboxEmailAddress(System.IAsyncResult asyncResult) { + public int EndAddMailboxEmailAddress(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddMailboxEmailAddressAsync(int itemId, int accountId, string emailAddress) { + public void AddMailboxEmailAddressAsync(int itemId, int accountId, string emailAddress) + { this.AddMailboxEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void AddMailboxEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { - if ((this.AddMailboxEmailAddressOperationCompleted == null)) { + public void AddMailboxEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) + { + if ((this.AddMailboxEmailAddressOperationCompleted == null)) + { this.AddMailboxEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddMailboxEmailAddressOperationCompleted); } this.InvokeAsync("AddMailboxEmailAddress", new object[] { @@ -2051,46 +3728,54 @@ namespace WebsitePanel.EnterpriseServer { accountId, emailAddress}, this.AddMailboxEmailAddressOperationCompleted, userState); } - - private void OnAddMailboxEmailAddressOperationCompleted(object arg) { - if ((this.AddMailboxEmailAddressCompleted != null)) { + + private void OnAddMailboxEmailAddressOperationCompleted(object arg) + { + if ((this.AddMailboxEmailAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddMailboxEmailAddressCompleted(this, new AddMailboxEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxPrimaryEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxPrimaryEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress) + { object[] results = this.Invoke("SetMailboxPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndSetMailboxPrimaryEmailAddress(System.IAsyncResult asyncResult) { + public int EndSetMailboxPrimaryEmailAddress(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) { + public void SetMailboxPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) + { this.SetMailboxPrimaryEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void SetMailboxPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { - if ((this.SetMailboxPrimaryEmailAddressOperationCompleted == null)) { + public void SetMailboxPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) + { + if ((this.SetMailboxPrimaryEmailAddressOperationCompleted == null)) + { this.SetMailboxPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxPrimaryEmailAddressOperationCompleted); } this.InvokeAsync("SetMailboxPrimaryEmailAddress", new object[] { @@ -2098,46 +3783,54 @@ namespace WebsitePanel.EnterpriseServer { accountId, emailAddress}, this.SetMailboxPrimaryEmailAddressOperationCompleted, userState); } - - private void OnSetMailboxPrimaryEmailAddressOperationCompleted(object arg) { - if ((this.SetMailboxPrimaryEmailAddressCompleted != null)) { + + private void OnSetMailboxPrimaryEmailAddressOperationCompleted(object arg) + { + if ((this.SetMailboxPrimaryEmailAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxPrimaryEmailAddressCompleted(this, new SetMailboxPrimaryEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMailboxEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMailboxEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses) + { object[] results = this.Invoke("DeleteMailboxEmailAddresses", new object[] { itemId, accountId, emailAddresses}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteMailboxEmailAddresses", new object[] { itemId, accountId, emailAddresses}, callback, asyncState); } - + /// - public int EndDeleteMailboxEmailAddresses(System.IAsyncResult asyncResult) { + public int EndDeleteMailboxEmailAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteMailboxEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) { + public void DeleteMailboxEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) + { this.DeleteMailboxEmailAddressesAsync(itemId, accountId, emailAddresses, null); } - + /// - public void DeleteMailboxEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) { - if ((this.DeleteMailboxEmailAddressesOperationCompleted == null)) { + public void DeleteMailboxEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) + { + if ((this.DeleteMailboxEmailAddressesOperationCompleted == null)) + { this.DeleteMailboxEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteMailboxEmailAddressesOperationCompleted); } this.InvokeAsync("DeleteMailboxEmailAddresses", new object[] { @@ -2145,61 +3838,72 @@ namespace WebsitePanel.EnterpriseServer { accountId, emailAddresses}, this.DeleteMailboxEmailAddressesOperationCompleted, userState); } - - private void OnDeleteMailboxEmailAddressesOperationCompleted(object arg) { - if ((this.DeleteMailboxEmailAddressesCompleted != null)) { + + private void OnDeleteMailboxEmailAddressesOperationCompleted(object arg) + { + if ((this.DeleteMailboxEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteMailboxEmailAddressesCompleted(this, new DeleteMailboxEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailbox GetMailboxMailFlowSettings(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailbox GetMailboxMailFlowSettings(int itemId, int accountId) + { object[] results = this.Invoke("GetMailboxMailFlowSettings", new object[] { itemId, accountId}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxMailFlowSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxMailFlowSettings(System.IAsyncResult asyncResult) { + public ExchangeMailbox EndGetMailboxMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxMailFlowSettingsAsync(int itemId, int accountId) { + public void GetMailboxMailFlowSettingsAsync(int itemId, int accountId) + { this.GetMailboxMailFlowSettingsAsync(itemId, accountId, null); } - + /// - public void GetMailboxMailFlowSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetMailboxMailFlowSettingsOperationCompleted == null)) { + public void GetMailboxMailFlowSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetMailboxMailFlowSettingsOperationCompleted == null)) + { this.GetMailboxMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetMailboxMailFlowSettings", new object[] { itemId, accountId}, this.GetMailboxMailFlowSettingsOperationCompleted, userState); } - - private void OnGetMailboxMailFlowSettingsOperationCompleted(object arg) { - if ((this.GetMailboxMailFlowSettingsCompleted != null)) { + + private void OnGetMailboxMailFlowSettingsOperationCompleted(object arg) + { + if ((this.GetMailboxMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxMailFlowSettingsCompleted(this, new GetMailboxMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { object[] results = this.Invoke("SetMailboxMailFlowSettings", new object[] { itemId, accountId, @@ -2212,9 +3916,10 @@ namespace WebsitePanel.EnterpriseServer { requireSenderAuthentication}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxMailFlowSettings", new object[] { itemId, accountId, @@ -2226,21 +3931,25 @@ namespace WebsitePanel.EnterpriseServer { rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public int EndSetMailboxMailFlowSettings(System.IAsyncResult asyncResult) { + public int EndSetMailboxMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { this.SetMailboxMailFlowSettingsAsync(itemId, accountId, enableForwarding, forwardingAccountName, forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { - if ((this.SetMailboxMailFlowSettingsOperationCompleted == null)) { + public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) + { + if ((this.SetMailboxMailFlowSettingsOperationCompleted == null)) + { this.SetMailboxMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetMailboxMailFlowSettings", new object[] { @@ -2254,46 +3963,54 @@ namespace WebsitePanel.EnterpriseServer { rejectAccounts, requireSenderAuthentication}, this.SetMailboxMailFlowSettingsOperationCompleted, userState); } - - private void OnSetMailboxMailFlowSettingsOperationCompleted(object arg) { - if ((this.SetMailboxMailFlowSettingsCompleted != null)) { + + private void OnSetMailboxMailFlowSettingsOperationCompleted(object arg) + { + if ((this.SetMailboxMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxMailFlowSettingsCompleted(this, new SetMailboxMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) + { object[] results = this.Invoke("SetExchangeMailboxPlan", new object[] { itemId, accountId, mailboxPlanId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetExchangeMailboxPlan", new object[] { itemId, accountId, mailboxPlanId}, callback, asyncState); } - + /// - public int EndSetExchangeMailboxPlan(System.IAsyncResult asyncResult) { + public int EndSetExchangeMailboxPlan(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId) { + public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId) + { this.SetExchangeMailboxPlanAsync(itemId, accountId, mailboxPlanId, null); } - + /// - public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId, object userState) { - if ((this.SetExchangeMailboxPlanOperationCompleted == null)) { + public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId, object userState) + { + if ((this.SetExchangeMailboxPlanOperationCompleted == null)) + { this.SetExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetExchangeMailboxPlanOperationCompleted); } this.InvokeAsync("SetExchangeMailboxPlan", new object[] { @@ -2301,17 +4018,20 @@ namespace WebsitePanel.EnterpriseServer { accountId, mailboxPlanId}, this.SetExchangeMailboxPlanOperationCompleted, userState); } - - private void OnSetExchangeMailboxPlanOperationCompleted(object arg) { - if ((this.SetExchangeMailboxPlanCompleted != null)) { + + private void OnSetExchangeMailboxPlanOperationCompleted(object arg) + { + if ((this.SetExchangeMailboxPlanCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetExchangeMailboxPlanCompleted(this, new SetExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxSetupInstructions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxSetupInstructions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup) + { object[] results = this.Invoke("GetMailboxSetupInstructions", new object[] { itemId, accountId, @@ -2320,9 +4040,10 @@ namespace WebsitePanel.EnterpriseServer { signup}); return ((string)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxSetupInstructions", new object[] { itemId, accountId, @@ -2330,21 +4051,25 @@ namespace WebsitePanel.EnterpriseServer { emailMode, signup}, callback, asyncState); } - + /// - public string EndGetMailboxSetupInstructions(System.IAsyncResult asyncResult) { + public string EndGetMailboxSetupInstructions(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// - public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup) { + public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup) + { this.GetMailboxSetupInstructionsAsync(itemId, accountId, pmm, emailMode, signup, null); } - + /// - public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, object userState) { - if ((this.GetMailboxSetupInstructionsOperationCompleted == null)) { + public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, object userState) + { + if ((this.GetMailboxSetupInstructionsOperationCompleted == null)) + { this.GetMailboxSetupInstructionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxSetupInstructionsOperationCompleted); } this.InvokeAsync("GetMailboxSetupInstructions", new object[] { @@ -2354,17 +4079,20 @@ namespace WebsitePanel.EnterpriseServer { emailMode, signup}, this.GetMailboxSetupInstructionsOperationCompleted, userState); } - - private void OnGetMailboxSetupInstructionsOperationCompleted(object arg) { - if ((this.GetMailboxSetupInstructionsCompleted != null)) { + + private void OnGetMailboxSetupInstructionsOperationCompleted(object arg) + { + if ((this.GetMailboxSetupInstructionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxSetupInstructionsCompleted(this, new GetMailboxSetupInstructionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SendMailboxSetupInstructions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SendMailboxSetupInstructions(int itemId, int accountId, bool signup, string to, string cc) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SendMailboxSetupInstructions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SendMailboxSetupInstructions(int itemId, int accountId, bool signup, string to, string cc) + { object[] results = this.Invoke("SendMailboxSetupInstructions", new object[] { itemId, accountId, @@ -2373,9 +4101,10 @@ namespace WebsitePanel.EnterpriseServer { cc}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSendMailboxSetupInstructions(int itemId, int accountId, bool signup, string to, string cc, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSendMailboxSetupInstructions(int itemId, int accountId, bool signup, string to, string cc, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SendMailboxSetupInstructions", new object[] { itemId, accountId, @@ -2383,21 +4112,25 @@ namespace WebsitePanel.EnterpriseServer { to, cc}, callback, asyncState); } - + /// - public int EndSendMailboxSetupInstructions(System.IAsyncResult asyncResult) { + public int EndSendMailboxSetupInstructions(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SendMailboxSetupInstructionsAsync(int itemId, int accountId, bool signup, string to, string cc) { + public void SendMailboxSetupInstructionsAsync(int itemId, int accountId, bool signup, string to, string cc) + { this.SendMailboxSetupInstructionsAsync(itemId, accountId, signup, to, cc, null); } - + /// - public void SendMailboxSetupInstructionsAsync(int itemId, int accountId, bool signup, string to, string cc, object userState) { - if ((this.SendMailboxSetupInstructionsOperationCompleted == null)) { + public void SendMailboxSetupInstructionsAsync(int itemId, int accountId, bool signup, string to, string cc, object userState) + { + if ((this.SendMailboxSetupInstructionsOperationCompleted == null)) + { this.SendMailboxSetupInstructionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendMailboxSetupInstructionsOperationCompleted); } this.InvokeAsync("SendMailboxSetupInstructions", new object[] { @@ -2407,17 +4140,20 @@ namespace WebsitePanel.EnterpriseServer { to, cc}, this.SendMailboxSetupInstructionsOperationCompleted, userState); } - - private void OnSendMailboxSetupInstructionsOperationCompleted(object arg) { - if ((this.SendMailboxSetupInstructionsCompleted != null)) { + + private void OnSendMailboxSetupInstructionsOperationCompleted(object arg) + { + if ((this.SendMailboxSetupInstructionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SendMailboxSetupInstructionsCompleted(this, new SendMailboxSetupInstructionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxManagerSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxManagerSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) + { object[] results = this.Invoke("SetMailboxManagerSettings", new object[] { itemId, accountId, @@ -2425,30 +4161,35 @@ namespace WebsitePanel.EnterpriseServer { action}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxManagerSettings", new object[] { itemId, accountId, pmmAllowed, action}, callback, asyncState); } - + /// - public int EndSetMailboxManagerSettings(System.IAsyncResult asyncResult) { + public int EndSetMailboxManagerSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxManagerSettingsAsync(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) { + public void SetMailboxManagerSettingsAsync(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) + { this.SetMailboxManagerSettingsAsync(itemId, accountId, pmmAllowed, action, null); } - + /// - public void SetMailboxManagerSettingsAsync(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action, object userState) { - if ((this.SetMailboxManagerSettingsOperationCompleted == null)) { + public void SetMailboxManagerSettingsAsync(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action, object userState) + { + if ((this.SetMailboxManagerSettingsOperationCompleted == null)) + { this.SetMailboxManagerSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxManagerSettingsOperationCompleted); } this.InvokeAsync("SetMailboxManagerSettings", new object[] { @@ -2457,61 +4198,72 @@ namespace WebsitePanel.EnterpriseServer { pmmAllowed, action}, this.SetMailboxManagerSettingsOperationCompleted, userState); } - - private void OnSetMailboxManagerSettingsOperationCompleted(object arg) { - if ((this.SetMailboxManagerSettingsCompleted != null)) { + + private void OnSetMailboxManagerSettingsOperationCompleted(object arg) + { + if ((this.SetMailboxManagerSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxManagerSettingsCompleted(this, new SetMailboxManagerSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxPermissions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailbox GetMailboxPermissions(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxPermissions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailbox GetMailboxPermissions(int itemId, int accountId) + { object[] results = this.Invoke("GetMailboxPermissions", new object[] { itemId, accountId}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxPermissions(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxPermissions(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxPermissions", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxPermissions(System.IAsyncResult asyncResult) { + public ExchangeMailbox EndGetMailboxPermissions(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxPermissionsAsync(int itemId, int accountId) { + public void GetMailboxPermissionsAsync(int itemId, int accountId) + { this.GetMailboxPermissionsAsync(itemId, accountId, null); } - + /// - public void GetMailboxPermissionsAsync(int itemId, int accountId, object userState) { - if ((this.GetMailboxPermissionsOperationCompleted == null)) { + public void GetMailboxPermissionsAsync(int itemId, int accountId, object userState) + { + if ((this.GetMailboxPermissionsOperationCompleted == null)) + { this.GetMailboxPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxPermissionsOperationCompleted); } this.InvokeAsync("GetMailboxPermissions", new object[] { itemId, accountId}, this.GetMailboxPermissionsOperationCompleted, userState); } - - private void OnGetMailboxPermissionsOperationCompleted(object arg) { - if ((this.GetMailboxPermissionsCompleted != null)) { + + private void OnGetMailboxPermissionsOperationCompleted(object arg) + { + if ((this.GetMailboxPermissionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxPermissionsCompleted(this, new GetMailboxPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxPermissions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxPermissions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) + { object[] results = this.Invoke("SetMailboxPermissions", new object[] { itemId, accountId, @@ -2519,30 +4271,35 @@ namespace WebsitePanel.EnterpriseServer { fullAccessAcounts}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxPermissions", new object[] { itemId, accountId, sendAsaccounts, fullAccessAcounts}, callback, asyncState); } - + /// - public int EndSetMailboxPermissions(System.IAsyncResult asyncResult) { + public int EndSetMailboxPermissions(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxPermissionsAsync(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) { + public void SetMailboxPermissionsAsync(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) + { this.SetMailboxPermissionsAsync(itemId, accountId, sendAsaccounts, fullAccessAcounts, null); } - + /// - public void SetMailboxPermissionsAsync(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts, object userState) { - if ((this.SetMailboxPermissionsOperationCompleted == null)) { + public void SetMailboxPermissionsAsync(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts, object userState) + { + if ((this.SetMailboxPermissionsOperationCompleted == null)) + { this.SetMailboxPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxPermissionsOperationCompleted); } this.InvokeAsync("SetMailboxPermissions", new object[] { @@ -2551,46 +4308,54 @@ namespace WebsitePanel.EnterpriseServer { sendAsaccounts, fullAccessAcounts}, this.SetMailboxPermissionsOperationCompleted, userState); } - - private void OnSetMailboxPermissionsOperationCompleted(object arg) { - if ((this.SetMailboxPermissionsCompleted != null)) { + + private void OnSetMailboxPermissionsOperationCompleted(object arg) + { + if ((this.SetMailboxPermissionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxPermissionsCompleted(this, new SetMailboxPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateContact", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateContact(int itemId, string displayName, string email) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateContact", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateContact(int itemId, string displayName, string email) + { object[] results = this.Invoke("CreateContact", new object[] { itemId, displayName, email}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateContact(int itemId, string displayName, string email, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateContact(int itemId, string displayName, string email, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateContact", new object[] { itemId, displayName, email}, callback, asyncState); } - + /// - public int EndCreateContact(System.IAsyncResult asyncResult) { + public int EndCreateContact(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateContactAsync(int itemId, string displayName, string email) { + public void CreateContactAsync(int itemId, string displayName, string email) + { this.CreateContactAsync(itemId, displayName, email, null); } - + /// - public void CreateContactAsync(int itemId, string displayName, string email, object userState) { - if ((this.CreateContactOperationCompleted == null)) { + public void CreateContactAsync(int itemId, string displayName, string email, object userState) + { + if ((this.CreateContactOperationCompleted == null)) + { this.CreateContactOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateContactOperationCompleted); } this.InvokeAsync("CreateContact", new object[] { @@ -2598,131 +4363,150 @@ namespace WebsitePanel.EnterpriseServer { displayName, email}, this.CreateContactOperationCompleted, userState); } - - private void OnCreateContactOperationCompleted(object arg) { - if ((this.CreateContactCompleted != null)) { + + private void OnCreateContactOperationCompleted(object arg) + { + if ((this.CreateContactCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateContactCompleted(this, new CreateContactCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteContact", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteContact(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteContact", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteContact(int itemId, int accountId) + { object[] results = this.Invoke("DeleteContact", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteContact(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteContact(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteContact", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDeleteContact(System.IAsyncResult asyncResult) { + public int EndDeleteContact(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteContactAsync(int itemId, int accountId) { + public void DeleteContactAsync(int itemId, int accountId) + { this.DeleteContactAsync(itemId, accountId, null); } - + /// - public void DeleteContactAsync(int itemId, int accountId, object userState) { - if ((this.DeleteContactOperationCompleted == null)) { + public void DeleteContactAsync(int itemId, int accountId, object userState) + { + if ((this.DeleteContactOperationCompleted == null)) + { this.DeleteContactOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteContactOperationCompleted); } this.InvokeAsync("DeleteContact", new object[] { itemId, accountId}, this.DeleteContactOperationCompleted, userState); } - - private void OnDeleteContactOperationCompleted(object arg) { - if ((this.DeleteContactCompleted != null)) { + + private void OnDeleteContactOperationCompleted(object arg) + { + if ((this.DeleteContactCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteContactCompleted(this, new DeleteContactCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetContactGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeContact GetContactGeneralSettings(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetContactGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeContact GetContactGeneralSettings(int itemId, int accountId) + { object[] results = this.Invoke("GetContactGeneralSettings", new object[] { itemId, accountId}); return ((ExchangeContact)(results[0])); } - + /// - public System.IAsyncResult BeginGetContactGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetContactGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetContactGeneralSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeContact EndGetContactGeneralSettings(System.IAsyncResult asyncResult) { + public ExchangeContact EndGetContactGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeContact)(results[0])); } - + /// - public void GetContactGeneralSettingsAsync(int itemId, int accountId) { + public void GetContactGeneralSettingsAsync(int itemId, int accountId) + { this.GetContactGeneralSettingsAsync(itemId, accountId, null); } - + /// - public void GetContactGeneralSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetContactGeneralSettingsOperationCompleted == null)) { + public void GetContactGeneralSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetContactGeneralSettingsOperationCompleted == null)) + { this.GetContactGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetContactGeneralSettingsOperationCompleted); } this.InvokeAsync("GetContactGeneralSettings", new object[] { itemId, accountId}, this.GetContactGeneralSettingsOperationCompleted, userState); } - - private void OnGetContactGeneralSettingsOperationCompleted(object arg) { - if ((this.GetContactGeneralSettingsCompleted != null)) { + + private void OnGetContactGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetContactGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetContactGeneralSettingsCompleted(this, new GetContactGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetContactGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetContactGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetContactGeneralSettings( - int itemId, - int accountId, - string displayName, - string emailAddress, - bool hideAddressBook, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - int useMapiRichTextFormat) { + int itemId, + int accountId, + string displayName, + string emailAddress, + bool hideAddressBook, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + int useMapiRichTextFormat) + { object[] results = this.Invoke("SetContactGeneralSettings", new object[] { itemId, accountId, @@ -2752,37 +4536,38 @@ namespace WebsitePanel.EnterpriseServer { useMapiRichTextFormat}); return ((int)(results[0])); } - + /// public System.IAsyncResult BeginSetContactGeneralSettings( - int itemId, - int accountId, - string displayName, - string emailAddress, - bool hideAddressBook, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - int useMapiRichTextFormat, - System.AsyncCallback callback, - object asyncState) { + int itemId, + int accountId, + string displayName, + string emailAddress, + bool hideAddressBook, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + int useMapiRichTextFormat, + System.AsyncCallback callback, + object asyncState) + { return this.BeginInvoke("SetContactGeneralSettings", new object[] { itemId, accountId, @@ -2811,74 +4596,78 @@ namespace WebsitePanel.EnterpriseServer { notes, useMapiRichTextFormat}, callback, asyncState); } - + /// - public int EndSetContactGeneralSettings(System.IAsyncResult asyncResult) { + public int EndSetContactGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// public void SetContactGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string emailAddress, - bool hideAddressBook, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - int useMapiRichTextFormat) { + int itemId, + int accountId, + string displayName, + string emailAddress, + bool hideAddressBook, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + int useMapiRichTextFormat) + { this.SetContactGeneralSettingsAsync(itemId, accountId, displayName, emailAddress, hideAddressBook, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, useMapiRichTextFormat, null); } - + /// public void SetContactGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string emailAddress, - bool hideAddressBook, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - int useMapiRichTextFormat, - object userState) { - if ((this.SetContactGeneralSettingsOperationCompleted == null)) { + int itemId, + int accountId, + string displayName, + string emailAddress, + bool hideAddressBook, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + int useMapiRichTextFormat, + object userState) + { + if ((this.SetContactGeneralSettingsOperationCompleted == null)) + { this.SetContactGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetContactGeneralSettingsOperationCompleted); } this.InvokeAsync("SetContactGeneralSettings", new object[] { @@ -2909,61 +4698,72 @@ namespace WebsitePanel.EnterpriseServer { notes, useMapiRichTextFormat}, this.SetContactGeneralSettingsOperationCompleted, userState); } - - private void OnSetContactGeneralSettingsOperationCompleted(object arg) { - if ((this.SetContactGeneralSettingsCompleted != null)) { + + private void OnSetContactGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetContactGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetContactGeneralSettingsCompleted(this, new SetContactGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetContactMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeContact GetContactMailFlowSettings(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetContactMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeContact GetContactMailFlowSettings(int itemId, int accountId) + { object[] results = this.Invoke("GetContactMailFlowSettings", new object[] { itemId, accountId}); return ((ExchangeContact)(results[0])); } - + /// - public System.IAsyncResult BeginGetContactMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetContactMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetContactMailFlowSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeContact EndGetContactMailFlowSettings(System.IAsyncResult asyncResult) { + public ExchangeContact EndGetContactMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeContact)(results[0])); } - + /// - public void GetContactMailFlowSettingsAsync(int itemId, int accountId) { + public void GetContactMailFlowSettingsAsync(int itemId, int accountId) + { this.GetContactMailFlowSettingsAsync(itemId, accountId, null); } - + /// - public void GetContactMailFlowSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetContactMailFlowSettingsOperationCompleted == null)) { + public void GetContactMailFlowSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetContactMailFlowSettingsOperationCompleted == null)) + { this.GetContactMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetContactMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetContactMailFlowSettings", new object[] { itemId, accountId}, this.GetContactMailFlowSettingsOperationCompleted, userState); } - - private void OnGetContactMailFlowSettingsOperationCompleted(object arg) { - if ((this.GetContactMailFlowSettingsCompleted != null)) { + + private void OnGetContactMailFlowSettingsOperationCompleted(object arg) + { + if ((this.GetContactMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetContactMailFlowSettingsCompleted(this, new GetContactMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetContactMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetContactMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetContactMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetContactMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { object[] results = this.Invoke("SetContactMailFlowSettings", new object[] { itemId, accountId, @@ -2972,9 +4772,10 @@ namespace WebsitePanel.EnterpriseServer { requireSenderAuthentication}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetContactMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetContactMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetContactMailFlowSettings", new object[] { itemId, accountId, @@ -2982,21 +4783,25 @@ namespace WebsitePanel.EnterpriseServer { rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public int EndSetContactMailFlowSettings(System.IAsyncResult asyncResult) { + public int EndSetContactMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetContactMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + public void SetContactMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { this.SetContactMailFlowSettingsAsync(itemId, accountId, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetContactMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { - if ((this.SetContactMailFlowSettingsOperationCompleted == null)) { + public void SetContactMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) + { + if ((this.SetContactMailFlowSettingsOperationCompleted == null)) + { this.SetContactMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetContactMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetContactMailFlowSettings", new object[] { @@ -3006,17 +4811,20 @@ namespace WebsitePanel.EnterpriseServer { rejectAccounts, requireSenderAuthentication}, this.SetContactMailFlowSettingsOperationCompleted, userState); } - - private void OnSetContactMailFlowSettingsOperationCompleted(object arg) { - if ((this.SetContactMailFlowSettingsCompleted != null)) { + + private void OnSetContactMailFlowSettingsOperationCompleted(object arg) + { + if ((this.SetContactMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetContactMailFlowSettingsCompleted(this, new SetContactMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateDistributionList", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateDistributionList", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId) + { object[] results = this.Invoke("CreateDistributionList", new object[] { itemId, displayName, @@ -3025,9 +4833,10 @@ namespace WebsitePanel.EnterpriseServer { managerId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateDistributionList(int itemId, string displayName, string name, string domain, int managerId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateDistributionList(int itemId, string displayName, string name, string domain, int managerId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateDistributionList", new object[] { itemId, displayName, @@ -3035,21 +4844,25 @@ namespace WebsitePanel.EnterpriseServer { domain, managerId}, callback, asyncState); } - + /// - public int EndCreateDistributionList(System.IAsyncResult asyncResult) { + public int EndCreateDistributionList(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateDistributionListAsync(int itemId, string displayName, string name, string domain, int managerId) { + public void CreateDistributionListAsync(int itemId, string displayName, string name, string domain, int managerId) + { this.CreateDistributionListAsync(itemId, displayName, name, domain, managerId, null); } - + /// - public void CreateDistributionListAsync(int itemId, string displayName, string name, string domain, int managerId, object userState) { - if ((this.CreateDistributionListOperationCompleted == null)) { + public void CreateDistributionListAsync(int itemId, string displayName, string name, string domain, int managerId, object userState) + { + if ((this.CreateDistributionListOperationCompleted == null)) + { this.CreateDistributionListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateDistributionListOperationCompleted); } this.InvokeAsync("CreateDistributionList", new object[] { @@ -3059,105 +4872,124 @@ namespace WebsitePanel.EnterpriseServer { domain, managerId}, this.CreateDistributionListOperationCompleted, userState); } - - private void OnCreateDistributionListOperationCompleted(object arg) { - if ((this.CreateDistributionListCompleted != null)) { + + private void OnCreateDistributionListOperationCompleted(object arg) + { + if ((this.CreateDistributionListCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateDistributionListCompleted(this, new CreateDistributionListCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionList", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteDistributionList(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionList", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDistributionList(int itemId, int accountId) + { object[] results = this.Invoke("DeleteDistributionList", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteDistributionList(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteDistributionList(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteDistributionList", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDeleteDistributionList(System.IAsyncResult asyncResult) { + public int EndDeleteDistributionList(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteDistributionListAsync(int itemId, int accountId) { + public void DeleteDistributionListAsync(int itemId, int accountId) + { this.DeleteDistributionListAsync(itemId, accountId, null); } - + /// - public void DeleteDistributionListAsync(int itemId, int accountId, object userState) { - if ((this.DeleteDistributionListOperationCompleted == null)) { + public void DeleteDistributionListAsync(int itemId, int accountId, object userState) + { + if ((this.DeleteDistributionListOperationCompleted == null)) + { this.DeleteDistributionListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDistributionListOperationCompleted); } this.InvokeAsync("DeleteDistributionList", new object[] { itemId, accountId}, this.DeleteDistributionListOperationCompleted, userState); } - - private void OnDeleteDistributionListOperationCompleted(object arg) { - if ((this.DeleteDistributionListCompleted != null)) { + + private void OnDeleteDistributionListOperationCompleted(object arg) + { + if ((this.DeleteDistributionListCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteDistributionListCompleted(this, new DeleteDistributionListCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId) + { object[] results = this.Invoke("GetDistributionListGeneralSettings", new object[] { itemId, accountId}); return ((ExchangeDistributionList)(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDistributionListGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDistributionListGeneralSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeDistributionList EndGetDistributionListGeneralSettings(System.IAsyncResult asyncResult) { + public ExchangeDistributionList EndGetDistributionListGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDistributionList)(results[0])); } - + /// - public void GetDistributionListGeneralSettingsAsync(int itemId, int accountId) { + public void GetDistributionListGeneralSettingsAsync(int itemId, int accountId) + { this.GetDistributionListGeneralSettingsAsync(itemId, accountId, null); } - + /// - public void GetDistributionListGeneralSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetDistributionListGeneralSettingsOperationCompleted == null)) { + public void GetDistributionListGeneralSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetDistributionListGeneralSettingsOperationCompleted == null)) + { this.GetDistributionListGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListGeneralSettingsOperationCompleted); } this.InvokeAsync("GetDistributionListGeneralSettings", new object[] { itemId, accountId}, this.GetDistributionListGeneralSettingsOperationCompleted, userState); } - - private void OnGetDistributionListGeneralSettingsOperationCompleted(object arg) { - if ((this.GetDistributionListGeneralSettingsCompleted != null)) { + + private void OnGetDistributionListGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetDistributionListGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListGeneralSettingsCompleted(this, new GetDistributionListGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) + { object[] results = this.Invoke("SetDistributionListGeneralSettings", new object[] { itemId, accountId, @@ -3168,9 +5000,10 @@ namespace WebsitePanel.EnterpriseServer { notes}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetDistributionListGeneralSettings(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListGeneralSettings(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetDistributionListGeneralSettings", new object[] { itemId, accountId, @@ -3180,21 +5013,25 @@ namespace WebsitePanel.EnterpriseServer { memberAccounts, notes}, callback, asyncState); } - + /// - public int EndSetDistributionListGeneralSettings(System.IAsyncResult asyncResult) { + public int EndSetDistributionListGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetDistributionListGeneralSettingsAsync(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) { + public void SetDistributionListGeneralSettingsAsync(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) + { this.SetDistributionListGeneralSettingsAsync(itemId, accountId, displayName, hideAddressBook, managerAccount, memberAccounts, notes, null); } - + /// - public void SetDistributionListGeneralSettingsAsync(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes, object userState) { - if ((this.SetDistributionListGeneralSettingsOperationCompleted == null)) { + public void SetDistributionListGeneralSettingsAsync(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes, object userState) + { + if ((this.SetDistributionListGeneralSettingsOperationCompleted == null)) + { this.SetDistributionListGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListGeneralSettingsOperationCompleted); } this.InvokeAsync("SetDistributionListGeneralSettings", new object[] { @@ -3206,61 +5043,72 @@ namespace WebsitePanel.EnterpriseServer { memberAccounts, notes}, this.SetDistributionListGeneralSettingsOperationCompleted, userState); } - - private void OnSetDistributionListGeneralSettingsOperationCompleted(object arg) { - if ((this.SetDistributionListGeneralSettingsCompleted != null)) { + + private void OnSetDistributionListGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetDistributionListGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListGeneralSettingsCompleted(this, new SetDistributionListGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId) + { object[] results = this.Invoke("GetDistributionListMailFlowSettings", new object[] { itemId, accountId}); return ((ExchangeDistributionList)(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDistributionListMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDistributionListMailFlowSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeDistributionList EndGetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) { + public ExchangeDistributionList EndGetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDistributionList)(results[0])); } - + /// - public void GetDistributionListMailFlowSettingsAsync(int itemId, int accountId) { + public void GetDistributionListMailFlowSettingsAsync(int itemId, int accountId) + { this.GetDistributionListMailFlowSettingsAsync(itemId, accountId, null); } - + /// - public void GetDistributionListMailFlowSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetDistributionListMailFlowSettingsOperationCompleted == null)) { + public void GetDistributionListMailFlowSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetDistributionListMailFlowSettingsOperationCompleted == null)) + { this.GetDistributionListMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetDistributionListMailFlowSettings", new object[] { itemId, accountId}, this.GetDistributionListMailFlowSettingsOperationCompleted, userState); } - - private void OnGetDistributionListMailFlowSettingsOperationCompleted(object arg) { - if ((this.GetDistributionListMailFlowSettingsCompleted != null)) { + + private void OnGetDistributionListMailFlowSettingsOperationCompleted(object arg) + { + if ((this.GetDistributionListMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListMailFlowSettingsCompleted(this, new GetDistributionListMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { object[] results = this.Invoke("SetDistributionListMailFlowSettings", new object[] { itemId, accountId, @@ -3269,9 +5117,10 @@ namespace WebsitePanel.EnterpriseServer { requireSenderAuthentication}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetDistributionListMailFlowSettings", new object[] { itemId, accountId, @@ -3279,21 +5128,25 @@ namespace WebsitePanel.EnterpriseServer { rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public int EndSetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) { + public int EndSetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetDistributionListMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + public void SetDistributionListMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { this.SetDistributionListMailFlowSettingsAsync(itemId, accountId, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetDistributionListMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { - if ((this.SetDistributionListMailFlowSettingsOperationCompleted == null)) { + public void SetDistributionListMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) + { + if ((this.SetDistributionListMailFlowSettingsOperationCompleted == null)) + { this.SetDistributionListMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetDistributionListMailFlowSettings", new object[] { @@ -3303,90 +5156,106 @@ namespace WebsitePanel.EnterpriseServer { rejectAccounts, requireSenderAuthentication}, this.SetDistributionListMailFlowSettingsOperationCompleted, userState); } - - private void OnSetDistributionListMailFlowSettingsOperationCompleted(object arg) { - if ((this.SetDistributionListMailFlowSettingsCompleted != null)) { + + private void OnSetDistributionListMailFlowSettingsOperationCompleted(object arg) + { + if ((this.SetDistributionListMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListMailFlowSettingsCompleted(this, new SetDistributionListMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId) + { object[] results = this.Invoke("GetDistributionListEmailAddresses", new object[] { itemId, accountId}); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDistributionListEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDistributionListEmailAddresses", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeEmailAddress[] EndGetDistributionListEmailAddresses(System.IAsyncResult asyncResult) { + public ExchangeEmailAddress[] EndGetDistributionListEmailAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public void GetDistributionListEmailAddressesAsync(int itemId, int accountId) { + public void GetDistributionListEmailAddressesAsync(int itemId, int accountId) + { this.GetDistributionListEmailAddressesAsync(itemId, accountId, null); } - + /// - public void GetDistributionListEmailAddressesAsync(int itemId, int accountId, object userState) { - if ((this.GetDistributionListEmailAddressesOperationCompleted == null)) { + public void GetDistributionListEmailAddressesAsync(int itemId, int accountId, object userState) + { + if ((this.GetDistributionListEmailAddressesOperationCompleted == null)) + { this.GetDistributionListEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListEmailAddressesOperationCompleted); } this.InvokeAsync("GetDistributionListEmailAddresses", new object[] { itemId, accountId}, this.GetDistributionListEmailAddressesOperationCompleted, userState); } - - private void OnGetDistributionListEmailAddressesOperationCompleted(object arg) { - if ((this.GetDistributionListEmailAddressesCompleted != null)) { + + private void OnGetDistributionListEmailAddressesOperationCompleted(object arg) + { + if ((this.GetDistributionListEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListEmailAddressesCompleted(this, new GetDistributionListEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDistributionListEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDistributionListEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress) + { object[] results = this.Invoke("AddDistributionListEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddDistributionListEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddDistributionListEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddDistributionListEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndAddDistributionListEmailAddress(System.IAsyncResult asyncResult) { + public int EndAddDistributionListEmailAddress(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddDistributionListEmailAddressAsync(int itemId, int accountId, string emailAddress) { + public void AddDistributionListEmailAddressAsync(int itemId, int accountId, string emailAddress) + { this.AddDistributionListEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void AddDistributionListEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { - if ((this.AddDistributionListEmailAddressOperationCompleted == null)) { + public void AddDistributionListEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) + { + if ((this.AddDistributionListEmailAddressOperationCompleted == null)) + { this.AddDistributionListEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddDistributionListEmailAddressOperationCompleted); } this.InvokeAsync("AddDistributionListEmailAddress", new object[] { @@ -3394,47 +5263,55 @@ namespace WebsitePanel.EnterpriseServer { accountId, emailAddress}, this.AddDistributionListEmailAddressOperationCompleted, userState); } - - private void OnAddDistributionListEmailAddressOperationCompleted(object arg) { - if ((this.AddDistributionListEmailAddressCompleted != null)) { + + private void OnAddDistributionListEmailAddressOperationCompleted(object arg) + { + if ((this.AddDistributionListEmailAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddDistributionListEmailAddressCompleted(this, new AddDistributionListEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListPrimaryEmailAddre" + - "ss", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress) { + "ss", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress) + { object[] results = this.Invoke("SetDistributionListPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetDistributionListPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndSetDistributionListPrimaryEmailAddress(System.IAsyncResult asyncResult) { + public int EndSetDistributionListPrimaryEmailAddress(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetDistributionListPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) { + public void SetDistributionListPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) + { this.SetDistributionListPrimaryEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void SetDistributionListPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { - if ((this.SetDistributionListPrimaryEmailAddressOperationCompleted == null)) { + public void SetDistributionListPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) + { + if ((this.SetDistributionListPrimaryEmailAddressOperationCompleted == null)) + { this.SetDistributionListPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListPrimaryEmailAddressOperationCompleted); } this.InvokeAsync("SetDistributionListPrimaryEmailAddress", new object[] { @@ -3442,47 +5319,55 @@ namespace WebsitePanel.EnterpriseServer { accountId, emailAddress}, this.SetDistributionListPrimaryEmailAddressOperationCompleted, userState); } - - private void OnSetDistributionListPrimaryEmailAddressOperationCompleted(object arg) { - if ((this.SetDistributionListPrimaryEmailAddressCompleted != null)) { + + private void OnSetDistributionListPrimaryEmailAddressOperationCompleted(object arg) + { + if ((this.SetDistributionListPrimaryEmailAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListPrimaryEmailAddressCompleted(this, new SetDistributionListPrimaryEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListEmailAddresses" + - "", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses) { + "", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses) + { object[] results = this.Invoke("DeleteDistributionListEmailAddresses", new object[] { itemId, accountId, emailAddresses}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteDistributionListEmailAddresses", new object[] { itemId, accountId, emailAddresses}, callback, asyncState); } - + /// - public int EndDeleteDistributionListEmailAddresses(System.IAsyncResult asyncResult) { + public int EndDeleteDistributionListEmailAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteDistributionListEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) { + public void DeleteDistributionListEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) + { this.DeleteDistributionListEmailAddressesAsync(itemId, accountId, emailAddresses, null); } - + /// - public void DeleteDistributionListEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) { - if ((this.DeleteDistributionListEmailAddressesOperationCompleted == null)) { + public void DeleteDistributionListEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) + { + if ((this.DeleteDistributionListEmailAddressesOperationCompleted == null)) + { this.DeleteDistributionListEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDistributionListEmailAddressesOperationCompleted); } this.InvokeAsync("DeleteDistributionListEmailAddresses", new object[] { @@ -3490,17 +5375,20 @@ namespace WebsitePanel.EnterpriseServer { accountId, emailAddresses}, this.DeleteDistributionListEmailAddressesOperationCompleted, userState); } - - private void OnDeleteDistributionListEmailAddressesOperationCompleted(object arg) { - if ((this.DeleteDistributionListEmailAddressesCompleted != null)) { + + private void OnDeleteDistributionListEmailAddressesOperationCompleted(object arg) + { + if ((this.DeleteDistributionListEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteDistributionListEmailAddressesCompleted(this, new DeleteDistributionListEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListPermissions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject SetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListPermissions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject SetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) + { object[] results = this.Invoke("SetDistributionListPermissions", new object[] { itemId, accountId, @@ -3508,30 +5396,35 @@ namespace WebsitePanel.EnterpriseServer { sendOnBehalfAccounts}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginSetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetDistributionListPermissions", new object[] { itemId, accountId, sendAsAccounts, sendOnBehalfAccounts}, callback, asyncState); } - + /// - public ResultObject EndSetDistributionListPermissions(System.IAsyncResult asyncResult) { + public ResultObject EndSetDistributionListPermissions(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void SetDistributionListPermissionsAsync(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) { + public void SetDistributionListPermissionsAsync(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) + { this.SetDistributionListPermissionsAsync(itemId, accountId, sendAsAccounts, sendOnBehalfAccounts, null); } - + /// - public void SetDistributionListPermissionsAsync(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts, object userState) { - if ((this.SetDistributionListPermissionsOperationCompleted == null)) { + public void SetDistributionListPermissionsAsync(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts, object userState) + { + if ((this.SetDistributionListPermissionsOperationCompleted == null)) + { this.SetDistributionListPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListPermissionsOperationCompleted); } this.InvokeAsync("SetDistributionListPermissions", new object[] { @@ -3540,3222 +5433,2953 @@ namespace WebsitePanel.EnterpriseServer { sendAsAccounts, sendOnBehalfAccounts}, this.SetDistributionListPermissionsOperationCompleted, userState); } - - private void OnSetDistributionListPermissionsOperationCompleted(object arg) { - if ((this.SetDistributionListPermissionsCompleted != null)) { + + private void OnSetDistributionListPermissionsOperationCompleted(object arg) + { + if ((this.SetDistributionListPermissionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListPermissionsCompleted(this, new SetDistributionListPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListPermissions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeDistributionListResult GetDistributionListPermissions(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListPermissions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDistributionListResult GetDistributionListPermissions(int itemId, int accountId) + { object[] results = this.Invoke("GetDistributionListPermissions", new object[] { itemId, accountId}); return ((ExchangeDistributionListResult)(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListPermissions(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDistributionListPermissions(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDistributionListPermissions", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeDistributionListResult EndGetDistributionListPermissions(System.IAsyncResult asyncResult) { + public ExchangeDistributionListResult EndGetDistributionListPermissions(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDistributionListResult)(results[0])); } - + /// - public void GetDistributionListPermissionsAsync(int itemId, int accountId) { + public void GetDistributionListPermissionsAsync(int itemId, int accountId) + { this.GetDistributionListPermissionsAsync(itemId, accountId, null); } - + /// - public void GetDistributionListPermissionsAsync(int itemId, int accountId, object userState) { - if ((this.GetDistributionListPermissionsOperationCompleted == null)) { + public void GetDistributionListPermissionsAsync(int itemId, int accountId, object userState) + { + if ((this.GetDistributionListPermissionsOperationCompleted == null)) + { this.GetDistributionListPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListPermissionsOperationCompleted); } this.InvokeAsync("GetDistributionListPermissions", new object[] { itemId, accountId}, this.GetDistributionListPermissionsOperationCompleted, userState); } - - private void OnGetDistributionListPermissionsOperationCompleted(object arg) { - if ((this.GetDistributionListPermissionsCompleted != null)) { + + private void OnGetDistributionListPermissionsOperationCompleted(object arg) + { + if ((this.GetDistributionListPermissionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListPermissionsCompleted(this, new GetDistributionListPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListsByMember", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] GetDistributionListsByMember(int itemId, int accountId) + { + object[] results = this.Invoke("GetDistributionListsByMember", new object[] { + itemId, + accountId}); + return ((ExchangeAccount[])(results[0])); + } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDistributionListMember", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddDistributionListMember(int itemId, string distributionListName, int memberId) + { + object[] results = this.Invoke("AddDistributionListMember", new object[] { + itemId, + distributionListName, + memberId}); + return ((int)(results[0])); + } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListMember", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) + { + object[] results = this.Invoke("DeleteDistributionListMember", new object[] { + itemId, + distributionListName, + memberId}); + return ((int)(results[0])); + } + + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevices", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) + { object[] results = this.Invoke("GetMobileDevices", new object[] { itemId, accountId}); return ((ExchangeMobileDevice[])(results[0])); } - + /// - public System.IAsyncResult BeginGetMobileDevices(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMobileDevices(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMobileDevices", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) { + public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMobileDevice[])(results[0])); } - + /// - public void GetMobileDevicesAsync(int itemId, int accountId) { + public void GetMobileDevicesAsync(int itemId, int accountId) + { this.GetMobileDevicesAsync(itemId, accountId, null); } - + /// - public void GetMobileDevicesAsync(int itemId, int accountId, object userState) { - if ((this.GetMobileDevicesOperationCompleted == null)) { + public void GetMobileDevicesAsync(int itemId, int accountId, object userState) + { + if ((this.GetMobileDevicesOperationCompleted == null)) + { this.GetMobileDevicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDevicesOperationCompleted); } this.InvokeAsync("GetMobileDevices", new object[] { itemId, accountId}, this.GetMobileDevicesOperationCompleted, userState); } - - private void OnGetMobileDevicesOperationCompleted(object arg) { - if ((this.GetMobileDevicesCompleted != null)) { + + private void OnGetMobileDevicesOperationCompleted(object arg) + { + if ((this.GetMobileDevicesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMobileDevicesCompleted(this, new GetMobileDevicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevice", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) + { object[] results = this.Invoke("GetMobileDevice", new object[] { itemId, deviceId}); return ((ExchangeMobileDevice)(results[0])); } - + /// - public System.IAsyncResult BeginGetMobileDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMobileDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMobileDevice", new object[] { itemId, deviceId}, callback, asyncState); } - + /// - public ExchangeMobileDevice EndGetMobileDevice(System.IAsyncResult asyncResult) { + public ExchangeMobileDevice EndGetMobileDevice(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMobileDevice)(results[0])); } - + /// - public void GetMobileDeviceAsync(int itemId, string deviceId) { + public void GetMobileDeviceAsync(int itemId, string deviceId) + { this.GetMobileDeviceAsync(itemId, deviceId, null); } - + /// - public void GetMobileDeviceAsync(int itemId, string deviceId, object userState) { - if ((this.GetMobileDeviceOperationCompleted == null)) { + public void GetMobileDeviceAsync(int itemId, string deviceId, object userState) + { + if ((this.GetMobileDeviceOperationCompleted == null)) + { this.GetMobileDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDeviceOperationCompleted); } this.InvokeAsync("GetMobileDevice", new object[] { itemId, deviceId}, this.GetMobileDeviceOperationCompleted, userState); } - - private void OnGetMobileDeviceOperationCompleted(object arg) { - if ((this.GetMobileDeviceCompleted != null)) { + + private void OnGetMobileDeviceOperationCompleted(object arg) + { + if ((this.GetMobileDeviceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMobileDeviceCompleted(this, new GetMobileDeviceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WipeDataFromDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void WipeDataFromDevice(int itemId, string deviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WipeDataFromDevice", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void WipeDataFromDevice(int itemId, string deviceId) + { this.Invoke("WipeDataFromDevice", new object[] { itemId, deviceId}); } - + /// - public System.IAsyncResult BeginWipeDataFromDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginWipeDataFromDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("WipeDataFromDevice", new object[] { itemId, deviceId}, callback, asyncState); } - + /// - public void EndWipeDataFromDevice(System.IAsyncResult asyncResult) { + public void EndWipeDataFromDevice(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void WipeDataFromDeviceAsync(int itemId, string deviceId) { + public void WipeDataFromDeviceAsync(int itemId, string deviceId) + { this.WipeDataFromDeviceAsync(itemId, deviceId, null); } - + /// - public void WipeDataFromDeviceAsync(int itemId, string deviceId, object userState) { - if ((this.WipeDataFromDeviceOperationCompleted == null)) { + public void WipeDataFromDeviceAsync(int itemId, string deviceId, object userState) + { + if ((this.WipeDataFromDeviceOperationCompleted == null)) + { this.WipeDataFromDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWipeDataFromDeviceOperationCompleted); } this.InvokeAsync("WipeDataFromDevice", new object[] { itemId, deviceId}, this.WipeDataFromDeviceOperationCompleted, userState); } - - private void OnWipeDataFromDeviceOperationCompleted(object arg) { - if ((this.WipeDataFromDeviceCompleted != null)) { + + private void OnWipeDataFromDeviceOperationCompleted(object arg) + { + if ((this.WipeDataFromDeviceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.WipeDataFromDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CancelRemoteWipeRequest", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void CancelRemoteWipeRequest(int itemId, string deviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CancelRemoteWipeRequest", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void CancelRemoteWipeRequest(int itemId, string deviceId) + { this.Invoke("CancelRemoteWipeRequest", new object[] { itemId, deviceId}); } - + /// - public System.IAsyncResult BeginCancelRemoteWipeRequest(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCancelRemoteWipeRequest(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CancelRemoteWipeRequest", new object[] { itemId, deviceId}, callback, asyncState); } - + /// - public void EndCancelRemoteWipeRequest(System.IAsyncResult asyncResult) { + public void EndCancelRemoteWipeRequest(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void CancelRemoteWipeRequestAsync(int itemId, string deviceId) { + public void CancelRemoteWipeRequestAsync(int itemId, string deviceId) + { this.CancelRemoteWipeRequestAsync(itemId, deviceId, null); } - + /// - public void CancelRemoteWipeRequestAsync(int itemId, string deviceId, object userState) { - if ((this.CancelRemoteWipeRequestOperationCompleted == null)) { + public void CancelRemoteWipeRequestAsync(int itemId, string deviceId, object userState) + { + if ((this.CancelRemoteWipeRequestOperationCompleted == null)) + { this.CancelRemoteWipeRequestOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelRemoteWipeRequestOperationCompleted); } this.InvokeAsync("CancelRemoteWipeRequest", new object[] { itemId, deviceId}, this.CancelRemoteWipeRequestOperationCompleted, userState); } - - private void OnCancelRemoteWipeRequestOperationCompleted(object arg) { - if ((this.CancelRemoteWipeRequestCompleted != null)) { + + private void OnCancelRemoteWipeRequestOperationCompleted(object arg) + { + if ((this.CancelRemoteWipeRequestCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CancelRemoteWipeRequestCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RemoveDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RemoveDevice(int itemId, string deviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RemoveDevice", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RemoveDevice(int itemId, string deviceId) + { this.Invoke("RemoveDevice", new object[] { itemId, deviceId}); } - + /// - public System.IAsyncResult BeginRemoveDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginRemoveDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("RemoveDevice", new object[] { itemId, deviceId}, callback, asyncState); } - + /// - public void EndRemoveDevice(System.IAsyncResult asyncResult) { + public void EndRemoveDevice(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void RemoveDeviceAsync(int itemId, string deviceId) { + public void RemoveDeviceAsync(int itemId, string deviceId) + { this.RemoveDeviceAsync(itemId, deviceId, null); } - + /// - public void RemoveDeviceAsync(int itemId, string deviceId, object userState) { - if ((this.RemoveDeviceOperationCompleted == null)) { + public void RemoveDeviceAsync(int itemId, string deviceId, object userState) + { + if ((this.RemoveDeviceOperationCompleted == null)) + { this.RemoveDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveDeviceOperationCompleted); } this.InvokeAsync("RemoveDevice", new object[] { itemId, deviceId}, this.RemoveDeviceOperationCompleted, userState); } - - private void OnRemoveDeviceOperationCompleted(object arg) { - if ((this.RemoveDeviceCompleted != null)) { + + private void OnRemoveDeviceOperationCompleted(object arg) + { + if ((this.RemoveDeviceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RemoveDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlans", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailboxPlan[] GetExchangeMailboxPlans(int itemId) { - object[] results = this.Invoke("GetExchangeMailboxPlans", new object[] { - itemId}); - return ((ExchangeMailboxPlan[])(results[0])); - } - - /// - public System.IAsyncResult BeginGetExchangeMailboxPlans(int itemId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetExchangeMailboxPlans", new object[] { - itemId}, callback, asyncState); - } - - /// - public ExchangeMailboxPlan[] EndGetExchangeMailboxPlans(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeMailboxPlan[])(results[0])); - } - - /// - public void GetExchangeMailboxPlansAsync(int itemId) { - this.GetExchangeMailboxPlansAsync(itemId, null); - } - - /// - public void GetExchangeMailboxPlansAsync(int itemId, object userState) { - if ((this.GetExchangeMailboxPlansOperationCompleted == null)) { - this.GetExchangeMailboxPlansOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeMailboxPlansOperationCompleted); - } - this.InvokeAsync("GetExchangeMailboxPlans", new object[] { - itemId}, this.GetExchangeMailboxPlansOperationCompleted, userState); - } - - private void OnGetExchangeMailboxPlansOperationCompleted(object arg) { - if ((this.GetExchangeMailboxPlansCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetExchangeMailboxPlansCompleted(this, new GetExchangeMailboxPlansCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailboxPlan GetExchangeMailboxPlan(int itemId, int mailboxPlanId) { - object[] results = this.Invoke("GetExchangeMailboxPlan", new object[] { - itemId, - mailboxPlanId}); - return ((ExchangeMailboxPlan)(results[0])); - } - - /// - public System.IAsyncResult BeginGetExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetExchangeMailboxPlan", new object[] { - itemId, - mailboxPlanId}, callback, asyncState); - } - - /// - public ExchangeMailboxPlan EndGetExchangeMailboxPlan(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeMailboxPlan)(results[0])); - } - - /// - public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) { - this.GetExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); - } - - /// - public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) { - if ((this.GetExchangeMailboxPlanOperationCompleted == null)) { - this.GetExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeMailboxPlanOperationCompleted); - } - this.InvokeAsync("GetExchangeMailboxPlan", new object[] { - itemId, - mailboxPlanId}, this.GetExchangeMailboxPlanOperationCompleted, userState); - } - - private void OnGetExchangeMailboxPlanOperationCompleted(object arg) { - if ((this.GetExchangeMailboxPlanCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetExchangeMailboxPlanCompleted(this, new GetExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) { - object[] results = this.Invoke("AddExchangeMailboxPlan", new object[] { - itemId, - mailboxPlan}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginAddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("AddExchangeMailboxPlan", new object[] { - itemId, - mailboxPlan}, callback, asyncState); - } - - /// - public int EndAddExchangeMailboxPlan(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan) { - this.AddExchangeMailboxPlanAsync(itemId, mailboxPlan, null); - } - - /// - public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan, object userState) { - if ((this.AddExchangeMailboxPlanOperationCompleted == null)) { - this.AddExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddExchangeMailboxPlanOperationCompleted); - } - this.InvokeAsync("AddExchangeMailboxPlan", new object[] { - itemId, - mailboxPlan}, this.AddExchangeMailboxPlanOperationCompleted, userState); - } - - private void OnAddExchangeMailboxPlanOperationCompleted(object arg) { - if ((this.AddExchangeMailboxPlanCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.AddExchangeMailboxPlanCompleted(this, new AddExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) { - object[] results = this.Invoke("UpdateExchangeMailboxPlan", new object[] { - itemId, - mailboxPlan}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginUpdateExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("UpdateExchangeMailboxPlan", new object[] { - itemId, - mailboxPlan}, callback, asyncState); - } - - /// - public int EndUpdateExchangeMailboxPlan(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void UpdateExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan) { - this.UpdateExchangeMailboxPlanAsync(itemId, mailboxPlan, null); - } - - /// - public void UpdateExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan, object userState) { - if ((this.UpdateExchangeMailboxPlanOperationCompleted == null)) { - this.UpdateExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateExchangeMailboxPlanOperationCompleted); - } - this.InvokeAsync("UpdateExchangeMailboxPlan", new object[] { - itemId, - mailboxPlan}, this.UpdateExchangeMailboxPlanOperationCompleted, userState); - } - - private void OnUpdateExchangeMailboxPlanOperationCompleted(object arg) { - if ((this.UpdateExchangeMailboxPlanCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.UpdateExchangeMailboxPlanCompleted(this, new UpdateExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteExchangeMailboxPlan(int itemId, int mailboxPlanId) { - object[] results = this.Invoke("DeleteExchangeMailboxPlan", new object[] { - itemId, - mailboxPlanId}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginDeleteExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("DeleteExchangeMailboxPlan", new object[] { - itemId, - mailboxPlanId}, callback, asyncState); - } - - /// - public int EndDeleteExchangeMailboxPlan(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) { - this.DeleteExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); - } - - /// - public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) { - if ((this.DeleteExchangeMailboxPlanOperationCompleted == null)) { - this.DeleteExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeMailboxPlanOperationCompleted); - } - this.InvokeAsync("DeleteExchangeMailboxPlan", new object[] { - itemId, - mailboxPlanId}, this.DeleteExchangeMailboxPlanOperationCompleted, userState); - } - - private void OnDeleteExchangeMailboxPlanOperationCompleted(object arg) { - if ((this.DeleteExchangeMailboxPlanCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.DeleteExchangeMailboxPlanCompleted(this, new DeleteExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetOrganizationDefaultExchangeMailbo" + - "xPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) { - this.Invoke("SetOrganizationDefaultExchangeMailboxPlan", new object[] { - itemId, - mailboxPlanId}); - } - - /// - public System.IAsyncResult BeginSetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("SetOrganizationDefaultExchangeMailboxPlan", new object[] { - itemId, - mailboxPlanId}, callback, asyncState); - } - - /// - public void EndSetOrganizationDefaultExchangeMailboxPlan(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) { - this.SetOrganizationDefaultExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); - } - - /// - public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) { - if ((this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted == null)) { - this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationDefaultExchangeMailboxPlanOperationCompleted); - } - this.InvokeAsync("SetOrganizationDefaultExchangeMailboxPlan", new object[] { - itemId, - mailboxPlanId}, this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted, userState); - } - - private void OnSetOrganizationDefaultExchangeMailboxPlanOperationCompleted(object arg) { - if ((this.SetOrganizationDefaultExchangeMailboxPlanCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.SetOrganizationDefaultExchangeMailboxPlanCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreatePublicFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreatePublicFolder(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain) { - object[] results = this.Invoke("CreatePublicFolder", new object[] { - itemId, - parentFolder, - folderName, - mailEnabled, - accountName, - domain}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginCreatePublicFolder(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("CreatePublicFolder", new object[] { - itemId, - parentFolder, - folderName, - mailEnabled, - accountName, - domain}, callback, asyncState); - } - - /// - public int EndCreatePublicFolder(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void CreatePublicFolderAsync(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain) { - this.CreatePublicFolderAsync(itemId, parentFolder, folderName, mailEnabled, accountName, domain, null); - } - - /// - public void CreatePublicFolderAsync(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain, object userState) { - if ((this.CreatePublicFolderOperationCompleted == null)) { - this.CreatePublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreatePublicFolderOperationCompleted); - } - this.InvokeAsync("CreatePublicFolder", new object[] { - itemId, - parentFolder, - folderName, - mailEnabled, - accountName, - domain}, this.CreatePublicFolderOperationCompleted, userState); - } - - private void OnCreatePublicFolderOperationCompleted(object arg) { - if ((this.CreatePublicFolderCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.CreatePublicFolderCompleted(this, new CreatePublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolders", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeletePublicFolders(int itemId, int[] accountIds) { - object[] results = this.Invoke("DeletePublicFolders", new object[] { - itemId, - accountIds}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginDeletePublicFolders(int itemId, int[] accountIds, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("DeletePublicFolders", new object[] { - itemId, - accountIds}, callback, asyncState); - } - - /// - public int EndDeletePublicFolders(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void DeletePublicFoldersAsync(int itemId, int[] accountIds) { - this.DeletePublicFoldersAsync(itemId, accountIds, null); - } - - /// - public void DeletePublicFoldersAsync(int itemId, int[] accountIds, object userState) { - if ((this.DeletePublicFoldersOperationCompleted == null)) { - this.DeletePublicFoldersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFoldersOperationCompleted); - } - this.InvokeAsync("DeletePublicFolders", new object[] { - itemId, - accountIds}, this.DeletePublicFoldersOperationCompleted, userState); - } - - private void OnDeletePublicFoldersOperationCompleted(object arg) { - if ((this.DeletePublicFoldersCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.DeletePublicFoldersCompleted(this, new DeletePublicFoldersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeletePublicFolder(int itemId, int accountId) { - object[] results = this.Invoke("DeletePublicFolder", new object[] { - itemId, - accountId}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginDeletePublicFolder(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("DeletePublicFolder", new object[] { - itemId, - accountId}, callback, asyncState); - } - - /// - public int EndDeletePublicFolder(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void DeletePublicFolderAsync(int itemId, int accountId) { - this.DeletePublicFolderAsync(itemId, accountId, null); - } - - /// - public void DeletePublicFolderAsync(int itemId, int accountId, object userState) { - if ((this.DeletePublicFolderOperationCompleted == null)) { - this.DeletePublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFolderOperationCompleted); - } - this.InvokeAsync("DeletePublicFolder", new object[] { - itemId, - accountId}, this.DeletePublicFolderOperationCompleted, userState); - } - - private void OnDeletePublicFolderOperationCompleted(object arg) { - if ((this.DeletePublicFolderCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.DeletePublicFolderCompleted(this, new DeletePublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/EnableMailPublicFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int EnableMailPublicFolder(int itemId, int accountId, string name, string domain) { - object[] results = this.Invoke("EnableMailPublicFolder", new object[] { - itemId, - accountId, - name, - domain}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginEnableMailPublicFolder(int itemId, int accountId, string name, string domain, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("EnableMailPublicFolder", new object[] { - itemId, - accountId, - name, - domain}, callback, asyncState); - } - - /// - public int EndEnableMailPublicFolder(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void EnableMailPublicFolderAsync(int itemId, int accountId, string name, string domain) { - this.EnableMailPublicFolderAsync(itemId, accountId, name, domain, null); - } - - /// - public void EnableMailPublicFolderAsync(int itemId, int accountId, string name, string domain, object userState) { - if ((this.EnableMailPublicFolderOperationCompleted == null)) { - this.EnableMailPublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnableMailPublicFolderOperationCompleted); - } - this.InvokeAsync("EnableMailPublicFolder", new object[] { - itemId, - accountId, - name, - domain}, this.EnableMailPublicFolderOperationCompleted, userState); - } - - private void OnEnableMailPublicFolderOperationCompleted(object arg) { - if ((this.EnableMailPublicFolderCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.EnableMailPublicFolderCompleted(this, new EnableMailPublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableMailPublicFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DisableMailPublicFolder(int itemId, int accountId) { - object[] results = this.Invoke("DisableMailPublicFolder", new object[] { - itemId, - accountId}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginDisableMailPublicFolder(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("DisableMailPublicFolder", new object[] { - itemId, - accountId}, callback, asyncState); - } - - /// - public int EndDisableMailPublicFolder(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void DisableMailPublicFolderAsync(int itemId, int accountId) { - this.DisableMailPublicFolderAsync(itemId, accountId, null); - } - - /// - public void DisableMailPublicFolderAsync(int itemId, int accountId, object userState) { - if ((this.DisableMailPublicFolderOperationCompleted == null)) { - this.DisableMailPublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableMailPublicFolderOperationCompleted); - } - this.InvokeAsync("DisableMailPublicFolder", new object[] { - itemId, - accountId}, this.DisableMailPublicFolderOperationCompleted, userState); - } - - private void OnDisableMailPublicFolderOperationCompleted(object arg) { - if ((this.DisableMailPublicFolderCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.DisableMailPublicFolderCompleted(this, new DisableMailPublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangePublicFolder GetPublicFolderGeneralSettings(int itemId, int accountId) { - object[] results = this.Invoke("GetPublicFolderGeneralSettings", new object[] { - itemId, - accountId}); - return ((ExchangePublicFolder)(results[0])); - } - - /// - public System.IAsyncResult BeginGetPublicFolderGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetPublicFolderGeneralSettings", new object[] { - itemId, - accountId}, callback, asyncState); - } - - /// - public ExchangePublicFolder EndGetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangePublicFolder)(results[0])); - } - - /// - public void GetPublicFolderGeneralSettingsAsync(int itemId, int accountId) { - this.GetPublicFolderGeneralSettingsAsync(itemId, accountId, null); - } - - /// - public void GetPublicFolderGeneralSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetPublicFolderGeneralSettingsOperationCompleted == null)) { - this.GetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderGeneralSettingsOperationCompleted); - } - this.InvokeAsync("GetPublicFolderGeneralSettings", new object[] { - itemId, - accountId}, this.GetPublicFolderGeneralSettingsOperationCompleted, userState); - } - - private void OnGetPublicFolderGeneralSettingsOperationCompleted(object arg) { - if ((this.GetPublicFolderGeneralSettingsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetPublicFolderGeneralSettingsCompleted(this, new GetPublicFolderGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) { - object[] results = this.Invoke("SetPublicFolderGeneralSettings", new object[] { - itemId, - accountId, - newName, - hideAddressBook, - accounts}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginSetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("SetPublicFolderGeneralSettings", new object[] { - itemId, - accountId, - newName, - hideAddressBook, - accounts}, callback, asyncState); - } - - /// - public int EndSetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) { - this.SetPublicFolderGeneralSettingsAsync(itemId, accountId, newName, hideAddressBook, accounts, null); - } - - /// - public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, object userState) { - if ((this.SetPublicFolderGeneralSettingsOperationCompleted == null)) { - this.SetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderGeneralSettingsOperationCompleted); - } - this.InvokeAsync("SetPublicFolderGeneralSettings", new object[] { - itemId, - accountId, - newName, - hideAddressBook, - accounts}, this.SetPublicFolderGeneralSettingsOperationCompleted, userState); - } - - private void OnSetPublicFolderGeneralSettingsOperationCompleted(object arg) { - if ((this.SetPublicFolderGeneralSettingsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.SetPublicFolderGeneralSettingsCompleted(this, new SetPublicFolderGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangePublicFolder GetPublicFolderMailFlowSettings(int itemId, int accountId) { - object[] results = this.Invoke("GetPublicFolderMailFlowSettings", new object[] { - itemId, - accountId}); - return ((ExchangePublicFolder)(results[0])); - } - - /// - public System.IAsyncResult BeginGetPublicFolderMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetPublicFolderMailFlowSettings", new object[] { - itemId, - accountId}, callback, asyncState); - } - - /// - public ExchangePublicFolder EndGetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangePublicFolder)(results[0])); - } - - /// - public void GetPublicFolderMailFlowSettingsAsync(int itemId, int accountId) { - this.GetPublicFolderMailFlowSettingsAsync(itemId, accountId, null); - } - - /// - public void GetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetPublicFolderMailFlowSettingsOperationCompleted == null)) { - this.GetPublicFolderMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderMailFlowSettingsOperationCompleted); - } - this.InvokeAsync("GetPublicFolderMailFlowSettings", new object[] { - itemId, - accountId}, this.GetPublicFolderMailFlowSettingsOperationCompleted, userState); - } - - private void OnGetPublicFolderMailFlowSettingsOperationCompleted(object arg) { - if ((this.GetPublicFolderMailFlowSettingsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetPublicFolderMailFlowSettingsCompleted(this, new GetPublicFolderMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetPublicFolderMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { - object[] results = this.Invoke("SetPublicFolderMailFlowSettings", new object[] { - itemId, - accountId, - acceptAccounts, - rejectAccounts, - requireSenderAuthentication}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginSetPublicFolderMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("SetPublicFolderMailFlowSettings", new object[] { - itemId, - accountId, - acceptAccounts, - rejectAccounts, - requireSenderAuthentication}, callback, asyncState); - } - - /// - public int EndSetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void SetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { - this.SetPublicFolderMailFlowSettingsAsync(itemId, accountId, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); - } - - /// - public void SetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { - if ((this.SetPublicFolderMailFlowSettingsOperationCompleted == null)) { - this.SetPublicFolderMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderMailFlowSettingsOperationCompleted); - } - this.InvokeAsync("SetPublicFolderMailFlowSettings", new object[] { - itemId, - accountId, - acceptAccounts, - rejectAccounts, - requireSenderAuthentication}, this.SetPublicFolderMailFlowSettingsOperationCompleted, userState); - } - - private void OnSetPublicFolderMailFlowSettingsOperationCompleted(object arg) { - if ((this.SetPublicFolderMailFlowSettingsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.SetPublicFolderMailFlowSettingsCompleted(this, new SetPublicFolderMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeEmailAddress[] GetPublicFolderEmailAddresses(int itemId, int accountId) { - object[] results = this.Invoke("GetPublicFolderEmailAddresses", new object[] { - itemId, - accountId}); - return ((ExchangeEmailAddress[])(results[0])); - } - - /// - public System.IAsyncResult BeginGetPublicFolderEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetPublicFolderEmailAddresses", new object[] { - itemId, - accountId}, callback, asyncState); - } - - /// - public ExchangeEmailAddress[] EndGetPublicFolderEmailAddresses(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeEmailAddress[])(results[0])); - } - - /// - public void GetPublicFolderEmailAddressesAsync(int itemId, int accountId) { - this.GetPublicFolderEmailAddressesAsync(itemId, accountId, null); - } - - /// - public void GetPublicFolderEmailAddressesAsync(int itemId, int accountId, object userState) { - if ((this.GetPublicFolderEmailAddressesOperationCompleted == null)) { - this.GetPublicFolderEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderEmailAddressesOperationCompleted); - } - this.InvokeAsync("GetPublicFolderEmailAddresses", new object[] { - itemId, - accountId}, this.GetPublicFolderEmailAddressesOperationCompleted, userState); - } - - private void OnGetPublicFolderEmailAddressesOperationCompleted(object arg) { - if ((this.GetPublicFolderEmailAddressesCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetPublicFolderEmailAddressesCompleted(this, new GetPublicFolderEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddPublicFolderEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress) { - object[] results = this.Invoke("AddPublicFolderEmailAddress", new object[] { - itemId, - accountId, - emailAddress}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginAddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("AddPublicFolderEmailAddress", new object[] { - itemId, - accountId, - emailAddress}, callback, asyncState); - } - - /// - public int EndAddPublicFolderEmailAddress(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void AddPublicFolderEmailAddressAsync(int itemId, int accountId, string emailAddress) { - this.AddPublicFolderEmailAddressAsync(itemId, accountId, emailAddress, null); - } - - /// - public void AddPublicFolderEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { - if ((this.AddPublicFolderEmailAddressOperationCompleted == null)) { - this.AddPublicFolderEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddPublicFolderEmailAddressOperationCompleted); - } - this.InvokeAsync("AddPublicFolderEmailAddress", new object[] { - itemId, - accountId, - emailAddress}, this.AddPublicFolderEmailAddressOperationCompleted, userState); - } - - private void OnAddPublicFolderEmailAddressOperationCompleted(object arg) { - if ((this.AddPublicFolderEmailAddressCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.AddPublicFolderEmailAddressCompleted(this, new AddPublicFolderEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderPrimaryEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress) { - object[] results = this.Invoke("SetPublicFolderPrimaryEmailAddress", new object[] { - itemId, - accountId, - emailAddress}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginSetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("SetPublicFolderPrimaryEmailAddress", new object[] { - itemId, - accountId, - emailAddress}, callback, asyncState); - } - - /// - public int EndSetPublicFolderPrimaryEmailAddress(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void SetPublicFolderPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) { - this.SetPublicFolderPrimaryEmailAddressAsync(itemId, accountId, emailAddress, null); - } - - /// - public void SetPublicFolderPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { - if ((this.SetPublicFolderPrimaryEmailAddressOperationCompleted == null)) { - this.SetPublicFolderPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderPrimaryEmailAddressOperationCompleted); - } - this.InvokeAsync("SetPublicFolderPrimaryEmailAddress", new object[] { - itemId, - accountId, - emailAddress}, this.SetPublicFolderPrimaryEmailAddressOperationCompleted, userState); - } - - private void OnSetPublicFolderPrimaryEmailAddressOperationCompleted(object arg) { - if ((this.SetPublicFolderPrimaryEmailAddressCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.SetPublicFolderPrimaryEmailAddressCompleted(this, new SetPublicFolderPrimaryEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolderEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses) { - object[] results = this.Invoke("DeletePublicFolderEmailAddresses", new object[] { - itemId, - accountId, - emailAddresses}); - return ((int)(results[0])); - } - - /// - public System.IAsyncResult BeginDeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("DeletePublicFolderEmailAddresses", new object[] { - itemId, - accountId, - emailAddresses}, callback, asyncState); - } - - /// - public int EndDeletePublicFolderEmailAddresses(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((int)(results[0])); - } - - /// - public void DeletePublicFolderEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) { - this.DeletePublicFolderEmailAddressesAsync(itemId, accountId, emailAddresses, null); - } - - /// - public void DeletePublicFolderEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) { - if ((this.DeletePublicFolderEmailAddressesOperationCompleted == null)) { - this.DeletePublicFolderEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFolderEmailAddressesOperationCompleted); - } - this.InvokeAsync("DeletePublicFolderEmailAddresses", new object[] { - itemId, - accountId, - emailAddresses}, this.DeletePublicFolderEmailAddressesOperationCompleted, userState); - } - - private void OnDeletePublicFolderEmailAddressesOperationCompleted(object arg) { - if ((this.DeletePublicFolderEmailAddressesCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.DeletePublicFolderEmailAddressesCompleted(this, new DeletePublicFolderEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - public new void CancelAsync(object userState) { + public new void CancelAsync(object userState) + { base.CancelAsync(userState); } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetRawExchangeOrganizationsPagedCompletedEventHandler(object sender, GetRawExchangeOrganizationsPagedCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetRawExchangeOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public System.Data.DataSet Result { - get { - this.RaiseExceptionIfNecessary(); - return ((System.Data.DataSet)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetExchangeOrganizationsPagedCompletedEventHandler(object sender, GetExchangeOrganizationsPagedCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetExchangeOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public OrganizationsPaged Result { - get { - this.RaiseExceptionIfNecessary(); - return ((OrganizationsPaged)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetExchangeOrganizationsCompletedEventHandler(object sender, GetExchangeOrganizationsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetExchangeOrganizationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public Organization[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((Organization[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetOrganizationCompletedEventHandler(object sender, GetOrganizationCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public Organization Result { - get { - this.RaiseExceptionIfNecessary(); - return ((Organization)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetOrganizationStatisticsCompletedEventHandler(object sender, GetOrganizationStatisticsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetOrganizationStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public OrganizationStatistics Result { - get { - this.RaiseExceptionIfNecessary(); - return ((OrganizationStatistics)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetOrganizationStatisticsByOrganizationCompletedEventHandler(object sender, GetOrganizationStatisticsByOrganizationCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationStatisticsByOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetOrganizationStatisticsByOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public OrganizationStatistics Result { - get { - this.RaiseExceptionIfNecessary(); - return ((OrganizationStatistics)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetOrganizationStorageLimitsCompletedEventHandler(object sender, GetOrganizationStorageLimitsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetOrganizationStorageLimitsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public Organization Result { - get { - this.RaiseExceptionIfNecessary(); - return ((Organization)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetOrganizationStorageLimitsCompletedEventHandler(object sender, SetOrganizationStorageLimitsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetOrganizationStorageLimitsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxesStatisticsCompletedEventHandler(object sender, GetMailboxesStatisticsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxesStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxesStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeItemStatistics[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeItemStatistics[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxStatisticsCompletedEventHandler(object sender, GetMailboxStatisticsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailboxStatistics Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailboxStatistics)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CalculateOrganizationDiskspaceCompletedEventHandler(object sender, CalculateOrganizationDiskspaceCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CalculateOrganizationDiskspaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CalculateOrganizationDiskspaceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetActiveSyncPolicyCompletedEventHandler(object sender, GetActiveSyncPolicyCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetActiveSyncPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeActiveSyncPolicy Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeActiveSyncPolicy)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetActiveSyncPolicyCompletedEventHandler(object sender, SetActiveSyncPolicyCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetActiveSyncPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void AddAuthoritativeDomainCompletedEventHandler(object sender, AddAuthoritativeDomainCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddAuthoritativeDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteAuthoritativeDomainCompletedEventHandler(object sender, DeleteAuthoritativeDomainCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteAuthoritativeDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetAccountsPagedCompletedEventHandler(object sender, GetAccountsPagedCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAccountsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetAccountsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeAccountsPaged Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeAccountsPaged)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetAccountsCompletedEventHandler(object sender, GetAccountsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeAccount[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeAccount[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetExchangeAccountByMailboxPlanIdCompletedEventHandler(object sender, GetExchangeAccountByMailboxPlanIdCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeAccountByMailboxPlanIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetExchangeAccountByMailboxPlanIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeAccount[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeAccount[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SearchAccountsCompletedEventHandler(object sender, SearchAccountsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SearchAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SearchAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeAccount[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeAccount[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetAccountCompletedEventHandler(object sender, GetAccountCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeAccount Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeAccount)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SearchAccountCompletedEventHandler(object sender, SearchAccountCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SearchAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SearchAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeAccount Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeAccount)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CheckAccountCredentialsCompletedEventHandler(object sender, CheckAccountCredentialsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckAccountCredentialsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CheckAccountCredentialsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public bool Result { - get { - this.RaiseExceptionIfNecessary(); - return ((bool)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateMailboxCompletedEventHandler(object sender, CreateMailboxCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreateMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteMailboxCompletedEventHandler(object sender, DeleteMailboxCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DisableMailboxCompletedEventHandler(object sender, DisableMailboxCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DisableMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DisableMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxAdvancedSettingsCompletedEventHandler(object sender, GetMailboxAdvancedSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxAdvancedSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxAdvancedSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailbox Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailbox)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxGeneralSettingsCompletedEventHandler(object sender, GetMailboxGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailbox Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailbox)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxGeneralSettingsCompletedEventHandler(object sender, SetMailboxGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetMailboxGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxEmailAddressesCompletedEventHandler(object sender, GetMailboxEmailAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeEmailAddress[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeEmailAddress[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void AddMailboxEmailAddressCompletedEventHandler(object sender, AddMailboxEmailAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddMailboxEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddMailboxEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxPrimaryEmailAddressCompletedEventHandler(object sender, SetMailboxPrimaryEmailAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetMailboxPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteMailboxEmailAddressesCompletedEventHandler(object sender, DeleteMailboxEmailAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteMailboxEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxMailFlowSettingsCompletedEventHandler(object sender, GetMailboxMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailbox Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailbox)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxMailFlowSettingsCompletedEventHandler(object sender, SetMailboxMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetMailboxMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetExchangeMailboxPlanCompletedEventHandler(object sender, SetExchangeMailboxPlanCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxSetupInstructionsCompletedEventHandler(object sender, GetMailboxSetupInstructionsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxSetupInstructionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public string Result { - get { - this.RaiseExceptionIfNecessary(); - return ((string)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SendMailboxSetupInstructionsCompletedEventHandler(object sender, SendMailboxSetupInstructionsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SendMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SendMailboxSetupInstructionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxManagerSettingsCompletedEventHandler(object sender, SetMailboxManagerSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxManagerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetMailboxManagerSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxPermissionsCompletedEventHandler(object sender, GetMailboxPermissionsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailbox Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailbox)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxPermissionsCompletedEventHandler(object sender, SetMailboxPermissionsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetMailboxPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateContactCompletedEventHandler(object sender, CreateContactCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreateContactCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteContactCompletedEventHandler(object sender, DeleteContactCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteContactCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetContactGeneralSettingsCompletedEventHandler(object sender, GetContactGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetContactGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeContact Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeContact)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetContactGeneralSettingsCompletedEventHandler(object sender, SetContactGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetContactGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetContactMailFlowSettingsCompletedEventHandler(object sender, GetContactMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetContactMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeContact Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeContact)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetContactMailFlowSettingsCompletedEventHandler(object sender, SetContactMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetContactMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateDistributionListCompletedEventHandler(object sender, CreateDistributionListCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreateDistributionListCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteDistributionListCompletedEventHandler(object sender, DeleteDistributionListCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteDistributionListCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetDistributionListGeneralSettingsCompletedEventHandler(object sender, GetDistributionListGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDistributionListGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeDistributionList Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeDistributionList)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetDistributionListGeneralSettingsCompletedEventHandler(object sender, SetDistributionListGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetDistributionListGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetDistributionListMailFlowSettingsCompletedEventHandler(object sender, GetDistributionListMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDistributionListMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeDistributionList Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeDistributionList)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetDistributionListMailFlowSettingsCompletedEventHandler(object sender, SetDistributionListMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetDistributionListMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetDistributionListEmailAddressesCompletedEventHandler(object sender, GetDistributionListEmailAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDistributionListEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeEmailAddress[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeEmailAddress[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void AddDistributionListEmailAddressCompletedEventHandler(object sender, AddDistributionListEmailAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddDistributionListEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddDistributionListEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetDistributionListPrimaryEmailAddressCompletedEventHandler(object sender, SetDistributionListPrimaryEmailAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetDistributionListPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetDistributionListPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteDistributionListEmailAddressesCompletedEventHandler(object sender, DeleteDistributionListEmailAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteDistributionListEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetDistributionListPermissionsCompletedEventHandler(object sender, SetDistributionListPermissionsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetDistributionListPermissionsCompletedEventHandler(object sender, GetDistributionListPermissionsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeDistributionListResult Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeDistributionListResult)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMobileDevicesCompletedEventHandler(object sender, GetMobileDevicesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMobileDevicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMobileDevice[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMobileDevice[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMobileDeviceCompletedEventHandler(object sender, GetMobileDeviceCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMobileDeviceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMobileDeviceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMobileDevice Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMobileDevice)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void WipeDataFromDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CancelRemoteWipeRequestCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void RemoveDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetExchangeMailboxPlansCompletedEventHandler(object sender, GetExchangeMailboxPlansCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeMailboxPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetExchangeMailboxPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetExchangeMailboxPlansCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetExchangeMailboxPlansCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ExchangeMailboxPlan[] Result { - get { + public ExchangeMailboxPlan[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ExchangeMailboxPlan[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetExchangeMailboxPlanCompletedEventHandler(object sender, GetExchangeMailboxPlanCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ExchangeMailboxPlan Result { - get { + public ExchangeMailboxPlan Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ExchangeMailboxPlan)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddExchangeMailboxPlanCompletedEventHandler(object sender, AddExchangeMailboxPlanCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class AddExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal AddExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal AddExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateExchangeMailboxPlanCompletedEventHandler(object sender, UpdateExchangeMailboxPlanCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class UpdateExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal UpdateExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal UpdateExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteExchangeMailboxPlanCompletedEventHandler(object sender, DeleteExchangeMailboxPlanCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetOrganizationDefaultExchangeMailboxPlanCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreatePublicFolderCompletedEventHandler(object sender, CreatePublicFolderCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreatePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class CreatePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal CreatePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal CreatePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeletePublicFoldersCompletedEventHandler(object sender, DeletePublicFoldersCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeletePublicFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeletePublicFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeletePublicFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeletePublicFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeletePublicFolderCompletedEventHandler(object sender, DeletePublicFolderCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeletePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeletePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeletePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeletePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void EnableMailPublicFolderCompletedEventHandler(object sender, EnableMailPublicFolderCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class EnableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class EnableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal EnableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal EnableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DisableMailPublicFolderCompletedEventHandler(object sender, DisableMailPublicFolderCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DisableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DisableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DisableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DisableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPublicFolderGeneralSettingsCompletedEventHandler(object sender, GetPublicFolderGeneralSettingsCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ExchangePublicFolder Result { - get { + public ExchangePublicFolder Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ExchangePublicFolder)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetPublicFolderGeneralSettingsCompletedEventHandler(object sender, SetPublicFolderGeneralSettingsCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, GetPublicFolderMailFlowSettingsCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ExchangePublicFolder Result { - get { + public ExchangePublicFolder Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ExchangePublicFolder)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, SetPublicFolderMailFlowSettingsCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPublicFolderEmailAddressesCompletedEventHandler(object sender, GetPublicFolderEmailAddressesCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetPublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetPublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetPublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ExchangeEmailAddress[] Result { - get { + public ExchangeEmailAddress[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ExchangeEmailAddress[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddPublicFolderEmailAddressCompletedEventHandler(object sender, AddPublicFolderEmailAddressCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddPublicFolderEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class AddPublicFolderEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal AddPublicFolderEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal AddPublicFolderEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetPublicFolderPrimaryEmailAddressCompletedEventHandler(object sender, SetPublicFolderPrimaryEmailAddressCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetPublicFolderPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SetPublicFolderPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SetPublicFolderPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SetPublicFolderPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeletePublicFolderEmailAddressesCompletedEventHandler(object sender, DeletePublicFolderEmailAddressesCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeletePublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeletePublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeletePublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeletePublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddExchangeDisclaimerCompletedEventHandler(object sender, AddExchangeDisclaimerCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddExchangeDisclaimerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void UpdateExchangeDisclaimerCompletedEventHandler(object sender, UpdateExchangeDisclaimerCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UpdateExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal UpdateExchangeDisclaimerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteExchangeDisclaimerCompletedEventHandler(object sender, DeleteExchangeDisclaimerCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteExchangeDisclaimerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeDisclaimerCompletedEventHandler(object sender, GetExchangeDisclaimerCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetExchangeDisclaimerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeDisclaimer Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeDisclaimer)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeDisclaimersCompletedEventHandler(object sender, GetExchangeDisclaimersCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeDisclaimersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetExchangeDisclaimersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeDisclaimer[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeDisclaimer[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetExchangeAccountDisclaimerIdCompletedEventHandler(object sender, SetExchangeAccountDisclaimerIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetExchangeAccountDisclaimerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetExchangeAccountDisclaimerIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeAccountDisclaimerIdCompletedEventHandler(object sender, GetExchangeAccountDisclaimerIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeAccountDisclaimerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetExchangeAccountDisclaimerIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetRawExchangeOrganizationsPagedCompletedEventHandler(object sender, GetRawExchangeOrganizationsPagedCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRawExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetRawExchangeOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public System.Data.DataSet Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((System.Data.DataSet)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeOrganizationsPagedCompletedEventHandler(object sender, GetExchangeOrganizationsPagedCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetExchangeOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public OrganizationsPaged Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((OrganizationsPaged)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeOrganizationsCompletedEventHandler(object sender, GetExchangeOrganizationsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetExchangeOrganizationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public Organization[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((Organization[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetOrganizationCompletedEventHandler(object sender, GetOrganizationCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public Organization Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((Organization)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetOrganizationStatisticsCompletedEventHandler(object sender, GetOrganizationStatisticsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetOrganizationStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetOrganizationStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public OrganizationStatistics Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((OrganizationStatistics)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetOrganizationStatisticsByOrganizationCompletedEventHandler(object sender, GetOrganizationStatisticsByOrganizationCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetOrganizationStatisticsByOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetOrganizationStatisticsByOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public OrganizationStatistics Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((OrganizationStatistics)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetOrganizationStorageLimitsCompletedEventHandler(object sender, GetOrganizationStorageLimitsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetOrganizationStorageLimitsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public Organization Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((Organization)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetOrganizationStorageLimitsCompletedEventHandler(object sender, SetOrganizationStorageLimitsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetOrganizationStorageLimitsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxesStatisticsCompletedEventHandler(object sender, GetMailboxesStatisticsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxesStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxesStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeItemStatistics[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeItemStatistics[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxStatisticsCompletedEventHandler(object sender, GetMailboxStatisticsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailboxStatistics Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailboxStatistics)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CalculateOrganizationDiskspaceCompletedEventHandler(object sender, CalculateOrganizationDiskspaceCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CalculateOrganizationDiskspaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CalculateOrganizationDiskspaceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetActiveSyncPolicyCompletedEventHandler(object sender, GetActiveSyncPolicyCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetActiveSyncPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeActiveSyncPolicy Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeActiveSyncPolicy)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetActiveSyncPolicyCompletedEventHandler(object sender, SetActiveSyncPolicyCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetActiveSyncPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddAuthoritativeDomainCompletedEventHandler(object sender, AddAuthoritativeDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddAuthoritativeDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteAuthoritativeDomainCompletedEventHandler(object sender, DeleteAuthoritativeDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteAuthoritativeDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetAccountsPagedCompletedEventHandler(object sender, GetAccountsPagedCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetAccountsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetAccountsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeAccountsPaged Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeAccountsPaged)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetAccountsCompletedEventHandler(object sender, GetAccountsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeAccount[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeAccount[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeAccountByMailboxPlanIdCompletedEventHandler(object sender, GetExchangeAccountByMailboxPlanIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeAccountByMailboxPlanIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetExchangeAccountByMailboxPlanIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeAccount[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeAccount[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SearchAccountsCompletedEventHandler(object sender, SearchAccountsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SearchAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SearchAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeAccount[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeAccount[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetAccountCompletedEventHandler(object sender, GetAccountCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeAccount Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeAccount)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SearchAccountCompletedEventHandler(object sender, SearchAccountCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SearchAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SearchAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeAccount Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeAccount)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CheckAccountCredentialsCompletedEventHandler(object sender, CheckAccountCredentialsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CheckAccountCredentialsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CheckAccountCredentialsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public bool Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateMailboxCompletedEventHandler(object sender, CreateMailboxCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteMailboxCompletedEventHandler(object sender, DeleteMailboxCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DisableMailboxCompletedEventHandler(object sender, DisableMailboxCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DisableMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DisableMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxAdvancedSettingsCompletedEventHandler(object sender, GetMailboxAdvancedSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxAdvancedSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxAdvancedSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailbox Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailbox)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxGeneralSettingsCompletedEventHandler(object sender, GetMailboxGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailbox Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailbox)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxGeneralSettingsCompletedEventHandler(object sender, SetMailboxGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetMailboxGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxEmailAddressesCompletedEventHandler(object sender, GetMailboxEmailAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeEmailAddress[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeEmailAddress[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddMailboxEmailAddressCompletedEventHandler(object sender, AddMailboxEmailAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddMailboxEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddMailboxEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxPrimaryEmailAddressCompletedEventHandler(object sender, SetMailboxPrimaryEmailAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetMailboxPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetMailboxPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteMailboxEmailAddressesCompletedEventHandler(object sender, DeleteMailboxEmailAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteMailboxEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxMailFlowSettingsCompletedEventHandler(object sender, GetMailboxMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailbox Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailbox)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxMailFlowSettingsCompletedEventHandler(object sender, SetMailboxMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetMailboxMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetExchangeMailboxPlanCompletedEventHandler(object sender, SetExchangeMailboxPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxSetupInstructionsCompletedEventHandler(object sender, GetMailboxSetupInstructionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxSetupInstructionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public string Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SendMailboxSetupInstructionsCompletedEventHandler(object sender, SendMailboxSetupInstructionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SendMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SendMailboxSetupInstructionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxManagerSettingsCompletedEventHandler(object sender, SetMailboxManagerSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetMailboxManagerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetMailboxManagerSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxPermissionsCompletedEventHandler(object sender, GetMailboxPermissionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailbox Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailbox)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxPermissionsCompletedEventHandler(object sender, SetMailboxPermissionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetMailboxPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateContactCompletedEventHandler(object sender, CreateContactCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateContactCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteContactCompletedEventHandler(object sender, DeleteContactCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteContactCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetContactGeneralSettingsCompletedEventHandler(object sender, GetContactGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetContactGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeContact Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeContact)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetContactGeneralSettingsCompletedEventHandler(object sender, SetContactGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetContactGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetContactMailFlowSettingsCompletedEventHandler(object sender, GetContactMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetContactMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeContact Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeContact)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetContactMailFlowSettingsCompletedEventHandler(object sender, SetContactMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetContactMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateDistributionListCompletedEventHandler(object sender, CreateDistributionListCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateDistributionListCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteDistributionListCompletedEventHandler(object sender, DeleteDistributionListCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteDistributionListCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDistributionListGeneralSettingsCompletedEventHandler(object sender, GetDistributionListGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDistributionListGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeDistributionList Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeDistributionList)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetDistributionListGeneralSettingsCompletedEventHandler(object sender, SetDistributionListGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetDistributionListGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDistributionListMailFlowSettingsCompletedEventHandler(object sender, GetDistributionListMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDistributionListMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeDistributionList Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeDistributionList)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetDistributionListMailFlowSettingsCompletedEventHandler(object sender, SetDistributionListMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetDistributionListMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDistributionListEmailAddressesCompletedEventHandler(object sender, GetDistributionListEmailAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDistributionListEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeEmailAddress[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeEmailAddress[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddDistributionListEmailAddressCompletedEventHandler(object sender, AddDistributionListEmailAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddDistributionListEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddDistributionListEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetDistributionListPrimaryEmailAddressCompletedEventHandler(object sender, SetDistributionListPrimaryEmailAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetDistributionListPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetDistributionListPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteDistributionListEmailAddressesCompletedEventHandler(object sender, DeleteDistributionListEmailAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteDistributionListEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetDistributionListPermissionsCompletedEventHandler(object sender, SetDistributionListPermissionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ResultObject Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDistributionListPermissionsCompletedEventHandler(object sender, GetDistributionListPermissionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeDistributionListResult Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeDistributionListResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMobileDevicesCompletedEventHandler(object sender, GetMobileDevicesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMobileDevicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMobileDevice[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMobileDevice[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMobileDeviceCompletedEventHandler(object sender, GetMobileDeviceCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMobileDeviceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMobileDeviceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMobileDevice Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMobileDevice)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void WipeDataFromDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CancelRemoteWipeRequestCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void RemoveDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Comments/CommentsController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Comments/CommentsController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Comments/CommentsController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Comments/CommentsController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ConfigSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/ConfigSettings.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ConfigSettings.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/ConfigSettings.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/CryptoUtils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/CryptoUtils.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/CryptoUtils.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/CryptoUtils.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerIdentity.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/EnterpriseServerIdentity.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerIdentity.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/EnterpriseServerIdentity.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerPrincipal.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/EnterpriseServerPrincipal.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerPrincipal.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/EnterpriseServerPrincipal.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/FileUtils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/FileUtils.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/FileUtils.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/FileUtils.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/IPAddress.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/IPAddress.cs similarity index 79% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/IPAddress.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/IPAddress.cs index c1b440b3..d1b8540e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/IPAddress.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/IPAddress.cs @@ -1,4 +1,32 @@ -using System; +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; using System.Collections.Generic; using System.Linq; using System.Web; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Int128.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/Int128.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Int128.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/Int128.cs index 6df29285..2b706996 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Int128.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/Int128.cs @@ -1,4 +1,32 @@ -/* +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* * Int128.c: Represents a 128-bit signed integer. * * Authors: diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/MailHelper.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/MailHelper.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/MailHelper.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/MailHelper.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/ObjectUtils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/ObjectUtils.cs new file mode 100644 index 00000000..4359ca98 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/ObjectUtils.cs @@ -0,0 +1,668 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Reflection; +using System.Data; +using System.Collections; +using System.Collections.Generic; + +using WebsitePanel.Providers; + +namespace WebsitePanel.EnterpriseServer +{ + /// + /// Summary description for ObjectUtils. + /// + public class ObjectUtils + { + public static DT ConvertObject(ST so) + { + Dictionary sProps = GetTypePropertiesHash(typeof(ST)); + Dictionary dProps = GetTypePropertiesHash(typeof(DT)); + + DT dobj = (DT)Activator.CreateInstance(typeof(DT)); + + // copy properties + foreach (string propName in sProps.Keys) + { + if (dProps.ContainsKey(propName) && sProps[propName].Name != "Item") + { + if (sProps[propName].CanRead) + { + object val = sProps[propName].GetValue(so, null); + if (dProps[propName] != null) + { + if (val != null && dProps[propName].CanWrite) + { + dProps[propName].SetValue(dobj, val, null); + } + } + } + } + } + return dobj; + } + + private static Hashtable typeProperties = new Hashtable(); + + public static Hashtable GetObjectProperties(object obj, bool persistentOnly) + { + Hashtable hash = new Hashtable(); + + Type type = obj.GetType(); + PropertyInfo[] props = type.GetProperties(BindingFlags.Instance + | BindingFlags.Public); + foreach (PropertyInfo prop in props) + { + // check for persistent attribute + object[] attrs = prop.GetCustomAttributes(typeof(PersistentAttribute), false); + if (!persistentOnly || (persistentOnly && attrs.Length > 0) && !hash.ContainsKey(prop.Name)) + { + object val = prop.GetValue(obj, null); + string s = ""; + if (val != null) + { + if (prop.PropertyType == typeof(string[])) + s = String.Join(";", (string[])val); + else if (prop.PropertyType == typeof(int[])) + { + int[] ivals = (int[])val; + string[] svals = new string[ivals.Length]; + for (int i = 0; i < svals.Length; i++) + svals[i] = ivals[i].ToString(); + s = String.Join(";", svals); + } + else + s = val.ToString(); + } + + // add property to hash + hash.Add(prop.Name, s); + } + } + + return hash; + } + + public static void FillCollectionFromDataSet(List list, DataSet ds) + { + if (ds.Tables.Count == 0) + return; + + FillCollectionFromDataView(list, ds.Tables[0].DefaultView); + } + + public static void FillCollectionFromDataView(List list, DataView dv) + { + Type type = typeof(T); + + PropertyInfo[] props = GetTypeProperties(type); + + foreach (DataRowView dr in dv) + { + // create an instance + T obj = (T)Activator.CreateInstance(type); + list.Add(obj); + + // fill properties + for (int i = 0; i < props.Length; i++) + { + string propName = props[i].Name; + if (dv.Table.Columns[propName] == null) + continue; + + object propVal = dr[propName]; + if (propVal == DBNull.Value) + props[i].SetValue(obj, GetNull(props[i].PropertyType), null); + else + { + try + { + // try implicit type conversion + props[i].SetValue(obj, propVal, null); + } + catch + { + // convert to string and then set property value + try + { + string strVal = propVal.ToString(); + props[i].SetValue(obj, Cast(strVal, props[i].PropertyType), null); + } + catch + { + // skip property init + } + } + } + } // for properties + } // for rows + } + + public static List CreateListFromDataReader(IDataReader reader) + { + List list = new List(); + FillCollectionFromDataReader(list, reader); + return list; + } + + public static List CreateListFromDataSet(DataSet ds) + { + List list = new List(); + FillCollectionFromDataSet(list, ds); + return list; + } + + public static void FillCollectionFromDataReader(List list, IDataReader reader) + { + Type type = typeof(T); + + try + { + // get type properties + PropertyInfo[] props = GetTypeProperties(type); + + // iterate through reader + while (reader.Read()) + { + T obj = (T)Activator.CreateInstance(type); + list.Add(obj); + + // set properties + for (int i = 0; i < props.Length; i++) + { + string propName = props[i].Name; + + try + { + + object propVal = reader[propName]; + if (propVal == DBNull.Value) + props[i].SetValue(obj, GetNull(props[i].PropertyType), null); + else + { + try + { + // try implicit type conversion + props[i].SetValue(obj, propVal, null); + } + catch + { + // convert to string and then set property value + try + { + string strVal = propVal.ToString(); + props[i].SetValue(obj, Cast(strVal, props[i].PropertyType), null); + } + catch { } + } + } + } + catch { } // just skip + } // for properties + } + } + finally + { + reader.Close(); + } + } + + public static T FillObjectFromDataView(DataView dv) + { + Type type = typeof(T); + T obj = default(T); + + // get type properties + PropertyInfo[] props = GetTypeProperties(type); + + // iterate through reader + foreach (DataRowView dr in dv) + { + obj = (T)Activator.CreateInstance(type); + + // set properties + for (int i = 0; i < props.Length; i++) + { + string propName = props[i].Name; + + try + { + // verify if there is such a column + if (!dr.Row.Table.Columns.Contains(propName.ToLower())) + { + // if not, we move to another property + // because this one we cannot set + continue; + } + + object propVal = dr[propName]; + if (propVal == DBNull.Value) + props[i].SetValue(obj, GetNull(props[i].PropertyType), null); + else + { + try + { + string strVal = propVal.ToString(); + + //convert to DateTime + if (props[i].PropertyType.UnderlyingSystemType.FullName == typeof(DateTime).FullName) + { + DateTime date = DateTime.MinValue; + if (DateTime.TryParse(strVal, out date)) + { + props[i].SetValue(obj, date, null); + } + } + else + { + //Convert generic + props[i].SetValue(obj, Cast(strVal, props[i].PropertyType), null); + } + } + catch + { + // skip property init + } + } + } + catch { } // just skip + } // for properties + } + + return obj; + } + + public static T FillObjectFromDataReader(IDataReader reader) + { + Type type = typeof(T); + + T obj = default(T); + + try + { + // get type properties + PropertyInfo[] props = GetTypeProperties(type); + + // iterate through reader + while (reader.Read()) + { + obj = (T)Activator.CreateInstance(type); + + // set properties + for (int i = 0; i < props.Length; i++) + { + string propName = props[i].Name; + + try + { + if (!IsColumnExists(propName, reader.GetSchemaTable())) + { + continue; + } + object propVal = reader[propName]; + + if (propVal == DBNull.Value) + props[i].SetValue(obj, GetNull(props[i].PropertyType), null); + else + { + try + { + //try string first + if (props[i].PropertyType.UnderlyingSystemType.FullName == typeof(String).FullName) + { + props[i].SetValue(obj, propVal.ToString(), null); + } + else + { + // then, try implicit type conversion + props[i].SetValue(obj, propVal, null); + } + } + catch + { + // convert to string and then set property value + try + { + string strVal = propVal.ToString(); + props[i].SetValue(obj, Cast(strVal, props[i].PropertyType), null); + } + catch + { + // skip property init + } + } + } + } + catch { } // just skip + } // for properties + } + } + finally + { + reader.Close(); + } + + return obj; + } + + private static Hashtable propertiesCache = new Hashtable(); + + public static object CreateObjectFromDataview(Type type, DataView dv, + string nameColumn, string valueColumn, bool persistentOnly) + { + // create hash of properties from datareader + Hashtable propValues = new Hashtable(); + foreach (DataRowView dr in dv) + { + if (propValues[dr[nameColumn]] == null && !propValues.ContainsKey(dr[nameColumn])) + propValues.Add(dr[nameColumn], dr[valueColumn]); + } + + return CreateObjectFromHash(type, propValues, persistentOnly); + } + + public static object CreateObjectFromDataReader(Type type, IDataReader reader, + string nameColumn, string valueColumn, bool persistentOnly) + { + // create hash of properties from datareader + Hashtable propValues = new Hashtable(); + while (reader.Read()) + { + if (propValues[reader[nameColumn]] == null && !propValues.ContainsKey(reader[nameColumn])) + propValues.Add(reader[nameColumn], reader[valueColumn]); + } + reader.Close(); + + return CreateObjectFromHash(type, propValues, persistentOnly); + } + + public static object CreateObjectFromHash(Type type, Hashtable propValues, bool persistentOnly) + { + // create object + object obj = Activator.CreateInstance(type); + + CreateObjectFromHash(obj, propValues, persistentOnly); + + return obj; + } + + public static void CopyPersistentPropertiesFromSource(T source, T target) + where T : ServiceProviderItem + { + // + var typeSource = source.GetType(); + var typeTarget = target.GetType(); + // get all property infos + Hashtable props = null; + if (propertiesCache[typeSource.Name] != null) + { + // load properties from cache + props = (Hashtable)propertiesCache[typeSource.Name]; + } + else + { + // create properties cache + props = new Hashtable(); + // + PropertyInfo[] objProps = typeSource.GetProperties(BindingFlags.Instance + //| BindingFlags.DeclaredOnly + | BindingFlags.Public); + foreach (PropertyInfo prop in objProps) + { + // check for persistent attribute + object[] attrs = prop.GetCustomAttributes(typeof(PersistentAttribute), false); + // Persistent only + if (attrs.Length > 0 && !props.ContainsKey(prop.Name)) + { + // add property to hash + props.Add(prop.Name, prop); + } + } + + if (!propertiesCache.ContainsKey(typeSource.Name)) + { + // add to cache + propertiesCache.Add(typeSource.Name, props); + } + } + + // Copy the data + foreach (PropertyInfo propertyInfo in props.Values) + { + propertyInfo.SetValue(target, propertyInfo.GetValue(source, null), null); + } + } + + public static void CreateObjectFromHash(object obj, Hashtable propValues, bool persistentOnly) + { + Type type = obj.GetType(); + + // get all property infos + Hashtable props = null; + if (propertiesCache[type.Name] != null) + { + // load properties from cache + props = (Hashtable)propertiesCache[type.Name]; + } + else + { + // create properties cache + props = new Hashtable(); + PropertyInfo[] objProps = type.GetProperties(BindingFlags.Instance + //| BindingFlags.DeclaredOnly + | BindingFlags.Public); + foreach (PropertyInfo prop in objProps) + { + // check for persistent attribute + object[] attrs = prop.GetCustomAttributes(typeof(PersistentAttribute), false); + if (!persistentOnly || (persistentOnly && attrs.Length > 0) && !props.ContainsKey(prop.Name)) + { + // add property to hash + props.Add(prop.Name, prop); + } + } + + if (!propertiesCache.ContainsKey(type.Name)) + { + // add to cache + propertiesCache.Add(type.Name, props); + } + } + + // fill properties + foreach (string propName in propValues.Keys) + { + // try to locate specified property + if (props[propName] != null) + { + // set property + // we support: + // String + // Int32 + // Boolean + // Float + PropertyInfo prop = (PropertyInfo)props[propName]; + string val = propValues[propName].ToString(); + if (prop.PropertyType == typeof(String)) + prop.SetValue(obj, val, null); + else if (prop.PropertyType == typeof(Int32)) + prop.SetValue(obj, Int32.Parse(val), null); + else + if (prop.PropertyType == typeof(long)) + prop.SetValue(obj, long.Parse(val), null); + else + if (prop.PropertyType == typeof(Boolean)) + prop.SetValue(obj, Boolean.Parse(val), null); + else if (prop.PropertyType == typeof(Single)) + prop.SetValue(obj, Single.Parse(val), null); + else if (prop.PropertyType.IsEnum) + prop.SetValue(obj, Enum.Parse(prop.PropertyType, val, true), null); + else + if (prop.PropertyType == typeof(Guid)) + prop.SetValue(obj, new Guid(val), null); + else + if (prop.PropertyType == typeof(string[])) + { + if (val == "") + prop.SetValue(obj, new string[0], null); + else + prop.SetValue(obj, val.Split(';'), null); + } + else if (prop.PropertyType == typeof(int[])) + { + string[] svals = val.Split(';'); + int[] ivals = new int[svals.Length]; + + for (int i = 0; i < svals.Length; i++) + ivals[i] = Int32.Parse(svals[i]); + + if (val == "") + ivals = new int[0]; + + prop.SetValue(obj, ivals, null); + } + } + } + } + + private static Dictionary GetTypePropertiesHash(Type type) + { + Dictionary hash = new Dictionary(); + PropertyInfo[] props = GetTypeProperties(type); + foreach (PropertyInfo prop in props) + { + if (!hash.ContainsKey(prop.Name)) + { + hash.Add(prop.Name, prop); + } + } + return hash; + } + + private static PropertyInfo[] GetTypeProperties(Type type) + { + string typeName = type.AssemblyQualifiedName; + if (typeProperties[typeName] != null) + return (PropertyInfo[])typeProperties[typeName]; + + PropertyInfo[] props = type.GetProperties(BindingFlags.Instance | BindingFlags.Public); + typeProperties[typeName] = props; + return props; + } + + public static object GetNull(Type type) + { + if (type == typeof(string)) + return null; + if (type == typeof(Int32)) + return 0; + if (type == typeof(Int64)) + return 0; + if (type == typeof(Boolean)) + return false; + if (type == typeof(Decimal)) + return 0M; + else + return null; + } + + public static object Cast(string val, Type type) + { + if (type == typeof(string)) + return val; + if (type == typeof(Int32)) + return Int32.Parse(val); + if (type == typeof(Int64)) + return Int64.Parse(val); + if (type == typeof(Boolean)) + return Boolean.Parse(val); + if (type == typeof(Decimal)) + return Decimal.Parse(val); + if (type == typeof(string[]) && val != null) + { + return val.Split(';'); + } + if (type.IsEnum) + return Enum.Parse(type, val, true); + + if (type == typeof(int[]) && val != null) + { + string[] sarr = val.Split(';'); + int[] iarr = new int[sarr.Length]; + for (int i = 0; i < sarr.Length; i++) + iarr[i] = Int32.Parse(sarr[i]); + return iarr; + } + else + return val; + } + + public static string GetTypeFullName(Type type) + { + return type.FullName + ", " + type.Assembly.GetName().Name; + } + + + #region Helper Functions + + /// + /// This function is used to determine whether IDataReader contains a Column. + /// + /// Name of the column. + /// The schema that decribes result-set contains. + /// True, when required column exists in the . Otherwise, false. + /// + /// The followin example shows how to look for the "Role" column in the . + /// + /// IDataReader reader = .... + /// if (!IsColumnExists("Role", reader.GetSchemaTable()) + /// { + /// continue; + /// } + /// + /// object roleValue = reader["Role"]; + /// + /// + static bool IsColumnExists(string columnName, DataTable schemaTable) + { + foreach (DataRow row in schemaTable.Rows) + { + if (String.Compare(row[0].ToString(), columnName, StringComparison.OrdinalIgnoreCase) == 0) + { + return true; + } + } + + return false; + } + + #endregion + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/SecurityContext.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/SecurityContext.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/SecurityContext.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/SecurityContext.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceProviderProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/ServiceProviderProxy.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceProviderProxy.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/ServiceProviderProxy.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceUsernameTokenManager.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/ServiceUsernameTokenManager.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceUsernameTokenManager.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/ServiceUsernameTokenManager.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/UsernameAssertion.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/UsernameAssertion.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/UsernameAssertion.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/UsernameAssertion.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/Utils.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/Utils.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs new file mode 100644 index 00000000..1db00f99 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs @@ -0,0 +1,3992 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Configuration; +using System.Data; +using System.Data.SqlClient; +using System.Text.RegularExpressions; +using WebsitePanel.Providers.HostedSolution; +using Microsoft.ApplicationBlocks.Data; +using System.Collections.Generic; +using Microsoft.Win32; + +namespace WebsitePanel.EnterpriseServer +{ + /// + /// Summary description for DataProvider. + /// + public static class DataProvider + { + + static string EnterpriseServerRegistryPath = "SOFTWARE\\WebsitePanel\\EnterpriseServer"; + + private static string ConnectionString + { + get + { + string ConnectionKey = ConfigurationManager.AppSettings["WebsitePanel.AltConnectionString"]; + string value = string.Empty; + + if (!string.IsNullOrEmpty(ConnectionKey)) + { + RegistryKey root = Registry.LocalMachine; + RegistryKey rk = root.OpenSubKey(EnterpriseServerRegistryPath); + if (rk != null) + { + value = (string)rk.GetValue(ConnectionKey, null); + rk.Close(); + } + } + + if (!string.IsNullOrEmpty(value)) + return value; + else + return ConfigurationManager.ConnectionStrings["EnterpriseServer"].ConnectionString; + } + } + + private static string ObjectQualifier + { + get + { + return ""; + } + } + + #region System Settings + + public static IDataReader GetSystemSettings(string settingsName) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetSystemSettings", + new SqlParameter("@SettingsName", settingsName) + ); + } + + public static void SetSystemSettings(string settingsName, string xml) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetSystemSettings", + new SqlParameter("@SettingsName", settingsName), + new SqlParameter("@Xml", xml) + ); + } + + #endregion + + #region Users + public static bool CheckUserExists(string username) + { + SqlParameter prmExists = new SqlParameter("@Exists", SqlDbType.Bit); + prmExists.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "CheckUserExists", + prmExists, + new SqlParameter("@username", username)); + + return Convert.ToBoolean(prmExists.Value); + } + + public static DataSet GetUsersPaged(int actorId, int userId, string filterColumn, string filterValue, + int statusId, int roleId, string sortColumn, int startRow, int maximumRows, bool recursive) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUsersPaged", + new SqlParameter("@actorId", actorId), + new SqlParameter("@UserID", userId), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@statusId", statusId), + new SqlParameter("@roleId", roleId), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows), + new SqlParameter("@recursive", recursive)); + } + + public static DataSet GetUsersSummary(int actorId, int userId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUsersSummary", + new SqlParameter("@actorId", actorId), + new SqlParameter("@UserID", userId)); + } + + public static DataSet GetUserDomainsPaged(int actorId, int userId, string filterColumn, string filterValue, + string sortColumn, int startRow, int maximumRows) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserDomainsPaged", + new SqlParameter("@actorId", actorId), + new SqlParameter("@UserID", userId), + new SqlParameter("@filterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@filterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@sortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + } + + public static DataSet GetUsers(int actorId, int ownerId, bool recursive) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUsers", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@OwnerID", ownerId), + new SqlParameter("@Recursive", recursive)); + } + + public static DataSet GetUserParents(int actorId, int userId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserParents", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId)); + } + + public static DataSet GetUserPeers(int actorId, int userId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserPeers", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@userId", userId)); + } + + public static IDataReader GetUserByExchangeOrganizationIdInternally(int itemId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserByExchangeOrganizationIdInternally", + new SqlParameter("@ItemID", itemId)); + } + + + + public static IDataReader GetUserByIdInternally(int userId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserByIdInternally", + new SqlParameter("@UserID", userId)); + } + + public static IDataReader GetUserByUsernameInternally(string username) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserByUsernameInternally", + new SqlParameter("@Username", username)); + } + + public static IDataReader GetUserById(int actorId, int userId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserById", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId)); + } + + public static IDataReader GetUserByUsername(int actorId, string username) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserByUsername", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@Username", username)); + } + + public static int AddUser(int actorId, int ownerId, int roleId, int statusId, string subscriberNumber, int loginStatusId, bool isDemo, + bool isPeer, string comments, string username, string password, + string firstName, string lastName, string email, string secondaryEmail, + string address, string city, string country, string state, string zip, + string primaryPhone, string secondaryPhone, string fax, string instantMessenger, bool htmlMail, + string companyName, bool ecommerceEnabled) + { + SqlParameter prmUserId = new SqlParameter("@UserID", SqlDbType.Int); + prmUserId.Direction = ParameterDirection.Output; + + // add user to WebsitePanel Users table + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddUser", + prmUserId, + new SqlParameter("@ActorId", actorId), + new SqlParameter("@OwnerID", ownerId), + new SqlParameter("@RoleID", roleId), + new SqlParameter("@StatusId", statusId), + new SqlParameter("@SubscriberNumber", subscriberNumber), + new SqlParameter("@LoginStatusId", loginStatusId), + new SqlParameter("@IsDemo", isDemo), + new SqlParameter("@IsPeer", isPeer), + new SqlParameter("@Comments", comments), + new SqlParameter("@username", username), + new SqlParameter("@password", password), + new SqlParameter("@firstName", firstName), + new SqlParameter("@lastName", lastName), + new SqlParameter("@email", email), + new SqlParameter("@secondaryEmail", secondaryEmail), + new SqlParameter("@address", address), + new SqlParameter("@city", city), + new SqlParameter("@country", country), + new SqlParameter("@state", state), + new SqlParameter("@zip", zip), + new SqlParameter("@primaryPhone", primaryPhone), + new SqlParameter("@secondaryPhone", secondaryPhone), + new SqlParameter("@fax", fax), + new SqlParameter("@instantMessenger", instantMessenger), + new SqlParameter("@htmlMail", htmlMail), + new SqlParameter("@CompanyName", companyName), + new SqlParameter("@EcommerceEnabled", ecommerceEnabled)); + + return Convert.ToInt32(prmUserId.Value); + } + + public static void UpdateUser(int actorId, int userId, int roleId, int statusId, string subscriberNumber, int loginStatusId, bool isDemo, + bool isPeer, string comments, string firstName, string lastName, string email, string secondaryEmail, + string address, string city, string country, string state, string zip, + string primaryPhone, string secondaryPhone, string fax, string instantMessenger, bool htmlMail, + string companyName, bool ecommerceEnabled, string additionalParams) + { + // update user + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateUser", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@RoleID", roleId), + new SqlParameter("@StatusId", statusId), + new SqlParameter("@SubscriberNumber", subscriberNumber), + new SqlParameter("@LoginStatusId", loginStatusId), + new SqlParameter("@UserID", userId), + new SqlParameter("@IsDemo", isDemo), + new SqlParameter("@IsPeer", isPeer), + new SqlParameter("@Comments", comments), + new SqlParameter("@firstName", firstName), + new SqlParameter("@lastName", lastName), + new SqlParameter("@email", email), + new SqlParameter("@secondaryEmail", secondaryEmail), + new SqlParameter("@address", address), + new SqlParameter("@city", city), + new SqlParameter("@country", country), + new SqlParameter("@state", state), + new SqlParameter("@zip", zip), + new SqlParameter("@primaryPhone", primaryPhone), + new SqlParameter("@secondaryPhone", secondaryPhone), + new SqlParameter("@fax", fax), + new SqlParameter("@instantMessenger", instantMessenger), + new SqlParameter("@htmlMail", htmlMail), + new SqlParameter("@CompanyName", companyName), + new SqlParameter("@EcommerceEnabled", ecommerceEnabled), + new SqlParameter("@AdditionalParams", additionalParams)); + } + + public static void UpdateUserFailedLoginAttempt(int userId, int lockOut, bool reset) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateUserFailedLoginAttempt", + new SqlParameter("@UserID", userId), + new SqlParameter("@LockOut", lockOut), + new SqlParameter("@Reset", reset)); + } + + public static void DeleteUser(int actorId, int userId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteUser", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId)); + } + + public static void ChangeUserPassword(int actorId, int userId, string password) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "ChangeUserPassword", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId), + new SqlParameter("@password", password)); + } + + #endregion + + #region User Settings + public static IDataReader GetUserSettings(int actorId, int userId, string settingsName) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserSettings", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId), + new SqlParameter("@SettingsName", settingsName)); + } + public static void UpdateUserSettings(int actorId, int userId, string settingsName, string xml) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateUserSettings", + new SqlParameter("@UserID", userId), + new SqlParameter("@ActorId", actorId), + new SqlParameter("@SettingsName", settingsName), + new SqlParameter("@Xml", xml)); + } + #endregion + + #region Servers + public static DataSet GetAllServers(int actorId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetAllServers", + new SqlParameter("@actorId", actorId)); + } + public static DataSet GetServers(int actorId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServers", + new SqlParameter("@actorId", actorId)); + } + + public static IDataReader GetServer(int actorId, int serverId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServer", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServerID", serverId)); + } + + public static IDataReader GetServerShortDetails(int serverId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServerShortDetails", + new SqlParameter("@ServerID", serverId)); + } + + public static IDataReader GetServerByName(int actorId, string serverName) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServerByName", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServerName", serverName)); + } + + public static IDataReader GetServerInternal(int serverId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServerInternal", + new SqlParameter("@ServerID", serverId)); + } + + public static int AddServer(string serverName, string serverUrl, + string password, string comments, bool virtualServer, string instantDomainAlias, + int primaryGroupId, bool adEnabled, string adRootDomain, string adUsername, string adPassword, + string adAuthenticationType) + { + SqlParameter prmServerId = new SqlParameter("@ServerID", SqlDbType.Int); + prmServerId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddServer", + prmServerId, + new SqlParameter("@ServerName", serverName), + new SqlParameter("@ServerUrl", serverUrl), + new SqlParameter("@Password", password), + new SqlParameter("@Comments", comments), + new SqlParameter("@VirtualServer", virtualServer), + new SqlParameter("@InstantDomainAlias", instantDomainAlias), + new SqlParameter("@PrimaryGroupId", primaryGroupId), + new SqlParameter("@AdEnabled", adEnabled), + new SqlParameter("@AdRootDomain", adRootDomain), + new SqlParameter("@AdUsername", adUsername), + new SqlParameter("@AdPassword", adPassword), + new SqlParameter("@AdAuthenticationType", adAuthenticationType)); + + return Convert.ToInt32(prmServerId.Value); + } + + public static void UpdateServer(int serverId, string serverName, string serverUrl, + string password, string comments, string instantDomainAlias, + int primaryGroupId, bool adEnabled, string adRootDomain, string adUsername, string adPassword, + string adAuthenticationType) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateServer", + new SqlParameter("@ServerID", serverId), + new SqlParameter("@ServerName", serverName), + new SqlParameter("@ServerUrl", serverUrl), + new SqlParameter("@Password", password), + new SqlParameter("@Comments", comments), + new SqlParameter("@InstantDomainAlias", instantDomainAlias), + new SqlParameter("@PrimaryGroupId", primaryGroupId), + new SqlParameter("@AdEnabled", adEnabled), + new SqlParameter("@AdRootDomain", adRootDomain), + new SqlParameter("@AdUsername", adUsername), + new SqlParameter("@AdPassword", adPassword), + new SqlParameter("@AdAuthenticationType", adAuthenticationType)); + + } + + public static int DeleteServer(int serverId) + { + SqlParameter prmResult = new SqlParameter("@Result", SqlDbType.Int); + prmResult.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteServer", + prmResult, + new SqlParameter("@ServerID", serverId)); + + return Convert.ToInt32(prmResult.Value); + } + #endregion + + #region Virtual Servers + public static DataSet GetVirtualServers(int actorId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetVirtualServers", + new SqlParameter("@actorId", actorId)); + } + + public static DataSet GetAvailableVirtualServices(int actorId, int serverId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetAvailableVirtualServices", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServerID", serverId)); + } + + public static DataSet GetVirtualServices(int actorId, int serverId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetVirtualServices", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServerID", serverId)); + } + + public static void AddVirtualServices(int serverId, string xml) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddVirtualServices", + new SqlParameter("@ServerID", serverId), + new SqlParameter("@xml", xml)); + } + + public static void DeleteVirtualServices(int serverId, string xml) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteVirtualServices", + new SqlParameter("@ServerID", serverId), + new SqlParameter("@xml", xml)); + } + + public static void UpdateVirtualGroups(int serverId, string xml) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateVirtualGroups", + new SqlParameter("@ServerID", serverId), + new SqlParameter("@xml", xml)); + } + #endregion + + #region Providers + + // Providers methods + + public static DataSet GetProviders() + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetProviders"); + } + + public static DataSet GetGroupProviders(int groupId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetGroupProviders", + new SqlParameter("@groupId", groupId)); + } + + public static IDataReader GetProvider(int providerId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetProvider", + new SqlParameter("@ProviderID", providerId)); + } + + public static IDataReader GetProviderByServiceID(int serviceId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetProviderByServiceID", + new SqlParameter("@ServiceID", serviceId)); + } + + #endregion + + #region IPAddresses + public static IDataReader GetIPAddress(int ipAddressId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetIPAddress", + new SqlParameter("@AddressID", ipAddressId)); + } + + public static IDataReader GetIPAddresses(int actorId, int poolId, int serverId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetIPAddresses", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PoolId", poolId), + new SqlParameter("@ServerId", serverId)); + return reader; + } + + public static IDataReader GetIPAddressesPaged(int actorId, int poolId, int serverId, + string filterColumn, string filterValue, + string sortColumn, int startRow, int maximumRows) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetIPAddressesPaged", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PoolId", poolId), + new SqlParameter("@ServerId", serverId), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + return reader; + } + + public static int AddIPAddress(int poolId, int serverId, string externalIP, string internalIP, + string subnetMask, string defaultGateway, string comments) + { + SqlParameter prmAddresId = new SqlParameter("@AddressID", SqlDbType.Int); + prmAddresId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddIPAddress", + prmAddresId, + new SqlParameter("@ServerID", serverId), + new SqlParameter("@externalIP", externalIP), + new SqlParameter("@internalIP", internalIP), + new SqlParameter("@PoolId", poolId), + new SqlParameter("@SubnetMask", subnetMask), + new SqlParameter("@DefaultGateway", defaultGateway), + new SqlParameter("@Comments", comments)); + + return Convert.ToInt32(prmAddresId.Value); + } + + public static void UpdateIPAddress(int addressId, int poolId, int serverId, + string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateIPAddress", + new SqlParameter("@AddressID", addressId), + new SqlParameter("@externalIP", externalIP), + new SqlParameter("@internalIP", internalIP), + new SqlParameter("@ServerID", serverId), + new SqlParameter("@PoolId", poolId), + new SqlParameter("@SubnetMask", subnetMask), + new SqlParameter("@DefaultGateway", defaultGateway), + new SqlParameter("@Comments", comments)); + } + + public static void UpdateIPAddresses(string xmlIds, int poolId, int serverId, + string subnetMask, string defaultGateway, string comments) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateIPAddresses", + new SqlParameter("@Xml", xmlIds), + new SqlParameter("@ServerID", serverId), + new SqlParameter("@PoolId", poolId), + new SqlParameter("@SubnetMask", subnetMask), + new SqlParameter("@DefaultGateway", defaultGateway), + new SqlParameter("@Comments", comments)); + } + + public static int DeleteIPAddress(int ipAddressId) + { + SqlParameter prmResult = new SqlParameter("@Result", SqlDbType.Int); + prmResult.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteIPAddress", + prmResult, + new SqlParameter("@AddressID", ipAddressId)); + + return Convert.ToInt32(prmResult.Value); + } + + + + #endregion + + #region Clusters + public static IDataReader GetClusters(int actorId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetClusters", + new SqlParameter("@actorId", actorId)); + } + + public static int AddCluster(string clusterName) + { + SqlParameter prmId = new SqlParameter("@ClusterID", SqlDbType.Int); + prmId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddCluster", + prmId, + new SqlParameter("@ClusterName", clusterName)); + + return Convert.ToInt32(prmId.Value); + } + + public static void DeleteCluster(int clusterId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteCluster", + new SqlParameter("@ClusterId", clusterId)); + } + + #endregion + + #region Global DNS records + public static DataSet GetDnsRecordsByService(int actorId, int serviceId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDnsRecordsByService", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServiceId", serviceId)); + } + + public static DataSet GetDnsRecordsByServer(int actorId, int serverId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDnsRecordsByServer", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServerId", serverId)); + } + + public static DataSet GetDnsRecordsByPackage(int actorId, int packageId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDnsRecordsByPackage", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageId", packageId)); + } + + public static DataSet GetDnsRecordsByGroup(int groupId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDnsRecordsByGroup", + new SqlParameter("@GroupId", groupId)); + } + + public static DataSet GetDnsRecordsTotal(int actorId, int packageId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDnsRecordsTotal", + new SqlParameter("@actorId", actorId), + new SqlParameter("@packageId", packageId)); + } + + public static IDataReader GetDnsRecord(int actorId, int recordId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDnsRecord", + new SqlParameter("@actorId", actorId), + new SqlParameter("@RecordId", recordId)); + } + + public static void AddDnsRecord(int actorId, int serviceId, int serverId, int packageId, string recordType, + string recordName, string recordData, int mxPriority, int SrvPriority, int SrvWeight, int SrvPort, int ipAddressId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddDnsRecord", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServiceId", serviceId), + new SqlParameter("@ServerId", serverId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@RecordType", recordType), + new SqlParameter("@RecordName", recordName), + new SqlParameter("@RecordData", recordData), + new SqlParameter("@MXPriority", mxPriority), + new SqlParameter("@SrvPriority", SrvPriority), + new SqlParameter("@SrvWeight", SrvWeight), + new SqlParameter("@SrvPort", SrvPort), + new SqlParameter("@IpAddressId", ipAddressId)); + } + + public static void UpdateDnsRecord(int actorId, int recordId, string recordType, + string recordName, string recordData, int mxPriority, int SrvPriority, int SrvWeight, int SrvPort, int ipAddressId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateDnsRecord", + new SqlParameter("@actorId", actorId), + new SqlParameter("@RecordId", recordId), + new SqlParameter("@RecordType", recordType), + new SqlParameter("@RecordName", recordName), + new SqlParameter("@RecordData", recordData), + new SqlParameter("@MXPriority", mxPriority), + new SqlParameter("@SrvPriority", SrvPriority), + new SqlParameter("@SrvWeight", SrvWeight), + new SqlParameter("@SrvPort", SrvPort), + new SqlParameter("@IpAddressId", ipAddressId)); + } + + + public static void DeleteDnsRecord(int actorId, int recordId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteDnsRecord", + new SqlParameter("@actorId", actorId), + new SqlParameter("@RecordId", recordId)); + } + #endregion + + #region Domains + public static DataSet GetDomains(int actorId, int packageId, bool recursive) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDomains", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@Recursive", recursive)); + } + + public static DataSet GetResellerDomains(int actorId, int packageId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetResellerDomains", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageId", packageId)); + } + + public static DataSet GetDomainsPaged(int actorId, int packageId, int serverId, bool recursive, string filterColumn, string filterValue, + string sortColumn, int startRow, int maximumRows) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDomainsPaged", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@serverId", serverId), + new SqlParameter("@recursive", recursive), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@StartRow", startRow), + new SqlParameter("@MaximumRows", maximumRows)); + } + + public static IDataReader GetDomain(int actorId, int domainId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDomain", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@domainId", domainId)); + } + + public static IDataReader GetDomainByName(int actorId, string domainName, bool searchOnDomainPointer, bool isDomainPointer) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDomainByName", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@domainName", domainName), + new SqlParameter("@SearchOnDomainPointer", searchOnDomainPointer), + new SqlParameter("@IsDomainPointer", isDomainPointer)); + } + + + public static DataSet GetDomainsByZoneId(int actorId, int zoneId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDomainsByZoneID", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@ZoneID", zoneId)); + } + + public static DataSet GetDomainsByDomainItemId(int actorId, int domainId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetDomainsByDomainItemId", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@DomainID", domainId)); + } + + + + public static int CheckDomain(int packageId, string domainName, bool isDomainPointer) + { + SqlParameter prmId = new SqlParameter("@Result", SqlDbType.Int); + prmId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "CheckDomain", + prmId, + new SqlParameter("@packageId", packageId), + new SqlParameter("@domainName", domainName), + new SqlParameter("@isDomainPointer", isDomainPointer)); + + return Convert.ToInt32(prmId.Value); + } + + + + public static int CheckDomainUsedByHostedOrganization(string domainName) + { + SqlParameter prmId = new SqlParameter("@Result", SqlDbType.Int); + prmId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "CheckDomainUsedByHostedOrganization", + prmId, + new SqlParameter("@domainName", domainName)); + + return Convert.ToInt32(prmId.Value); + } + + + public static int AddDomain(int actorId, int packageId, int zoneItemId, string domainName, + bool hostingAllowed, int webSiteId, int mailDomainId, bool isSubDomain, bool isInstantAlias, bool isDomainPointer) + { + SqlParameter prmId = new SqlParameter("@DomainID", SqlDbType.Int); + prmId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddDomain", + prmId, + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@ZoneItemId", zoneItemId), + new SqlParameter("@DomainName", domainName), + new SqlParameter("@HostingAllowed", hostingAllowed), + new SqlParameter("@WebSiteId", webSiteId), + new SqlParameter("@MailDomainId", mailDomainId), + new SqlParameter("@IsSubDomain", isSubDomain), + new SqlParameter("@IsInstantAlias", isInstantAlias), + new SqlParameter("@IsDomainPointer", isDomainPointer)); + + return Convert.ToInt32(prmId.Value); + } + + public static void UpdateDomain(int actorId, int domainId, int zoneItemId, + bool hostingAllowed, int webSiteId, int mailDomainId, int domainItemId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateDomain", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@DomainId", domainId), + new SqlParameter("@ZoneItemId", zoneItemId), + new SqlParameter("@HostingAllowed", hostingAllowed), + new SqlParameter("@WebSiteId", webSiteId), + new SqlParameter("@MailDomainId", mailDomainId), + new SqlParameter("@DomainItemId", domainItemId)); + } + + public static void DeleteDomain(int actorId, int domainId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteDomain", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@DomainId", domainId)); + } + #endregion + + #region Services + public static IDataReader GetServicesByServerId(int actorId, int serverId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServicesByServerID", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServerID", serverId)); + } + + public static IDataReader GetServicesByServerIdGroupName(int actorId, int serverId, string groupName) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServicesByServerIdGroupName", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@ServerID", serverId), + new SqlParameter("@GroupName", groupName)); + } + + public static DataSet GetRawServicesByServerId(int actorId, int serverId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetRawServicesByServerID", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServerID", serverId)); + } + + public static DataSet GetServicesByGroupId(int actorId, int groupId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServicesByGroupID", + new SqlParameter("@actorId", actorId), + new SqlParameter("@groupId", groupId)); + } + + public static DataSet GetServicesByGroupName(int actorId, string groupName) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServicesByGroupName", + new SqlParameter("@actorId", actorId), + new SqlParameter("@GroupName", groupName)); + } + + public static IDataReader GetService(int actorId, int serviceId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, + CommandType.StoredProcedure, + ObjectQualifier + "GetService", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServiceID", serviceId)); + } + + public static int AddService(int serverId, int providerId, string serviceName, int serviceQuotaValue, + int clusterId, string comments) + { + SqlParameter prmServiceId = new SqlParameter("@ServiceID", SqlDbType.Int); + prmServiceId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddService", + prmServiceId, + new SqlParameter("@ServerID", serverId), + new SqlParameter("@ProviderID", providerId), + new SqlParameter("@ServiceName", serviceName), + new SqlParameter("@ServiceQuotaValue", serviceQuotaValue), + new SqlParameter("@ClusterId", clusterId), + new SqlParameter("@comments", comments)); + + return Convert.ToInt32(prmServiceId.Value); + } + + public static void UpdateService(int serviceId, string serviceName, int serviceQuotaValue, + int clusterId, string comments) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateService", + new SqlParameter("@ServiceName", serviceName), + new SqlParameter("@ServiceID", serviceId), + new SqlParameter("@ServiceQuotaValue", serviceQuotaValue), + new SqlParameter("@ClusterId", clusterId), + new SqlParameter("@Comments", comments)); + } + + public static int DeleteService(int serviceId) + { + SqlParameter prmResult = new SqlParameter("@Result", SqlDbType.Int); + prmResult.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteService", + prmResult, + new SqlParameter("@ServiceID", serviceId)); + + return Convert.ToInt32(prmResult.Value); + } + + public static IDataReader GetServiceProperties(int actorId, int serviceId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, + CommandType.StoredProcedure, + ObjectQualifier + "GetServiceProperties", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServiceID", serviceId)); + } + + public static void UpdateServiceProperties(int serviceId, string xml) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateServiceProperties", + new SqlParameter("@ServiceId", serviceId), + new SqlParameter("@Xml", xml)); + } + + public static IDataReader GetResourceGroup(int groupId) + { + return SqlHelper.ExecuteReader(ConnectionString, + CommandType.StoredProcedure, + ObjectQualifier + "GetResourceGroup", + new SqlParameter("@groupId", groupId)); + } + + public static DataSet GetResourceGroups() + { + return SqlHelper.ExecuteDataset(ConnectionString, + CommandType.StoredProcedure, + ObjectQualifier + "GetResourceGroups"); + } + #endregion + + #region Service Items + public static DataSet GetServiceItems(int actorId, int packageId, string groupName, string itemTypeName, bool recursive) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItems", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@GroupName", groupName), + new SqlParameter("@ItemTypeName", itemTypeName), + new SqlParameter("@Recursive", recursive)); + + } + + public static DataSet GetServiceItemsPaged(int actorId, int packageId, string groupName, string itemTypeName, + int serverId, bool recursive, string filterColumn, string filterValue, + string sortColumn, int startRow, int maximumRows) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItemsPaged", + new SqlParameter("@actorId", actorId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@groupName", groupName), + new SqlParameter("@serverId", serverId), + new SqlParameter("@itemTypeName", itemTypeName), + new SqlParameter("@recursive", recursive), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + } + + public static DataSet GetSearchableServiceItemTypes() + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetSearchableServiceItemTypes"); + } + + public static DataSet GetServiceItemsByService(int actorId, int serviceId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItemsByService", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ServiceID", serviceId)); + } + + public static int GetServiceItemsCount(string typeName, string groupName, int serviceId) + { + SqlParameter prmTotalNumber = new SqlParameter("@TotalNumber", SqlDbType.Int); + prmTotalNumber.Direction = ParameterDirection.Output; + + DataSet ds = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItemsCount", + prmTotalNumber, + new SqlParameter("@itemTypeName", typeName), + new SqlParameter("@groupName", groupName), + new SqlParameter("@serviceId", serviceId)); + + // read identity + return Convert.ToInt32(prmTotalNumber.Value); + } + + public static DataSet GetServiceItemsForStatistics(int actorId, int serviceId, int packageId, + bool calculateDiskspace, bool calculateBandwidth, bool suspendable, bool disposable) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItemsForStatistics", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ServiceID", serviceId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@calculateDiskspace", calculateDiskspace), + new SqlParameter("@calculateBandwidth", calculateBandwidth), + new SqlParameter("@suspendable", suspendable), + new SqlParameter("@disposable", disposable)); + } + + public static DataSet GetServiceItemsByPackage(int actorId, int packageId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItemsByPackage", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageID", packageId)); + } + + public static DataSet GetServiceItem(int actorId, int itemId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItem", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@actorId", actorId)); + } + + public static bool CheckServiceItemExists(int serviceId, string itemName, string itemTypeName) + { + SqlParameter prmExists = new SqlParameter("@Exists", SqlDbType.Bit); + prmExists.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "CheckServiceItemExistsInService", + prmExists, + new SqlParameter("@serviceId", serviceId), + new SqlParameter("@itemName", itemName), + new SqlParameter("@itemTypeName", itemTypeName)); + + return Convert.ToBoolean(prmExists.Value); + } + + public static bool CheckServiceItemExists(string itemName, string groupName, string itemTypeName) + { + SqlParameter prmExists = new SqlParameter("@Exists", SqlDbType.Bit); + prmExists.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "CheckServiceItemExists", + prmExists, + new SqlParameter("@itemName", itemName), + new SqlParameter("@groupName", groupName), + new SqlParameter("@itemTypeName", itemTypeName)); + + return Convert.ToBoolean(prmExists.Value); + } + + public static DataSet GetServiceItemByName(int actorId, int packageId, string groupName, + string itemName, string itemTypeName) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItemByName", + new SqlParameter("@actorId", actorId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@itemName", itemName), + new SqlParameter("@itemTypeName", itemTypeName), + new SqlParameter("@groupName", groupName)); + } + + public static DataSet GetServiceItemsByName(int actorId, int packageId, string itemName) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItemsByName", + new SqlParameter("@actorId", actorId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@itemName", itemName)); + } + + public static int AddServiceItem(int actorId, int serviceId, int packageId, string itemName, + string itemTypeName, string xmlProperties) + { + // add item + SqlParameter prmItemId = new SqlParameter("@ItemID", SqlDbType.Int); + prmItemId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddServiceItem", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@ServiceID", serviceId), + new SqlParameter("@ItemName", itemName), + new SqlParameter("@ItemTypeName", itemTypeName), + new SqlParameter("@xmlProperties", xmlProperties), + new SqlParameter("@CreatedDate", DateTime.Now), + prmItemId); + + return Convert.ToInt32(prmItemId.Value); + } + + public static void UpdateServiceItem(int actorId, int itemId, string itemName, string xmlProperties) + { + // update item + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateServiceItem", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ItemName", itemName), + new SqlParameter("@ItemId", itemId), + new SqlParameter("@XmlProperties", xmlProperties)); + } + + public static void DeleteServiceItem(int actorId, int itemId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteServiceItem", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ItemID", itemId)); + } + + public static void MoveServiceItem(int actorId, int itemId, int destinationServiceId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "MoveServiceItem", + new SqlParameter("@actorId", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@DestinationServiceID", destinationServiceId)); + } + + public static int GetPackageServiceId(int actorId, int packageId, string groupName) + { + SqlParameter prmServiceId = new SqlParameter("@ServiceID", SqlDbType.Int); + prmServiceId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackageServiceID", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@groupName", groupName), + prmServiceId); + + return Convert.ToInt32(prmServiceId.Value); + } + + public static void UpdatePackageDiskSpace(int packageId, string xml) + { + ExecuteLongNonQuery( + ObjectQualifier + "UpdatePackageDiskSpace", + new SqlParameter("@packageId", packageId), + new SqlParameter("@xml", xml)); + } + + public static void UpdatePackageBandwidth(int packageId, string xml) + { + ExecuteLongNonQuery( + ObjectQualifier + "UpdatePackageBandwidth", + new SqlParameter("@packageId", packageId), + new SqlParameter("@xml", xml)); + } + + public static DateTime GetPackageBandwidthUpdate(int packageId) + { + SqlParameter prmUpdateDate = new SqlParameter("@UpdateDate", SqlDbType.DateTime); + prmUpdateDate.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackageBandwidthUpdate", + prmUpdateDate, + new SqlParameter("@packageId", packageId)); + + return (prmUpdateDate.Value != DBNull.Value) ? Convert.ToDateTime(prmUpdateDate.Value) : DateTime.MinValue; + } + + public static void UpdatePackageBandwidthUpdate(int packageId, DateTime updateDate) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdatePackageBandwidthUpdate", + new SqlParameter("@packageId", packageId), + new SqlParameter("@updateDate", updateDate)); + } + + public static IDataReader GetServiceItemType(int itemTypeId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetServiceItemType", + new SqlParameter("@ItemTypeID", itemTypeId) + ); + } + + public static IDataReader GetServiceItemTypes() + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetServiceItemTypes" + ); + } + #endregion + + #region Plans + // Plans methods + public static DataSet GetHostingPlans(int actorId, int userId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetHostingPlans", + new SqlParameter("@actorId", actorId), + new SqlParameter("@userId", userId)); + } + + public static DataSet GetHostingAddons(int actorId, int userId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetHostingAddons", + new SqlParameter("@actorId", actorId), + new SqlParameter("@userId", userId)); + } + + public static DataSet GetUserAvailableHostingPlans(int actorId, int userId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserAvailableHostingPlans", + new SqlParameter("@actorId", actorId), + new SqlParameter("@userId", userId)); + } + + public static DataSet GetUserAvailableHostingAddons(int actorId, int userId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetUserAvailableHostingAddons", + new SqlParameter("@actorId", actorId), + new SqlParameter("@userId", userId)); + } + + public static IDataReader GetHostingPlan(int actorId, int planId) + { + return (IDataReader)SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetHostingPlan", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PlanId", planId)); + } + + public static DataSet GetHostingPlanQuotas(int actorId, int packageId, int planId, int serverId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetHostingPlanQuotas", + new SqlParameter("@actorId", actorId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@planId", planId), + new SqlParameter("@serverId", serverId)); + } + + public static int AddHostingPlan(int actorId, int userId, int packageId, string planName, + string planDescription, bool available, int serverId, decimal setupPrice, decimal recurringPrice, + int recurrenceUnit, int recurrenceLength, bool isAddon, string quotasXml) + { + SqlParameter prmPlanId = new SqlParameter("@PlanID", SqlDbType.Int); + prmPlanId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddHostingPlan", + new SqlParameter("@actorId", actorId), + new SqlParameter("@userId", userId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@planName", planName), + new SqlParameter("@planDescription", planDescription), + new SqlParameter("@available", available), + new SqlParameter("@serverId", serverId), + new SqlParameter("@setupPrice", setupPrice), + new SqlParameter("@recurringPrice", recurringPrice), + new SqlParameter("@recurrenceUnit", recurrenceUnit), + new SqlParameter("@recurrenceLength", recurrenceLength), + new SqlParameter("@isAddon", isAddon), + new SqlParameter("@quotasXml", quotasXml), + prmPlanId); + + // read identity + return Convert.ToInt32(prmPlanId.Value); + } + + public static DataSet UpdateHostingPlan(int actorId, int planId, int packageId, int serverId, string planName, + string planDescription, bool available, decimal setupPrice, decimal recurringPrice, + int recurrenceUnit, int recurrenceLength, string quotasXml) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateHostingPlan", + new SqlParameter("@actorId", actorId), + new SqlParameter("@planId", planId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@serverId", serverId), + new SqlParameter("@planName", planName), + new SqlParameter("@planDescription", planDescription), + new SqlParameter("@available", available), + new SqlParameter("@setupPrice", setupPrice), + new SqlParameter("@recurringPrice", recurringPrice), + new SqlParameter("@recurrenceUnit", recurrenceUnit), + new SqlParameter("@recurrenceLength", recurrenceLength), + new SqlParameter("@quotasXml", quotasXml)); + } + + public static int CopyHostingPlan(int planId, int userId, int packageId) + { + SqlParameter prmPlanId = new SqlParameter("@DestinationPlanID", SqlDbType.Int); + prmPlanId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "CopyHostingPlan", + new SqlParameter("@SourcePlanID", planId), + new SqlParameter("@UserID", userId), + new SqlParameter("@PackageID", packageId), + prmPlanId); + + return Convert.ToInt32(prmPlanId.Value); + } + + public static int DeleteHostingPlan(int actorId, int planId) + { + SqlParameter prmResult = new SqlParameter("@Result", SqlDbType.Int); + prmResult.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteHostingPlan", + prmResult, + new SqlParameter("@actorId", actorId), + new SqlParameter("@PlanId", planId)); + + return Convert.ToInt32(prmResult.Value); + } + #endregion + + #region Packages + + // Packages + public static DataSet GetMyPackages(int actorId, int userId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetMyPackages", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId)); + } + + public static DataSet GetPackages(int actorId, int userId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackages", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId)); + } + + public static DataSet GetNestedPackagesSummary(int actorId, int packageId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetNestedPackagesSummary", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageID", packageId)); + } + + public static DataSet SearchServiceItemsPaged(int actorId, int userId, int itemTypeId, string filterValue, + string sortColumn, int startRow, int maximumRows) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "SearchServiceItemsPaged", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId), + new SqlParameter("@itemTypeId", itemTypeId), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + } + + public static DataSet GetPackagesPaged(int actorId, int userId, string filterColumn, string filterValue, + string sortColumn, int startRow, int maximumRows) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackagesPaged", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + } + + public static DataSet GetNestedPackagesPaged(int actorId, int packageId, string filterColumn, string filterValue, + int statusId, int planId, int serverId, string sortColumn, int startRow, int maximumRows) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetNestedPackagesPaged", + new SqlParameter("@actorId", actorId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@statusId", statusId), + new SqlParameter("@planId", planId), + new SqlParameter("@serverId", serverId), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + } + + public static DataSet GetPackagePackages(int actorId, int packageId, bool recursive) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackagePackages", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@recursive", recursive)); + } + + public static IDataReader GetPackage(int actorId, int packageId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackage", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageID", packageId)); + } + + public static DataSet GetPackageQuotas(int actorId, int packageId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackageQuotas", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageID", packageId)); + } + + public static DataSet GetPackageQuotasForEdit(int actorId, int packageId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackageQuotasForEdit", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageID", packageId)); + } + + public static DataSet AddPackage(int actorId, out int packageId, int userId, int planId, string packageName, + string packageComments, int statusId, DateTime purchaseDate) + { + SqlParameter prmPackageId = new SqlParameter("@PackageID", SqlDbType.Int); + prmPackageId.Direction = ParameterDirection.Output; + + DataSet ds = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddPackage", + prmPackageId, + new SqlParameter("@ActorId", actorId), + new SqlParameter("@userId", userId), + new SqlParameter("@packageName", packageName), + new SqlParameter("@packageComments", packageComments), + new SqlParameter("@statusId", statusId), + new SqlParameter("@planId", planId), + new SqlParameter("@purchaseDate", purchaseDate)); + + // read identity + packageId = Convert.ToInt32(prmPackageId.Value); + + return ds; + } + + public static DataSet UpdatePackage(int actorId, int packageId, int planId, string packageName, + string packageComments, int statusId, DateTime purchaseDate, + bool overrideQuotas, string quotasXml) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdatePackage", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@packageName", packageName), + new SqlParameter("@packageComments", packageComments), + new SqlParameter("@statusId", statusId), + new SqlParameter("@planId", planId), + new SqlParameter("@purchaseDate", purchaseDate), + new SqlParameter("@overrideQuotas", overrideQuotas), + new SqlParameter("@quotasXml", quotasXml)); + } + + public static void UpdatePackageName(int actorId, int packageId, string packageName, + string packageComments) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdatePackageName", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@packageName", packageName), + new SqlParameter("@packageComments", packageComments)); + } + + public static void DeletePackage(int actorId, int packageId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeletePackage", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageID", packageId)); + } + + // Package Add-ons + public static DataSet GetPackageAddons(int actorId, int packageId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackageAddons", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageID", packageId)); + } + + public static IDataReader GetPackageAddon(int actorId, int packageAddonId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackageAddon", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageAddonID", packageAddonId)); + } + + public static DataSet AddPackageAddon(int actorId, out int addonId, int packageId, int planId, int quantity, + int statusId, DateTime purchaseDate, string comments) + { + SqlParameter prmPackageAddonId = new SqlParameter("@PackageAddonID", SqlDbType.Int); + prmPackageAddonId.Direction = ParameterDirection.Output; + + DataSet ds = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddPackageAddon", + prmPackageAddonId, + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@planId", planId), + new SqlParameter("@Quantity", quantity), + new SqlParameter("@statusId", statusId), + new SqlParameter("@PurchaseDate", purchaseDate), + new SqlParameter("@Comments", comments)); + + // read identity + addonId = Convert.ToInt32(prmPackageAddonId.Value); + + return ds; + } + + public static DataSet UpdatePackageAddon(int actorId, int packageAddonId, int planId, int quantity, + int statusId, DateTime purchaseDate, string comments) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdatePackageAddon", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageAddonID", packageAddonId), + new SqlParameter("@planId", planId), + new SqlParameter("@Quantity", quantity), + new SqlParameter("@statusId", statusId), + new SqlParameter("@PurchaseDate", purchaseDate), + new SqlParameter("@Comments", comments)); + } + + public static void DeletePackageAddon(int actorId, int packageAddonId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeletePackageAddon", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageAddonID", packageAddonId)); + } + + #endregion + + #region Packages Settings + public static IDataReader GetPackageSettings(int actorId, int packageId, string settingsName) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackageSettings", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@SettingsName", settingsName)); + } + public static void UpdatePackageSettings(int actorId, int packageId, string settingsName, string xml) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdatePackageSettings", + new SqlParameter("@PackageId", packageId), + new SqlParameter("@ActorId", actorId), + new SqlParameter("@SettingsName", settingsName), + new SqlParameter("@Xml", xml)); + } + #endregion + + #region Quotas + public static IDataReader GetProviderServiceQuota(int providerId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetProviderServiceQuota", + new SqlParameter("@providerId", providerId)); + } + + public static IDataReader GetPackageQuota(int actorId, int packageId, string quotaName) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPackageQuota", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@QuotaName", quotaName)); + } + #endregion + + #region Log + public static void AddAuditLogRecord(string recordId, int severityId, + int userId, string username, int packageId, int itemId, string itemName, DateTime startDate, DateTime finishDate, string sourceName, + string taskName, string executionLog) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddAuditLogRecord", + new SqlParameter("@recordId", recordId), + new SqlParameter("@severityId", severityId), + new SqlParameter("@UserID", userId), + new SqlParameter("@username", username), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@ItemId", itemId), + new SqlParameter("@itemName", itemName), + new SqlParameter("@startDate", startDate), + new SqlParameter("@finishDate", finishDate), + new SqlParameter("@sourceName", sourceName), + new SqlParameter("@taskName", taskName), + new SqlParameter("@executionLog", executionLog)); + } + + public static DataSet GetAuditLogRecordsPaged(int actorId, int userId, int packageId, int itemId, string itemName, DateTime startDate, DateTime endDate, + int severityId, string sourceName, string taskName, string sortColumn, int startRow, int maximumRows) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetAuditLogRecordsPaged", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@UserID", userId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@itemId", itemId), + new SqlParameter("@itemName", itemName), + new SqlParameter("@StartDate", startDate), + new SqlParameter("@EndDate", endDate), + new SqlParameter("@severityId", severityId), + new SqlParameter("@sourceName", sourceName), + new SqlParameter("@taskName", taskName), + new SqlParameter("@sortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + } + + public static DataSet GetAuditLogSources() + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetAuditLogSources"); + } + + public static DataSet GetAuditLogTasks(string sourceName) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetAuditLogTasks", + new SqlParameter("@sourceName", sourceName)); + } + + public static IDataReader GetAuditLogRecord(string recordId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetAuditLogRecord", + new SqlParameter("@recordId", recordId)); + } + + public static void DeleteAuditLogRecords(int actorId, int userId, int itemId, string itemName, DateTime startDate, DateTime endDate, + int severityId, string sourceName, string taskName) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteAuditLogRecords", + new SqlParameter("@actorId", actorId), + new SqlParameter("@userId", userId), + new SqlParameter("@itemId", itemId), + new SqlParameter("@itemName", itemName), + new SqlParameter("@startDate", startDate), + new SqlParameter("@endDate", endDate), + new SqlParameter("@severityId", severityId), + new SqlParameter("@sourceName", sourceName), + new SqlParameter("@taskName", taskName)); + } + + public static void DeleteAuditLogRecordsComplete() + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteAuditLogRecordsComplete"); + } + + #endregion + + #region Reports + public static DataSet GetPackagesBandwidthPaged(int actorId, int userId, int packageId, + DateTime startDate, DateTime endDate, string sortColumn, + int startRow, int maximumRows) + { + return ExecuteLongDataSet( + ObjectQualifier + "GetPackagesBandwidthPaged", + new SqlParameter("@actorId", actorId), + new SqlParameter("@userId", userId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@StartDate", startDate), + new SqlParameter("@EndDate", endDate), + new SqlParameter("@sortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + } + + public static DataSet GetPackagesDiskspacePaged(int actorId, int userId, int packageId, string sortColumn, + int startRow, int maximumRows) + { + return ExecuteLongDataSet( + ObjectQualifier + "GetPackagesDiskspacePaged", + new SqlParameter("@actorId", actorId), + new SqlParameter("@userId", userId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@sortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + } + + public static DataSet GetPackageBandwidth(int actorId, int packageId, DateTime startDate, DateTime endDate) + { + return ExecuteLongDataSet( + ObjectQualifier + "GetPackageBandwidth", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@StartDate", startDate), + new SqlParameter("@EndDate", endDate)); + } + + public static DataSet GetPackageDiskspace(int actorId, int packageId) + { + return ExecuteLongDataSet( + ObjectQualifier + "GetPackageDiskspace", + new SqlParameter("@actorId", actorId), + new SqlParameter("@PackageId", packageId)); + } + + #endregion + + #region Scheduler + + public static IDataReader GetBackgroundTask(string taskId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetBackgroundTask", + new SqlParameter("@taskId", taskId)); + } + + public static IDataReader GetScheduleBackgroundTasks(int scheduleId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetScheduleBackgroundTasks", + new SqlParameter("@scheduleId", scheduleId)); + } + + public static IDataReader GetBackgroundTasks(int actorId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetBackgroundTasks", + new SqlParameter("@actorId", actorId)); + } + + public static IDataReader GetBackgroundTasks(Guid guid) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetThreadBackgroundTasks", + new SqlParameter("@guid", guid)); + } + + public static IDataReader GetProcessBackgroundTasks(BackgroundTaskStatus status) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetProcessBackgroundTasks", + new SqlParameter("@status", (int)status)); + } + + public static IDataReader GetBackgroundTopTask(Guid guid) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetBackgroundTopTask", + new SqlParameter("@guid", guid)); + } + + public static int AddBackgroundTask(Guid guid, string taskId, int scheduleId, int packageId, int userId, + int effectiveUserId, string taskName, int itemId, string itemName, DateTime startDate, + int indicatorCurrent, int indicatorMaximum, int maximumExecutionTime, string source, + int severity, bool completed, bool notifyOnComplete, BackgroundTaskStatus status) + { + SqlParameter prmId = new SqlParameter("@BackgroundTaskID", SqlDbType.Int); + prmId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddBackgroundTask", + prmId, + new SqlParameter("@guid", guid), + new SqlParameter("@taskId", taskId), + new SqlParameter("@scheduleId", scheduleId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@userId", userId), + new SqlParameter("@effectiveUserId", effectiveUserId), + new SqlParameter("@taskName", taskName), + new SqlParameter("@itemId", itemId), + new SqlParameter("@itemName", itemName), + new SqlParameter("@startDate", startDate), + new SqlParameter("@indicatorCurrent", indicatorCurrent), + new SqlParameter("@indicatorMaximum", indicatorMaximum), + new SqlParameter("@maximumExecutionTime", maximumExecutionTime), + new SqlParameter("@source", source), + new SqlParameter("@severity", severity), + new SqlParameter("@completed", completed), + new SqlParameter("@notifyOnComplete", notifyOnComplete), + new SqlParameter("@status", status)); + + // read identity + return Convert.ToInt32(prmId.Value); + } + + public static void AddBackgroundTaskLog(int taskId, DateTime date, string exceptionStackTrace, + bool innerTaskStart, int severity, string text, int textIdent, string xmlParameters) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddBackgroundTaskLog", + new SqlParameter("@taskId", taskId), + new SqlParameter("@date", date), + new SqlParameter("@exceptionStackTrace", exceptionStackTrace), + new SqlParameter("@innerTaskStart", innerTaskStart), + new SqlParameter("@severity", severity), + new SqlParameter("@text", text), + new SqlParameter("@textIdent", textIdent), + new SqlParameter("@xmlParameters", xmlParameters)); + } + + public static IDataReader GetBackgroundTaskLogs(int taskId, DateTime startLogTime) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetBackgroundTaskLogs", + new SqlParameter("@taskId", taskId), + new SqlParameter("@startLogTime", startLogTime)); + } + + public static void UpdateBackgroundTask(Guid guid, int taskId, int scheduleId, int packageId, string taskName, int itemId, + string itemName, DateTime finishDate, int indicatorCurrent, int indicatorMaximum, int maximumExecutionTime, + string source, int severity, bool completed, bool notifyOnComplete, BackgroundTaskStatus status) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateBackgroundTask", + new SqlParameter("@Guid", guid), + new SqlParameter("@taskId", taskId), + new SqlParameter("@scheduleId", scheduleId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@taskName", taskName), + new SqlParameter("@itemId", itemId), + new SqlParameter("@itemName", itemName), + new SqlParameter("@finishDate", + finishDate == DateTime.MinValue + ? DBNull.Value + : (object) finishDate), + new SqlParameter("@indicatorCurrent", indicatorCurrent), + new SqlParameter("@indicatorMaximum", indicatorMaximum), + new SqlParameter("@maximumExecutionTime", maximumExecutionTime), + new SqlParameter("@source", source), + new SqlParameter("@severity", severity), + new SqlParameter("@completed", completed), + new SqlParameter("@notifyOnComplete", notifyOnComplete), + new SqlParameter("@status", (int)status)); + + } + + public static IDataReader GetBackgroundTaskParams(int taskId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetBackgroundTaskParams", + new SqlParameter("@taskId", taskId)); + } + + public static void AddBackgroundTaskParam(int taskId, string name, string value, string typeName) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddBackgroundTaskParam", + new SqlParameter("@taskId", taskId), + new SqlParameter("@name", name), + new SqlParameter("@value", value), + new SqlParameter("@typeName", typeName)); + } + + public static void DeleteBackgroundTaskParams(int taskId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteBackgroundTaskParams", + new SqlParameter("@taskId", taskId)); + } + + public static void AddBackgroundTaskStack(int taskId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddBackgroundTaskStack", + new SqlParameter("@taskId", taskId)); + } + + public static void DeleteBackgroundTasks(Guid guid) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteBackgroundTasks", + new SqlParameter("@guid", guid)); + } + + public static void DeleteBackgroundTask(int taskId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteBackgroundTask", + new SqlParameter("@id", taskId)); + } + + public static IDataReader GetScheduleTasks(int actorId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetScheduleTasks", + new SqlParameter("@actorId", actorId)); + } + + public static IDataReader GetScheduleTask(int actorId, string taskId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetScheduleTask", + new SqlParameter("@actorId", actorId), + new SqlParameter("@taskId", taskId)); + } + + public static DataSet GetSchedules(int actorId, int packageId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetSchedules", + new SqlParameter("@actorId", actorId), + new SqlParameter("@packageId", packageId)); + } + + public static DataSet GetSchedulesPaged(int actorId, int packageId, bool recursive, + string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetSchedulesPaged", + new SqlParameter("@actorId", actorId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@recursive", recursive), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + } + + public static DataSet GetSchedule(int actorId, int scheduleId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetSchedule", + new SqlParameter("@actorId", actorId), + new SqlParameter("@scheduleId", scheduleId)); + } + public static IDataReader GetScheduleInternal(int scheduleId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetScheduleInternal", + new SqlParameter("@scheduleId", scheduleId)); + } + public static DataSet GetNextSchedule() + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetNextSchedule"); + } + public static IDataReader GetScheduleParameters(int actorId, string taskId, int scheduleId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetScheduleParameters", + new SqlParameter("@actorId", actorId), + new SqlParameter("@taskId", taskId), + new SqlParameter("@scheduleId", scheduleId)); + } + + /// + /// Loads view configuration for the task with specified id. + /// + /// Task id which points to task for which view configuration will be loaded. + /// View configuration for the task with supplied id. + public static IDataReader GetScheduleTaskViewConfigurations(string taskId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetScheduleTaskViewConfigurations", + new SqlParameter("@taskId", taskId)); + } + + public static int AddSchedule(int actorId, string taskId, int packageId, + string scheduleName, string scheduleTypeId, int interval, + DateTime fromTime, DateTime toTime, DateTime startTime, + DateTime nextRun, bool enabled, string priorityId, int historiesNumber, + int maxExecutionTime, int weekMonthDay, string xmlParameters) + { + SqlParameter prmId = new SqlParameter("@ScheduleID", SqlDbType.Int); + prmId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddSchedule", + prmId, + new SqlParameter("@actorId", actorId), + new SqlParameter("@taskId", taskId), + new SqlParameter("@packageId", packageId), + new SqlParameter("@scheduleName", scheduleName), + new SqlParameter("@scheduleTypeId", scheduleTypeId), + new SqlParameter("@interval", interval), + new SqlParameter("@fromTime", fromTime), + new SqlParameter("@toTime", toTime), + new SqlParameter("@startTime", startTime), + new SqlParameter("@nextRun", nextRun), + new SqlParameter("@enabled", enabled), + new SqlParameter("@priorityId", priorityId), + new SqlParameter("@historiesNumber", historiesNumber), + new SqlParameter("@maxExecutionTime", maxExecutionTime), + new SqlParameter("@weekMonthDay", weekMonthDay), + new SqlParameter("@xmlParameters", xmlParameters)); + + // read identity + return Convert.ToInt32(prmId.Value); + } + + public static void UpdateSchedule(int actorId, int scheduleId, string taskId, + string scheduleName, string scheduleTypeId, int interval, + DateTime fromTime, DateTime toTime, DateTime startTime, + DateTime lastRun, DateTime nextRun, bool enabled, string priorityId, + int historiesNumber, int maxExecutionTime, int weekMonthDay, string xmlParameters) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateSchedule", + new SqlParameter("@actorId", actorId), + new SqlParameter("@scheduleId", scheduleId), + new SqlParameter("@taskId", taskId), + new SqlParameter("@scheduleName", scheduleName), + new SqlParameter("@scheduleTypeId", scheduleTypeId), + new SqlParameter("@interval", interval), + new SqlParameter("@fromTime", fromTime), + new SqlParameter("@toTime", toTime), + new SqlParameter("@startTime", startTime), + new SqlParameter("@lastRun", (lastRun == DateTime.MinValue) ? DBNull.Value : (object)lastRun), + new SqlParameter("@nextRun", nextRun), + new SqlParameter("@enabled", enabled), + new SqlParameter("@priorityId", priorityId), + new SqlParameter("@historiesNumber", historiesNumber), + new SqlParameter("@maxExecutionTime", maxExecutionTime), + new SqlParameter("@weekMonthDay", weekMonthDay), + new SqlParameter("@xmlParameters", xmlParameters)); + } + + public static void DeleteSchedule(int actorId, int scheduleId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteSchedule", + new SqlParameter("@actorId", actorId), + new SqlParameter("@scheduleId", scheduleId)); + } + + public static DataSet GetScheduleHistories(int actorId, int scheduleId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetScheduleHistories", + new SqlParameter("@actorId", actorId), + new SqlParameter("@scheduleId", scheduleId)); + } + public static IDataReader GetScheduleHistory(int actorId, int scheduleHistoryId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetScheduleHistory", + new SqlParameter("@actorId", actorId), + new SqlParameter("@scheduleHistoryId", scheduleHistoryId)); + } + public static int AddScheduleHistory(int actorId, int scheduleId, + DateTime startTime, DateTime finishTime, string statusId, string executionLog) + { + SqlParameter prmId = new SqlParameter("@ScheduleHistoryID", SqlDbType.Int); + prmId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddScheduleHistory", + prmId, + new SqlParameter("@actorId", actorId), + new SqlParameter("@scheduleId", scheduleId), + new SqlParameter("@startTime", (startTime == DateTime.MinValue) ? DBNull.Value : (object)startTime), + new SqlParameter("@finishTime", (finishTime == DateTime.MinValue) ? DBNull.Value : (object)finishTime), + new SqlParameter("@statusId", statusId), + new SqlParameter("@executionLog", executionLog)); + + // read identity + return Convert.ToInt32(prmId.Value); + } + public static void UpdateScheduleHistory(int actorId, int scheduleHistoryId, + DateTime startTime, DateTime finishTime, string statusId, string executionLog) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateScheduleHistory", + new SqlParameter("@actorId", actorId), + new SqlParameter("@scheduleHistoryId", scheduleHistoryId), + new SqlParameter("@startTime", (startTime == DateTime.MinValue) ? DBNull.Value : (object)startTime), + new SqlParameter("@finishTime", (finishTime == DateTime.MinValue) ? DBNull.Value : (object)finishTime), + new SqlParameter("@statusId", statusId), + new SqlParameter("@executionLog", executionLog)); + } + public static void DeleteScheduleHistories(int actorId, int scheduleId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteScheduleHistories", + new SqlParameter("@actorId", actorId), + new SqlParameter("@scheduleId", scheduleId)); + } + #endregion + + #region Comments + public static DataSet GetComments(int actorId, int userId, string itemTypeId, int itemId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetComments", + new SqlParameter("@actorId", actorId), + new SqlParameter("@userId", userId), + new SqlParameter("@itemTypeId", itemTypeId), + new SqlParameter("@itemId", itemId)); + } + + public static void AddComment(int actorId, string itemTypeId, int itemId, + string commentText, int severityId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddComment", + new SqlParameter("@actorId", actorId), + new SqlParameter("@itemTypeId", itemTypeId), + new SqlParameter("@itemId", itemId), + new SqlParameter("@commentText", commentText), + new SqlParameter("@severityId", severityId)); + } + + public static void DeleteComment(int actorId, int commentId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteComment", + new SqlParameter("@actorId", actorId), + new SqlParameter("@commentId", commentId)); + } + #endregion + + #region Helper Methods + private static string VerifyColumnName(string str) + { + if (str == null) + str = ""; + return Regex.Replace(str, @"[^\w\. ]", ""); + } + + private static string VerifyColumnValue(string str) + { + return String.IsNullOrEmpty(str) ? str : str.Replace("'", "''"); + } + + private static DataSet ExecuteLongDataSet(string spName, params SqlParameter[] parameters) + { + return ExecuteLongDataSet(spName, CommandType.StoredProcedure, parameters); + } + + private static DataSet ExecuteLongQueryDataSet(string spName, params SqlParameter[] parameters) + { + return ExecuteLongDataSet(spName, CommandType.Text, parameters); + } + + private static DataSet ExecuteLongDataSet(string commandText, CommandType commandType, params SqlParameter[] parameters) + { + SqlConnection conn = new SqlConnection(ConnectionString); + SqlCommand cmd = new SqlCommand(commandText, conn); + cmd.CommandType = commandType; + cmd.CommandTimeout = 300; + + if (parameters != null) + { + foreach (SqlParameter prm in parameters) + { + cmd.Parameters.Add(prm); + } + } + + DataSet ds = new DataSet(); + try + { + SqlDataAdapter da = new SqlDataAdapter(cmd); + da.Fill(ds); + } + finally + { + if (conn.State == ConnectionState.Open) + conn.Close(); + } + + return ds; + } + + private static void ExecuteLongNonQuery(string spName, params SqlParameter[] parameters) + { + SqlConnection conn = new SqlConnection(ConnectionString); + SqlCommand cmd = new SqlCommand(spName, conn); + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandTimeout = 300; + + if (parameters != null) + { + foreach (SqlParameter prm in parameters) + { + cmd.Parameters.Add(prm); + } + } + + try + { + conn.Open(); + cmd.ExecuteNonQuery(); + } + finally + { + if (conn.State == ConnectionState.Open) + conn.Close(); + } + } + #endregion + + #region Exchange Server + + + public static int AddExchangeAccount(int itemId, int accountType, string accountName, + string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, + string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) + { + SqlParameter outParam = new SqlParameter("@AccountID", SqlDbType.Int); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeAccount", + outParam, + new SqlParameter("@ItemID", itemId), + new SqlParameter("@AccountType", accountType), + new SqlParameter("@AccountName", accountName), + new SqlParameter("@DisplayName", displayName), + new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress), + new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder), + new SqlParameter("@MailboxManagerActions", mailboxManagerActions), + new SqlParameter("@SamAccountName", samAccountName), + new SqlParameter("@AccountPassword", accountPassword), + new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId), + new SqlParameter("@SubscriberNumber", (string.IsNullOrEmpty(subscriberNumber) ? (object)DBNull.Value : (object)subscriberNumber)) + ); + + return Convert.ToInt32(outParam.Value); + } + + + public static void AddExchangeAccountEmailAddress(int accountId, string emailAddress) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeAccountEmailAddress", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@EmailAddress", emailAddress) + ); + } + + public static void AddExchangeOrganization(int itemId, string organizationId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeOrganization", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@OrganizationID", organizationId) + ); + } + + public static void AddExchangeOrganizationDomain(int itemId, int domainId, bool isHost) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeOrganizationDomain", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@DomainID", domainId), + new SqlParameter("@IsHost", isHost) + ); + } + + public static void ChangeExchangeAcceptedDomainType(int itemId, int domainId, int domainTypeId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "ChangeExchangeAcceptedDomainType", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@DomainID", domainId), + new SqlParameter("@DomainTypeID", domainTypeId) + ); + } + + public static IDataReader GetExchangeOrganizationStatistics(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeOrganizationStatistics", + new SqlParameter("@ItemID", itemId) + ); + } + + public static void DeleteUserEmailAddresses(int accountId, string primaryAddress) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteUserEmailAddresses", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@PrimaryEmailAddress", primaryAddress) + ); + } + + public static void DeleteExchangeAccount(int itemId, int accountId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteExchangeAccount", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@AccountID", accountId) + ); + } + + + public static void DeleteExchangeAccountEmailAddress(int accountId, string emailAddress) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteExchangeAccountEmailAddress", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@EmailAddress", emailAddress) + ); + } + + public static void DeleteExchangeOrganization(int itemId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteExchangeOrganization", + new SqlParameter("@ItemID", itemId) + ); + } + + public static void DeleteExchangeOrganizationDomain(int itemId, int domainId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteExchangeOrganizationDomain", + new SqlParameter("@ItemId", itemId), + new SqlParameter("@DomainID", domainId) + ); + } + + public static bool ExchangeAccountEmailAddressExists(string emailAddress) + { + SqlParameter outParam = new SqlParameter("@Exists", SqlDbType.Bit); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "ExchangeAccountEmailAddressExists", + new SqlParameter("@EmailAddress", emailAddress), + outParam + ); + + return Convert.ToBoolean(outParam.Value); + } + + public static bool ExchangeOrganizationDomainExists(int domainId) + { + SqlParameter outParam = new SqlParameter("@Exists", SqlDbType.Bit); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "ExchangeOrganizationDomainExists", + new SqlParameter("@DomainID", domainId), + outParam + ); + + return Convert.ToBoolean(outParam.Value); + } + + public static bool ExchangeOrganizationExists(string organizationId) + { + SqlParameter outParam = new SqlParameter("@Exists", SqlDbType.Bit); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "ExchangeOrganizationExists", + new SqlParameter("@OrganizationID", organizationId), + outParam + ); + + return Convert.ToBoolean(outParam.Value); + } + + public static bool ExchangeAccountExists(string accountName) + { + SqlParameter outParam = new SqlParameter("@Exists", SqlDbType.Bit); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "ExchangeAccountExists", + new SqlParameter("@AccountName", accountName), + outParam + ); + + return Convert.ToBoolean(outParam.Value); + } + + public static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType, + string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, + string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateExchangeAccount", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@AccountName", accountName), + new SqlParameter("@DisplayName", displayName), + new SqlParameter("@AccountType", (int)accountType), + new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress), + new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder), + new SqlParameter("@MailboxManagerActions", mailboxManagerActions), + new SqlParameter("@Password", string.IsNullOrEmpty(accountPassword) ? (object)DBNull.Value : (object)accountPassword), + new SqlParameter("@SamAccountName", samAccountName), + new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId), + new SqlParameter("@SubscriberNumber", (string.IsNullOrEmpty(subscriberNumber) ? (object)DBNull.Value : (object)subscriberNumber)) + ); + } + + public static void UpdateExchangeAccountUserPrincipalName(int accountId, string userPrincipalName) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateExchangeAccountUserPrincipalName", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@UserPrincipalName", userPrincipalName)); + } + + public static IDataReader GetExchangeAccount(int itemId, int accountId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeAccount", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@AccountID", accountId) + ); + } + + public static IDataReader GetExchangeAccountByAccountName(int itemId, string accountName) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeAccountByAccountName", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@AccountName", accountName) + ); + } + + public static IDataReader GetExchangeAccountByMailboxPlanId(int itemId, int MailboxPlanId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeAccountByMailboxPlanId", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@MailboxPlanId", MailboxPlanId) + ); + } + + + public static IDataReader GetExchangeAccountEmailAddresses(int accountId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeAccountEmailAddresses", + new SqlParameter("@AccountID", accountId) + ); + } + + public static IDataReader GetExchangeOrganizationDomains(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeOrganizationDomains", + new SqlParameter("@ItemID", itemId) + ); + } + + + public static IDataReader GetExchangeAccounts(int itemId, int accountType) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeAccounts", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@AccountType", accountType) + ); + } + + public static IDataReader GetExchangeMailboxes(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeMailboxes", + new SqlParameter("@ItemID", itemId) + ); + } + + public static DataSet GetExchangeAccountsPaged(int actorId, int itemId, string accountTypes, + string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { + // check input parameters + string[] types = accountTypes.Split(','); + for (int i = 0; i < types.Length; i++) + { + try + { + int type = Int32.Parse(types[i]); + } + catch + { + throw new ArgumentException("Wrong patameter", "accountTypes"); + } + } + + string searchTypes = String.Join(",", types); + + return SqlHelper.ExecuteDataset( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeAccountsPaged", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@AccountTypes", searchTypes), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@StartRow", startRow), + new SqlParameter("@MaximumRows", maximumRows) + ); + } + + public static IDataReader SearchExchangeAccounts(int actorId, int itemId, bool includeMailboxes, + bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, + string filterColumn, string filterValue, string sortColumn) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "SearchExchangeAccounts", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@IncludeMailboxes", includeMailboxes), + new SqlParameter("@IncludeContacts", includeContacts), + new SqlParameter("@IncludeDistributionLists", includeDistributionLists), + new SqlParameter("@IncludeRooms", includeRooms), + new SqlParameter("@IncludeEquipment", includeEquipment), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)) + ); + } + + public static IDataReader SearchExchangeAccount(int actorId, int accountType, string primaryEmailAddress) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "SearchExchangeAccount", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@AccountType", accountType), + new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress) + ); + } + + #endregion + + #region Exchange Mailbox Plans + public static int AddExchangeMailboxPlan(int itemID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP, + bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients, + int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType, + bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg) + { + SqlParameter outParam = new SqlParameter("@MailboxPlanId", SqlDbType.Int); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeMailboxPlan", + outParam, + new SqlParameter("@ItemID", itemID), + new SqlParameter("@MailboxPlan", mailboxPlan), + new SqlParameter("@EnableActiveSync", enableActiveSync), + new SqlParameter("@EnableIMAP", enableIMAP), + new SqlParameter("@EnableMAPI", enableMAPI), + new SqlParameter("@EnableOWA", enableOWA), + new SqlParameter("@EnablePOP", enablePOP), + new SqlParameter("@IsDefault", isDefault), + new SqlParameter("@IssueWarningPct", issueWarningPct), + new SqlParameter("@KeepDeletedItemsDays", keepDeletedItemsDays), + new SqlParameter("@MailboxSizeMB", mailboxSizeMB), + new SqlParameter("@MaxReceiveMessageSizeKB", maxReceiveMessageSizeKB), + new SqlParameter("@MaxRecipients", maxRecipients), + new SqlParameter("@MaxSendMessageSizeKB", maxSendMessageSizeKB), + new SqlParameter("@ProhibitSendPct", prohibitSendPct), + new SqlParameter("@ProhibitSendReceivePct", prohibitSendReceivePct), + new SqlParameter("@HideFromAddressBook", hideFromAddressBook), + new SqlParameter("@MailboxPlanType", mailboxPlanType), + new SqlParameter("@AllowLitigationHold", enabledLitigationHold), + new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsWarning), + new SqlParameter("@RecoverableItemsSpace", recoverabelItemsSpace), + new SqlParameter("@LitigationHoldUrl", litigationHoldUrl), + new SqlParameter("@LitigationHoldMsg", litigationHoldMsg) + ); + + return Convert.ToInt32(outParam.Value); + } + + + + public static void UpdateExchangeMailboxPlan(int mailboxPlanID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP, + bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients, + int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType, + bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateExchangeMailboxPlan", + new SqlParameter("@MailboxPlanID", mailboxPlanID), + new SqlParameter("@MailboxPlan", mailboxPlan), + new SqlParameter("@EnableActiveSync", enableActiveSync), + new SqlParameter("@EnableIMAP", enableIMAP), + new SqlParameter("@EnableMAPI", enableMAPI), + new SqlParameter("@EnableOWA", enableOWA), + new SqlParameter("@EnablePOP", enablePOP), + new SqlParameter("@IsDefault", isDefault), + new SqlParameter("@IssueWarningPct", issueWarningPct), + new SqlParameter("@KeepDeletedItemsDays", keepDeletedItemsDays), + new SqlParameter("@MailboxSizeMB", mailboxSizeMB), + new SqlParameter("@MaxReceiveMessageSizeKB", maxReceiveMessageSizeKB), + new SqlParameter("@MaxRecipients", maxRecipients), + new SqlParameter("@MaxSendMessageSizeKB", maxSendMessageSizeKB), + new SqlParameter("@ProhibitSendPct", prohibitSendPct), + new SqlParameter("@ProhibitSendReceivePct", prohibitSendReceivePct), + new SqlParameter("@HideFromAddressBook", hideFromAddressBook), + new SqlParameter("@MailboxPlanType", mailboxPlanType), + new SqlParameter("@AllowLitigationHold", enabledLitigationHold), + new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsWarning), + new SqlParameter("@RecoverableItemsSpace", recoverabelItemsSpace), + new SqlParameter("@LitigationHoldUrl", litigationHoldUrl), + new SqlParameter("@LitigationHoldMsg", litigationHoldMsg) + + ); + } + + + + public static void DeleteExchangeMailboxPlan(int mailboxPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteExchangeMailboxPlan", + new SqlParameter("@MailboxPlanId", mailboxPlanId) + ); + } + + + public static IDataReader GetExchangeMailboxPlan(int mailboxPlanId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeMailboxPlan", + new SqlParameter("@MailboxPlanId", mailboxPlanId) + ); + } + + public static IDataReader GetExchangeMailboxPlans(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeMailboxPlans", + new SqlParameter("@ItemID", itemId) + ); + } + + + public static IDataReader GetExchangeOrganization(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeOrganization", + new SqlParameter("@ItemID", itemId) + ); + } + + + public static void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetOrganizationDefaultExchangeMailboxPlan", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@MailboxPlanId", mailboxPlanId) + ); + } + + public static void SetExchangeAccountMailboxPlan(int accountId, int mailboxPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetExchangeAccountMailboxplan", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId) + ); + } + + #endregion + + #region Exchange Disclaimers + public static int AddExchangeDisclaimer(int itemID, ExchangeDisclaimer disclaimer) + { + SqlParameter outParam = new SqlParameter("@ExchangeDisclaimerId", SqlDbType.Int); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeDisclaimer", + outParam, + + new SqlParameter("@ItemID", itemID), + new SqlParameter("@DisclaimerName", disclaimer.DisclaimerName), + new SqlParameter("@DisclaimerText", disclaimer.DisclaimerText) + ); + + return Convert.ToInt32(outParam.Value); + } + + public static void UpdateExchangeDisclaimer(int itemID, ExchangeDisclaimer disclaimer) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateExchangeDisclaimer", + new SqlParameter("@ExchangeDisclaimerId", disclaimer.ExchangeDisclaimerId), + new SqlParameter("@DisclaimerName", disclaimer.DisclaimerName), + new SqlParameter("@DisclaimerText", disclaimer.DisclaimerText) + ); + } + + public static void DeleteExchangeDisclaimer(int exchangeDisclaimerId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteExchangeDisclaimer", + new SqlParameter("@ExchangeDisclaimerId", exchangeDisclaimerId) + ); + } + + public static IDataReader GetExchangeDisclaimer(int exchangeDisclaimerId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeDisclaimer", + new SqlParameter("@ExchangeDisclaimerId", exchangeDisclaimerId) + ); + } + + public static IDataReader GetExchangeDisclaimers(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeDisclaimers", + new SqlParameter("@ItemID", itemId) + ); + } + + public static void SetExchangeAccountDisclaimerId(int AccountID, int ExchangeDisclaimerId) + { + object id = null; + if (ExchangeDisclaimerId != -1) id = ExchangeDisclaimerId; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetExchangeAccountDisclaimerId", + new SqlParameter("@AccountID", AccountID), + new SqlParameter("@ExchangeDisclaimerId", id) + ); + } + + public static int GetExchangeAccountDisclaimerId(int AccountID) + { + object objReturn = SqlHelper.ExecuteScalar( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeAccountDisclaimerId", + new SqlParameter("@AccountID", AccountID) + ); + + int ret; + if (!int.TryParse(objReturn.ToString(), out ret)) return -1; + return ret; + } + + #endregion + + #region Organizations + + public static void DeleteOrganizationUser(int itemId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, "DeleteOrganizationUsers", new SqlParameter("@ItemID", itemId)); + } + + public static int GetItemIdByOrganizationId(string id) + { + object obj = SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "GetItemIdByOrganizationId", + new SqlParameter("@OrganizationId", id)); + + return (obj == null || DBNull.Value == obj) ? 0 : (int)obj; + + } + + public static IDataReader GetOrganizationStatistics(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetOrganizationStatistics", + new SqlParameter("@ItemID", itemId) + ); + } + + public static IDataReader SearchOrganizationAccounts(int actorId, int itemId, + string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "SearchOrganizationAccounts", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@IncludeMailboxes", includeMailboxes) + ); + } + + #endregion + + #region CRM + + public static int GetCRMUsersCount(int itemId, string name, string email) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId), + GetFilterSqlParam("@Name", name), + GetFilterSqlParam("@Email", email), + }; + + return (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "GetCRMUsersCount", sqlParams); + + } + + private static SqlParameter GetFilterSqlParam(string paramName, string value) + { + if (string.IsNullOrEmpty(value)) + return new SqlParameter(paramName, DBNull.Value); + + return new SqlParameter(paramName, value); + } + + public static IDataReader GetCrmUsers(int itemId, string sortColumn, string sortDirection, string name, string email, int startRow, int count) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId), + new SqlParameter("@SortColumn", sortColumn), + new SqlParameter("@SortDirection", sortDirection), + GetFilterSqlParam("@Name", name), + GetFilterSqlParam("@Email", email), + new SqlParameter("@StartRow", startRow), + new SqlParameter("Count", count) + }; + + + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetCRMUsers", sqlParams); + } + + public static IDataReader GetCRMOrganizationUsers(int itemId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, "GetCRMOrganizationUsers", + new SqlParameter[] { new SqlParameter("@ItemID", itemId) }); + } + + public static void CreateCRMUser(int itemId, Guid crmId, Guid businessUnitId) + { + SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, "InsertCRMUser", + new SqlParameter[] + { + new SqlParameter("@ItemID", itemId), + new SqlParameter("@CrmUserID", crmId), + new SqlParameter("@BusinessUnitId", businessUnitId) + }); + + } + + + public static IDataReader GetCrmUser(int itemId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, "GetCRMUser", + new SqlParameter[] + { + new SqlParameter("@AccountID", itemId) + }); + return reader; + + } + + public static int GetCrmUserCount(int itemId) + { + return (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "GetOrganizationCRMUserCount", + new SqlParameter[] { new SqlParameter("@ItemID", itemId) }); + } + + public static void DeleteCrmOrganization(int organizationId) + { + SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "DeleteCRMOrganization", + new SqlParameter[] { new SqlParameter("@ItemID", organizationId) }); + } + + #endregion + + #region VPS - Virtual Private Servers + + public static IDataReader GetVirtualMachinesPaged(int actorId, int packageId, string filterColumn, string filterValue, + string sortColumn, int startRow, int maximumRows, bool recursive) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetVirtualMachinesPaged", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@StartRow", startRow), + new SqlParameter("@MaximumRows", maximumRows), + new SqlParameter("@Recursive", recursive)); + return reader; + } + #endregion + + public static IDataReader GetVirtualMachinesForPCPaged(int actorId, int packageId, string filterColumn, string filterValue, + string sortColumn, int startRow, int maximumRows, bool recursive) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetVirtualMachinesPagedForPC", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@StartRow", startRow), + new SqlParameter("@MaximumRows", maximumRows), + new SqlParameter("@Recursive", recursive)); + return reader; + } + + + #region VPS - External Network + + public static IDataReader GetUnallottedIPAddresses(int packageId, int serviceId, int poolId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetUnallottedIPAddresses", + new SqlParameter("@PackageId", packageId), + new SqlParameter("@ServiceId", serviceId), + new SqlParameter("@PoolId", poolId)); + } + + + public static void AllocatePackageIPAddresses(int packageId, string xml) + { + SqlParameter[] param = new[] + { + new SqlParameter("@PackageID", packageId), + new SqlParameter("@xml", xml) + }; + + ExecuteLongNonQuery("AllocatePackageIPAddresses", param); + } + + public static IDataReader GetPackageIPAddresses(int packageId, int poolId, string filterColumn, string filterValue, + string sortColumn, int startRow, int maximumRows, bool recursive) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetPackageIPAddresses", + new SqlParameter("@PackageID", packageId), + new SqlParameter("@PoolId", poolId), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows), + new SqlParameter("@Recursive", recursive)); + return reader; + } + + + public static void DeallocatePackageIPAddress(int id) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, "DeallocatePackageIPAddress", + new SqlParameter("@PackageAddressID", id)); + } + #endregion + + #region VPS - Private Network + + public static IDataReader GetPackagePrivateIPAddressesPaged(int packageId, string filterColumn, string filterValue, + string sortColumn, int startRow, int maximumRows) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetPackagePrivateIPAddressesPaged", + new SqlParameter("@PackageID", packageId), + new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), + new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), + new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), + new SqlParameter("@startRow", startRow), + new SqlParameter("@maximumRows", maximumRows)); + return reader; + } + + public static IDataReader GetPackagePrivateIPAddresses(int packageId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetPackagePrivateIPAddresses", + new SqlParameter("@PackageID", packageId)); + return reader; + } + #endregion + + #region VPS - External Network Adapter + public static IDataReader GetPackageUnassignedIPAddresses(int actorId, int packageId, int poolId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetPackageUnassignedIPAddresses", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@PoolId", poolId)); + } + + public static IDataReader GetPackageIPAddress(int packageAddressId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetPackageIPAddress", + new SqlParameter("@PackageAddressId", packageAddressId)); + } + + public static IDataReader GetItemIPAddresses(int actorId, int itemId, int poolId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetItemIPAddresses", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@PoolID", poolId)); + } + + public static int AddItemIPAddress(int actorId, int itemId, int packageAddressId) + { + return SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + "AddItemIPAddress", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@PackageAddressID", packageAddressId)); + } + + public static int SetItemPrimaryIPAddress(int actorId, int itemId, int packageAddressId) + { + return SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + "SetItemPrimaryIPAddress", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@PackageAddressID", packageAddressId)); + } + + public static int DeleteItemIPAddress(int actorId, int itemId, int packageAddressId) + { + return SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + "DeleteItemIPAddress", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@PackageAddressID", packageAddressId)); + } + + public static int DeleteItemIPAddresses(int actorId, int itemId) + { + return SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + "DeleteItemIPAddresses", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId)); + } + #endregion + + #region VPS - Private Network Adapter + public static IDataReader GetItemPrivateIPAddresses(int actorId, int itemId) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + "GetItemPrivateIPAddresses", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId)); + } + + public static int AddItemPrivateIPAddress(int actorId, int itemId, string ipAddress) + { + return SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + "AddItemPrivateIPAddress", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@IPAddress", ipAddress)); + } + + public static int SetItemPrivatePrimaryIPAddress(int actorId, int itemId, int privateAddressId) + { + return SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + "SetItemPrivatePrimaryIPAddress", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@PrivateAddressID", privateAddressId)); + } + + public static int DeleteItemPrivateIPAddress(int actorId, int itemId, int privateAddressId) + { + return SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + "DeleteItemPrivateIPAddress", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId), + new SqlParameter("@PrivateAddressID", privateAddressId)); + } + + public static int DeleteItemPrivateIPAddresses(int actorId, int itemId) + { + return SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + "DeleteItemPrivateIPAddresses", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ItemID", itemId)); + } + #endregion + + #region BlackBerry + + public static void AddBlackBerryUser(int accountId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, + CommandType.StoredProcedure, + "AddBlackBerryUser", + new[] + { + new SqlParameter("@AccountID", accountId) + }); + } + + + public static bool CheckBlackBerryUserExists(int accountId) + { + int res = (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "CheckBlackBerryUserExists", + new SqlParameter("@AccountID", accountId)); + return res > 0; + } + + + public static IDataReader GetBlackBerryUsers(int itemId, string sortColumn, string sortDirection, string name, string email, int startRow, int count) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId), + new SqlParameter("@SortColumn", sortColumn), + new SqlParameter("@SortDirection", sortDirection), + GetFilterSqlParam("@Name", name), + GetFilterSqlParam("@Email", email), + new SqlParameter("@StartRow", startRow), + new SqlParameter("Count", count) + }; + + + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetBlackBerryUsers", sqlParams); + } + + public static int GetBlackBerryUsersCount(int itemId, string name, string email) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId), + GetFilterSqlParam("@Name", name), + GetFilterSqlParam("@Email", email), + }; + + return + (int) + SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "GetBlackBerryUsersCount", sqlParams); + } + + public static void DeleteBlackBerryUser(int accountId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, + CommandType.StoredProcedure, + "DeleteBlackBerryUser", + new[] + { + new SqlParameter("@AccountID", accountId) + }); + + } + + #endregion + + #region OCS + + public static void AddOCSUser(int accountId, string instanceId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, + CommandType.StoredProcedure, + "AddOCSUser", + new[] + { + new SqlParameter("@AccountID", accountId), + new SqlParameter("@InstanceID", instanceId) + }); + } + + + public static bool CheckOCSUserExists(int accountId) + { + int res = (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "CheckOCSUserExists", + new SqlParameter("@AccountID", accountId)); + return res > 0; + } + + + public static IDataReader GetOCSUsers(int itemId, string sortColumn, string sortDirection, string name, string email, int startRow, int count) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId), + new SqlParameter("@SortColumn", sortColumn), + new SqlParameter("@SortDirection", sortDirection), + GetFilterSqlParam("@Name", name), + GetFilterSqlParam("@Email", email), + new SqlParameter("@StartRow", startRow), + new SqlParameter("Count", count) + }; + + + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetOCSUsers", sqlParams); + } + + public static int GetOCSUsersCount(int itemId, string name, string email) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId), + GetFilterSqlParam("@Name", name), + GetFilterSqlParam("@Email", email), + }; + + return + (int) + SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "GetOCSUsersCount", sqlParams); + } + + public static void DeleteOCSUser(string instanceId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, + CommandType.StoredProcedure, + "DeleteOCSUser", + new[] + { + new SqlParameter("@InstanceId", instanceId) + }); + + } + + public static string GetOCSUserInstanceID(int accountId) + { + return (string)SqlHelper.ExecuteScalar(ConnectionString, + CommandType.StoredProcedure, + "GetInstanceID", + new[] + { + new SqlParameter("@AccountID", accountId) + }); + } + + #endregion + + #region SSL + public static int AddSSLRequest(int actorId, int packageId, int siteID, int userID, string friendlyname, string hostname, string csr, int csrLength, string distinguishedName, bool isRenewal, int previousID) + { + SqlParameter prmId = new SqlParameter("@SSLID", SqlDbType.Int); + prmId.Direction = ParameterDirection.Output; + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddSSLRequest", prmId, + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@UserID", userID), + new SqlParameter("@WebSiteID", siteID), + new SqlParameter("@FriendlyName", friendlyname), + new SqlParameter("@HostName", hostname), + new SqlParameter("@CSR", csr), + new SqlParameter("@CSRLength", csrLength), + new SqlParameter("@DistinguishedName", distinguishedName), + new SqlParameter("@IsRenewal", isRenewal), + new SqlParameter("@PreviousId", previousID) + ); + return Convert.ToInt32(prmId.Value); + + } + + public static void CompleteSSLRequest(int actorId, int packageId, int id, string certificate, string distinguishedName, string serialNumber, byte[] hash, DateTime validFrom, DateTime expiryDate) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "CompleteSSLRequest", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@ID", id), + new SqlParameter("@DistinguishedName", distinguishedName), + new SqlParameter("@Certificate", certificate), + new SqlParameter("@SerialNumber", serialNumber), + new SqlParameter("@Hash", Convert.ToBase64String(hash)), + new SqlParameter("@ValidFrom", validFrom), + new SqlParameter("@ExpiryDate", expiryDate)); + + } + + public static void AddPFX(int actorId, int packageId, int siteID, int userID, string hostname, string friendlyName, string distinguishedName, int csrLength, string serialNumber, DateTime validFrom, DateTime expiryDate) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "AddPFX", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@UserID", userID), + new SqlParameter("@WebSiteID", siteID), + new SqlParameter("@FriendlyName", friendlyName), + new SqlParameter("@HostName", hostname), + new SqlParameter("@CSRLength", csrLength), + new SqlParameter("@DistinguishedName", distinguishedName), + new SqlParameter("@SerialNumber", serialNumber), + new SqlParameter("@ValidFrom", validFrom), + new SqlParameter("@ExpiryDate", expiryDate)); + + } + + public static DataSet GetSSL(int actorId, int packageId, int id) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetSSL", + new SqlParameter("@SSLID", id)); + + } + + public static DataSet GetCertificatesForSite(int actorId, int packageId, int siteId) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetCertificatesForSite", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@websiteid", siteId)); + + } + + public static DataSet GetPendingCertificates(int actorId, int packageId, int id, bool recursive) + { + return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetPendingSSLForWebsite", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@PackageId", packageId), + new SqlParameter("@websiteid", id), + new SqlParameter("@Recursive", recursive)); + + } + + public static IDataReader GetSSLCertificateByID(int actorId, int id) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetSSLCertificateByID", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@ID", id)); + } + + public static int CheckSSL(int siteID, bool renewal) + { + SqlParameter prmId = new SqlParameter("@Result", SqlDbType.Int); + prmId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "CheckSSL", + prmId, + new SqlParameter("@siteID", siteID), + new SqlParameter("@Renewal", renewal)); + + return Convert.ToInt32(prmId.Value); + } + + public static IDataReader GetSiteCert(int actorId, int siteID) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetSSLCertificateByID", + new SqlParameter("@ActorId", actorId), + new SqlParameter("@ID", siteID)); + } + + public static void DeleteCertificate(int actorId, int packageId, int id) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "DeleteCertificate", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@PackageID", packageId), + new SqlParameter("@id", id)); + } + + public static bool CheckSSLExistsForWebsite(int siteId) + { + SqlParameter prmId = new SqlParameter("@Result", SqlDbType.Bit); + prmId.Direction = ParameterDirection.Output; + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "CheckSSLExistsForWebsite", prmId, + new SqlParameter("@siteID", siteId), + new SqlParameter("@SerialNumber", "")); + return Convert.ToBoolean(prmId.Value); + } + #endregion + + #region Lync + + public static void AddLyncUser(int accountId, int lyncUserPlanId, string sipAddress) + { + SqlHelper.ExecuteNonQuery(ConnectionString, + CommandType.StoredProcedure, + "AddLyncUser", + new[] + { + new SqlParameter("@AccountID", accountId), + new SqlParameter("@LyncUserPlanID", lyncUserPlanId), + new SqlParameter("@SipAddress", sipAddress) + }); + } + + public static void UpdateLyncUser(int accountId, string sipAddress) + { + SqlHelper.ExecuteNonQuery(ConnectionString, + CommandType.StoredProcedure, + "UpdateLyncUser", + new[] + { + new SqlParameter("@AccountID", accountId), + new SqlParameter("@SipAddress", sipAddress) + }); + } + + + public static bool CheckLyncUserExists(int accountId) + { + int res = (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "CheckLyncUserExists", + new SqlParameter("@AccountID", accountId)); + return res > 0; + } + + public static bool LyncUserExists(int accountId, string sipAddress) + { + SqlParameter outParam = new SqlParameter("@Exists", SqlDbType.Bit); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "LyncUserExists", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@SipAddress", sipAddress), + outParam + ); + + return Convert.ToBoolean(outParam.Value); + } + + + + public static IDataReader GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId), + new SqlParameter("@SortColumn", sortColumn), + new SqlParameter("@SortDirection", sortDirection), + new SqlParameter("@StartRow", startRow), + new SqlParameter("Count", count) + }; + + + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUsers", sqlParams); + } + + + public static IDataReader GetLyncUsersByPlanId(int itemId, int planId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUsersByPlanId", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@PlanId", planId) + ); + } + + public static int GetLyncUsersCount(int itemId) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId) + }; + + return + (int) + SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "GetLyncUsersCount", sqlParams); + } + + public static void DeleteLyncUser(int accountId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, + CommandType.StoredProcedure, + "DeleteLyncUser", + new[] + { + new SqlParameter("@AccountId", accountId) + }); + + } + + public static int AddLyncUserPlan(int itemID, LyncUserPlan lyncUserPlan) + { + SqlParameter outParam = new SqlParameter("@LyncUserPlanId", SqlDbType.Int); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddLyncUserPlan", + outParam, + + new SqlParameter("@ItemID", itemID), + new SqlParameter("@LyncUserPlanName", lyncUserPlan.LyncUserPlanName), + new SqlParameter("@LyncUserPlanType", lyncUserPlan.LyncUserPlanType), + new SqlParameter("@IM", lyncUserPlan.IM), + new SqlParameter("@Mobility", lyncUserPlan.Mobility), + new SqlParameter("@MobilityEnableOutsideVoice", lyncUserPlan.MobilityEnableOutsideVoice), + new SqlParameter("@Federation", lyncUserPlan.Federation), + new SqlParameter("@Conferencing", lyncUserPlan.Conferencing), + new SqlParameter("@EnterpriseVoice", lyncUserPlan.EnterpriseVoice), + new SqlParameter("@VoicePolicy", lyncUserPlan.VoicePolicy), + new SqlParameter("@IsDefault", lyncUserPlan.IsDefault), + + new SqlParameter("@RemoteUserAccess", lyncUserPlan.RemoteUserAccess), + new SqlParameter("@PublicIMConnectivity", lyncUserPlan.PublicIMConnectivity), + + new SqlParameter("@AllowOrganizeMeetingsWithExternalAnonymous", lyncUserPlan.AllowOrganizeMeetingsWithExternalAnonymous), + + new SqlParameter("@Telephony", lyncUserPlan.Telephony), + + new SqlParameter("@ServerURI", lyncUserPlan.ServerURI), + + new SqlParameter("@ArchivePolicy", lyncUserPlan.ArchivePolicy), + new SqlParameter("@TelephonyDialPlanPolicy", lyncUserPlan.TelephonyDialPlanPolicy), + new SqlParameter("@TelephonyVoicePolicy", lyncUserPlan.TelephonyVoicePolicy) + ); + + return Convert.ToInt32(outParam.Value); + } + + + public static void UpdateLyncUserPlan(int itemID, LyncUserPlan lyncUserPlan) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateLyncUserPlan", + new SqlParameter("@LyncUserPlanId", lyncUserPlan.LyncUserPlanId), + new SqlParameter("@LyncUserPlanName", lyncUserPlan.LyncUserPlanName), + new SqlParameter("@LyncUserPlanType", lyncUserPlan.LyncUserPlanType), + new SqlParameter("@IM", lyncUserPlan.IM), + new SqlParameter("@Mobility", lyncUserPlan.Mobility), + new SqlParameter("@MobilityEnableOutsideVoice", lyncUserPlan.MobilityEnableOutsideVoice), + new SqlParameter("@Federation", lyncUserPlan.Federation), + new SqlParameter("@Conferencing", lyncUserPlan.Conferencing), + new SqlParameter("@EnterpriseVoice", lyncUserPlan.EnterpriseVoice), + new SqlParameter("@VoicePolicy", lyncUserPlan.VoicePolicy), + new SqlParameter("@IsDefault", lyncUserPlan.IsDefault), + + new SqlParameter("@RemoteUserAccess", lyncUserPlan.RemoteUserAccess), + new SqlParameter("@PublicIMConnectivity", lyncUserPlan.PublicIMConnectivity), + + new SqlParameter("@AllowOrganizeMeetingsWithExternalAnonymous", lyncUserPlan.AllowOrganizeMeetingsWithExternalAnonymous), + + new SqlParameter("@Telephony", lyncUserPlan.Telephony), + + new SqlParameter("@ServerURI", lyncUserPlan.ServerURI), + + new SqlParameter("@ArchivePolicy", lyncUserPlan.ArchivePolicy), + new SqlParameter("@TelephonyDialPlanPolicy", lyncUserPlan.TelephonyDialPlanPolicy), + new SqlParameter("@TelephonyVoicePolicy", lyncUserPlan.TelephonyVoicePolicy) + ); + } + + public static void DeleteLyncUserPlan(int lyncUserPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteLyncUserPlan", + new SqlParameter("@LyncUserPlanId", lyncUserPlanId) + ); + } + + public static IDataReader GetLyncUserPlan(int lyncUserPlanId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUserPlan", + new SqlParameter("@LyncUserPlanId", lyncUserPlanId) + ); + } + + + public static IDataReader GetLyncUserPlans(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUserPlans", + new SqlParameter("@ItemID", itemId) + ); + } + + + public static void SetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetOrganizationDefaultLyncUserPlan", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@LyncUserPlanId", lyncUserPlanId) + ); + } + + public static IDataReader GetLyncUserPlanByAccountId(int AccountId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUserPlanByAccountId", + new SqlParameter("@AccountID", AccountId) + ); + } + + + public static void SetLyncUserLyncUserplan(int accountId, int lyncUserPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetLyncUserLyncUserplan", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@LyncUserPlanId", (lyncUserPlanId == 0) ? (object)DBNull.Value : (object)lyncUserPlanId) + ); + } + + + #endregion + + public static int GetPackageIdByName(string Name) + { + int packageId = -1; + List providers = ServerController.GetProviders(); + foreach (ProviderInfo providerInfo in providers) + { + if (string.Equals(Name, providerInfo.ProviderName, StringComparison.OrdinalIgnoreCase)) + { + packageId = providerInfo.ProviderId; + break; + } + } + + //if (-1 == packageId) + //{ + // throw new Exception("Provider not found"); + //} + + return packageId; + } + + public static int GetServiceIdByProviderForServer(int providerId, int serverId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT TOP 1 + ServiceID + FROM Services + WHERE ProviderID = @ProviderID AND ServerID = @ServerID", + new SqlParameter("@ProviderID", providerId), + new SqlParameter("@ServerID", serverId)); + + if (reader.Read()) + { + return (int)reader["ServiceID"]; + } + + return -1; + } + + #region Helicon Zoo + + public static void GetHeliconZooProviderAndGroup(string providerName, out int providerId, out int groupId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT TOP 1 + ProviderID, GroupID + FROM Providers + WHERE ProviderName = @ProviderName", + new SqlParameter("@ProviderName", providerName)); + + reader.Read(); + + providerId = (int)reader["ProviderID"]; + groupId = (int)reader["GroupID"]; + + } + + public static IDataReader GetHeliconZooQuotas(int providerId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT + Q.QuotaID, + Q.GroupID, + Q.QuotaName, + Q.QuotaDescription, + Q.QuotaTypeID, + Q.ServiceQuota + FROM Providers AS P + INNER JOIN Quotas AS Q ON P.GroupID = Q.GroupID + WHERE P.ProviderID = @ProviderID", + new SqlParameter("@ProviderID", providerId)); + + return reader; + } + + public static void RemoveHeliconZooQuota(int groupId, string engineName) + { + int quotaId; + + // find quota id + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT TOP 1 + QuotaID + FROM Quotas + WHERE QuotaName = @QuotaName AND GroupID = @GroupID", + new SqlParameter("@QuotaName", engineName), + new SqlParameter("@GroupID", groupId)); + + reader.Read(); + quotaId = (int)reader["QuotaID"]; + + // delete references from HostingPlanQuotas + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.Text, + "DELETE FROM HostingPlanQuotas WHERE QuotaID = @QuotaID", + new SqlParameter("@QuotaID", quotaId) + ); + + // delete from Quotas + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.Text, + "DELETE FROM Quotas WHERE QuotaID = @QuotaID", + new SqlParameter("@QuotaID", quotaId) + ); + + } + + public static void AddHeliconZooQuota(int groupId, int quotaId, string engineName, string engineDescription, int quotaOrder) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.Text, + @"INSERT INTO Quotas (QuotaID, GroupID, QuotaOrder, QuotaName, QuotaDescription, QuotaTypeID, ServiceQuota) + VALUES (@QuotaID, @GroupID, @QuotaOrder, @QuotaName, @QuotaDescription, 1, 0)", + new SqlParameter("@QuotaID", quotaId), + new SqlParameter("@GroupID", groupId), + new SqlParameter("@QuotaOrder", quotaOrder), + new SqlParameter("@QuotaName", engineName), + new SqlParameter("@QuotaDescription", engineDescription) + ); + } + + public static IDataReader GetEnabledHeliconZooQuotasForPackage(int packageId) + { + int providerId, groupId; + + GetHeliconZooProviderAndGroup("HeliconZoo", out providerId, out groupId); + + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT HostingPlanQuotas.QuotaID, Quotas.QuotaName, Quotas.QuotaDescription + FROM HostingPlanQuotas + INNER JOIN Packages ON HostingPlanQuotas.PlanID = Packages.PlanID + INNER JOIN Quotas ON HostingPlanQuotas.QuotaID = Quotas.QuotaID + WHERE + (Packages.PackageID = @PackageID) AND (Quotas.GroupID = @GroupID) AND (HostingPlanQuotas.QuotaValue = 1)", + new SqlParameter("@PackageID", packageId), + new SqlParameter("@GroupID", groupId) + ); + + return reader; + } + + public static int GetServerIdForPackage(int packageId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT TOP 1 + ServerID + FROM Packages + WHERE PackageID = @PackageID", + new SqlParameter("@PackageID", packageId) + ); + + if (reader.Read()) + { + return (int)reader["ServerID"]; + } + + return -1; + } + + #endregion + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/EcommerceProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/EcommerceProvider.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/EcommerceProvider.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/EcommerceProvider.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/SQLHelper.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/SQLHelper.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/SQLHelper.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/SQLHelper.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DatabaseServers/DatabaseServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DatabaseServers/DatabaseServerController.cs similarity index 96% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DatabaseServers/DatabaseServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DatabaseServers/DatabaseServerController.cs index 26a3fac9..99e2d55d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DatabaseServers/DatabaseServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DatabaseServers/DatabaseServerController.cs @@ -200,8 +200,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("SQL_DATABASE", "UPDATE", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("SQL_DATABASE", "UPDATE", origItem.Name, item.Id); + TaskManager.WriteParameter("Provider", origItem.GroupName); try @@ -237,9 +237,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MSSQL_DATABASES_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("SQL_DATABASE", "DELETE", origItem.Name); - TaskManager.ItemId = itemId; - TaskManager.WriteParameter("Provider", origItem.GroupName); + TaskManager.StartTask("SQL_DATABASE", "DELETE", origItem.Name, itemId, new BackgroundTaskParameter("Provider", origItem.GroupName)); try { @@ -305,8 +303,7 @@ namespace WebsitePanel.EnterpriseServer return null; // place log record - TaskManager.StartTask("SQL_DATABASE", "BACKUP", item.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SQL_DATABASE", "BACKUP", item.Name, itemId); try { @@ -398,8 +395,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("SQL_DATABASE", "RESTORE", item.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SQL_DATABASE", "RESTORE", item.Name, itemId); try { @@ -468,8 +464,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MSSQL_DATABASES_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("SQL_DATABASE", "TRUNCATE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SQL_DATABASE", "TRUNCATE", origItem.Name, itemId); try { @@ -701,8 +696,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("SQL_USER", "UPDATE", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("SQL_USER", "UPDATE", origItem.Name, item.Id); try { @@ -746,8 +740,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MSSQL_USERS_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("SQL_USER", "DELETE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SQL_USER", "DELETE", origItem.Name, itemId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DnsServers/DnsServerController.cs similarity index 97% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DnsServers/DnsServerController.cs index de9aa5fd..10d4bbea 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DnsServers/DnsServerController.cs @@ -214,12 +214,10 @@ namespace WebsitePanel.EnterpriseServer // if (zoneItem != null) { - TaskManager.StartTask("DNS_ZONE", "DELETE", zoneItem.Name); + TaskManager.StartTask("DNS_ZONE", "DELETE", zoneItem.Name, zoneItemId); // try { - // - TaskManager.ItemId = zoneItemId; // delete DNS zone DNSServer dns = new DNSServer(); ServiceProviderProxy.Init(dns, zoneItem.ServiceId); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/CategoryController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/CategoryController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/CategoryController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/CategoryController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ContractSystem/ContractController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/ContractSystem/ContractController.cs similarity index 96% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ContractSystem/ContractController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/ContractSystem/ContractController.cs index 05920e1a..1fcab30c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ContractSystem/ContractController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/ContractSystem/ContractController.cs @@ -84,8 +84,10 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.ContractSystem // result.Succeed = true; result.SetProperty("ContractId", contractId); + // Add contract object - ES.TaskManager.TaskParameters[SystemTaskParams.PARAM_CONTRACT] = GetContract(contractId); + ES.TaskManager.UpdateParam(SystemTaskParams.PARAM_CONTRACT, GetContract(contractId)); + // return result; } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Helpers.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Helpers.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Helpers.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Helpers.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/InvoiceController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/InvoiceController.cs similarity index 94% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/InvoiceController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/InvoiceController.cs index bd06bd04..65ccd06e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/InvoiceController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/InvoiceController.cs @@ -224,10 +224,15 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer InvoiceController.UpdateInvoice(invoice.InvoiceId, invoice.InvoiceNumber, invoice.DueDate, invoice.Total, invoice.SubTotal, invoice.TaxationId, invoice.TaxAmount, invoice.Currency); // - ES.TaskManager.TaskParameters[SystemTaskParams.PARAM_CONTRACT] = contract; - ES.TaskManager.TaskParameters[SystemTaskParams.PARAM_INVOICE] = invoice; - ES.TaskManager.TaskParameters[SystemTaskParams.PARAM_INVOICE_LINES] = invoiceLines; - ES.TaskManager.TaskParameters[SystemTaskParams.PARAM_EXTRA_ARGS] = extraArgs; + + Hashtable parameters = new Hashtable(); + + parameters.Add(SystemTaskParams.PARAM_CONTRACT, contract); + parameters.Add(SystemTaskParams.PARAM_INVOICE, invoice); + parameters.Add(SystemTaskParams.PARAM_INVOICE_LINES, invoiceLines); + parameters.Add(SystemTaskParams.PARAM_EXTRA_ARGS, extraArgs); + + TaskManager.UpdateParams(parameters); // return result; } @@ -248,7 +253,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer invoiceNumber, dueDate, total, subTotal, taxationId, taxAmount, currency); } - internal static Invoice GetCustomerInvoiceInternally(int invoiceId) + public static Invoice GetCustomerInvoiceInternally(int invoiceId) { return ES.ObjectUtils.FillObjectFromDataReader( EcommerceProvider.GetCustomerInvoice(ES.SecurityContext.User.UserId, invoiceId)); @@ -260,7 +265,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer EcommerceProvider.GetCustomerInvoiceItems(ES.SecurityContext.User.UserId, invoiceId)); } - internal static string GetCustomerInvoiceFormattedInternally(int invoiceId, string cultureName) + public static string GetCustomerInvoiceFormattedInternally(int invoiceId, string cultureName) { Invoice invoice = GetCustomerInvoiceInternally(invoiceId); // diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/MiscController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/MiscController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/MiscController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/MiscController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/PaymentGatewayController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/PaymentGatewayController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/PaymentGatewayController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/PaymentGatewayController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/DomainNameController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/DomainNameController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/DomainNameController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/DomainNameController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingAddonController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/HostingAddonController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingAddonController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/HostingAddonController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingPackageController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/HostingPackageController.cs similarity index 96% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingPackageController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/HostingPackageController.cs index 196c6f88..dca4232f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingPackageController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/HostingPackageController.cs @@ -162,7 +162,8 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer TaskManager.WriteParameter(USERNAME_PARAM, context.ConsumerInfo[ContractAccount.USERNAME]); TaskManager.WriteParameter(SVC_PARAM, context.ServiceInfo.ServiceName); TaskManager.WriteParameter(SVC_ID_PARAM, context.ServiceInfo.ServiceId); - TaskManager.TaskParameters[SystemTaskParams.PARAM_SEND_EMAIL] = context.SendEmail; + + TaskManager.UpdateParam(SystemTaskParams.PARAM_SEND_EMAIL, context.SendEmail); // 0. Do security checks if (!CheckOperationClientPermissions(result)) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/IServiceProvisioning.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/IServiceProvisioning.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/IServiceProvisioning.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/IServiceProvisioning.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ProvisioningContext.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/ProvisioningContext.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ProvisioningContext.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/ProvisioningContext.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs similarity index 92% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs index 50673c48..1988b103 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs @@ -235,10 +235,13 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer protected void SetOutboundParameters(ProvisioningContext context) { // set task outbound parameters - TaskManager.TaskParameters[SystemTaskParams.PARAM_SERVICE] = context.ServiceInfo; - TaskManager.TaskParameters[SystemTaskParams.PARAM_CONTRACT] = context.ContractInfo; - TaskManager.TaskParameters[SystemTaskParams.PARAM_CONTRACT_ACCOUNT] = context.ConsumerInfo; - TaskManager.TaskParameters[SystemTaskParams.PARAM_SEND_EMAIL] = context.SendEmail; + Hashtable parameters = new Hashtable(); + parameters.Add(SystemTaskParams.PARAM_SERVICE, context.ServiceInfo); + parameters.Add(SystemTaskParams.PARAM_CONTRACT, context.ContractInfo); + parameters.Add(SystemTaskParams.PARAM_CONTRACT_ACCOUNT, context.ConsumerInfo); + parameters.Add(SystemTaskParams.PARAM_SEND_EMAIL, context.SendEmail); + + TaskManager.UpdateParams(parameters); } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/ServiceController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/ServiceController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceHandlers/ServiceHandlerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/ServiceHandlers/ServiceHandlerController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceHandlers/ServiceHandlerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/ServiceHandlers/ServiceHandlerController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorefrontController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/StorefrontController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorefrontController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/StorefrontController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorehouseController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/StorehouseController.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorehouseController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/StorehouseController.cs index 737fdb5c..6ea4ddc6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorehouseController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/StorehouseController.cs @@ -763,7 +763,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer return EcommerceProvider.DeleteTaxation(SecurityContext.User.UserId, userId, taxationId); } - internal static void SetPaymentProfile(string contractId, CheckoutDetails newProfile) + public static void SetPaymentProfile(string contractId, CheckoutDetails newProfile) { try { @@ -864,7 +864,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer return details; } - internal static bool PaymentProfileExists(string contractId) + public static bool PaymentProfileExists(string contractId) { return EcommerceProvider.PaymentProfileExists(SecurityContext.User.UserId, contractId); } @@ -1145,10 +1145,15 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer // int resultCode = EcommerceProvider.UpdateCustomerPayment(SecurityContext.User.UserId, paymentId, invoiceId, transactionId, total, currency, methodName, pluginId, (int)status); + // - TaskManager.TaskParameters[SystemTaskParams.PARAM_CONTRACT] = ContractSystem.ContractController.GetContract(contractId); - TaskManager.TaskParameters[SystemTaskParams.PARAM_INVOICE] = InvoiceController.GetCustomerInvoiceInternally(invoiceId); - TaskManager.TaskParameters[SystemTaskParams.PARAM_PAYMENT] = GetCustomerPayment(paymentId); + Hashtable parameters = new Hashtable(); + parameters[SystemTaskParams.PARAM_CONTRACT] = ContractSystem.ContractController.GetContract(contractId); + parameters[SystemTaskParams.PARAM_INVOICE] = InvoiceController.GetCustomerInvoiceInternally(invoiceId); + parameters[SystemTaskParams.PARAM_PAYMENT] = GetCustomerPayment(paymentId); + + TaskManager.UpdateParams(parameters); + // return resultCode; } @@ -1209,9 +1214,12 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer // TRACE TaskManager.WriteParameter("PaymentID", resultCode); // - TaskManager.TaskParameters[SystemTaskParams.PARAM_CONTRACT] = contract; - TaskManager.TaskParameters[SystemTaskParams.PARAM_INVOICE] = invoice; - TaskManager.TaskParameters[SystemTaskParams.PARAM_PAYMENT] = GetCustomerPayment(resultCode); + Hashtable parameters = new Hashtable(); + parameters[SystemTaskParams.PARAM_CONTRACT] = contract; + parameters[SystemTaskParams.PARAM_INVOICE] = invoice; + parameters[SystemTaskParams.PARAM_PAYMENT] = GetCustomerPayment(resultCode); + + TaskManager.UpdateParams(parameters); // return resultCode; } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/SystemPluginController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/SystemPluginController.cs similarity index 96% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/SystemPluginController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/SystemPluginController.cs index c9f01256..e93e8cf4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/SystemPluginController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/SystemPluginController.cs @@ -252,7 +252,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer EcommerceProvider.GetSupportedPluginById(pluginId)); } - internal static CheckoutFormParams GetCheckoutFormParams(string contractId, int invoiceId, + public static CheckoutFormParams GetCheckoutFormParams(string contractId, int invoiceId, string methodName, KeyValueBunch options) { Contract contractInfo = ContractSystem.ContractController.GetContract(contractId); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs similarity index 81% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs index d13af554..114c09e6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs @@ -45,9 +45,11 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.TaskEventHandlers /// public override void OnComplete() { - if (!TaskManager.HasErrors) + BackgroundTask topTask = TaskManager.TopTask; + + if (!TaskManager.HasErrors(topTask)) { - switch (TaskManager.TaskName) + switch (topTask.TaskName) { case SystemTasks.SVC_SUSPEND: case SystemTasks.SVC_CANCEL: @@ -72,7 +74,10 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.TaskEventHandlers // send an e-mail notification try { - bool sendNotification = (bool)TaskManager.TaskParameters[SystemTaskParams.PARAM_SEND_EMAIL]; + BackgroundTask topTask = TaskManager.TopTask; + + bool sendNotification = Utils.ParseBool(topTask.GetParamValue(SystemTaskParams.PARAM_SEND_EMAIL), false); + // Ensure notification is required if (!sendNotification) { @@ -80,7 +85,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.TaskEventHandlers return; } - Service service = (Service)TaskManager.TaskParameters[SystemTaskParams.PARAM_SERVICE]; + Service service = (Service)topTask.GetParamValue(SystemTaskParams.PARAM_SERVICE); int smtpResult = 0; switch (service.Status) { @@ -112,9 +117,11 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.TaskEventHandlers // try { + BackgroundTask topTask = TaskManager.TopTask; + // Read task parameters - Invoice invoice = (Invoice)TaskManager.TaskParameters[SystemTaskParams.PARAM_INVOICE]; - CustomerPayment payment = (CustomerPayment)TaskManager.TaskParameters[SystemTaskParams.PARAM_PAYMENT]; + Invoice invoice = (Invoice)topTask.GetParamValue(SystemTaskParams.PARAM_INVOICE); + CustomerPayment payment = (CustomerPayment)topTask.GetParamValue(SystemTaskParams.PARAM_PAYMENT); // if (payment.Status == TransactionStatus.Approved) { @@ -139,11 +146,13 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.TaskEventHandlers // try { + BackgroundTask topTask = TaskManager.TopTask; + // Read task parameters - Contract contract = (Contract)TaskManager.TaskParameters[SystemTaskParams.PARAM_CONTRACT]; - Invoice invoice = (Invoice)TaskManager.TaskParameters[SystemTaskParams.PARAM_INVOICE]; - List invoiceLines = (List)TaskManager.TaskParameters[SystemTaskParams.PARAM_INVOICE_LINES]; - KeyValueBunch extraArgs = (KeyValueBunch)TaskManager.TaskParameters[SystemTaskParams.PARAM_EXTRA_ARGS]; + Contract contract = (Contract)topTask.GetParamValue(SystemTaskParams.PARAM_CONTRACT); + Invoice invoice = (Invoice)topTask.GetParamValue(SystemTaskParams.PARAM_INVOICE); + List invoiceLines = (List)topTask.GetParamValue(SystemTaskParams.PARAM_INVOICE_LINES); + KeyValueBunch extraArgs = (KeyValueBunch)topTask.GetParamValue(SystemTaskParams.PARAM_EXTRA_ARGS); // modify invoice direct url if (extraArgs != null && !String.IsNullOrEmpty(extraArgs["InvoiceDirectURL"])) extraArgs["InvoiceDirectURL"] += "&InvoiceId=" + invoice.InvoiceId; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs similarity index 82% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs index 1ce637c4..b7b8efec 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs @@ -44,9 +44,11 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.TaskEventHandlers public override void OnComplete() { - if (!TaskManager.HasErrors) + BackgroundTask topTask = TaskManager.TopTask; + + if (!TaskManager.HasErrors(topTask)) { - switch (TaskManager.TaskName) + switch (topTask.TaskName) { case SystemTasks.TASK_ADD_INVOICE: RegisterInvoiceActivationTrigger(); @@ -65,7 +67,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.TaskEventHandlers private void RegisterInvoiceActivationTrigger() { // Read contract invoice - Invoice invoice = (Invoice)TaskManager.TaskParameters[SystemTaskParams.PARAM_INVOICE]; + Invoice invoice = (Invoice)TaskManager.TopTask.GetParamValue(SystemTaskParams.PARAM_INVOICE); // TriggerSystem.TriggerController.AddSystemTrigger(invoice.InvoiceId.ToString(), ActivateInvoiceTrigger.STATUS_AWAITING_PAYMENT, typeof(ActivateInvoiceTrigger)); @@ -73,10 +75,12 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.TaskEventHandlers private void RegisterContractActivationTrigger() { + BackgroundTask topTask = TaskManager.TopTask; + // Ensure the contract has been registered successfully - if (TaskManager.TaskParameters.ContainsKey(SystemTaskParams.PARAM_CONTRACT)) + if (topTask.ContainsParam(SystemTaskParams.PARAM_CONTRACT)) { - Contract contract = (Contract)TaskManager.TaskParameters[SystemTaskParams.PARAM_CONTRACT]; + Contract contract = (Contract)topTask.GetParamValue(SystemTaskParams.PARAM_CONTRACT); // if (contract.Status == ContractStatus.Pending) { @@ -88,8 +92,10 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.TaskEventHandlers private void ActivatePaymentSystemTriggers() { - CustomerPayment payment = (CustomerPayment)TaskManager.TaskParameters[SystemTaskParams.PARAM_PAYMENT]; - Contract contract = (Contract)TaskManager.TaskParameters[SystemTaskParams.PARAM_CONTRACT]; + BackgroundTask topTask = TaskManager.TopTask; + + CustomerPayment payment = (CustomerPayment)topTask.GetParamValue(SystemTaskParams.PARAM_PAYMENT); + Contract contract = (Contract)topTask.GetParamValue(SystemTaskParams.PARAM_CONTRACT); // Run activate contract trigger if the transaction was approved if (payment.Status == TransactionStatus.Approved) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/CommonTrigger.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TriggerSystem/CommonTrigger.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/CommonTrigger.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TriggerSystem/CommonTrigger.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/TriggerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TriggerSystem/TriggerController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/TriggerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Ecommerce/TriggerSystem/TriggerController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs similarity index 88% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs index 8e0a1a82..c15f832c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs @@ -171,8 +171,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_ORG_STATS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_ORG_STATS", itemId); try { @@ -260,8 +259,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "CALCULATE_DISKSPACE"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "CALCULATE_DISKSPACE", itemId); try { @@ -348,8 +346,7 @@ namespace WebsitePanel.EnterpriseServer private static int ExtendToExchangeOrganization(ref Organization org) { // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_ORG", org.Name); - TaskManager.TaskParameters["Organization ID"] = org.OrganizationId; + TaskManager.StartTask("EXCHANGE", "CREATE_ORG", org.Name, new BackgroundTaskParameter("Organization ID", org.OrganizationId)); try { @@ -575,8 +572,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_ORG"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DELETE_ORG", itemId); try { @@ -613,8 +609,7 @@ namespace WebsitePanel.EnterpriseServer public static Organization GetOrganizationStorageLimits(int itemId) { // place log record - TaskManager.StartTask("EXCHANGE", "GET_ORG_LIMITS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_ORG_LIMITS", itemId); try { @@ -638,8 +633,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "SET_ORG_LIMITS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "SET_ORG_LIMITS", itemId); try { @@ -724,8 +718,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOXES_STATS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_MAILBOXES_STATS", itemId); try { @@ -753,8 +746,7 @@ namespace WebsitePanel.EnterpriseServer public static ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId) { // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_STATS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_STATS", itemId); try { @@ -818,8 +810,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_FOLDERS_STATS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_FOLDERS_STATS", itemId); try { @@ -865,8 +856,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_ACTIVESYNC_POLICY"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_ACTIVESYNC_POLICY", itemId); try { @@ -917,8 +907,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "SET_ACTIVESYNC_POLICY"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "SET_ACTIVESYNC_POLICY", itemId); try { @@ -1171,8 +1160,7 @@ namespace WebsitePanel.EnterpriseServer public static bool CheckAccountCredentials(int itemId, string email, string password) { // place log record - TaskManager.StartTask("EXCHANGE", "AUTHENTICATE", email); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "AUTHENTICATE", email, itemId); try { @@ -1396,9 +1384,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "ADD_DOMAIN"); - TaskManager.TaskParameters["Domain ID"] = domainId; - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "ADD_DOMAIN", itemId, new BackgroundTaskParameter("Domain ID", domainId)); try { @@ -1469,10 +1455,12 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "CHANGE_DOMAIN_TYPE"); - TaskManager.TaskParameters["Domain ID"] = domainId; - TaskManager.TaskParameters["Domain Type"] = domainType.ToString(); - TaskManager.ItemId = itemId; + + List parameters = new List(); + parameters.Add(new BackgroundTaskParameter("Domain ID", domainId)); + parameters.Add(new BackgroundTaskParameter("Domain Type", domainType.ToString())); + + TaskManager.StartTask("EXCHANGE", "CHANGE_DOMAIN_TYPE", itemId, parameters); try { @@ -1527,9 +1515,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_DOMAIN"); - TaskManager.TaskParameters["Domain ID"] = domainId; - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DELETE_DOMAIN", itemId, new BackgroundTaskParameter("Domain ID", domainId)); try { @@ -1632,8 +1618,8 @@ namespace WebsitePanel.EnterpriseServer // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_MAILBOX"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "CREATE_MAILBOX", itemId); + bool userCreated = false; Organization org = null; try @@ -1824,8 +1810,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DISABLE_MAILBOX"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DISABLE_MAILBOX", itemId); try { @@ -1873,8 +1858,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_MAILBOX"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DELETE_MAILBOX", itemId); try { @@ -1953,8 +1937,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_GENERAL", itemId); try { @@ -1989,8 +1972,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL", itemId); try { @@ -2036,8 +2018,7 @@ namespace WebsitePanel.EnterpriseServer public static ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId) { // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_ADDRESSES"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_ADDRESSES", itemId); try { @@ -2060,8 +2041,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "ADD_MAILBOX_ADDRESS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "ADD_MAILBOX_ADDRESS", itemId); try { @@ -2123,8 +2103,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_MAILBOX_ADDRESS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_MAILBOX_ADDRESS", itemId); try { @@ -2183,8 +2162,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_MAILBOX_ADDRESSES"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DELETE_MAILBOX_ADDRESSES", itemId); try { @@ -2238,8 +2216,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_MAILFLOW"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_MAILFLOW", itemId); try { @@ -2278,8 +2255,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_MAILFLOW"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_MAILFLOW", itemId); try { @@ -2331,8 +2307,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_ADVANCED"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_ADVANCED", itemId); try { @@ -2368,8 +2343,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL", itemId); try { @@ -2539,8 +2513,7 @@ namespace WebsitePanel.EnterpriseServer public static ExchangeMailbox GetMailboxPermissions(int itemId, int accountId) { // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_PERMISSIONS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_PERMISSIONS", itemId); try { @@ -2576,8 +2549,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "SET_MAILBOX_PERMISSIONS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "SET_MAILBOX_PERMISSIONS", itemId); try { @@ -2625,8 +2597,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "SET_MAILBOXPLAN"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "SET_MAILBOXPLAN", itemId); try { @@ -2736,8 +2707,7 @@ namespace WebsitePanel.EnterpriseServer public static List GetExchangeMailboxPlans(int itemId) { // place log record - TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLANS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLANS", itemId); try { @@ -2819,8 +2789,7 @@ namespace WebsitePanel.EnterpriseServer { // place log record - TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = mailboxPlanId; + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLAN", mailboxPlanId); try { @@ -2840,8 +2809,7 @@ namespace WebsitePanel.EnterpriseServer public static int AddExchangeMailboxPlan(int itemID, ExchangeMailboxPlan mailboxPlan) { // place log record - TaskManager.StartTask("EXCHANGE", "ADD_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = itemID; + TaskManager.StartTask("EXCHANGE", "ADD_EXCHANGE_MAILBOXPLAN", itemID); try { @@ -2910,8 +2878,7 @@ namespace WebsitePanel.EnterpriseServer public static int UpdateExchangeMailboxPlan(int itemID, ExchangeMailboxPlan mailboxPlan) { // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = itemID; + TaskManager.StartTask("EXCHANGE", "UPDATE_EXCHANGE_MAILBOXPLAN", itemID); try { @@ -2983,8 +2950,7 @@ namespace WebsitePanel.EnterpriseServer public static int DeleteExchangeMailboxPlan(int itemID, int mailboxPlanId) { - TaskManager.StartTask("EXCHANGE", "DELETE_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = itemID; + TaskManager.StartTask("EXCHANGE", "DELETE_EXCHANGE_MAILBOXPLAN", itemID); try { @@ -3005,8 +2971,7 @@ namespace WebsitePanel.EnterpriseServer public static void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) { - TaskManager.StartTask("EXCHANGE", "SET_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "SET_EXCHANGE_MAILBOXPLAN", itemId); try { @@ -3046,8 +3011,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_EXCHANGE_CONTACTS_QUOTA_LIMIT; // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_CONTACT"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "CREATE_CONTACT", itemId); try { @@ -3114,10 +3078,9 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_CONTACT"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DELETE_CONTACT", itemId); - try + try { // load organization Organization org = GetOrganization(itemId); @@ -3170,8 +3133,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_CONTACT_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_CONTACT_GENERAL", itemId); try { @@ -3211,8 +3173,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_CONTACT_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "UPDATE_CONTACT_GENERAL", itemId); try { @@ -3292,8 +3253,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_CONTACT_MAILFLOW"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_CONTACT_MAILFLOW", itemId); try { @@ -3331,8 +3291,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_CONTACT_MAILFLOW"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "UPDATE_CONTACT_MAILFLOW", itemId); try { @@ -3384,8 +3343,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_EXCHANGE_DLISTS_QUOTA_LIMIT; // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_DISTR_LIST"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "CREATE_DISTR_LIST", itemId); try { @@ -3465,8 +3423,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST", itemId); try { @@ -3520,8 +3477,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_GENERAL", itemId); try { @@ -3558,8 +3514,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_GENERAL", itemId); try { @@ -3621,8 +3576,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_MAILFLOW"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_MAILFLOW", itemId); try { @@ -3660,8 +3614,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_MAILFLOW"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_MAILFLOW", itemId); try { @@ -3707,8 +3660,7 @@ namespace WebsitePanel.EnterpriseServer public static ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId) { // place log record - TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_ADDRESSES"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_ADDRESSES", itemId); try { @@ -3731,8 +3683,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "ADD_DISTR_LIST_ADDRESS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "ADD_DISTR_LIST_ADDRESS", itemId); try { @@ -3786,8 +3737,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_DISTR_LIST_ADDRESS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_DISTR_LIST_ADDRESS", itemId); try { @@ -3839,8 +3789,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST_ADDRESSES"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST_ADDRESSES", itemId); try { @@ -4003,6 +3952,170 @@ namespace WebsitePanel.EnterpriseServer return res; } + public static ExchangeAccount[] GetDistributionListsByMember(int itemId, int accountId) + { + #region Demo Mode + if (IsDemoMode) + { + return null; + } + #endregion + + // place log record + TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_BYMEMBER"); + TaskManager.ItemId = itemId; + + List ret = new List(); + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return null; + + int exchangeServiceId = GetExchangeServiceID(org.PackageId); + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + // load account + ExchangeAccount account = GetAccount(itemId, accountId); + + List DistributionLists = GetAccounts(itemId, ExchangeAccountType.DistributionList); + foreach (ExchangeAccount DistributionAccount in DistributionLists) + { + ExchangeDistributionList DistributionList = exchange.GetDistributionListGeneralSettings(DistributionAccount.AccountName); + + foreach (ExchangeAccount member in DistributionList.MembersAccounts) + { + if (member.AccountName == account.AccountName) + { + ret.Add(DistributionAccount); + break; + } + + } + } + + return ret.ToArray(); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static int AddDistributionListMember(int itemId, string distributionListName, int memberId) + { + #region Demo Mode + if (IsDemoMode) + { + return 0; + } + #endregion + + // place log record + TaskManager.StartTask("EXCHANGE", "ADD_DISTR_LIST_MEMBER"); + TaskManager.ItemId = itemId; + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return 0; + + // load account + ExchangeAccount memberAccount = GetAccount(itemId, memberId); + + int exchangeServiceId = GetExchangeServiceID(org.PackageId); + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + ExchangeDistributionList distributionList = exchange.GetDistributionListGeneralSettings(distributionListName); + + List members = new List(); + foreach (ExchangeAccount member in distributionList.MembersAccounts) + members.Add(member.AccountName); + members.Add(memberAccount.AccountName); + + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); + + exchange.SetDistributionListGeneralSettings(distributionListName, distributionList.DisplayName, distributionList.HideFromAddressBook, distributionList.ManagerAccount.AccountName, + members.ToArray(), + distributionList.Notes, addressLists.ToArray()); + + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return 0; + } + + public static int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) + { + #region Demo Mode + if (IsDemoMode) + { + return 0; + } + #endregion + + // place log record + TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST_MEMBER"); + TaskManager.ItemId = itemId; + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return 0; + + // load account + ExchangeAccount memberAccount = GetAccount(itemId, memberId); + + int exchangeServiceId = GetExchangeServiceID(org.PackageId); + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + ExchangeDistributionList distributionList = exchange.GetDistributionListGeneralSettings(distributionListName); + + List members = new List(); + foreach (ExchangeAccount member in distributionList.MembersAccounts) + if (member.AccountName != memberAccount.AccountName) members.Add(member.AccountName); + + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); + + exchange.SetDistributionListGeneralSettings(distributionListName, distributionList.DisplayName, distributionList.HideFromAddressBook, distributionList.ManagerAccount.AccountName, + members.ToArray(), + distributionList.Notes, addressLists.ToArray()); + + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return 0; + } + + #endregion #region Public Folders @@ -4020,8 +4133,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_EXCHANGE_PFOLDERS_QUOTA_LIMIT; // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_PUBLIC_FOLDER"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "CREATE_PUBLIC_FOLDER", itemId); try { @@ -4128,8 +4240,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_PUBLIC_FOLDER"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DELETE_PUBLIC_FOLDER", itemId); try { @@ -4178,8 +4289,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "ENABLE_MAIL_PUBLIC_FOLDER"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "ENABLE_MAIL_PUBLIC_FOLDER", itemId); try { @@ -4245,8 +4355,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DISABLE_MAIL_PUBLIC_FOLDER"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DISABLE_MAIL_PUBLIC_FOLDER", itemId); try { @@ -4318,8 +4427,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_PUBLIC_FOLDER_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_PUBLIC_FOLDER_GENERAL", itemId); try { @@ -4357,8 +4465,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_PUBLIC_FOLDER_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "UPDATE_PUBLIC_FOLDER_GENERAL", itemId); try { @@ -4431,8 +4538,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("EXCHANGE", "GET_PUBLIC_FOLDER_MAILFLOW"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_PUBLIC_FOLDER_MAILFLOW", itemId); try { @@ -4470,8 +4576,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_PUBLIC_FOLDER_MAILFLOW"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "UPDATE_PUBLIC_FOLDER_MAILFLOW", itemId); try { @@ -4511,8 +4616,7 @@ namespace WebsitePanel.EnterpriseServer public static ExchangeEmailAddress[] GetPublicFolderEmailAddresses(int itemId, int accountId) { // place log record - TaskManager.StartTask("EXCHANGE", "GET_PUBLIC_FOLDER_ADDRESSES"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_PUBLIC_FOLDER_ADDRESSES", itemId); try { @@ -4535,8 +4639,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "ADD_PUBLIC_FOLDER_ADDRESS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "ADD_PUBLIC_FOLDER_ADDRESS", itemId); try { @@ -4587,8 +4690,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_PUBLIC_FOLDER_ADDRESS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_PUBLIC_FOLDER_ADDRESS", itemId); try { @@ -4636,8 +4738,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_PUBLIC_FOLDER_ADDRESSES"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "DELETE_PUBLIC_FOLDER_ADDRESSES", itemId); try { @@ -4817,8 +4918,7 @@ namespace WebsitePanel.EnterpriseServer public static ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) { // place log record - TaskManager.StartTask("EXCHANGE", "GET_MOBILE_DEVICES"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_MOBILE_DEVICES", itemId); try { @@ -4848,8 +4948,7 @@ namespace WebsitePanel.EnterpriseServer public static ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) { // place log record - TaskManager.StartTask("EXCHANGE", "GET_MOBILE_DEVICE"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "GET_MOBILE_DEVICE", itemId); try { @@ -4876,8 +4975,7 @@ namespace WebsitePanel.EnterpriseServer public static void WipeDataFromDevice(int itemId, string deviceId) { // place log record - TaskManager.StartTask("EXCHANGE", "WIPE_DATA_FROM_DEVICE"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "WIPE_DATA_FROM_DEVICE", itemId); try { @@ -4904,8 +5002,7 @@ namespace WebsitePanel.EnterpriseServer public static void CancelRemoteWipeRequest(int itemId, string deviceId) { // place log record - TaskManager.StartTask("EXCHANGE", "CANCEL_REMOTE_WIPE_REQUEST"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "CANCEL_REMOTE_WIPE_REQUEST", itemId); try { @@ -4932,8 +5029,7 @@ namespace WebsitePanel.EnterpriseServer public static void RemoveDevice(int itemId, string deviceId) { // place log record - TaskManager.StartTask("EXCHANGE", "REMOVE_DEVICE"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("EXCHANGE", "REMOVE_DEVICE", itemId); try { @@ -4956,5 +5052,190 @@ namespace WebsitePanel.EnterpriseServer TaskManager.CompleteTask(); } } - } + + #region Disclaimers + + public static int AddExchangeDisclaimer(int itemID, ExchangeDisclaimer disclaimer) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("EXCHANGE", "ADD_EXCHANGE_EXCHANGEDISCLAIMER", itemID); + + try + { + return DataProvider.AddExchangeDisclaimer(itemID, disclaimer); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + + } + + public static int UpdateExchangeDisclaimer(int itemID, ExchangeDisclaimer disclaimer) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("EXCHANGE", "UPDATE_EXCHANGE_EXCHANGEDISCLAIMER", itemID); + + try + { + DataProvider.UpdateExchangeDisclaimer(itemID, disclaimer); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return 0; + } + + public static int DeleteExchangeDisclaimer(int itemId, int exchangeDisclaimerId) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + TaskManager.StartTask("EXCHANGE", "DELETE_EXCHANGE_EXCHANGEDISCLAIMER", itemId); + + try + { + DataProvider.DeleteExchangeDisclaimer(exchangeDisclaimerId); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return 0; + } + + public static ExchangeDisclaimer GetExchangeDisclaimer(int itemId, int exchangeDisclaimerId) + { + + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_EXCHANGEDISCLAIMER", itemId); + + try + { + return ObjectUtils.FillObjectFromDataReader( + DataProvider.GetExchangeDisclaimer(exchangeDisclaimerId)); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + public static List GetExchangeDisclaimers(int itemId) + { + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_EXCHANGEDISCLAIMER", itemId); + + try + { + List disclaimers = ObjectUtils.CreateListFromDataReader(DataProvider.GetExchangeDisclaimers(itemId)); + return disclaimers; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + public static int SetExchangeAccountDisclaimerId(int itemId, int AccountID, int ExchangeDisclaimerId) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("EXCHANGE", "SET_EXCHANGE_ACCOUNTDISCLAIMERID", AccountID); + + try + { + ExchangeDisclaimer disclaimer = null; + + if (ExchangeDisclaimerId != -1) + disclaimer = GetExchangeDisclaimer(itemId, ExchangeDisclaimerId); + + // load account + ExchangeAccount account = GetAccount(itemId, AccountID); + + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + return -1; + + int exchangeServiceId = GetExchangeServiceID(org.PackageId); + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + string transportRuleName = org.Name + "_" + account.PrimaryEmailAddress; + + exchange.RemoveTransportRule(transportRuleName); + + if (disclaimer != null) + { + if (!string.IsNullOrEmpty(disclaimer.DisclaimerText)) + exchange.NewDisclaimerTransportRule(transportRuleName, account.PrimaryEmailAddress, disclaimer.DisclaimerText); + } + + DataProvider.SetExchangeAccountDisclaimerId(AccountID, ExchangeDisclaimerId); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return 0; + + } + + public static int GetExchangeAccountDisclaimerId(int itemId, int AccountID) + { + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_ACCOUNTDISCLAIMERID", AccountID); + + try + { + return DataProvider.GetExchangeAccountDisclaimerId(AccountID); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + #endregion + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Files/FilesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Files/FilesController.cs similarity index 94% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Files/FilesController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Files/FilesController.cs index e9dc8e48..74dd8d78 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Files/FilesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Files/FilesController.cs @@ -169,8 +169,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FILES", "UPDATE_BINARY_CONTENT", path); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "UPDATE_BINARY_CONTENT", path, packageId); try { @@ -204,8 +203,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FILES", "UPDATE_BINARY_CONTENT", path); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "UPDATE_BINARY_CONTENT", path, packageId); try { @@ -260,8 +258,8 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("FILES", "DELETE_FILES"); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "DELETE_FILES", packageId); + if (files != null) { foreach (string file in files) @@ -302,8 +300,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FILES", "CREATE_FILE", path); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "CREATE_FILE", path, packageId); try { @@ -356,8 +353,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FILES", "CREATE_FOLDER", path); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "CREATE_FOLDER", path, packageId); try { @@ -396,8 +392,7 @@ namespace WebsitePanel.EnterpriseServer if (!DirectoryExists(packageId, destFolder)) return BusinessErrorCodes.ERROR_FILE_DEST_FOLDER_NONEXISTENT; // place log record - TaskManager.StartTask("FILES", "COPY_FILES"); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "COPY_FILES", packageId); TaskManager.WriteParameter("Destination folder", destFolder); if (files != null) { @@ -455,8 +450,8 @@ namespace WebsitePanel.EnterpriseServer if (!DirectoryExists(packageId, destFolder)) return BusinessErrorCodes.ERROR_FILE_DEST_FOLDER_NONEXISTENT; // place log record - TaskManager.StartTask("FILES", "MOVE_FILES"); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "MOVE_FILES", packageId); + TaskManager.WriteParameter("Destination folder", destFolder); if (files != null) { @@ -514,8 +509,8 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("FILES", "RENAME_FILE", oldPath); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "RENAME_FILE", oldPath, packageId); + TaskManager.WriteParameter("New name", newPath); try @@ -551,8 +546,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return null; // place log record - TaskManager.StartTask("FILES", "UNZIP_FILES"); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "UNZIP_FILES", packageId); + if (files != null) { foreach (string file in files) @@ -596,8 +591,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FILES", "ZIP_FILES", archivePath); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "ZIP_FILES", archivePath, packageId); + if (files != null) { foreach (string file in files) @@ -647,8 +642,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FILES", "ZIP_FILES", archivePath); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "ZIP_FILES", archivePath, packageId); + if (files != null) { foreach (string file in files) @@ -706,8 +701,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FILES", "CREATE_ACCESS_DATABASE", dbPath); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "CREATE_ACCESS_DATABASE", dbPath, packageId); try { @@ -737,8 +731,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("SPACE", "CALCULATE_DISKSPACE"); - TaskManager.ItemId = packageId; + TaskManager.StartTask("SPACE", "CALCULATE_DISKSPACE", packageId); try { @@ -813,8 +806,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("FILES", "SET_PERMISSIONS", path); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "SET_PERMISSIONS", path, packageId); try { @@ -925,8 +917,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FILES", "SET_QUOTA_ON_FOLDER", path); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "SET_QUOTA_ON_FOLDER", path, packageId); try { @@ -1046,8 +1037,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FILES", "DELETE_DIRECTORY_RECURSIVE", rootPath); - TaskManager.ItemId = packageId; + TaskManager.StartTask("FILES", "DELETE_DIRECTORY_RECURSIVE", rootPath, packageId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/FtpServers/FtpServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/FtpServers/FtpServerController.cs similarity index 96% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/FtpServers/FtpServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/FtpServers/FtpServerController.cs index 4c174bf0..25541268 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/FtpServers/FtpServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/FtpServers/FtpServerController.cs @@ -215,8 +215,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("FTP_ACCOUNT", "UPDATE", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("FTP_ACCOUNT", "UPDATE", origItem.Name, item.Id); + TaskManager.WriteParameter("Folder", item.Folder); TaskManager.WriteParameter("CanRead", item.CanRead); TaskManager.WriteParameter("CanWrite", item.CanWrite); @@ -279,8 +279,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_FTP_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("FTP_ACCOUNT", "DELETE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("FTP_ACCOUNT", "DELETE", origItem.Name, itemId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HeliconZoo/HeliconZooController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HeliconZoo/HeliconZooController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HeliconZoo/HeliconZooController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HeliconZoo/HeliconZooController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/BlackBerryController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/BlackBerryController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/BlackBerryController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/BlackBerryController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/CRMController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/CRMController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs new file mode 100644 index 00000000..d4f352f2 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs @@ -0,0 +1,1080 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Data; +using System.Xml; +using WebsitePanel.Providers; +using WebsitePanel.Providers.Common; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.Lync; + +namespace WebsitePanel.EnterpriseServer.Code.HostedSolution +{ + public class LyncController + { + + + public static LyncServer GetLyncServer(int lyncServiceId, int organizationServiceId) + { + LyncServer ws = new LyncServer(); + + ServiceProviderProxy.Init(ws, lyncServiceId); + + string[] lyncSettings = ws.ServiceProviderSettingsSoapHeaderValue.Settings; + + List resSettings = new List(lyncSettings); + + if (organizationServiceId != -1) + { + ExtendLyncSettings(resSettings, "primarydomaincontroller", GetProviderProperty(organizationServiceId, "primarydomaincontroller")); + ExtendLyncSettings(resSettings, "rootou", GetProviderProperty(organizationServiceId, "rootou")); + } + ws.ServiceProviderSettingsSoapHeaderValue.Settings = resSettings.ToArray(); + return ws; + } + + private static string GetProviderProperty(int organizationServiceId, string property) + { + + Organizations orgProxy = new Organizations(); + + ServiceProviderProxy.Init(orgProxy, organizationServiceId); + + string[] organizationSettings = orgProxy.ServiceProviderSettingsSoapHeaderValue.Settings; + + string value = string.Empty; + foreach (string str in organizationSettings) + { + string[] props = str.Split('='); + if (props[0].ToLower() == property) + { + value = str; + break; + } + } + + return value; + } + + private static void ExtendLyncSettings(List lyncSettings, string property, string value) + { + bool isAdded = false; + for (int i = 0; i < lyncSettings.Count; i++) + { + string[] props = lyncSettings[i].Split('='); + if (props[0].ToLower() == property) + { + lyncSettings[i] = value; + isAdded = true; + break; + } + } + + if (!isAdded) + { + lyncSettings.Add(value); + } + } + + private static int GetLyncServiceID(int packageId) + { + return PackageController.GetPackageServiceId(packageId, ResourceGroups.Lync); + } + + + private static bool CheckQuota(int itemId) + { + Organization org = OrganizationController.GetOrganization(itemId); + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + IntResult userCount = GetLyncUsersCount(itemId); + + int allocatedUsers = cntx.Quotas[Quotas.LYNC_USERS].QuotaAllocatedValue; + + return allocatedUsers == -1 || allocatedUsers > userCount.Value; + } + + + public static LyncUserResult CreateLyncUser(int itemId, int accountId, int lyncUserPlanId) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "CREATE_LYNC_USER"); + + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + + LyncUser retLyncUser = new LyncUser(); + bool isLyncUser; + + isLyncUser = DataProvider.CheckLyncUserExists(accountId); + if (isLyncUser) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_IS_ALREADY_LYNC_USER); + return res; + } + + OrganizationUser user; + user = OrganizationController.GetAccount(itemId, accountId); + if (user == null) + { + TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_ACCOUNT); + return res; + } + + user = OrganizationController.GetUserGeneralSettings(itemId, accountId); + if (string.IsNullOrEmpty(user.FirstName)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_FIRST_NAME_IS_NOT_SPECIFIED); + return res; + } + + if (string.IsNullOrEmpty(user.LastName)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_LAST_NAME_IS_NOT_SPECIFIED); + return res; + } + + bool quota = CheckQuota(itemId); + if (!quota) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_QUOTA_HAS_BEEN_REACHED); + return res; + } + + + LyncServer lync; + + try + { + + bool bReloadConfiguration = false; + + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + lync = GetLyncServer(lyncServiceId, org.ServiceId); + + if (string.IsNullOrEmpty(org.LyncTenantId)) + { + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + org.LyncTenantId = lync.CreateOrganization(org.OrganizationId, + org.DefaultDomain, + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue), + Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_FEDERATION].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue)); + + if (string.IsNullOrEmpty(org.LyncTenantId)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ENABLE_ORG); + return res; + } + else + { + + DomainInfo domain = ServerController.GetDomain(org.DefaultDomain); + + //Add the service records + if (domain != null) + { + if (domain.ZoneItemId != 0) + { + ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.Lync, domain, ""); + } + } + + PackageController.UpdatePackageItem(org); + + bReloadConfiguration = true; + } + } + + LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId); + + if (!lync.CreateUser(org.OrganizationId, user.UserPrincipalName, plan)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER); + return res; + } + + if (bReloadConfiguration) + { + LyncControllerAsync userWorker = new LyncControllerAsync(); + userWorker.LyncServiceId = lyncServiceId; + userWorker.OrganizationServiceId = org.ServiceId; + userWorker.Enable_CsComputerAsync(); + } + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER, ex); + return res; + } + + try + { + DataProvider.AddLyncUser(accountId, lyncUserPlanId, user.UserPrincipalName); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER_TO_DATABASE, ex); + return res; + } + + res.IsSuccess = true; + TaskManager.CompleteResultTask(); + return res; + + } + + + private static int[] ParseMultiSetting(int lyncServiceId, string settingName) + { + List retIds = new List(); + StringDictionary settings = ServerController.GetServiceSettings(lyncServiceId); + if (!String.IsNullOrEmpty(settings[settingName])) + { + string[] ids = settings[settingName].Split(','); + + int res; + foreach (string id in ids) + { + if (int.TryParse(id, out res)) + retIds.Add(res); + } + } + + if (retIds.Count == 0) + retIds.Add(lyncServiceId); + + return retIds.ToArray(); + + } + + + public static void GetLyncServices(int lyncServiceId, out int[] lyncServiceIds) + { + lyncServiceIds = ParseMultiSetting(lyncServiceId, "LyncServersServiceID"); + } + + + + public static LyncUser GetLyncUserGeneralSettings(int itemId, int accountId) + { + TaskManager.StartTask("LYNC", "GET_LYNC_USER_GENERAL_SETTINGS"); + + LyncUser user = null; + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + OrganizationUser usr; + usr = OrganizationController.GetAccount(itemId, accountId); + + if (usr != null) + user = lync.GetLyncUserGeneralSettings(org.OrganizationId, usr.UserPrincipalName); + + if (user != null) + { + LyncUserPlan plan = ObjectUtils.FillObjectFromDataReader(DataProvider.GetLyncUserPlanByAccountId(accountId)); + + if (plan != null) + { + user.LyncUserPlanId = plan.LyncUserPlanId; + user.LyncUserPlanName = plan.LyncUserPlanName; + } + } + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + + } + TaskManager.CompleteTask(); + return user; + + } + + public static LyncUserResult SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "SET_LYNC_USER_GENERAL_SETTINGS"); + + string PIN = ""; + + string[] uriAndPin = ("" + lineUri).Split(':'); + + if (uriAndPin.Length > 0) lineUri = uriAndPin[0]; + if (uriAndPin.Length > 1) PIN = uriAndPin[1]; + + LyncUser user = null; + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + OrganizationUser usr; + usr = OrganizationController.GetAccount(itemId, accountId); + + if (usr != null) + user = lync.GetLyncUserGeneralSettings(org.OrganizationId, usr.UserPrincipalName); + + if (user != null) + { + LyncUserPlan plan = ObjectUtils.FillObjectFromDataReader(DataProvider.GetLyncUserPlanByAccountId(accountId)); + + if (plan != null) + { + user.LyncUserPlanId = plan.LyncUserPlanId; + user.LyncUserPlanName = plan.LyncUserPlanName; + } + + + if (!string.IsNullOrEmpty(sipAddress)) + { + if (user.SipAddress != sipAddress) + { + if (sipAddress != usr.UserPrincipalName) + { + if (DataProvider.LyncUserExists(accountId, sipAddress)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.ADDRESS_ALREADY_USED); + return res; + } + } + user.SipAddress = sipAddress; + } + } + + user.LineUri = lineUri; + user.PIN = PIN; + + lync.SetLyncUserGeneralSettings(org.OrganizationId, usr.UserPrincipalName, user); + + DataProvider.UpdateLyncUser(accountId, sipAddress); + } + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.FAILED_SET_SETTINGS, ex); + return res; + } + + res.IsSuccess = true; + TaskManager.CompleteResultTask(); + return res; + + } + + + + public static int DeleteOrganization(int itemId) + { + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("LYNC", "DELETE_ORG", itemId); + + try + { + // delete organization in Exchange + //System.Threading.Thread.Sleep(5000); + Organization org = (Organization)PackageController.GetPackageItem(itemId); + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + bool successful = lync.DeleteOrganization(org.OrganizationId, org.DefaultDomain); + + return successful ? 0 : BusinessErrorCodes.ERROR_LYNC_DELETE_SOME_PROBLEMS; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + + public static LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "SET_LYNC_USER_LYNCPLAN"); + + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId); + + OrganizationUser user; + user = OrganizationController.GetAccount(itemId, accountId); + + if (!lync.SetLyncUserPlan(org.OrganizationId, user.UserPrincipalName, plan)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER); + return res; + } + + try + { + DataProvider.SetLyncUserLyncUserplan(accountId, lyncUserPlanId); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER_TO_DATABASE, ex); + return res; + } + + res.IsSuccess = true; + TaskManager.CompleteResultTask(); + return res; + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_UPDATE_LYNC_USER, ex); + return res; + } + + } + + public static LyncUsersPagedResult GetLyncUsers(int itemId) + { + return GetLyncUsersPaged(itemId, string.Empty, string.Empty, 0, int.MaxValue); + } + + public static LyncUsersPagedResult GetLyncUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int count) + { + LyncUsersPagedResult res = TaskManager.StartResultTask("LYNC", "GET_LYNC_USERS"); + + try + { + IDataReader reader = + DataProvider.GetLyncUsers(itemId, sortColumn, sortDirection, startRow, count); + List accounts = new List(); + ObjectUtils.FillCollectionFromDataReader(accounts, reader); + res.Value = new LyncUsersPaged { PageUsers = accounts.ToArray() }; + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.GET_LYNC_USERS, ex); + return res; + } + + IntResult intRes = GetLyncUsersCount(itemId); + res.ErrorCodes.AddRange(intRes.ErrorCodes); + if (!intRes.IsSuccess) + { + TaskManager.CompleteResultTask(res); + return res; + } + res.Value.RecordsCount = intRes.Value; + + TaskManager.CompleteResultTask(); + return res; + } + + public static List GetLyncUsersByPlanId(int itemId, int planId) + { + return ObjectUtils.CreateListFromDataReader(DataProvider.GetLyncUsersByPlanId(itemId, planId)); + } + + public static IntResult GetLyncUsersCount(int itemId) + { + IntResult res = TaskManager.StartResultTask("LYNC", "GET_LYNC_USERS_COUNT"); + try + { + res.Value = DataProvider.GetLyncUsersCount(itemId); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.GET_LYNC_USER_COUNT, ex); + return res; + } + + TaskManager.CompleteResultTask(); + return res; + } + + public static LyncUserResult DeleteLyncUser(int itemId, int accountId) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "DELETE_LYNC_USER"); + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + LyncServer lync; + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + lync = GetLyncServer(lyncServiceId, org.ServiceId); + + OrganizationUser user; + user = OrganizationController.GetAccount(itemId, accountId); + + if (user != null) + lync.DeleteUser(user.UserPrincipalName); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_DELETE_LYNC_USER, ex); + return res; + } + + try + { + DataProvider.DeleteLyncUser(accountId); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_DELETE_LYNC_USER_FROM_METADATA, ex); + return res; + } + + TaskManager.CompleteResultTask(); + return res; + } + + + public static Organization GetOrganization(int itemId) + { + return (Organization)PackageController.GetPackageItem(itemId); + } + + + #region Lync Plans + public static List GetLyncUserPlans(int itemId) + { + // place log record + TaskManager.StartTask("LYNC", "GET_LYNC_LYNCUSERPLANS", itemId); + + try + { + List plans = new List(); + + UserInfo user = ObjectUtils.FillObjectFromDataReader(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId)); + + if (user.Role == UserRole.User) + LyncController.GetLyncUserPlansByUser(itemId, user, ref plans); + else + LyncController.GetLyncUserPlansByUser(0, user, ref plans); + + + ExchangeOrganization ExchangeOrg = ObjectUtils.FillObjectFromDataReader(DataProvider.GetExchangeOrganization(itemId)); + + if (ExchangeOrg != null) + { + foreach (LyncUserPlan p in plans) + { + p.IsDefault = (p.LyncUserPlanId == ExchangeOrg.LyncUserPlanID); + } + } + + + return plans; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + private static void GetLyncUserPlansByUser(int itemId, UserInfo user, ref List plans) + { + if ((user != null)) + { + List orgs = null; + + if (user.UserId != 1) + { + List Packages = PackageController.GetPackages(user.UserId); + + if ((Packages != null) & (Packages.Count > 0)) + { + orgs = ExchangeServerController.GetExchangeOrganizationsInternal(Packages[0].PackageId, false); + } + } + else + { + orgs = ExchangeServerController.GetExchangeOrganizationsInternal(1, false); + } + + int OrgId = -1; + if (itemId > 0) OrgId = itemId; + else if ((orgs != null) & (orgs.Count > 0)) OrgId = orgs[0].Id; + + if (OrgId != -1) + { + List Plans = ObjectUtils.CreateListFromDataReader(DataProvider.GetLyncUserPlans(OrgId)); + + foreach (LyncUserPlan p in Plans) + { + plans.Add(p); + } + } + + UserInfo owner = UserController.GetUserInternally(user.OwnerId); + + GetLyncUserPlansByUser(0, owner, ref plans); + } + } + + + public static LyncUserPlan GetLyncUserPlan(int itemID, int lyncUserPlanId) + { + + // place log record + TaskManager.StartTask("LYNC", "GET_LYNC_LYNCUSERPLAN", lyncUserPlanId); + + try + { + return ObjectUtils.FillObjectFromDataReader( + DataProvider.GetLyncUserPlan(lyncUserPlanId)); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static int AddLyncUserPlan(int itemID, LyncUserPlan lyncUserPlan) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("LYNC", "ADD_LYNC_LYNCUSERPLAN", itemID); + + try + { + Organization org = GetOrganization(itemID); + if (org == null) + return -1; + + // load package context + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + lyncUserPlan.Conferencing = lyncUserPlan.Conferencing & Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue); + lyncUserPlan.EnterpriseVoice = lyncUserPlan.EnterpriseVoice & Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue); + if (!lyncUserPlan.EnterpriseVoice) + lyncUserPlan.VoicePolicy = LyncVoicePolicyType.None; + lyncUserPlan.IM = true; + + return DataProvider.AddLyncUserPlan(itemID, lyncUserPlan); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + + + + + public static int UpdateLyncUserPlan(int itemID, LyncUserPlan lyncUserPlan) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("LYNC", "ADD_LYNC_LYNCUSERPLAN", itemID); + + try + { + Organization org = GetOrganization(itemID); + if (org == null) + return -1; + + // load package context + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + lyncUserPlan.Conferencing = lyncUserPlan.Conferencing & Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue); + lyncUserPlan.EnterpriseVoice = lyncUserPlan.EnterpriseVoice & Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue); + if (!lyncUserPlan.EnterpriseVoice) + lyncUserPlan.VoicePolicy = LyncVoicePolicyType.None; + lyncUserPlan.IM = true; + + DataProvider.UpdateLyncUserPlan(itemID, lyncUserPlan); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + + return 0; + } + + + public static int DeleteLyncUserPlan(int itemID, int lyncUserPlanId) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + TaskManager.StartTask("LYNC", "DELETE_LYNC_LYNCPLAN", itemID); + + try + { + DataProvider.DeleteLyncUserPlan(lyncUserPlanId); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + public static int SetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + TaskManager.StartTask("LYNC", "SET_LYNC_LYNCUSERPLAN", itemId); + + try + { + DataProvider.SetOrganizationDefaultLyncUserPlan(itemId, lyncUserPlanId); + + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return 1; + + } + + #endregion + + #region Federation Domains + public static LyncFederationDomain[] GetFederationDomains(int itemId) + { + // place log record + TaskManager.StartTask("LYNC", "GET_LYNC_FEDERATIONDOMAINS", itemId); + + LyncFederationDomain[] lyncFederationDomains = null; + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + lyncFederationDomains = lync.GetFederationDomains(org.OrganizationId); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return lyncFederationDomains; + } + + public static LyncUserResult AddFederationDomain(int itemId, string domainName, string proxyFqdn) + { + List parameters = new List(); + parameters.Add(new BackgroundTaskParameter("domainName", domainName)); + parameters.Add(new BackgroundTaskParameter("proxyFqdn", proxyFqdn)); + + LyncUserResult res = TaskManager.StartResultTask("LYNC", "ADD_LYNC_FEDERATIONDOMAIN", itemId, parameters); + + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + + try + { + + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + if (string.IsNullOrEmpty(org.LyncTenantId)) + { + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + org.LyncTenantId = lync.CreateOrganization(org.OrganizationId, + org.DefaultDomain, + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue), + Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_FEDERATION].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue)); + + if (string.IsNullOrEmpty(org.LyncTenantId)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ENABLE_ORG); + return res; + } + else + PackageController.UpdatePackageItem(org); + } + + lync = GetLyncServer(lyncServiceId, org.ServiceId); + + bool bDomainExists = false; + LyncFederationDomain[] domains = GetFederationDomains(itemId); + foreach (LyncFederationDomain d in domains) + { + if (d.DomainName.ToLower() == domainName.ToLower()) + { + bDomainExists = true; + break; + } + + } + + if (!bDomainExists) + lync.AddFederationDomain(org.OrganizationId, domainName.ToLower(), proxyFqdn); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_FEDERATIONDOMAIN, ex); + return res; + } + + TaskManager.CompleteResultTask(); + return res; + } + + public static LyncUserResult RemoveFederationDomain(int itemId, string domainName) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "REMOVE_LYNC_FEDERATIONDOMAIN", itemId, new BackgroundTaskParameter("domainName", domainName)); + + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + if (org.OrganizationId.ToLower() == domainName.ToLower()) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN); + return res; + } + + lync.RemoveFederationDomain(org.OrganizationId, domainName); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN, ex); + return res; + } + + TaskManager.CompleteResultTask(); + return res; + } + + + #endregion + + public static string[] GetPolicyList(int itemId, LyncPolicyType type, string name) + { + string[] ret = null; + try + { + if (itemId == -1) + { + // policy list in all lync servers + List allpolicylist = new List(); + List servers = ServerController.GetAllServers(); + foreach (ServerInfo server in servers) + { + List services = ServerController.GetServicesByServerIdGroupName(server.ServerId, ResourceGroups.Lync); + foreach (ServiceInfo service in services) + { + LyncServer lync = GetLyncServer(service.ServiceId, -1); + string[] values = lync.GetPolicyList(type, name); + foreach (string val in values) + if (allpolicylist.IndexOf(val) == -1) + allpolicylist.Add(val); + } + + } + ret = allpolicylist.ToArray(); + } + else + { + + Organization org = (Organization)PackageController.GetPackageItem(itemId); + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + ret = lync.GetPolicyList(type, name); + } + } + catch (Exception ex) + { + } + finally + { + } + + return ret; + } + + #region Private methods + public static UInt64 ConvertPhoneNumberToLong(string ip) + { + return Convert.ToUInt64(ip); + } + + public static string ConvertLongToPhoneNumber(UInt64 ip) + { + if (ip == 0) + return ""; + + return ip.ToString(); + } + #endregion + + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncControllerAsync.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncControllerAsync.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncControllerAsync.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncControllerAsync.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OCSController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OCSController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs index e8eb4767..95d5da6f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs @@ -291,9 +291,11 @@ namespace WebsitePanel.EnterpriseServer return errorCode; // place log record - TaskManager.StartTask("ORGANIZATION", "CREATE_ORG", organizationName); - TaskManager.TaskParameters["Organization ID"] = organizationId; - TaskManager.TaskParameters["DomainName"] = domainName; + List parameters = new List(); + parameters.Add(new BackgroundTaskParameter("Organization ID", organizationId)); + parameters.Add(new BackgroundTaskParameter("DomainName", domainName)); + + TaskManager.StartTask("ORGANIZATION", "CREATE_ORG", organizationName, parameters); try { @@ -411,9 +413,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("ORGANIZATION", "DELETE_DOMAIN"); - TaskManager.TaskParameters["Domain ID"] = domainId; - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "DELETE_DOMAIN", itemId, new BackgroundTaskParameter("Domain ID", domainId)); try { @@ -586,8 +586,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("ORGANIZATION", "DELETE_ORG"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "DELETE_ORG", itemId); try { @@ -869,8 +868,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("ORGANIZATION", "GET_ORG_STATS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "GET_ORG_STATS", itemId); try { @@ -1022,8 +1020,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("ORGANIZATION", "CHANGE_DOMAIN_TYPE", domainId); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "CHANGE_DOMAIN_TYPE", domainId, itemId); try { @@ -1060,8 +1057,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_EXCHANGE_DOMAINS_QUOTA_LIMIT; // place log record - TaskManager.StartTask("ORGANIZATION", "ADD_DOMAIN", domainName); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "ADD_DOMAIN", domainName, itemId); try { @@ -1291,8 +1287,8 @@ namespace WebsitePanel.EnterpriseServer // place log record - TaskManager.StartTask("ORGANIZATION", "CREATE_USER"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "CREATE_USER", itemId); + TaskManager.Write("Organization ID :" + itemId); TaskManager.Write("name :" + name); TaskManager.Write("domain :" + domain); @@ -1414,8 +1410,8 @@ namespace WebsitePanel.EnterpriseServer // place log record - TaskManager.StartTask("ORGANIZATION", "IMPORT_USER"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "IMPORT_USER", itemId); + TaskManager.Write("Organization ID :" + itemId); TaskManager.Write("account :" + accountName); TaskManager.Write("name :" + name); @@ -1572,8 +1568,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("ORGANIZATION", "DELETE_USER"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "DELETE_USER", itemId); try { @@ -1676,8 +1671,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // place log record - TaskManager.StartTask("ORGANIZATION", "GET_USER_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "GET_USER_GENERAL", itemId); OrganizationUser account = null; Organization org = null; @@ -1700,8 +1694,8 @@ namespace WebsitePanel.EnterpriseServer // get mailbox settings Organizations orgProxy = GetOrganizationProxy(org.ServiceId); string accountName = GetAccountName(account.AccountName); - - + + OrganizationUser retUser = orgProxy.GetUserGeneralSettings(accountName, org.OrganizationId); retUser.AccountId = accountId; retUser.AccountName = account.AccountName; @@ -1712,13 +1706,10 @@ namespace WebsitePanel.EnterpriseServer retUser.IsLyncUser = DataProvider.CheckLyncUserExists(accountId); retUser.IsBlackBerryUser = BlackBerryController.CheckBlackBerryUserExists(accountId); retUser.SubscriberNumber = account.SubscriberNumber; - + return retUser; } - catch (Exception ex) - { - //throw TaskManager.WriteError(ex); - } + catch { } finally { TaskManager.CompleteTask(); @@ -1740,8 +1731,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("ORGANIZATION", "UPDATE_USER_GENERAL"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "UPDATE_USER_GENERAL", itemId); try { @@ -1832,8 +1822,7 @@ namespace WebsitePanel.EnterpriseServer // place log record - TaskManager.StartTask("ORGANIZATION", "SET_USER_USERPRINCIPALNAME"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "SET_USER_USERPRINCIPALNAME", itemId); try { @@ -1931,8 +1920,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("ORGANIZATION", "SET_USER_PASSWORD"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "SET_USER_PASSWORD", itemId); try { @@ -2048,8 +2036,7 @@ namespace WebsitePanel.EnterpriseServer public static int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName) { // place log record - TaskManager.StartTask("ORGANIZATION", "GET_ACCOUNT_BYUPN"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ORGANIZATION", "GET_ACCOUNT_BYUPN", itemId); int accounId = -1; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/ReportController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/ReportController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/ReportController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/ReportController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Log/AuditLog.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Log/AuditLog.cs similarity index 96% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Log/AuditLog.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Log/AuditLog.cs index ec012ecf..0b1a62e1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Log/AuditLog.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Log/AuditLog.cs @@ -92,10 +92,7 @@ namespace WebsitePanel.EnterpriseServer DataProvider.AddAuditLogRecord(recordId, severityId, userId, username, packageId, itemId, itemName, startDate, finishDate, sourceName, taskName, executionLog); } - catch - { - // skip error - } + catch { } } private static DateTime GetStartDate(DateTime d) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/MailServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs similarity index 94% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/MailServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs index a911b077..d7923702 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/MailServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs @@ -191,8 +191,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MAIL_ACCOUNT_MAX_MAILBOX_SIZE_LIMIT; // place log record - TaskManager.StartTask("MAIL_ACCOUNT", "UPDATE", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("MAIL_ACCOUNT", "UPDATE", origItem.Name, item.Id); try { @@ -245,8 +244,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MAIL_ACCOUNTS_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("MAIL_ACCOUNT", "DELETE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("MAIL_ACCOUNT", "DELETE", origItem.Name, itemId); try { @@ -402,7 +400,7 @@ namespace WebsitePanel.EnterpriseServer item.ServiceId = serviceId; int itemId = PackageController.AddPackageItem(item); - TaskManager.ItemId = itemId; + TaskManager.ItemId = itemId; return itemId; } @@ -432,8 +430,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("MAIL_FORWARDING", "UPDATE", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("MAIL_FORWARDING", "UPDATE", origItem.Name, item.Id); try { @@ -477,8 +474,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MAIL_FORWARDINGS_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("MAIL_FORWARDING", "DELETE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("MAIL_FORWARDING", "DELETE", origItem.Name, itemId); try { @@ -638,8 +634,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MAIL_GROUPS_RECIPIENTS_LIMIT; // place log record - TaskManager.StartTask("MAIL_GROUP", "UPDATE", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("MAIL_GROUP", "UPDATE", origItem.Name, item.Id); try { @@ -679,8 +674,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MAIL_GROUPS_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("MAIL_GROUP", "DELETE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("MAIL_GROUP", "DELETE", origItem.Name, itemId); try { @@ -889,8 +883,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MAIL_LISTS_RECIPIENTS_LIMIT; // place log record - TaskManager.StartTask("MAIL_LIST", "UPDATE", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("MAIL_LIST", "UPDATE", origItem.Name, item.Id); try { @@ -938,8 +931,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MAIL_LISTS_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("MAIL_LIST", "DELETE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("MAIL_LIST", "DELETE", origItem.Name, itemId); try { @@ -1073,7 +1065,8 @@ namespace WebsitePanel.EnterpriseServer } TaskManager.ItemId = itemId; - return itemId; + + return itemId; } catch (Exception ex) { @@ -1101,8 +1094,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("MAIL_DOMAIN", "UPDATE", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("MAIL_DOMAIN", "UPDATE", origItem.Name, item.Id); // get service MailServer mail = new MailServer(); @@ -1148,8 +1140,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_MAIL_DOMAIN_IS_NOT_EMPTY; // mail domain is not empty // place log record - TaskManager.StartTask("MAIL_DOMAIN", "DELETE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("MAIL_DOMAIN", "DELETE", origItem.Name, itemId); try { @@ -1222,10 +1213,9 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_DOMAIN_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("MAIL_DOMAIN", "ADD_POINTER", mailDomain.Name); - TaskManager.ItemId = itemId; - TaskManager.TaskParameters["Domain ID"] = domain.DomainId; - TaskManager.WriteParameter("Domain pointer", domain.DomainName); + TaskManager.StartTask("MAIL_DOMAIN", "ADD_POINTER", mailDomain.Name, itemId, new BackgroundTaskParameter("Domain ID", domain.DomainId)); + + TaskManager.WriteParameter("Domain pointer", domain.DomainName); try { @@ -1277,10 +1267,12 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_DOMAIN_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("MAIL_DOMAIN", "DELETE_POINTER", mailDomain.Name); - TaskManager.ItemId = itemId; - TaskManager.TaskParameters["Domain ID"] = domain.DomainId; - TaskManager.WriteParameter("Domain pointer", domain.DomainName); + + List parameters = new List(); + parameters.Add(new BackgroundTaskParameter("Domain ID", domain.DomainId)); + parameters.Add(new BackgroundTaskParameter("Domain pointer", domain.DomainName)); + + TaskManager.StartTask("MAIL_DOMAIN", "DELETE_POINTER", mailDomain.Name, itemId, parameters); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/QuotaLimit.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/QuotaLimit.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/QuotaLimit.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/QuotaLimit.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/OperatingSystems/OperatingSystemController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/OperatingSystems/OperatingSystemController.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/OperatingSystems/OperatingSystemController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/OperatingSystems/OperatingSystemController.cs index 238ec360..10a79b04 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/OperatingSystems/OperatingSystemController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/OperatingSystems/OperatingSystemController.cs @@ -191,8 +191,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("ODBC_DSN", "UPDATE", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("ODBC_DSN", "UPDATE", origItem.Name, item.Id); try { @@ -265,8 +264,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_OS_DSN_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("ODBC_DSN", "DELETE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("ODBC_DSN", "DELETE", origItem.Name, itemId); try { @@ -316,8 +314,7 @@ namespace WebsitePanel.EnterpriseServer ServerInfo server = ServerController.GetServerById(serverId); // place log record - TaskManager.StartTask("SERVER", "RESET_TERMINAL_SESSION", sessionId); - TaskManager.ItemId = serverId; + TaskManager.StartTask("SERVER", "RESET_TERMINAL_SESSION", sessionId, serverId); try { @@ -352,8 +349,7 @@ namespace WebsitePanel.EnterpriseServer ServerInfo server = ServerController.GetServerById(serverId); // place log record - TaskManager.StartTask("SERVER", "TERMINATE_SYSTEM_PROCESS", pid); - TaskManager.ItemId = serverId; + TaskManager.StartTask("SERVER", "TERMINATE_SYSTEM_PROCESS", pid, serverId); try { @@ -388,8 +384,7 @@ namespace WebsitePanel.EnterpriseServer ServerInfo server = ServerController.GetServerById(serverId); // place log record - TaskManager.StartTask("SERVER", "CHANGE_WINDOWS_SERVICE_STATUS", id); - TaskManager.ItemId = serverId; + TaskManager.StartTask("SERVER", "CHANGE_WINDOWS_SERVICE_STATUS", id, serverId); TaskManager.WriteParameter("New Status", status); try @@ -555,8 +550,7 @@ namespace WebsitePanel.EnterpriseServer | DemandAccount.IsActive); if (accountCheck < 0) return accountCheck; - TaskManager.StartTask("SERVER", "CLEAR_EVENT_LOG", logName); - TaskManager.ItemId = serverId; + TaskManager.StartTask("SERVER", "CLEAR_EVENT_LOG", logName, serverId); try { @@ -587,8 +581,7 @@ namespace WebsitePanel.EnterpriseServer ServerInfo server = ServerController.GetServerById(serverId); // place log record - TaskManager.StartTask("SERVER", "REBOOT"); - TaskManager.ItemId = serverId; + TaskManager.StartTask("SERVER", "REBOOT", serverId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/PackageAsyncWorker.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageAsyncWorker.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/PackageAsyncWorker.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/PackageController.cs similarity index 97% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/PackageController.cs index 3363a13f..b8532151 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/PackageController.cs @@ -617,8 +617,12 @@ namespace WebsitePanel.EnterpriseServer } } - TaskManager.ItemId = result.Result; - TaskManager.TaskParameters["SendLetter"] = sendLetter; + BackgroundTask topTask = TaskManager.TopTask; + + topTask.ItemId = userId; + topTask.UpdateParamValue("SendLetter", sendLetter); + + TaskController.UpdateTaskWithParams(topTask); return result; } @@ -718,10 +722,14 @@ namespace WebsitePanel.EnterpriseServer if (homeId < 0) result.Result = homeId; - TaskManager.ItemId = result.Result; - TaskManager.TaskParameters["Signup"] = signup; - TaskManager.TaskParameters["UserId"] = userId; - TaskManager.TaskParameters["SendLetter"] = sendLetter; + BackgroundTask topTask = TaskManager.TopTask; + + topTask.ItemId = userId; + topTask.UpdateParamValue("Signup", signup); + topTask.UpdateParamValue("UserId", userId); + topTask.UpdateParamValue("SendLetter", sendLetter); + + TaskController.UpdateTaskWithParams(topTask); } finally { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/ServiceItemsPaged.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/ServiceItemsPaged.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/ServiceItemsPaged.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/ServiceItemsPaged.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Properties/AssemblyInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..f6d2b5d9 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Properties/AssemblyInfo.cs @@ -0,0 +1,64 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WebsitePanel.EnterpriseServer.Code")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("OM-3")] +[assembly: AssemblyProduct("WebsitePanel.EnterpriseServer.Code")] +[assembly: AssemblyCopyright("Copyright © OM-3 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e5f16c8f-9560-459d-88d4-9c6ee9b71283")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/BackupAsyncWorker.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupAsyncWorker.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/BackupAsyncWorker.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/BackupController.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/BackupController.cs index a580954a..23d8864c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/BackupController.cs @@ -31,6 +31,7 @@ using System.IO; using System.Data; using System.Text; using System.Collections.Generic; +using System.Threading; using System.Xml; using System.Security.Cryptography; using System.Security.Cryptography.Xml; @@ -116,10 +117,9 @@ namespace WebsitePanel.EnterpriseServer { try { - TaskManager.StartTask(taskId, "BACKUP", "BACKUP", backupFileName); - TaskManager.ItemId = SecurityContext.User.UserId; + TaskManager.StartTask(taskId, "BACKUP", "BACKUP", backupFileName, SecurityContext.User.UserId); - // get the list of items to backup + // get the list of items to backup TaskManager.Write("Calculate items to backup"); List items = GetBackupItems(userId, packageId, serviceId, serverId); @@ -210,7 +210,7 @@ namespace WebsitePanel.EnterpriseServer // increment progress TaskManager.IndicatorCurrent += 1; - } + } } } catch (Exception ex) @@ -343,7 +343,11 @@ namespace WebsitePanel.EnterpriseServer } } - TaskManager.IndicatorCurrent = TaskManager.IndicatorMaximum; + BackgroundTask topTask = TaskManager.TopTask; + + topTask.IndicatorCurrent = topTask.IndicatorMaximum; + + TaskController.UpdateTask(topTask); } catch (Exception ex) { @@ -490,8 +494,7 @@ namespace WebsitePanel.EnterpriseServer string backupFileName = (storePackageId > 0) ? Path.GetFileName(storePackageBackupPath) : Path.GetFileName(storeServerBackupPath); - TaskManager.StartTask(taskId, "BACKUP", "RESTORE", backupFileName); - TaskManager.ItemId = SecurityContext.User.UserId; + TaskManager.StartTask(taskId, "BACKUP", "RESTORE", backupFileName, SecurityContext.User.UserId); // create temp folder string tempFolder = GetTempBackupFolder(); @@ -804,8 +807,7 @@ namespace WebsitePanel.EnterpriseServer return true; } catch - { - // + { // return false; } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IBackupController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/IBackupController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IBackupController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/IBackupController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IImportController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/IImportController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IImportController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/IImportController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/ImportAsyncWorker.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportAsyncWorker.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/ImportAsyncWorker.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/ImportController.cs similarity index 97% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/ImportController.cs index fef786d4..aaa74100 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Provisioning/ImportController.cs @@ -171,8 +171,7 @@ namespace WebsitePanel.EnterpriseServer { PackageInfo package = PackageController.GetPackage(packageId); - TaskManager.StartTask(taskId, "IMPORT", "IMPORT", package.PackageName); - TaskManager.ItemId = packageId; + TaskManager.StartTask(taskId, "IMPORT", "IMPORT", package.PackageName, packageId); TaskManager.IndicatorMaximum = items.Length; TaskManager.IndicatorCurrent = 0; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ActivatePaidInvoicesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/ActivatePaidInvoicesTask.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ActivatePaidInvoicesTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/ActivatePaidInvoicesTask.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupDatabaseTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/BackupDatabaseTask.cs similarity index 86% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupDatabaseTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/BackupDatabaseTask.cs index fd545c4e..9a871c66 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupDatabaseTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/BackupDatabaseTask.cs @@ -46,11 +46,13 @@ namespace WebsitePanel.EnterpriseServer // - BACKUP_NAME // - ZIP_BACKUP - string databaseGroup = (string)TaskManager.TaskParameters["DATABASE_GROUP"]; - string databaseName = (string)TaskManager.TaskParameters["DATABASE_NAME"]; - string backupFolder = (string)TaskManager.TaskParameters["BACKUP_FOLDER"]; - string backupName = (string)TaskManager.TaskParameters["BACKUP_NAME"]; - string strZipBackup = (string)TaskManager.TaskParameters["ZIP_BACKUP"]; + BackgroundTask topTask = TaskManager.TopTask; + + string databaseGroup = (string)topTask.GetParamValue("DATABASE_GROUP"); + string databaseName = (string)topTask.GetParamValue("DATABASE_NAME"); + string backupFolder = (string)topTask.GetParamValue("BACKUP_FOLDER"); + string backupName = (string)topTask.GetParamValue("BACKUP_NAME"); + string strZipBackup = (string)topTask.GetParamValue("ZIP_BACKUP"); // check input parameters if (String.IsNullOrEmpty(databaseName)) @@ -77,7 +79,7 @@ namespace WebsitePanel.EnterpriseServer } // try to find database - SqlDatabase item = (SqlDatabase)PackageController.GetPackageItemByName(TaskManager.PackageId, databaseGroup, + SqlDatabase item = (SqlDatabase)PackageController.GetPackageItemByName(topTask.PackageId, databaseGroup, databaseName, typeof(SqlDatabase)); if (item == null) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/BackupTask.cs similarity index 81% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/BackupTask.cs index 8d04180d..92a30c81 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/BackupTask.cs @@ -29,6 +29,7 @@ using System; using System.Data; using System.Configuration; +using System.Threading; using System.Web; using System.Web.Security; using System.Web.UI; @@ -48,18 +49,22 @@ namespace WebsitePanel.EnterpriseServer /// public override void DoWork() { + string backupFileName; int storePackageId; string storePackageFolder; string storeServerFolder; bool deleteTempBackup; + + BackgroundTask topTask = TaskManager.TopTask; + try { - backupFileName = (string)TaskManager.TaskParameters["BACKUP_FILE_NAME"]; - storePackageId = Convert.ToInt32(TaskManager.TaskParameters["STORE_PACKAGE_ID"]); - storePackageFolder = (string)TaskManager.TaskParameters["STORE_PACKAGE_FOLDER"]; - storeServerFolder = (string)TaskManager.TaskParameters["STORE_SERVER_FOLDER"]; - deleteTempBackup = Convert.ToBoolean(TaskManager.TaskParameters["DELETE_TEMP_BACKUP"]); + backupFileName = (string)topTask.GetParamValue("BACKUP_FILE_NAME"); + storePackageId = Convert.ToInt32(topTask.GetParamValue("STORE_PACKAGE_ID")); + storePackageFolder = (string)topTask.GetParamValue("STORE_PACKAGE_FOLDER"); + storeServerFolder = (string)topTask.GetParamValue("STORE_SERVER_FOLDER"); + deleteTempBackup = Convert.ToBoolean(topTask.GetParamValue("DELETE_TEMP_BACKUP")); } catch(Exception ex) { @@ -69,7 +74,7 @@ namespace WebsitePanel.EnterpriseServer try { - PackageInfo package = PackageController.GetPackage(TaskManager.PackageId); + PackageInfo package = PackageController.GetPackage(topTask.PackageId); // We do not take into account service id as long as scheduled tasks run against packages. BackupController.Backup(false, "BackupTask", package.UserId, package.PackageId, 0, 0, backupFileName, storePackageId, storePackageFolder, storeServerFolder, deleteTempBackup); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs index 1a8909a9..b6e477cc 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs @@ -46,7 +46,7 @@ namespace WebsitePanel.EnterpriseServer public void CalculateDiskspace() { // get all space organizations recursively - List items = ExchangeServerController.GetExchangeOrganizations(TaskManager.PackageId, true); + List items = ExchangeServerController.GetExchangeOrganizations(TaskManager.TopTask.PackageId, true); foreach (Organization item in items) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs similarity index 97% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs index ccb91d16..995415f9 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs @@ -51,7 +51,7 @@ namespace WebsitePanel.EnterpriseServer public void CalculateBandwidth() { // get all owned packages - List packages = PackageController.GetPackagePackages(TaskManager.PackageId, true); + List packages = PackageController.GetPackagePackages(TaskManager.TopTask.PackageId, true); TaskManager.Write("Packages to calculate: " + packages.Count.ToString()); foreach (PackageInfo package in packages) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs similarity index 97% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs index 7a744cf9..200648cc 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs @@ -52,7 +52,7 @@ namespace WebsitePanel.EnterpriseServer public void CalculateDiskspace() { // get all owned packages - List packages = PackageController.GetPackagePackages(TaskManager.PackageId, true); + List packages = PackageController.GetPackagePackages(TaskManager.TopTask.PackageId, true); TaskManager.Write("Packages to calculate: " + packages.Count.ToString()); foreach (PackageInfo package in packages) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CancelOverdueInvoicesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CancelOverdueInvoicesTask.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CancelOverdueInvoicesTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CancelOverdueInvoicesTask.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CheckWebSiteTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CheckWebSiteTask.cs similarity index 84% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CheckWebSiteTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CheckWebSiteTask.cs index c16812d9..574e3d26 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CheckWebSiteTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/CheckWebSiteTask.cs @@ -57,17 +57,19 @@ namespace WebsitePanel.EnterpriseServer // - MAIL_SUBJECT // - MAIL_BODY - // get input parameters - string url = (string)TaskManager.TaskParameters["URL"]; - string username = (string)TaskManager.TaskParameters["USERNAME"]; - string password = (string)TaskManager.TaskParameters["PASSWORD"]; - string strResponseStatus = (string)TaskManager.TaskParameters["RESPONSE_STATUS"]; - string responseContains = (string)TaskManager.TaskParameters["RESPONSE_CONTAIN"]; - string responseNotContains = (string)TaskManager.TaskParameters["RESPONSE_DOESNT_CONTAIN"]; + BackgroundTask topTask = TaskManager.TopTask; - bool useResponseStatus = Convert.ToBoolean(TaskManager.TaskParameters["USE_RESPONSE_STATUS"]); - bool useResponseContains = Convert.ToBoolean(TaskManager.TaskParameters["USE_RESPONSE_CONTAIN"]); - bool useResponseDoesntContain = Convert.ToBoolean(TaskManager.TaskParameters["USE_RESPONSE_DOESNT_CONTAIN"]); + // get input parameters + string url = (string)topTask.GetParamValue("URL"); + string username = (string)topTask.GetParamValue("USERNAME"); + string password = (string)topTask.GetParamValue("PASSWORD"); + string strResponseStatus = (string)topTask.GetParamValue("RESPONSE_STATUS"); + string responseContains = (string)topTask.GetParamValue("RESPONSE_CONTAIN"); + string responseNotContains = (string)topTask.GetParamValue("RESPONSE_DOESNT_CONTAIN"); + + bool useResponseStatus = Convert.ToBoolean(topTask.GetParamValue("USE_RESPONSE_STATUS")); + bool useResponseContains = Convert.ToBoolean(topTask.GetParamValue("USE_RESPONSE_CONTAIN")); + bool useResponseDoesntContain = Convert.ToBoolean(topTask.GetParamValue("USE_RESPONSE_DOESNT_CONTAIN")); // check input parameters if (String.IsNullOrEmpty(url)) @@ -126,11 +128,13 @@ namespace WebsitePanel.EnterpriseServer private void SendMailMessage(string url, string message, string content) { + BackgroundTask topTask = TaskManager.TopTask; + // input parameters - string mailFrom = (string)TaskManager.TaskParameters["MAIL_FROM"]; - string mailTo = (string)TaskManager.TaskParameters["MAIL_TO"]; - string mailSubject = (string)TaskManager.TaskParameters["MAIL_SUBJECT"]; - string mailBody = (string)TaskManager.TaskParameters["MAIL_BODY"]; + string mailFrom = (string)topTask.GetParamValue("MAIL_FROM"); + string mailTo = (string)topTask.GetParamValue("MAIL_TO"); + string mailSubject = (string)topTask.GetParamValue("MAIL_SUBJECT"); + string mailBody = (string)topTask.GetParamValue("MAIL_BODY"); if (String.IsNullOrEmpty(mailTo)) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/FTPFilesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/FTPFilesTask.cs similarity index 83% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/FTPFilesTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/FTPFilesTask.cs index b069aa07..1738f145 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/FTPFilesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/FTPFilesTask.cs @@ -46,12 +46,14 @@ namespace WebsitePanel.EnterpriseServer // - FTP_PASSWORD // - FTP_FOLDER + BackgroundTask topTask = TaskManager.TopTask; + // get input parameters - string filePath = (string)TaskManager.TaskParameters["FILE_PATH"]; - string ftpServer = (string)TaskManager.TaskParameters["FTP_SERVER"]; - string ftpUsername = (string)TaskManager.TaskParameters["FTP_USERNAME"]; - string ftpPassword = (string)TaskManager.TaskParameters["FTP_PASSWORD"]; - string ftpFolder = (string)TaskManager.TaskParameters["FTP_FOLDER"]; + string filePath = (string)topTask.GetParamValue("FILE_PATH"); + string ftpServer = (string)topTask.GetParamValue("FTP_SERVER"); + string ftpUsername = (string)topTask.GetParamValue("FTP_USERNAME"); + string ftpPassword = (string)topTask.GetParamValue("FTP_PASSWORD"); + string ftpFolder = (string)topTask.GetParamValue("FTP_FOLDER"); // check input parameters if (String.IsNullOrEmpty(filePath)) @@ -100,7 +102,7 @@ namespace WebsitePanel.EnterpriseServer // file to send writer.WriteLine("binary"); - writer.WriteLine("put " + FilesController.GetFullPackagePath(TaskManager.PackageId, filePath)); + writer.WriteLine("put " + FilesController.GetFullPackagePath(topTask.PackageId, filePath)); // bye writer.WriteLine("bye"); @@ -109,14 +111,14 @@ namespace WebsitePanel.EnterpriseServer // create temp file in user space string cmdPath = Utils.GetRandomString(10) + ".txt"; - string fullCmdPath = FilesController.GetFullPackagePath(TaskManager.PackageId, cmdPath); + string fullCmdPath = FilesController.GetFullPackagePath(topTask.PackageId, cmdPath); // upload batch - FilesController.UpdateFileBinaryContent(TaskManager.PackageId, cmdPath, Encoding.UTF8.GetBytes(cmdBatch)); + FilesController.UpdateFileBinaryContent(topTask.PackageId, cmdPath, Encoding.UTF8.GetBytes(cmdBatch)); // execute system command // load OS service - int serviceId = PackageController.GetPackageServiceId(TaskManager.PackageId, ResourceGroups.Os); + int serviceId = PackageController.GetPackageServiceId(topTask.PackageId, ResourceGroups.Os); // load service ServiceInfo service = ServerController.GetServiceInfo(serviceId); @@ -128,7 +130,7 @@ namespace WebsitePanel.EnterpriseServer TaskManager.Write(winServer.ExecuteSystemCommand("ftp.exe", "-s:" + fullCmdPath)); // delete batch file - FilesController.DeleteFiles(TaskManager.PackageId, new string[] { cmdPath }); + FilesController.DeleteFiles(topTask.PackageId, new string[] { cmdPath }); } } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/GenerateInvoicesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/GenerateInvoicesTask.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/GenerateInvoicesTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/GenerateInvoicesTask.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/HostedSolutionReport.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/HostedSolutionReport.cs similarity index 87% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/HostedSolutionReport.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/HostedSolutionReport.cs index b82436df..fedeb3e8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/HostedSolutionReport.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/HostedSolutionReport.cs @@ -51,16 +51,18 @@ namespace WebsitePanel.EnterpriseServer { try { - bool isExchange = Utils.ParseBool(TaskManager.TaskParameters[EXCHANGE_REPORT], false); - bool isSharePoint = Utils.ParseBool(TaskManager.TaskParameters[SHAREPOINT_REPORT], false); - bool isLync = Utils.ParseBool(TaskManager.TaskParameters[LYNC_REPORT], false); - bool isCRM = Utils.ParseBool(TaskManager.TaskParameters[CRM_REPORT], false); - bool isOrganization = Utils.ParseBool(TaskManager.TaskParameters[ORGANIZATION_REPORT], false); + BackgroundTask topTask = TaskManager.TopTask; - string email = TaskManager.TaskParameters[EMAIL].ToString(); + bool isExchange = Utils.ParseBool(topTask.GetParamValue(EXCHANGE_REPORT), false); + bool isSharePoint = Utils.ParseBool(topTask.GetParamValue(SHAREPOINT_REPORT), false); + bool isLync = Utils.ParseBool(topTask.GetParamValue(LYNC_REPORT), false); + bool isCRM = Utils.ParseBool(topTask.GetParamValue(CRM_REPORT), false); + bool isOrganization = Utils.ParseBool(topTask.GetParamValue(ORGANIZATION_REPORT), false); + + string email = topTask.GetParamValue(EMAIL).ToString(); - UserInfo user = PackageController.GetPackageOwner(TaskManager.PackageId); + UserInfo user = PackageController.GetPackageOwner(topTask.PackageId); EnterpriseSolutionStatisticsReport report = ReportController.GetEnterpriseSolutionStatisticsReport(user.UserId, isExchange, isSharePoint, isCRM, isOrganization, isLync); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs similarity index 86% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs index 5aae6dff..b38e5f38 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs @@ -44,25 +44,27 @@ namespace WebsitePanel.EnterpriseServer // - DISKSPACE_OVERUSED // - BANDWIDTH_OVERUSED + BackgroundTask topTask = TaskManager.TopTask; + // get the list of all packages - List packages = PackageController.GetPackagePackages(TaskManager.PackageId, false); + List packages = PackageController.GetPackagePackages(topTask.PackageId, false); TaskManager.Write("Packages to verify: " + packages.Count.ToString()); - bool checkMSSQL = (String.Compare((string)TaskManager.TaskParameters["MSSQL_OVERUSED"], "true", true) == 0); - bool checkMySQL = (String.Compare((string)TaskManager.TaskParameters["MYSQL_OVERUSED"], "true", true) == 0); + bool checkMSSQL = (String.Compare((string)topTask.GetParamValue("MSSQL_OVERUSED"), "true", true) == 0); + bool checkMySQL = (String.Compare((string)topTask.GetParamValue("MYSQL_OVERUSED"), "true", true) == 0); - bool sendWarningEmail = Convert.ToBoolean(TaskManager.TaskParameters["SEND_WARNING_EMAIL"]); - bool sendOverusedEmail = Convert.ToBoolean(TaskManager.TaskParameters["SEND_OVERUSED_EMAIL"]); - int warningUsageThreshold = Convert.ToInt32(TaskManager.TaskParameters["WARNING_USAGE_THRESHOLD"]); - int overusedUsageThreshold = Convert.ToInt32(TaskManager.TaskParameters["OVERUSED_USAGE_THRESHOLD"]); - string warningMailFrom = Convert.ToString(TaskManager.TaskParameters["WARNING_MAIL_FROM"]); - string warningMailBcc = Convert.ToString(TaskManager.TaskParameters["WARNING_MAIL_BCC"]); - string warningMailSubject = Convert.ToString(TaskManager.TaskParameters["WARNING_MAIL_SUBJECT"]); - string warningMailBody = Convert.ToString(TaskManager.TaskParameters["WARNING_MAIL_BODY"]); - string overusedMailFrom = Convert.ToString(TaskManager.TaskParameters["OVERUSED_MAIL_FROM"]); - string overusedMailBcc = Convert.ToString(TaskManager.TaskParameters["OVERUSED_MAIL_BCC"]); - string overusedMailSubject = Convert.ToString(TaskManager.TaskParameters["OVERUSED_MAIL_SUBJECT"]); - string overusedMailBody = Convert.ToString(TaskManager.TaskParameters["OVERUSED_MAIL_BODY"]); + bool sendWarningEmail = Convert.ToBoolean(topTask.GetParamValue("SEND_WARNING_EMAIL")); + bool sendOverusedEmail = Convert.ToBoolean(topTask.GetParamValue("SEND_OVERUSED_EMAIL")); + int warningUsageThreshold = Convert.ToInt32(topTask.GetParamValue("WARNING_USAGE_THRESHOLD")); + int overusedUsageThreshold = Convert.ToInt32(topTask.GetParamValue("OVERUSED_USAGE_THRESHOLD")); + string warningMailFrom = Convert.ToString(topTask.GetParamValue("WARNING_MAIL_FROM")); + string warningMailBcc = Convert.ToString(topTask.GetParamValue("WARNING_MAIL_BCC")); + string warningMailSubject = Convert.ToString(topTask.GetParamValue("WARNING_MAIL_SUBJECT")); + string warningMailBody = Convert.ToString(topTask.GetParamValue("WARNING_MAIL_BODY")); + string overusedMailFrom = Convert.ToString(topTask.GetParamValue("OVERUSED_MAIL_FROM")); + string overusedMailBcc = Convert.ToString(topTask.GetParamValue("OVERUSED_MAIL_BCC")); + string overusedMailSubject = Convert.ToString(topTask.GetParamValue("OVERUSED_MAIL_SUBJECT")); + string overusedMailBody = Convert.ToString(topTask.GetParamValue("OVERUSED_MAIL_BODY")); int overusedPackages = 0; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunPaymentQueueTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/RunPaymentQueueTask.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunPaymentQueueTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/RunPaymentQueueTask.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunSystemCommandTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/RunSystemCommandTask.cs similarity index 88% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunSystemCommandTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/RunSystemCommandTask.cs index 3dba9938..e05bf145 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunSystemCommandTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/RunSystemCommandTask.cs @@ -42,10 +42,12 @@ namespace WebsitePanel.EnterpriseServer // - SERVER_NAME // - EXECUTABLE_PATH + BackgroundTask topTask = TaskManager.TopTask; + // get input parameters - string serverName = (string)TaskManager.TaskParameters["SERVER_NAME"]; - string execPath = (string)TaskManager.TaskParameters["EXECUTABLE_PATH"]; - string execParams = (string)TaskManager.TaskParameters["EXECUTABLE_PARAMS"]; + string serverName = (string)topTask.GetParamValue("SERVER_NAME"); + string execPath = (string)topTask.GetParamValue("EXECUTABLE_PATH"); + string execParams = (string)topTask.GetParamValue("EXECUTABLE_PARAMS"); if (execParams == null) execParams = ""; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SendMailNotificationTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/SendMailNotificationTask.cs similarity index 86% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SendMailNotificationTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/SendMailNotificationTask.cs index 57e722ea..b7a0308f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SendMailNotificationTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/SendMailNotificationTask.cs @@ -42,11 +42,13 @@ namespace WebsitePanel.EnterpriseServer // - MAIL_SUBJECT // - MAIL_BODY + BackgroundTask topTask = TaskManager.TopTask; + // get input parameters - string mailFrom = (string)TaskManager.TaskParameters["MAIL_FROM"]; - string mailTo = (string)TaskManager.TaskParameters["MAIL_TO"]; - string mailSubject = (string)TaskManager.TaskParameters["MAIL_SUBJECT"]; - string mailBody = (string)TaskManager.TaskParameters["MAIL_BODY"]; + string mailFrom = (string)topTask.GetParamValue("MAIL_FROM"); + string mailTo = (string)topTask.GetParamValue("MAIL_TO"); + string mailSubject = (string)topTask.GetParamValue("MAIL_SUBJECT"); + string mailBody = (string)topTask.GetParamValue("MAIL_BODY"); // check input parameters if (String.IsNullOrEmpty(mailFrom)) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverdueInvoicesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/SuspendOverdueInvoicesTask.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverdueInvoicesTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/SuspendOverdueInvoicesTask.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverusedPackagesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/SuspendOverusedPackagesTask.cs similarity index 83% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverusedPackagesTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/SuspendOverusedPackagesTask.cs index 5fa58ce9..e7201be1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverusedPackagesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/SuspendOverusedPackagesTask.cs @@ -43,27 +43,29 @@ namespace WebsitePanel.EnterpriseServer // - DISKSPACE_OVERUSED // - BANDWIDTH_OVERUSED + BackgroundTask topTask = TaskManager.TopTask; + // get the list of all packages - List packages = PackageController.GetPackagePackages(TaskManager.PackageId, false); + List packages = PackageController.GetPackagePackages(topTask.PackageId, false); TaskManager.Write("Packages to verify: " + packages.Count.ToString()); - bool checkDiskspace = (String.Compare((string)TaskManager.TaskParameters["DISKSPACE_OVERUSED"], "true", true) == 0); - bool checkBandwidth = (String.Compare((string)TaskManager.TaskParameters["BANDWIDTH_OVERUSED"], "true", true) == 0); + bool checkDiskspace = (String.Compare((string)topTask.GetParamValue("DISKSPACE_OVERUSED"), "true", true) == 0); + bool checkBandwidth = (String.Compare((string)topTask.GetParamValue("BANDWIDTH_OVERUSED"), "true", true) == 0); - bool suspendOverused = Convert.ToBoolean(TaskManager.TaskParameters["SUSPEND_OVERUSED"]); + bool suspendOverused = Convert.ToBoolean(topTask.GetParamValue("SUSPEND_OVERUSED")); - bool sendWarningEmail = Convert.ToBoolean(TaskManager.TaskParameters["SEND_WARNING_EMAIL"]); - bool sendSuspensionEmail = Convert.ToBoolean(TaskManager.TaskParameters["SEND_SUSPENSION_EMAIL"]); - int warningUsageThreshold = Convert.ToInt32(TaskManager.TaskParameters["WARNING_USAGE_THRESHOLD"]); - int suspensionUsageThreshold = Convert.ToInt32(TaskManager.TaskParameters["SUSPENSION_USAGE_THRESHOLD"]); - string warningMailFrom = Convert.ToString(TaskManager.TaskParameters["WARNING_MAIL_FROM"]); - string warningMailBcc = Convert.ToString(TaskManager.TaskParameters["WARNING_MAIL_BCC"]); - string warningMailSubject = Convert.ToString(TaskManager.TaskParameters["WARNING_MAIL_SUBJECT"]); - string warningMailBody = Convert.ToString(TaskManager.TaskParameters["WARNING_MAIL_BODY"]); - string suspensionMailFrom = Convert.ToString(TaskManager.TaskParameters["SUSPENSION_MAIL_FROM"]); - string suspensionMailBcc = Convert.ToString(TaskManager.TaskParameters["SUSPENSION_MAIL_BCC"]); - string suspensionMailSubject = Convert.ToString(TaskManager.TaskParameters["SUSPENSION_MAIL_SUBJECT"]); - string suspensionMailBody = Convert.ToString(TaskManager.TaskParameters["SUSPENSION_MAIL_BODY"]); + bool sendWarningEmail = Convert.ToBoolean(topTask.GetParamValue("SEND_WARNING_EMAIL")); + bool sendSuspensionEmail = Convert.ToBoolean(topTask.GetParamValue("SEND_SUSPENSION_EMAIL")); + int warningUsageThreshold = Convert.ToInt32(topTask.GetParamValue("WARNING_USAGE_THRESHOLD")); + int suspensionUsageThreshold = Convert.ToInt32(topTask.GetParamValue("SUSPENSION_USAGE_THRESHOLD")); + string warningMailFrom = Convert.ToString(topTask.GetParamValue("WARNING_MAIL_FROM")); + string warningMailBcc = Convert.ToString(topTask.GetParamValue("WARNING_MAIL_BCC")); + string warningMailSubject = Convert.ToString(topTask.GetParamValue("WARNING_MAIL_SUBJECT")); + string warningMailBody = Convert.ToString(topTask.GetParamValue("WARNING_MAIL_BODY")); + string suspensionMailFrom = Convert.ToString(topTask.GetParamValue("SUSPENSION_MAIL_FROM")); + string suspensionMailBcc = Convert.ToString(topTask.GetParamValue("SUSPENSION_MAIL_BCC")); + string suspensionMailSubject = Convert.ToString(topTask.GetParamValue("SUSPENSION_MAIL_SUBJECT")); + string suspensionMailBody = Convert.ToString(topTask.GetParamValue("SUSPENSION_MAIL_BODY")); int suspendedPackages = 0; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ZipFilesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/ZipFilesTask.cs similarity index 88% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ZipFilesTask.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/ZipFilesTask.cs index 5f93c1ac..20247fee 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ZipFilesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/ZipFilesTask.cs @@ -40,9 +40,11 @@ namespace WebsitePanel.EnterpriseServer // - FOLDER // - ZIP_FILE + BackgroundTask topTask = TaskManager.TopTask; + // get input parameters - string filesList = (string)TaskManager.TaskParameters["FOLDER"]; - string zipFile = (string)TaskManager.TaskParameters["ZIP_FILE"]; + string filesList = (string)topTask.GetParamValue("FOLDER"); + string zipFile = (string)topTask.GetParamValue("ZIP_FILE"); // check input parameters if (String.IsNullOrEmpty(filesList)) @@ -68,7 +70,7 @@ namespace WebsitePanel.EnterpriseServer zipFile = Utils.ReplaceStringVariable(zipFile, "time", time); // zip files and folders - FilesController.ZipFiles(TaskManager.PackageId, new string[] { filesList }, zipFile); + FilesController.ZipFiles(topTask.PackageId, new string[] { filesList }, zipFile); } } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Scheduling/Scheduler.cs similarity index 71% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Scheduling/Scheduler.cs index 268391b7..34b9ffbf 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Scheduling/Scheduler.cs @@ -28,6 +28,7 @@ using System; using System.IO; +using System.ServiceProcess; using System.Threading; using System.Collections; using System.Diagnostics; @@ -43,77 +44,91 @@ namespace WebsitePanel.EnterpriseServer { public static SchedulerJob nextSchedule = null; - // main timer and put it to sleep - static Timer scheduleTimer = new Timer(new TimerCallback(RunNextSchedule), - null, - Timeout.Infinite, - Timeout.Infinite); - public static void Start() - { - // schedule tasks + { ScheduleTasks(); } public static bool IsScheduleActive(int scheduleId) { Dictionary scheduledTasks = TaskManager.GetScheduledTasks(); + return scheduledTasks.ContainsKey(scheduleId); } - public static void StartSchedule(SchedulerJob schedule) - { - Dictionary scheduledTasks = TaskManager.GetScheduledTasks(); - if (scheduledTasks.ContainsKey(schedule.ScheduleInfo.ScheduleId)) - return; - - // run schedule - RunSchedule(schedule, false); - } - - public static void StopSchedule(SchedulerJob schedule) - { - Dictionary scheduledTasks = TaskManager.GetScheduledTasks(); - if (!scheduledTasks.ContainsKey(schedule.ScheduleInfo.ScheduleId)) - return; - - BackgroundTask activeTask = scheduledTasks[schedule.ScheduleInfo.ScheduleId]; - TaskManager.StopTask(activeTask.TaskId); - } - public static void ScheduleTasks() { + RunManualTasks(); + nextSchedule = SchedulerController.GetNextSchedule(); - // set timer if (nextSchedule != null) { if (nextSchedule.ScheduleInfo.NextRun <= DateTime.Now) { - // this will put the timer to sleep - scheduleTimer.Change(Timeout.Infinite, Timeout.Infinite); - - System.Threading.Thread.Sleep(1000); - - // run immediately RunNextSchedule(null); } - else - { - // set timer - TimeSpan ts = nextSchedule.ScheduleInfo.NextRun.Subtract(DateTime.Now); - if (ts < TimeSpan.Zero) - ts = TimeSpan.Zero; // cannot be negative ! + } + } - // invoke after the timespan - scheduleTimer.Change((long)ts.TotalMilliseconds, Timeout.Infinite); + private static void RunManualTasks() + { + var tasks = TaskController.GetProcessTasks(BackgroundTaskStatus.Stopping); + + foreach (var task in tasks) + { + TaskManager.StopTask(task.TaskId); + } + + tasks = TaskController.GetProcessTasks(BackgroundTaskStatus.Starting); + + foreach (var task in tasks) + { + var taskThread = new Thread(() => RunBackgroundTask(task)) { Priority = ThreadPriority.Highest }; + taskThread.Start(); + TaskManager.AddTaskThread(task.Id, taskThread); + } + } + + private static void RunBackgroundTask(BackgroundTask backgroundTask) + { + UserInfo user = PackageController.GetPackageOwner(backgroundTask.PackageId); + + SecurityContext.SetThreadPrincipal(user.UserId); + + var schedule = SchedulerController.GetScheduleComplete(backgroundTask.ScheduleId); + + backgroundTask.Guid = TaskManager.Guid; + backgroundTask.Status = BackgroundTaskStatus.Run; + + + TaskController.UpdateTask(backgroundTask); + + try + { + var objTask = (SchedulerTask)Activator.CreateInstance(Type.GetType(schedule.Task.TaskType)); + + objTask.DoWork(); + } + catch (Exception ex) + { + TaskManager.WriteError(ex, "Error executing scheduled task"); + } + finally + { + try + { + TaskManager.CompleteTask(); + } + catch (Exception) + { } } } // call back for the timer function static void RunNextSchedule(object obj) // obj ignored - { + { if (nextSchedule == null) return; @@ -125,8 +140,6 @@ namespace WebsitePanel.EnterpriseServer static void RunSchedule(SchedulerJob schedule, bool changeNextRun) { - - try { // update next run (if required) @@ -162,6 +175,8 @@ namespace WebsitePanel.EnterpriseServer counter++; } + if (counter == MAX_RETRY_COUNT) + return; // skip execution if the current task is still running scheduledTasks = TaskManager.GetScheduledTasks(); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Scheduling/SchedulerController.cs similarity index 84% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Scheduling/SchedulerController.cs index 0fc85004..be434a2e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Scheduling/SchedulerController.cs @@ -31,6 +31,7 @@ using System.Data; using System.Collections.Generic; using System.Text; using System.Xml; +using System.Linq; using WebsitePanel.EnterpriseServer.Base.Scheduling; namespace WebsitePanel.EnterpriseServer @@ -151,30 +152,74 @@ namespace WebsitePanel.EnterpriseServer { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo); - if (accountCheck < 0) return accountCheck; + + if (accountCheck < 0) + return accountCheck; SchedulerJob schedule = GetScheduleComplete(scheduleId); if (schedule == null) return 0; - Scheduler.StartSchedule(schedule); + if (TaskController.GetScheduleTasks(scheduleId).Any(x => x.Status == BackgroundTaskStatus.Run + || x.Status == BackgroundTaskStatus.Starting)) + return 0; + + var parameters = schedule.ScheduleInfo.Parameters.Select( + prm => new BackgroundTaskParameter(prm.ParameterId, prm.ParameterValue)).ToList(); + + var userInfo = PackageController.GetPackageOwner(schedule.ScheduleInfo.PackageId); + + var backgroundTask = new BackgroundTask( + Guid.NewGuid(), + Guid.NewGuid().ToString("N"), + userInfo.OwnerId == 0 ? userInfo.UserId : userInfo.OwnerId, + userInfo.UserId, + "SCHEDULER", + "RUN_SCHEDULE", + schedule.ScheduleInfo.ScheduleName, + schedule.ScheduleInfo.ScheduleId, + schedule.ScheduleInfo.ScheduleId, + schedule.ScheduleInfo.PackageId, + schedule.ScheduleInfo.MaxExecutionTime, parameters) + { + Status = BackgroundTaskStatus.Starting + }; + + TaskController.AddTask(backgroundTask); + + // update next run (if required) + CalculateNextStartTime(schedule.ScheduleInfo); + + // disable run once task + if (schedule.ScheduleInfo.ScheduleType == ScheduleType.OneTime) + schedule.ScheduleInfo.Enabled = false; + + schedule.ScheduleInfo.LastRun = DateTime.Now; + UpdateSchedule(schedule.ScheduleInfo); return 0; - } + } public static int StopSchedule(int scheduleId) { - // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo); - if (accountCheck < 0) return accountCheck; + if (accountCheck < 0) + return accountCheck; + SchedulerJob schedule = GetScheduleComplete(scheduleId); if (schedule == null) return 0; - Scheduler.StopSchedule(schedule); - + foreach (BackgroundTask task in TaskController.GetScheduleTasks(scheduleId)) + { + task.Status = BackgroundTaskStatus.Stopping; + + TaskController.UpdateTask(task); + } + return 0; + } public static void CalculateNextStartTime(ScheduleInfo schedule) @@ -275,7 +320,7 @@ namespace WebsitePanel.EnterpriseServer schedule.HistoriesNumber, schedule.MaxExecutionTime, schedule.WeekMonthDay, xmlParameters); // re-schedule tasks - Scheduler.ScheduleTasks(); + //Scheduler.ScheduleTasks(); return scheduleId; } @@ -301,7 +346,7 @@ namespace WebsitePanel.EnterpriseServer schedule.HistoriesNumber, schedule.MaxExecutionTime, schedule.WeekMonthDay, xmlParameters); // re-schedule tasks - Scheduler.ScheduleTasks(); + //Scheduler.ScheduleTasks(); return 0; } @@ -336,7 +381,7 @@ namespace WebsitePanel.EnterpriseServer DataProvider.DeleteSchedule(SecurityContext.User.UserId, scheduleId); // re-schedule tasks - Scheduler.ScheduleTasks(); + //Scheduler.ScheduleTasks(); return 0; } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerJob.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Scheduling/SchedulerJob.cs similarity index 87% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerJob.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Scheduling/SchedulerJob.cs index c29be3fd..7b9d2efd 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerJob.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Scheduling/SchedulerJob.cs @@ -66,7 +66,6 @@ namespace WebsitePanel.EnterpriseServer { // create worker Thread worker = new Thread(new ThreadStart(RunSchedule)); - // set worker priority switch (scheduleInfo.Priority) { @@ -89,15 +88,15 @@ namespace WebsitePanel.EnterpriseServer UserInfo user = PackageController.GetPackageOwner(scheduleInfo.PackageId); SecurityContext.SetThreadPrincipal(user.UserId); - TaskManager.StartTask("SCHEDULER", "RUN_SCHEDULE", scheduleInfo.ScheduleName); - TaskManager.PackageId = scheduleInfo.PackageId; - TaskManager.ItemId = scheduleInfo.ScheduleId; - TaskManager.ScheduleId = scheduleInfo.ScheduleId; - TaskManager.MaximumExecutionTime = scheduleInfo.MaxExecutionTime; - - // set task parameters + List parameters = new List(); foreach (ScheduleTaskParameterInfo prm in scheduleInfo.Parameters) - TaskManager.TaskParameters[prm.ParameterId] = prm.ParameterValue; + { + parameters.Add(new BackgroundTaskParameter(prm.ParameterId, prm.ParameterValue)); + } + + TaskManager.StartTask("SCHEDULER", "RUN_SCHEDULE", scheduleInfo.ScheduleName, scheduleInfo.ScheduleId, + scheduleInfo.ScheduleId, scheduleInfo.PackageId, scheduleInfo.MaxExecutionTime, + parameters); // run task try @@ -109,7 +108,8 @@ namespace WebsitePanel.EnterpriseServer objTask.DoWork(); else throw new Exception(String.Format("Could not create scheduled task of '{0}' type", - task.TaskType)); + task.TaskType)); + // Thread.Sleep(40000); } catch (Exception ex) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs index b1cd15f0..61e838a6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs @@ -265,6 +265,7 @@ namespace WebsitePanel.EnterpriseServer } TaskManager.ItemId = serverId; + TaskManager.CompleteTask(); return serverId; @@ -277,12 +278,10 @@ namespace WebsitePanel.EnterpriseServer | DemandAccount.IsAdmin); if (accountCheck < 0) return accountCheck; - TaskManager.StartTask("SERVER", "UPDATE"); - TaskManager.ItemId = server.ServerId; - // get original server ServerInfo origServer = GetServerByIdInternal(server.ServerId); - TaskManager.ItemName = origServer.ServerName; + + TaskManager.StartTask("SERVER", "UPDATE", origServer.ServerName, server.ServerId); // preserve passwords server.Password = origServer.Password; @@ -313,12 +312,10 @@ namespace WebsitePanel.EnterpriseServer | DemandAccount.IsAdmin); if (accountCheck < 0) return accountCheck; - TaskManager.StartTask("SERVER", "UPDATE_PASSWORD"); - TaskManager.ItemId = serverId; - // get original server ServerInfo server = GetServerByIdInternal(serverId); - TaskManager.ItemName = server.ServerName; + + TaskManager.StartTask("SERVER", "UPDATE_PASSWORD", server.ServerName, serverId); // set password server.Password = password; @@ -341,12 +338,10 @@ namespace WebsitePanel.EnterpriseServer | DemandAccount.IsAdmin); if (accountCheck < 0) return accountCheck; - TaskManager.StartTask("SERVER", "UPDATE_AD_PASSWORD"); - TaskManager.ItemId = serverId; - // get original server ServerInfo server = GetServerByIdInternal(serverId); - TaskManager.ItemName = server.ServerName; + + TaskManager.StartTask("SERVER", "UPDATE_AD_PASSWORD", server.ServerName, serverId); // set password server.ADPassword = adPassword; @@ -369,12 +364,10 @@ namespace WebsitePanel.EnterpriseServer | DemandAccount.IsAdmin); if (accountCheck < 0) return accountCheck; - TaskManager.StartTask("SERVER", "DELETE"); - TaskManager.ItemId = serverId; - // get original server ServerInfo server = GetServerByIdInternal(serverId); - TaskManager.ItemName = server.ServerName; + + TaskManager.StartTask("SERVER", "DELETE", server.ServerName, serverId); try { @@ -427,10 +420,9 @@ namespace WebsitePanel.EnterpriseServer | DemandAccount.IsActive); if (accountCheck < 0) return accountCheck; - TaskManager.StartTask("VIRTUAL_SERVER", "ADD_SERVICES"); ServerInfo server = GetServerByIdInternal(serverId); - TaskManager.ItemId = serverId; - TaskManager.ItemName = server.ServerName; + + TaskManager.StartTask("VIRTUAL_SERVER", "ADD_SERVICES", server.ServerName, serverId); // build XML string xml = BuildXmlFromArray(ids, "services", "service"); @@ -450,10 +442,9 @@ namespace WebsitePanel.EnterpriseServer | DemandAccount.IsActive); if (accountCheck < 0) return accountCheck; - TaskManager.StartTask("VIRTUAL_SERVER", "DELETE_SERVICES"); ServerInfo server = GetServerByIdInternal(serverId); - TaskManager.ItemId = serverId; - TaskManager.ItemName = server.ServerName; + + TaskManager.StartTask("VIRTUAL_SERVER", "DELETE_SERVICES", server.ServerName, serverId); // build XML string xml = BuildXmlFromArray(ids, "services", "service"); @@ -585,9 +576,8 @@ namespace WebsitePanel.EnterpriseServer | DemandAccount.IsActive); if (accountCheck < 0) return accountCheck; - TaskManager.StartTask("SERVER", "ADD_SERVICE"); - TaskManager.ItemId = service.ServerId; - TaskManager.ItemName = GetServerByIdInternal(service.ServerId).ServerName; + TaskManager.StartTask("SERVER", "ADD_SERVICE", GetServerByIdInternal(service.ServerId).ServerName, service.ServerId); + TaskManager.WriteParameter("Service name", service.ServiceName); TaskManager.WriteParameter("Provider", service.ProviderId); @@ -641,9 +631,8 @@ namespace WebsitePanel.EnterpriseServer // load original service ServiceInfo origService = GetServiceInfo(service.ServiceId); - TaskManager.StartTask("SERVER", "UPDATE_SERVICE"); - TaskManager.ItemId = origService.ServerId; - TaskManager.ItemName = GetServerByIdInternal(origService.ServerId).ServerName; + TaskManager.StartTask("SERVER", "UPDATE_SERVICE", GetServerByIdInternal(origService.ServerId).ServerName, origService.ServerId); + TaskManager.WriteParameter("New service name", service.ServiceName); DataProvider.UpdateService(service.ServiceId, service.ServiceName, @@ -663,9 +652,8 @@ namespace WebsitePanel.EnterpriseServer ServiceInfo service = GetServiceInfoAdmin(serviceId); - TaskManager.StartTask("SERVER", "DELETE_SERVICE"); - TaskManager.ItemId = service.ServerId; - TaskManager.ItemName = GetServerByIdInternal(service.ServerId).ServerName; + TaskManager.StartTask("SERVER", "DELETE_SERVICE", GetServerByIdInternal(service.ServerId).ServerName, service.ServerId); + TaskManager.WriteParameter("Service name", service.ServiceName); try @@ -926,8 +914,8 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("IP_ADDRESS", "ADD"); - TaskManager.ItemName = externalIP; + res = TaskManager.StartResultTask("IP_ADDRESS", "ADD", externalIP); + TaskManager.WriteParameter("IP Address", externalIP); TaskManager.WriteParameter("NAT Address", internalIP); @@ -961,8 +949,8 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("IP_ADDRESS", "ADD_RANGE"); - TaskManager.ItemName = externalIP; + res = TaskManager.StartResultTask("IP_ADDRESS", "ADD_RANGE", externalIP); + TaskManager.WriteParameter("IP Address", externalIP); TaskManager.WriteParameter("End IP Address", endIP); TaskManager.WriteParameter("NAT Address", internalIP); @@ -1251,8 +1239,7 @@ namespace WebsitePanel.EnterpriseServer if (addressesNumber > maxAvailableIPs) addressesNumber = maxAvailableIPs; - res = TaskManager.StartResultTask("IP_ADDRESS", "ALLOCATE_PACKAGE_IP"); - TaskManager.PackageId = packageId; + res = TaskManager.StartResultTask("IP_ADDRESS", "ALLOCATE_PACKAGE_IP", packageId); try { @@ -1337,8 +1324,8 @@ namespace WebsitePanel.EnterpriseServer return res; #endregion - res = TaskManager.StartResultTask("IP_ADDRESS", "DEALLOCATE_PACKAGE_IP"); - TaskManager.PackageId = packageId; + res = TaskManager.StartResultTask("IP_ADDRESS", "DEALLOCATE_PACKAGE_IP", packageId); + try { foreach (int id in addressId) @@ -1876,11 +1863,7 @@ namespace WebsitePanel.EnterpriseServer */ // place log record - TaskManager.StartTask("DOMAIN", "ADD", domainName); - TaskManager.PackageId = packageId; - TaskManager.TaskParameters["CreateZone"] = createDnsZone; - - + TaskManager.StartTask("DOMAIN", "ADD", domainName, 0, packageId, new BackgroundTaskParameter("CreateZone", createDnsZone)); // create DNS zone int zoneItemId = 0; @@ -1911,6 +1894,7 @@ namespace WebsitePanel.EnterpriseServer packageId, zoneItemId, domainName, allowSubDomains, 0, 0, isSubDomain, isInstantAlias, isDomainPointer); TaskManager.ItemId = itemId; + TaskManager.CompleteTask(); return itemId; @@ -2041,8 +2025,7 @@ namespace WebsitePanel.EnterpriseServer // place log record DomainInfo origDomain = GetDomain(domain.DomainId); - TaskManager.StartTask("DOMAIN", "UPDATE", origDomain.DomainName); - TaskManager.ItemId = domain.DomainId; + TaskManager.StartTask("DOMAIN", "UPDATE", origDomain.DomainName, domain.DomainId); try { @@ -2074,8 +2057,7 @@ namespace WebsitePanel.EnterpriseServer return 0; // place log record - TaskManager.StartTask("DOMAIN", "DETACH", domain.DomainName); - TaskManager.ItemId = domain.DomainId; + TaskManager.StartTask("DOMAIN", "DETACH", domain.DomainName, domain.DomainId); try { @@ -2143,8 +2125,7 @@ namespace WebsitePanel.EnterpriseServer return 0; // place log record - TaskManager.StartTask("DOMAIN", "DELETE", domain.DomainName); - TaskManager.ItemId = domain.DomainId; + TaskManager.StartTask("DOMAIN", "DELETE", domain.DomainName, domain.DomainId); try { @@ -2223,8 +2204,7 @@ namespace WebsitePanel.EnterpriseServer return 0; // place log record - TaskManager.StartTask("DOMAIN", "DISABLE_DNS", domain.DomainName); - TaskManager.ItemId = domain.DomainId; + TaskManager.StartTask("DOMAIN", "DISABLE_DNS", domain.DomainName, domain.DomainId); try { @@ -2270,8 +2250,7 @@ namespace WebsitePanel.EnterpriseServer return 0; // place log record - TaskManager.StartTask("DOMAIN", "ENABLE_DNS", domain.DomainName); - TaskManager.ItemId = domain.DomainId; + TaskManager.StartTask("DOMAIN", "ENABLE_DNS", domain.DomainName, domain.DomainId); try { @@ -2475,8 +2454,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_INSTANT_ALIAS_IS_NOT_CONFIGURED; // place log record - TaskManager.StartTask("DOMAIN", "CREATE_INSTANT_ALIAS", domain.DomainName); - TaskManager.ItemId = domain.DomainId; + TaskManager.StartTask("DOMAIN", "CREATE_INSTANT_ALIAS", domain.DomainName, domain.DomainId); try { @@ -2560,8 +2538,7 @@ namespace WebsitePanel.EnterpriseServer return 0; // place log record - TaskManager.StartTask("DOMAIN", "DELETE_INSTANT_ALIAS", domain.DomainName); - TaskManager.ItemId = domain.DomainId; + TaskManager.StartTask("DOMAIN", "DELETE_INSTANT_ALIAS", domain.DomainName, domain.DomainId); try { @@ -2695,8 +2672,7 @@ namespace WebsitePanel.EnterpriseServer return 0; // place log record - TaskManager.StartTask("DNS_ZONE", "ADD_RECORD", domain.DomainName); - TaskManager.ItemId = domain.ZoneItemId; + TaskManager.StartTask("DNS_ZONE", "ADD_RECORD", domain.DomainName, domain.ZoneItemId); try { @@ -2736,8 +2712,7 @@ namespace WebsitePanel.EnterpriseServer { // place log record DomainInfo domain = GetDomain(domainId); - TaskManager.StartTask("DNS_ZONE", "UPDATE_RECORD", domain.DomainName); - TaskManager.ItemId = domain.ZoneItemId; + TaskManager.StartTask("DNS_ZONE", "UPDATE_RECORD", domain.DomainName, domain.ZoneItemId); try { @@ -2783,8 +2758,7 @@ namespace WebsitePanel.EnterpriseServer try { // place log record - TaskManager.StartTask("DNS_ZONE", "DELETE_RECORD", domain.DomainName); - TaskManager.ItemId = domain.ZoneItemId; + TaskManager.StartTask("DNS_ZONE", "DELETE_RECORD", domain.DomainName, domain.ZoneItemId); DNSServer dns = new DNSServer(); ServiceProviderProxy.Init(dns, zoneItem.ServiceId); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/HostedSharePointServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/HostedSharePointServerController.cs similarity index 97% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/HostedSharePointServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/HostedSharePointServerController.cs index eebff84b..886936a1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/HostedSharePointServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/HostedSharePointServerController.cs @@ -341,6 +341,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint } TaskManager.ItemId = itemId; + return itemId; } catch (Exception ex) @@ -380,8 +381,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint string siteName = origItem.Name.Replace(String.Format("{0}://", rootWebApplicationUri.Scheme), String.Empty); // Log operation. - TaskManager.StartTask("HOSTEDSHAREPOINT", "DELETE_SITE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("HOSTEDSHAREPOINT", "DELETE_SITE", origItem.Name, itemId); try { @@ -459,8 +459,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint } // Log operation. - TaskManager.StartTask("HOSTEDSHAREPOINT", "BACKUP_SITE_COLLECTION", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("HOSTEDSHAREPOINT", "BACKUP_SITE_COLLECTION", origItem.Name, itemId); try { @@ -550,8 +549,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint } // Log operation. - TaskManager.StartTask("HOSTEDSHAREPOINT", "BACKUP_SITE_COLLECTION", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("HOSTEDSHAREPOINT", "BACKUP_SITE_COLLECTION", origItem.Name, itemId); try { @@ -850,8 +848,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("HOSTED_SHAREPOINT", "SET_ORG_LIMITS"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("HOSTED_SHAREPOINT", "SET_ORG_LIMITS", itemId); try { @@ -923,8 +920,8 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint } // place log record - TaskManager.StartTask("HOSTED_SHAREPOINT", "CALCULATE_DISK_SPACE"); - TaskManager.ItemId = itemId; + TaskManager.StartTask("HOSTED_SHAREPOINT", "CALCULATE_DISK_SPACE", itemId); + try { Organization org = (Organization)PackageController.GetPackageItem(itemId); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/SharePointServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/SharePointServerController.cs similarity index 96% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/SharePointServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/SharePointServerController.cs index 63382be7..f516bfa6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/SharePointServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/SharePointServerController.cs @@ -268,8 +268,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("SHAREPOINT", "DELETE_SITE", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SHAREPOINT", "DELETE_SITE", origItem.Name, itemId); try { @@ -340,8 +339,7 @@ namespace WebsitePanel.EnterpriseServer return null; // place log record - TaskManager.StartTask("SHAREPOINT", "BACKUP_SITE", item.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SHAREPOINT", "BACKUP_SITE", item.Name, itemId); try { @@ -432,8 +430,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("SHAREPOINT", "RESTORE_SITE", item.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SHAREPOINT", "RESTORE_SITE", item.Name, itemId); try { @@ -520,8 +517,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("SHAREPOINT", "INSTALL_WEBPARTS", item.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SHAREPOINT", "INSTALL_WEBPARTS", item.Name, itemId); + TaskManager.WriteParameter("Package file", packageFile); try @@ -592,8 +589,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("SHAREPOINT", "UNINSTALL_WEBPARTS", item.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SHAREPOINT", "UNINSTALL_WEBPARTS", item.Name, itemId); + TaskManager.WriteParameter("Package name", packageName); try @@ -736,8 +733,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("SHAREPOINT", "UPDATE_USER", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("SHAREPOINT", "UPDATE_USER", origItem.Name, item.Id); try { @@ -785,8 +781,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_SHAREPOINT_USERS_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("SHAREPOINT", "DELETE_USER", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SHAREPOINT", "DELETE_USER", origItem.Name, itemId); try { @@ -925,8 +920,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("SHAREPOINT", "UPDATE_GROUP", origItem.Name); - TaskManager.ItemId = item.Id; + TaskManager.StartTask("SHAREPOINT", "UPDATE_GROUP", origItem.Name, item.Id); try { @@ -962,8 +956,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_SHAREPOINT_GROUPS_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("SHAREPOINT", "DELETE_GROUP", origItem.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("SHAREPOINT", "DELETE_GROUP", origItem.Name, itemId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/StatisticsServers/StatisticsServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/StatisticsServers/StatisticsServerController.cs similarity index 96% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/StatisticsServers/StatisticsServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/StatisticsServers/StatisticsServerController.cs index 1f060c99..29b33e14 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/StatisticsServers/StatisticsServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/StatisticsServers/StatisticsServerController.cs @@ -226,8 +226,7 @@ namespace WebsitePanel.EnterpriseServer item.SiteId = origItem.SiteId; // place log record - TaskManager.StartTask("STATS_SITE", "UPDATE", origItem.Name); - TaskManager.ItemId = origItem.Id; + TaskManager.StartTask("STATS_SITE", "UPDATE", origItem.Name, origItem.Id); try { @@ -263,8 +262,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_STATS_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("STATS_SITE", "DELETE", origItem.Name); - TaskManager.ItemId = origItem.Id; + TaskManager.StartTask("STATS_SITE", "DELETE", origItem.Name, itemId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/System/SystemController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/System/SystemController.cs similarity index 94% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/System/SystemController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/System/SystemController.cs index 322e30d6..3f010eec 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/System/SystemController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/System/SystemController.cs @@ -119,7 +119,7 @@ namespace WebsitePanel.EnterpriseServer return 0; } - internal static bool GetSystemSetupMode() + public static bool GetSystemSetupMode() { var scpaSystemSettings = GetSystemSettings(SystemSettings.SETUP_SETTINGS); // Flag either not found or empty @@ -131,7 +131,7 @@ namespace WebsitePanel.EnterpriseServer return true; } - internal static int SetupControlPanelAccounts(string passwordA, string passwordB, string ip) + public static int SetupControlPanelAccounts(string passwordA, string passwordB, string ip) { try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/SendEmailNotification.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/SendEmailNotification.cs similarity index 76% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/SendEmailNotification.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/SendEmailNotification.cs index 67d246b2..e36eacb6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/SendEmailNotification.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/SendEmailNotification.cs @@ -40,23 +40,25 @@ namespace WebsitePanel.EnterpriseServer.Tasks public override void OnComplete() { - if (!TaskManager.HasErrors) + BackgroundTask topTask = TaskManager.TopTask; + + if (!TaskManager.HasErrors(topTask)) { // Send user add notification - if (TaskManager.TaskSource == "USER" && - TaskManager.TaskName == "ADD" && TaskManager.ItemId > 0) + if (topTask.Source == "USER" && + topTask.TaskName == "ADD" && topTask.ItemId > 0) { SendAddUserNotification(); } // Send hosting package add notification - if (TaskManager.TaskSource == "HOSTING_SPACE" - && TaskManager.TaskName == "ADD" && TaskManager.ItemId > 0) + if (topTask.Source == "HOSTING_SPACE" + && topTask.TaskName == "ADD" && topTask.ItemId > 0) { SendAddPackageNotification(); } // Send hosting package add notification - if (TaskManager.TaskSource == "HOSTING_SPACE_WR" - && TaskManager.TaskName == "ADD" && TaskManager.ItemId > 0) + if (topTask.Source == "HOSTING_SPACE_WR" + && topTask.TaskName == "ADD" && topTask.ItemId > 0) { SendAddPackageWithResourcesNotification(); } @@ -76,10 +78,13 @@ namespace WebsitePanel.EnterpriseServer.Tasks { try { - bool sendLetter = (bool)TaskManager.TaskParameters["SendLetter"]; + BackgroundTask topTask = TaskManager.TopTask; + + bool sendLetter = Utils.ParseBool(topTask.GetParamValue("SendLetter"), false); + if (sendLetter) { - int sendResult = PackageController.SendPackageSummaryLetter(TaskManager.ItemId, null, null, true); + int sendResult = PackageController.SendPackageSummaryLetter(topTask.ItemId, null, null, true); CheckSmtpResult(sendResult); } } @@ -93,9 +98,12 @@ namespace WebsitePanel.EnterpriseServer.Tasks { try { - int userId = (int)TaskManager.TaskParameters["UserId"]; - bool sendLetter = (bool)TaskManager.TaskParameters["SendLetter"]; - bool signup = (bool)TaskManager.TaskParameters["Signup"]; + BackgroundTask topTask = TaskManager.TopTask; + + int userId = Utils.ParseInt(topTask.GetParamValue("UserId").ToString(), 0); + bool sendLetter = Utils.ParseBool(topTask.GetParamValue("SendLetter"), false); + bool signup = Utils.ParseBool(topTask.GetParamValue("Signup"), false); + // send space letter if enabled UserSettings settings = UserController.GetUserSettings(userId, UserSettings.PACKAGE_SUMMARY_LETTER); if (sendLetter @@ -103,7 +111,7 @@ namespace WebsitePanel.EnterpriseServer.Tasks && Utils.ParseBool(settings["EnableLetter"], false)) { // send letter - int smtpResult = PackageController.SendPackageSummaryLetter(TaskManager.ItemId, null, null, signup); + int smtpResult = PackageController.SendPackageSummaryLetter(topTask.ItemId, null, null, signup); CheckSmtpResult(smtpResult); } } @@ -117,8 +125,11 @@ namespace WebsitePanel.EnterpriseServer.Tasks { try { - bool sendLetter = (bool)TaskManager.TaskParameters["SendLetter"]; - int userId = TaskManager.ItemId; + BackgroundTask topTask = TaskManager.TopTask; + + bool sendLetter = Utils.ParseBool(topTask.GetParamValue("SendLetter"), false); + + int userId = topTask.ItemId; // send account letter if enabled UserSettings settings = UserController.GetUserSettings(userId, UserSettings.ACCOUNT_SUMMARY_LETTER); if (sendLetter diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskController.cs new file mode 100644 index 00000000..b6207b84 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskController.cs @@ -0,0 +1,243 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Xml; +using System.Xml.Serialization; +namespace WebsitePanel.EnterpriseServer +{ + public class TaskController + { + public static BackgroundTask GetTask(string taskId) + { + BackgroundTask task = ObjectUtils.FillObjectFromDataReader( + DataProvider.GetBackgroundTask(taskId)); + + if (task == null) + { + return null; + } + + task.Params = GetTaskParams(task.Id); + + return task; + } + + public static List GetScheduleTasks(int scheduleId) + { + return ObjectUtils.CreateListFromDataReader( + DataProvider.GetScheduleBackgroundTasks(scheduleId)); + } + + public static List GetTasks() + { + var user = SecurityContext.User; + + return GetTasks(user.IsPeer ? user.OwnerId : user.UserId); + } + + public static List GetTasks(int actorId) + { + return ObjectUtils.CreateListFromDataReader( + DataProvider.GetBackgroundTasks(actorId)); + } + + public static List GetTasks(Guid guid) + { + return ObjectUtils.CreateListFromDataReader( + DataProvider.GetBackgroundTasks(guid)); + } + + public static List GetProcessTasks(BackgroundTaskStatus status) + { + return ObjectUtils.CreateListFromDataReader( + DataProvider.GetProcessBackgroundTasks(status)); + } + + public static BackgroundTask GetTopTask(Guid guid) + { + BackgroundTask task = ObjectUtils.FillObjectFromDataReader( + DataProvider.GetBackgroundTopTask(guid)); + + if (task == null) + { + return null; + } + + task.Params = GetTaskParams(task.Id); + + return task; + } + + public static int AddTask(BackgroundTask task) + { + int taskId = DataProvider.AddBackgroundTask(task.Guid, task.TaskId, task.ScheduleId, task.PackageId, task.UserId, + task.EffectiveUserId, task.TaskName, task.ItemId, task.ItemName, + task.StartDate, task.IndicatorCurrent, task.IndicatorMaximum, + task.MaximumExecutionTime, task.Source, task.Severity, task.Completed, + task.NotifyOnComplete, task.Status); + + AddTaskParams(taskId, task.Params); + + DataProvider.AddBackgroundTaskStack(taskId); + + return taskId; + } + + public static void UpdateTaskWithParams(BackgroundTask task) + { + if (UpdateTask(task)) + { + UpdateBackgroundTaskParams(task); + } + } + + public static bool UpdateTask(BackgroundTask task) + { + if (task.Status == BackgroundTaskStatus.Abort) + { + DeleteBackgroundTasks(task.Guid); + + return false; + } + + if (task.Completed) + { + DeleteBackgroundTask(task.Id); + + return false; + } + + DataProvider.UpdateBackgroundTask(task.Guid, task.Id, task.ScheduleId, task.PackageId, task.TaskName, task.ItemId, + task.ItemName, task.FinishDate, task.IndicatorCurrent, + task.IndicatorMaximum, task.MaximumExecutionTime, task.Source, + task.Severity, task.Completed, task.NotifyOnComplete, task.Status); + + return true; + } + + public static void UpdateBackgroundTaskParams(BackgroundTask task) + { + DataProvider.DeleteBackgroundTaskParams(task.Id); + + AddTaskParams(task.Id, task.Params); + } + + public static void DeleteBackgroundTasks(Guid guid) + { + DataProvider.DeleteBackgroundTasks(guid); + } + + public static void DeleteBackgroundTask(int id) + { + DataProvider.DeleteBackgroundTask(id); + } + + public static void AddTaskParams(int taskId, List parameters) + { + foreach (BackgroundTaskParameter param in SerializeParams(parameters)) + { + DataProvider.AddBackgroundTaskParam(taskId, param.Name, param.SerializerValue, param.TypeName); + } + } + + public static List GetTaskParams(int taskId) + { + List parameters = ObjectUtils.CreateListFromDataReader( + DataProvider.GetBackgroundTaskParams(taskId)); + + return DeserializeParams(parameters); + } + + public static void AddLog(BackgroundTaskLogRecord log) + { + DataProvider.AddBackgroundTaskLog(log.TaskId, log.Date, log.ExceptionStackTrace, log.InnerTaskStart, + log.Severity, log.Text, log.TextIdent, BuildParametersXml(log.TextParameters)); + } + + public static List GetLogs(BackgroundTask task, DateTime startLogTime) + { + if (startLogTime <= task.StartDate) + { + startLogTime = task.StartDate; + } + + List logs = ObjectUtils.CreateListFromDataReader( + DataProvider.GetBackgroundTaskLogs(task.Id, startLogTime)); + + foreach (BackgroundTaskLogRecord log in logs) + { + log.TextParameters = ReBuildParametersXml(log.XmlParameters); + } + + return logs; + } + + private static List SerializeParams(List parameters) + { + foreach (BackgroundTaskParameter param in parameters) + { + var type = param.Value.GetType(); + param.TypeName = type.FullName; + + XmlSerializer serializer = new XmlSerializer(type); + MemoryStream ms = new MemoryStream(); + serializer.Serialize(ms, param.Value); + + ms.Position = 0; + StreamReader sr = new StreamReader(ms); + + param.SerializerValue = sr.ReadToEnd(); + } + + return parameters; + } + + private static List DeserializeParams(List parameters) + { + foreach (BackgroundTaskParameter param in parameters) + { + XmlSerializer deserializer = new XmlSerializer(Type.GetType(param.TypeName)); + StringReader sr = new StringReader(param.SerializerValue); + + param.Value = deserializer.Deserialize(sr); + } + + return parameters; + } + + private static string BuildParametersXml(string[] parameters) + { + XmlDocument xmlDoc = new XmlDocument(); + XmlElement nodeProps = xmlDoc.CreateElement("parameters"); + + if (parameters != null) + { + foreach (string parameter in parameters) + { + XmlElement nodeProp = xmlDoc.CreateElement("parameter"); + nodeProp.SetAttribute("value", parameter); + nodeProps.AppendChild(nodeProp); + } + } + return nodeProps.OuterXml; + } + + private static string[] ReBuildParametersXml(string parameters) + { + var textParameters = new List(); + + var xmlDoc = new XmlDocument(); + xmlDoc.LoadXml(parameters); + + if (xmlDoc != null) + { + textParameters.AddRange(from XmlNode xmlParameter in xmlDoc.SelectNodes("parameters/parameter") select xmlParameter.Attributes.GetNamedItem("value").Value); + } + + return textParameters.ToArray(); + } + } +} + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskEventHandler.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskEventHandler.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskEventHandler.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskEventHandler.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs new file mode 100644 index 00000000..971ad59a --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs @@ -0,0 +1,857 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Concurrent; +using System.IO; +using System.Threading; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Web; +using System.Web.Caching; +using System.Xml; +using System.Reflection; +using WebsitePanel.Providers.Common; +using System.Diagnostics; +using System.Linq; + +namespace WebsitePanel.EnterpriseServer +{ + public class TaskManager + { + private static Hashtable eventHandlers = null; + //using id instead of guid + private static ConcurrentDictionary _taskThreadsDictionary = new ConcurrentDictionary(); + + // purge timer, used for killing old tasks from the hash + static Timer purgeTimer = new Timer(new TimerCallback(PurgeCompletedTasks), + null, + 60000, // start from 1 minute + 60000); // invoke each minute + + public static Guid Guid + { + get + { + Guid? guid = (Guid?)Thread.GetData(Thread.GetNamedDataSlot("BackgroundTaskGuid")); + if (!guid.HasValue) + { + guid = Guid.NewGuid(); + Thread.SetData(Thread.GetNamedDataSlot("BackgroundTaskGuid"), guid.Value); + } + + return guid.Value; + } + } + + public static void StartTask(string source, string taskName) + { + StartTask(source, taskName, 0); + } + + public static void StartTask(string source, string taskName, int itemId) + { + StartTask(source, taskName, 0, new List()); + } + + public static void StartTask(string source, string taskName, int itemId, BackgroundTaskParameter parameter) + { + StartTask(source, taskName, null, itemId, parameter); + } + + public static void StartTask(string source, string taskName, int itemId, List parameters) + { + StartTask(source, taskName, null, itemId, parameters); + } + + public static void StartTask(string source, string taskName, object itemName) + { + StartTask(source, taskName, itemName, 0); + } + + public static void StartTask(string source, string taskName, object itemName, int itemId) + { + StartTask(source, taskName, itemName, itemId, new List()); + } + + public static void StartTask(string source, string taskName, object itemName, BackgroundTaskParameter parameter) + { + StartTask(source, taskName, itemName, 0, parameter); + } + + public static void StartTask(string source, string taskName, object itemName, List parameters) + { + StartTask(source, taskName, itemName, 0, parameters); + } + + public static void StartTask(string source, string taskName, object itemName, int itemId, BackgroundTaskParameter parameter) + { + StartTask(source, taskName, itemName, itemId, 0, parameter); + } + + public static void StartTask(string source, string taskName, object itemName, int itemId, List parameters) + { + StartTask(source, taskName, itemName, itemId, 0, 0, -1, parameters); + } + + public static void StartTask(string source, string taskName, object itemName, int itemId, int packageId, BackgroundTaskParameter parameter) + { + List parameters = new List(); + if (parameter != null) + { + parameters.Add(parameter); + } + + StartTask(source, taskName, itemName, itemId, 0, packageId, -1, parameters); + } + + public static void StartTask(string taskId, string source, string taskName, object itemName, int itemId) + { + StartTask(taskId, source, taskName, itemName, itemId, 0, 0, -1, new List()); + } + + public static void StartTask(string taskId, string source, string taskName, object itemName, int itemId, int packageId) + { + StartTask(taskId, source, taskName, itemName, itemId, 0, packageId, -1, new List()); + } + + public static void StartTask(string source, string taskName, object itemName, int itemId, + int scheduleId, int packageId, int maximumExecutionTime, List parameters) + { + StartTask(null, source, taskName, itemName, itemId, scheduleId, packageId, maximumExecutionTime, parameters); + } + + public static void StartTask(string taskId, string source, string taskName, object itemName, int itemId, + int scheduleId, int packageId, int maximumExecutionTime, List parameters) + { + if (String.IsNullOrEmpty(taskId)) + { + taskId = Guid.NewGuid().ToString("N"); + } + + var user = SecurityContext.User; + + int userId = user.OwnerId == 0 + ? user.UserId + : user.OwnerId; + + int effectiveUserId = user.UserId; + + String itemNameStr = itemName != null + ? itemName.ToString() + : String.Empty; + BackgroundTask task = new BackgroundTask(Guid, taskId, userId, effectiveUserId, source, taskName, itemNameStr, + itemId, scheduleId, packageId, maximumExecutionTime, parameters); + + + List tasks = TaskController.GetTasks(Guid); + + if (tasks.Count > 0) + { + BackgroundTask rootTask = tasks[0]; + + BackgroundTaskLogRecord log = new BackgroundTaskLogRecord( + rootTask.Id, + tasks.Count - 1, + true, + String.Format("{0}_{1}", source, taskName), + new string[] { itemNameStr }); + + + TaskController.AddLog(log); + } + + // call event handler + CallTaskEventHandler(task, false); + + AddTaskThread(TaskController.AddTask(task), Thread.CurrentThread); + } + + public static void WriteParameter(string parameterName, object parameterValue) + { + string val = parameterValue != null ? parameterValue.ToString() : ""; + WriteLogRecord(Guid, 0, parameterName + ": " + val, null, null); + } + + public static void Write(string text, params string[] textParameters) + { + // INFO + WriteLogRecord(Guid, 0, text, null, textParameters); + } + + public static void WriteWarning(string text, params string[] textParameters) + { + WriteWarning(Guid, text, textParameters); + } + + public static void WriteWarning(Guid guid, string text, params string[] textParameters) + { + // WARNING + WriteLogRecord(guid, 1, text, null, textParameters); + } + + public static Exception WriteError(Exception ex) + { + // ERROR + WriteLogRecord(Guid, 2, ex.Message, ex.StackTrace); + + return new Exception((TopTask != null) + ? String.Format("Error executing '{0}' task on '{1}' {2}", + TopTask.TaskName, TopTask.ItemName, TopTask.Source) + : String.Format("Error executing task"), ex); + } + + public static void WriteError(Exception ex, string text, params string[] textParameters) + { + // ERROR + string[] prms = new string[] { ex.Message }; + if (textParameters != null && textParameters.Length > 0) + { + prms = new string[textParameters.Length + 1]; + Array.Copy(textParameters, 0, prms, 1, textParameters.Length); + prms[0] = ex.Message; + } + + WriteLogRecord(Guid, 2, text, ex.Message + "\n" + ex.StackTrace, prms); + } + + public static void WriteError(string text, params string[] textParameters) + { + // ERROR + WriteLogRecord(Guid, 2, text, null, textParameters); + } + + private static void WriteLogRecord(Guid guid, int severity, string text, string stackTrace, params string[] textParameters) + { + List tasks = TaskController.GetTasks(guid); + + if (tasks.Count > 0) + { + BackgroundTask rootTask = tasks[0]; + + BackgroundTaskLogRecord log = new BackgroundTaskLogRecord( + rootTask.Id, + tasks.Count - 1, + false, + text, + stackTrace, + textParameters); + + TaskController.AddLog(log); + + if (severity > rootTask.Severity) + { + rootTask.Severity = severity; + + TaskController.UpdateTask(rootTask); + } + } + } + + public static void CompleteTask() + { + List tasks = TaskController.GetTasks(Guid); + + if (tasks.Count == 0) + return; + + BackgroundTask topTask = tasks[tasks.Count - 1]; + + // call event handler + CallTaskEventHandler(topTask, true); + + // finish task + topTask.FinishDate = DateTime.Now; + topTask.Completed = true; + + // write task execution result to database + if (tasks.Count == 1) // single task + { + // write to database + AddAuditLog(topTask); + } + + TaskController.UpdateTask(topTask); + StopProcess(topTask); + } + + public static void UpdateParam(String name, Object value) + { + BackgroundTask topTask = TopTask; + + if (topTask == null) + return; + + topTask.UpdateParamValue(name, value); + + TaskController.UpdateTaskWithParams(topTask); + } + + public static int ItemId + { + set + { + BackgroundTask topTask = TopTask; + + if (topTask == null) + return; + + topTask.ItemId = value; + + TaskController.UpdateTask(topTask); + } + } + + public static String ItemName + { + set + { + BackgroundTask topTask = TopTask; + + if (topTask == null) + return; + + topTask.ItemName = value; + + TaskController.UpdateTask(topTask); + } + } + + public static void UpdateParams(Hashtable parameters) + { + BackgroundTask topTask = TopTask; + + if (topTask == null) + return; + + foreach (string key in parameters.Keys) + { + topTask.UpdateParamValue(key, parameters[key]); + } + + TaskController.UpdateTaskWithParams(topTask); + } + + static string FormatExecutionLog(BackgroundTask task) + { + StringWriter sw = new StringWriter(); + XmlWriter writer = new XmlTextWriter(sw); + + writer.WriteStartElement("log"); + + // parameters + writer.WriteStartElement("parameters"); + foreach (BackgroundTaskParameter param in task.Params) + { + writer.WriteStartElement("parameter"); + writer.WriteAttributeString("name", param.Name); + writer.WriteString(param.Value.ToString()); + + writer.WriteEndElement(); + } + writer.WriteEndElement(); // parameters + + // records + writer.WriteStartElement("records"); + foreach (BackgroundTaskLogRecord record in task.Logs) + { + writer.WriteStartElement("record"); + writer.WriteAttributeString("severity", record.Severity.ToString()); + writer.WriteAttributeString("date", record.Date.ToString(System.Globalization.CultureInfo.InvariantCulture)); + writer.WriteAttributeString("ident", record.TextIdent.ToString()); + + // text + writer.WriteElementString("text", record.Text); + + // text parameters + if (record.TextParameters != null && record.TextParameters.Length > 0) + { + writer.WriteStartElement("textParameters"); + foreach (string prm in record.TextParameters) + { + writer.WriteElementString("value", prm); + } + writer.WriteEndElement(); // textParameters + } + + // stack trace + writer.WriteElementString("stackTrace", record.ExceptionStackTrace); + writer.WriteEndElement(); + } + writer.WriteEndElement(); + writer.WriteEndElement(); + + return sw.ToString(); + } + + static void PurgeCompletedTasks(object obj) + { + List tasks = TaskController.GetTasks(); + + foreach (BackgroundTask task in tasks) + { + if (task.MaximumExecutionTime != -1 + && ((TimeSpan)(DateTime.Now - task.StartDate)).TotalSeconds > task.MaximumExecutionTime) + { + task.Status = BackgroundTaskStatus.Stopping; + + TaskController.UpdateTask(task); + } + } + } + + public static int IndicatorMaximum + { + set + { + BackgroundTask topTask = TopTask; + + if (topTask == null) + { + return; + } + + topTask.IndicatorMaximum = value; + + TaskController.UpdateTask(topTask); + } + } + + public static int IndicatorCurrent + { + get + { + return TopTask.IndicatorCurrent; + } + set + { + BackgroundTask topTask = TopTask; + + if (topTask == null) + { + return; + } + + topTask.IndicatorCurrent = value; + + TaskController.UpdateTask(topTask); + } + } + + public static int MaximumExecutionTime + { + get + { + return TopTask.MaximumExecutionTime; + } + set + { + BackgroundTask topTask = TopTask; + + if (topTask == null) + { + return; + } + + topTask.MaximumExecutionTime = value; + + TaskController.UpdateTask(topTask); + } + } + + public static bool HasErrors(BackgroundTask task) + { + return task.Severity == 2; + } + + public static BackgroundTask TopTask + { + get { return TaskController.GetTopTask(Guid); } + } + + public static BackgroundTask GetTask(string taskId) + { + BackgroundTask task = TaskController.GetTask(taskId); + + if (task == null) + return null; + + return task; + } + + public static BackgroundTask GetTaskWithLogRecords(string taskId, DateTime startLogTime) + { + BackgroundTask task = GetTask(taskId); + + if (task == null) + return null; + + task.Logs = TaskController.GetLogs(task, startLogTime); + + return task; + } + + public static Dictionary GetScheduledTasks() + { + Dictionary scheduledTasks = new Dictionary(); + try + { + foreach (BackgroundTask task in TaskController.GetTasks()) + { + if (task.ScheduleId > 0 + && !task.Completed + && (task.Status == BackgroundTaskStatus.Run || task.Status == BackgroundTaskStatus.Starting) + && !scheduledTasks.ContainsKey(task.ScheduleId)) + scheduledTasks.Add(task.ScheduleId, task); + } + } + catch { } + + return scheduledTasks; + } + + public static void SetTaskNotifyOnComplete(string taskId) + { + BackgroundTask task = GetTask(taskId); + + if (task == null) + return; + + task.NotifyOnComplete = true; + } + + internal static void AddTaskThread(int taskId, Thread taskThread) + { + if (_taskThreadsDictionary.ContainsKey(taskId)) + _taskThreadsDictionary[taskId] = taskThread; + else + _taskThreadsDictionary.AddOrUpdate(taskId, taskThread, (key, oldValue) => taskThread); + } + + public static void StopTask(string taskId) + { + BackgroundTask task = GetTask(taskId); + + if (task == null) + { + return; + } + + task.Status = BackgroundTaskStatus.Abort; + + StopProcess(task); + + if (!HasErrors(task)) + { + task.Severity = 1; + } + + task.FinishDate = DateTime.Now; + + WriteWarning(task.Guid, "Task aborted by user"); + + AddAuditLog(task); + + TaskController.UpdateTask(task); + } + + private static void StopProcess(BackgroundTask task) + { + if (_taskThreadsDictionary.ContainsKey(task.Id)) + { + if (_taskThreadsDictionary[task.Id] != null) + if (_taskThreadsDictionary[task.Id].IsAlive) + { + if (!task.Completed) + _taskThreadsDictionary[task.Id].Abort(); + _taskThreadsDictionary[task.Id] = null; + } + Thread deleted; + _taskThreadsDictionary.TryRemove(task.Id, out deleted); + } + } + + private static void AddAuditLog(BackgroundTask task) + { + task.Logs = TaskController.GetLogs(task, task.StartDate); + + string executionLog = FormatExecutionLog(task); + + UserInfo user = UserController.GetUserInternally(task.EffectiveUserId); + string username = user != null ? user.Username : null; + + AuditLog.AddAuditLogRecord(task.TaskId, task.Severity, task.EffectiveUserId, + username, task.PackageId, task.ItemId, + task.ItemName, task.StartDate, task.FinishDate, task.Source, + task.TaskName, executionLog); + } + + public static List GetUserTasks(int userId) + { + List list = new List(); + + // try to get user first + UserInfo user = UserController.GetUser(userId); + if (user == null) + return list; // prohibited user + + // get user tasks + foreach (BackgroundTask task in TaskController.GetTasks(user.IsPeer ? user.OwnerId : user.UserId)) + { + if (task.UserId == userId && !task.Completed + && task.Status == BackgroundTaskStatus.Run) + { + list.Add(task); + } + } + return list; + } + + public static List GetUserCompletedTasks(int userId) + { + return new List(); + } + + public static int GetTasksNumber() + { + return TaskController.GetTasks().Count; + } + + #region Private Helpers + + private static void CallTaskEventHandler(BackgroundTask task, bool onComplete) + { + string[] taskHandlers = GetTaskEventHandlers(task.Source, task.TaskName); + if (taskHandlers != null) + { + foreach (string taskHandler in taskHandlers) + { + try + { + Type handlerType = Type.GetType(taskHandler); + TaskEventHandler handler = (TaskEventHandler)Activator.CreateInstance(handlerType); + + if (handler != null) + { + if (onComplete) + handler.OnComplete(); + else + handler.OnStart(); + } + } + catch (Exception ex) + { + WriteError(ex, "Error executing task event handler: {0}", ex.Message); + } + } + } + } + + private static string[] GetTaskEventHandlers(string source, string taskName) + { + // load configuration + string appRoot = AppDomain.CurrentDomain.BaseDirectory; + string path = Path.Combine(appRoot, "TaskEventHandlers.config"); + + if (eventHandlers == null) + { + eventHandlers = Hashtable.Synchronized(new Hashtable()); + + // load from XML + if (File.Exists(path)) + { + List xmlConfigs = new List(); + xmlConfigs.Add(new XmlDocument()); + xmlConfigs[0].Load(path); + // Lookup for external references first + XmlNodeList xmlReferences = xmlConfigs[0].SelectNodes("//reference"); + foreach (XmlElement xmlReference in xmlReferences) + { + string referencePath = Path.Combine(appRoot, xmlReference.GetAttribute("src")); + if (File.Exists(referencePath)) + { + XmlDocument xmldoc = new XmlDocument(); + xmldoc.Load(referencePath); + xmlConfigs.Add(xmldoc); + } + } + + // parse XML + foreach (XmlDocument xml in xmlConfigs) + { + XmlNodeList xmlHandlers = xml.SelectNodes("//handler"); + foreach (XmlNode xmlHandler in xmlHandlers) + { + string keyName = xmlHandler.ParentNode.Attributes["source"].Value + + xmlHandler.ParentNode.Attributes["name"].Value; + + // get handlers collection + List taskHandlers = (List)eventHandlers[keyName]; + if (taskHandlers == null) + { + taskHandlers = new List(); + eventHandlers[keyName] = taskHandlers; + } + + string handlerType = xmlHandler.Attributes["type"].Value; + taskHandlers.Add(handlerType); + } + } + } + } + + string fullTaskName = source + taskName; + List handlersList = (List)eventHandlers[fullTaskName]; + return handlersList == null ? null : handlersList.ToArray(); + } + + #endregion + + + #region ResultTasks + + public static void CompleteResultTask(ResultObject res, string errorCode, Exception ex, string errorMessage) + { + if (res != null) + { + res.IsSuccess = false; + + if (!string.IsNullOrEmpty(errorCode)) + res.ErrorCodes.Add(errorCode); + } + + if (ex != null) + TaskManager.WriteError(ex); + + if (!string.IsNullOrEmpty(errorMessage)) + TaskManager.WriteError(errorMessage); + + //LogRecord. + CompleteTask(); + + + } + + public static void CompleteResultTask(ResultObject res, string errorCode, Exception ex) + { + CompleteResultTask(res, errorCode, ex, null); + } + + public static void CompleteResultTask(ResultObject res, string errorCode) + { + CompleteResultTask(res, errorCode, null, null); + } + + public static void CompleteResultTask(ResultObject res) + { + CompleteResultTask(res, null); + } + + public static void CompleteResultTask() + { + CompleteResultTask(null); + } + + public static T StartResultTask(string source, string taskName) where T : ResultObject, new() + { + StartTask(source, taskName); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static T StartResultTask(string source, string taskName, object itemName) where T : ResultObject, new() + { + StartTask(source, taskName, itemName); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static T StartResultTask(string source, string taskName, object itemName, int packageId) where T : ResultObject, new() + { + StartTask(source, taskName, itemName, 0, packageId, null); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static T StartResultTask(string source, string taskName, int packageId) where T : ResultObject, new() + { + StartTask(source, taskName, null, 0, packageId, null); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static T StartResultTask(string source, string taskName, int itemId, BackgroundTaskParameter parameter) where T : ResultObject, new() + { + StartTask(source, taskName, itemId, parameter); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static T StartResultTask(string source, string taskName, int itemId, List parameters) where T : ResultObject, new() + { + StartTask(source, taskName, itemId, parameters); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static T StartResultTask(string source, string taskName, int itemId, object itemName, int packageId) where T : ResultObject, new() + { + StartTask(source, taskName, itemName, itemId, packageId, null); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static T StartResultTask(string source, string taskName, Guid taskId, object itemName, int packageId) where T : ResultObject, new() + { + StartTask(taskId.ToString(), source, taskName, itemName, 0, packageId); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static T StartResultTask(string source, string taskName, Guid taskId, int itemId, object itemName, int packageId) where T : ResultObject, new() + { + StartTask(taskId.ToString(), source, taskName, itemName, itemId, packageId); + T res = new T(); + res.IsSuccess = true; + return res; + } + + #endregion + + } +} + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Users/UserAsyncWorker.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserAsyncWorker.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Users/UserAsyncWorker.cs index d5a66597..33cac57d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserAsyncWorker.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Users/UserAsyncWorker.cs @@ -103,8 +103,7 @@ namespace WebsitePanel.EnterpriseServer UserInfo user = UserController.GetUserInternally(userId); // place log record - TaskManager.StartTask(taskId, "USER", "DELETE", user.Username); - TaskManager.ItemId = userId; + TaskManager.StartTask(taskId, "USER", "DELETE", user.Username, userId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Users/UserController.cs similarity index 94% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Users/UserController.cs index ff333445..4f51e249 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Users/UserController.cs @@ -448,8 +448,12 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_USER_ALREADY_EXISTS; } - TaskManager.ItemId = userId; - TaskManager.TaskParameters["SendLetter"] = sendLetter; + BackgroundTask topTask = TaskManager.TopTask; + + topTask.ItemId = userId; + topTask.UpdateParamValue("SendLetter", sendLetter); + + TaskController.UpdateTaskWithParams(topTask); return userId; } @@ -518,8 +522,7 @@ namespace WebsitePanel.EnterpriseServer try { // start task - TaskManager.StartTask(taskId, "USER", "UPDATE", user.Username); - TaskManager.ItemId = user.UserId; + TaskManager.StartTask(taskId, "USER", "UPDATE", user.Username, user.UserId); // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo); @@ -637,10 +640,9 @@ namespace WebsitePanel.EnterpriseServer UserInfo user = GetUserInternally(userId); // place log record - TaskManager.StartTask("USER", "CHANGE_PASSWORD", user.Username); - TaskManager.ItemId = user.UserId; + TaskManager.StartTask("USER", "CHANGE_PASSWORD", user.Username, user.UserId); - try + try { DataProvider.ChangeUserPassword(SecurityContext.User.UserId, userId, @@ -675,8 +677,7 @@ namespace WebsitePanel.EnterpriseServer UserInfo user = GetUserInternally(userId); // place log record - TaskManager.StartTask(taskId, "USER", "CHANGE_STATUS", user.Username); - TaskManager.ItemId = user.UserId; + TaskManager.StartTask(taskId, "USER", "CHANGE_STATUS", user.Username, user.UserId); // update user packages List packages = new List(); @@ -796,8 +797,7 @@ namespace WebsitePanel.EnterpriseServer UserInfo user = GetUserInternally(settings.UserId); // place log record - TaskManager.StartTask("USER", "UPDATE_SETTINGS", user.Username); - TaskManager.ItemId = user.UserId; + TaskManager.StartTask("USER", "UPDATE_SETTINGS", user.Username, user.UserId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/CreateServerAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization/CreateServerAsyncWorker.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/CreateServerAsyncWorker.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization/CreateServerAsyncWorker.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/VirtualizationServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization/VirtualizationServerController.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/VirtualizationServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization/VirtualizationServerController.cs index ee986ab1..b6dec6b3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/VirtualizationServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization/VirtualizationServerController.cs @@ -583,9 +583,7 @@ namespace WebsitePanel.EnterpriseServer string summaryLetterEmail) { // start task - TaskManager.StartTask(taskId, "VPS", "CREATE", vm.Name); - TaskManager.ItemId = vm.Id; - TaskManager.PackageId = vm.PackageId; + TaskManager.StartTask(taskId, "VPS", "CREATE", vm.Name, vm.Id, vm.PackageId); try { @@ -1647,12 +1645,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "UPDATE_HOSTNAME"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "UPDATE_HOSTNAME", vm.Id, vm.Name, vm.PackageId); try { @@ -1767,9 +1760,13 @@ namespace WebsitePanel.EnterpriseServer return res; } - TaskManager.ItemId = machine.Id; - TaskManager.ItemName = machine.Name; - TaskManager.PackageId = machine.PackageId; + BackgroundTask topTask = TaskManager.TopTask; + topTask.ItemId = machine.Id; + topTask.ItemName = machine.Name; + topTask.PackageId = machine.PackageId; + + TaskController.UpdateTask(topTask); + TaskManager.WriteParameter("New state", state); // load proxy @@ -1881,12 +1878,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "CHANGE_ADMIN_PASSWORD"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "CHANGE_ADMIN_PASSWORD", vm.Id, vm.Name, vm.PackageId); try { @@ -1983,12 +1975,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "UPDATE_CONFIGURATION"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "UPDATE_CONFIGURATION", vm.Id, vm.Name, vm.PackageId); try { @@ -2185,12 +2172,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "INSERT_DVD_DISK"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "INSERT_DVD_DISK", vm.Id, vm.Name, vm.PackageId); try { @@ -2246,12 +2228,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "EJECT_DVD_DISK"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "EJECT_DVD_DISK", vm.Id, vm.Name, vm.PackageId); try { @@ -2326,12 +2303,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "TAKE_SNAPSHOT"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "TAKE_SNAPSHOT", vm.Id, vm.Name, vm.PackageId); try { @@ -2401,12 +2373,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "APPLY_SNAPSHOT"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "APPLY_SNAPSHOT", vm.Id, vm.Name, vm.PackageId); try { @@ -2472,12 +2439,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "RENAME_SNAPSHOT"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "RENAME_SNAPSHOT", vm.Id, vm.Name, vm.PackageId); try { @@ -2526,12 +2488,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "DELETE_SNAPSHOT"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "DELETE_SNAPSHOT", vm.Id, vm.Name, vm.PackageId); try { @@ -2587,12 +2544,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "DELETE_SNAPSHOT_SUBTREE"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "DELETE_SNAPSHOT_SUBTREE", vm.Id, vm.Name, vm.PackageId); try { @@ -2776,12 +2728,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "ADD_EXTERNAL_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "ADD_EXTERNAL_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -2841,12 +2788,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "SET_PRIMARY_EXTERNAL_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "SET_PRIMARY_EXTERNAL_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -2893,12 +2835,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "DELETE_EXTERNAL_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "DELETE_EXTERNAL_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -3025,12 +2962,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "ADD_PRIVATE_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "ADD_PRIVATE_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -3148,12 +3080,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "SET_PRIMARY_PRIVATE_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "SET_PRIMARY_PRIVATE_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -3200,12 +3127,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "DELETE_PRIVATE_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "DELETE_PRIVATE_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -3368,12 +3290,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "DELETE"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "DELETE", vm.Id, vm.Name, vm.PackageId); try { @@ -3538,11 +3455,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "SEND_SUMMARY_LETTER"); - - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "SEND_SUMMARY_LETTER", vm.Id, vm.Name, vm.PackageId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/CreateAsyncVMfromVM.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/VirtualizationForPrivateCloud/CreateAsyncVMfromVM.cs similarity index 67% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/CreateAsyncVMfromVM.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/VirtualizationForPrivateCloud/CreateAsyncVMfromVM.cs index a31f69b1..b6c7b789 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/CreateAsyncVMfromVM.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/VirtualizationForPrivateCloud/CreateAsyncVMfromVM.cs @@ -1,4 +1,32 @@ -//using System; +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +//using System; //using System.Collections.Generic; //using System.Web; //using System.Threading; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/CreateServerAsyncWorkerForPrivateCloud.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/VirtualizationForPrivateCloud/CreateServerAsyncWorkerForPrivateCloud.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/CreateServerAsyncWorkerForPrivateCloud.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/VirtualizationForPrivateCloud/CreateServerAsyncWorkerForPrivateCloud.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs similarity index 95% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs index d1df6e1e..7ec47d27 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs @@ -276,9 +276,7 @@ namespace WebsitePanel.EnterpriseServer Guid taksId = Guid.NewGuid(); - res = TaskManager.StartResultTask("VPSForPC", "CREATE", taksId); - TaskManager.ItemName = vmName; - TaskManager.PackageId = packageId; + res = TaskManager.StartResultTask("VPSForPC", "CREATE", taksId, vmName, packageId); string templateName = vmTemplate.Name; @@ -344,9 +342,7 @@ namespace WebsitePanel.EnterpriseServer IntResult res = new IntResult(); //Create Task - res = TaskManager.StartResultTask("VPSForPC", "CREATE"); - TaskManager.PackageId = packageId; - TaskManager.ItemName = vmName; + res = TaskManager.StartResultTask("VPSForPC", "CREATE", vmName, packageId); // meta item VMInfo vmInfo = null; @@ -515,6 +511,7 @@ namespace WebsitePanel.EnterpriseServer { vmInfo.VmId = PackageController.AddPackageItem(vmInfo); vmInfo.Id = vmInfo.VmId; + TaskManager.ItemId = vmInfo.VmId; } catch (Exception ex) @@ -568,10 +565,7 @@ namespace WebsitePanel.EnterpriseServer { Guid taksId = Guid.NewGuid(); - ResultObject taskInfo = TaskManager.StartResultTask("VPSForPC", "CREATE", taksId); - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + ResultObject taskInfo = TaskManager.StartResultTask("VPSForPC", "CREATE", taksId, vm.Id, vm.Name, vm.PackageId); vm.CurrentTaskId = taksId.ToString("N"); @@ -1674,12 +1668,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "UPDATE_HOSTNAME"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "UPDATE_HOSTNAME", vm.Id, vm.Name, vm.PackageId); try { @@ -1814,9 +1803,13 @@ namespace WebsitePanel.EnterpriseServer return res; } - TaskManager.ItemId = machine.Id; - TaskManager.ItemName = machine.Name; - TaskManager.PackageId = machine.PackageId; + BackgroundTask topTask = TaskManager.TopTask; + topTask.ItemId = machine.Id; + topTask.ItemName = machine.Name; + topTask.PackageId = machine.PackageId; + + TaskController.UpdateTask(topTask); + TaskManager.WriteParameter("New state", state); // load proxy @@ -1927,12 +1920,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "CHANGE_ADMIN_PASSWORD"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "CHANGE_ADMIN_PASSWORD", vm.Id, vm.Name, vm.PackageId); try { @@ -2029,12 +2017,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "UPDATE_CONFIGURATION"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "UPDATE_CONFIGURATION", vm.Id, vm.Name, vm.PackageId); try { @@ -2222,12 +2205,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "INSERT_DVD_DISK"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "INSERT_DVD_DISK", vm.Id, vm.Name, vm.PackageId); try { @@ -2283,12 +2261,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "EJECT_DVD_DISK"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "EJECT_DVD_DISK", vm.Id, vm.Name, vm.PackageId); try { @@ -2363,12 +2336,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "TAKE_SNAPSHOT"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "TAKE_SNAPSHOT", vm.Id, vm.Name, vm.PackageId); try { @@ -2438,12 +2406,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "APPLY_SNAPSHOT"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "APPLY_SNAPSHOT", vm.Id, vm.Name, vm.PackageId); try { @@ -2514,12 +2477,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "RENAME_SNAPSHOT"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "RENAME_SNAPSHOT", vm.Id, vm.Name, vm.PackageId); try { @@ -2568,12 +2526,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "DELETE_SNAPSHOT"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "DELETE_SNAPSHOT", vm.Id, vm.Name, vm.PackageId); try { @@ -2629,12 +2582,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "DELETE_SNAPSHOT_SUBTREE"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "DELETE_SNAPSHOT_SUBTREE", vm.Id, vm.Name, vm.PackageId); try { @@ -2825,12 +2773,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "ADD_EXTERNAL_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "ADD_EXTERNAL_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -2890,12 +2833,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "SET_PRIMARY_EXTERNAL_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "SET_PRIMARY_EXTERNAL_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -2942,12 +2880,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "DELETE_EXTERNAL_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "DELETE_EXTERNAL_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -3062,12 +2995,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "ADD_PRIVATE_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "ADD_PRIVATE_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -3182,12 +3110,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "SET_PRIMARY_PRIVATE_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "SET_PRIMARY_PRIVATE_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -3234,12 +3157,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "DELETE_PRIVATE_IP"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "DELETE_PRIVATE_IP", vm.Id, vm.Name, vm.PackageId); try { @@ -3384,12 +3302,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPSForPC", "DELETE"); - - // log item info - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPSForPC", "DELETE", vm.Id, vm.Name, vm.PackageId); try { @@ -3547,11 +3460,7 @@ namespace WebsitePanel.EnterpriseServer #endregion // start task - res = TaskManager.StartResultTask("VPS", "SEND_SUMMARY_LETTER"); - - TaskManager.ItemId = vm.Id; - TaskManager.ItemName = vm.Name; - TaskManager.PackageId = vm.PackageId; + res = TaskManager.StartResultTask("VPS", "SEND_SUMMARY_LETTER", vm.Id, vm.Name, vm.PackageId); try { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebAppGallery/WebAppGalleryController.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebAppGallery/WebAppGalleryController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebServers/WebServerController.cs similarity index 96% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebServers/WebServerController.cs index c57912a5..07802a23 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebServers/WebServerController.cs @@ -496,8 +496,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "UPDATE", siteItem.Name); - TaskManager.ItemId = site.Id; + TaskManager.StartTask("WEB_SITE", "UPDATE", siteItem.Name, site.Id); try { @@ -559,8 +558,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("WEB_SITE", "CHANGE_STATE", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "CHANGE_STATE", siteItem.Name, siteItemId); + TaskManager.WriteParameter("New state", state); try @@ -582,7 +581,6 @@ namespace WebsitePanel.EnterpriseServer TaskManager.CompleteTask(); } } - // AppPool public static int ChangeAppPoolState(int siteItemId, AppPoolState state) { @@ -664,8 +662,6 @@ namespace WebsitePanel.EnterpriseServer return state; } - - public static int DeleteWebSite(int siteItemId, bool deleteWebsiteDirectory) { // check account @@ -678,8 +674,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "DELETE", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DELETE", siteItem.Name, siteItemId); // delete web site try @@ -793,8 +788,7 @@ namespace WebsitePanel.EnterpriseServer } // place log record - TaskManager.StartTask("WEB_SITE", "SWITCH_TO_DEDICATED_IP", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "SWITCH_TO_DEDICATED_IP", siteItem.Name, siteItemId); try { @@ -969,8 +963,7 @@ namespace WebsitePanel.EnterpriseServer // place log record - TaskManager.StartTask("WEB_SITE", "SWITCH_TO_SHARED_IP", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "SWITCH_TO_SHARED_IP", siteItem.Name, siteItemId); try { @@ -1306,8 +1299,8 @@ namespace WebsitePanel.EnterpriseServer IPAddressInfo ip = ServerController.GetIPAddress(siteItem.SiteIPAddressId); // place log record - TaskManager.StartTask("WEB_SITE", "ADD_POINTER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "ADD_POINTER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Domain pointer", domain.DomainName); TaskManager.WriteParameter("Host name", hostName); TaskManager.WriteParameter("updateWebSite", updateWebSite.ToString()); @@ -1508,8 +1501,8 @@ namespace WebsitePanel.EnterpriseServer IPAddressInfo ip = ServerController.GetIPAddress(siteItem.SiteIPAddressId); // place log record - TaskManager.StartTask("WEB_SITE", "DELETE_POINTER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DELETE_POINTER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Domain pointer", domain.DomainName); TaskManager.WriteParameter("updateWebSite", updateWebSite.ToString()); @@ -1670,8 +1663,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("WEB_SITE", "ADD_VDIR", vdirName); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "ADD_VDIR", vdirName, siteItemId); + TaskManager.WriteParameter("Web site", siteItem.Name); try @@ -1724,8 +1717,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "UPDATE_VDIR", vdir.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "UPDATE_VDIR", vdir.Name, siteItemId); + TaskManager.WriteParameter("Web site", siteItem.Name); try @@ -1763,8 +1756,8 @@ namespace WebsitePanel.EnterpriseServer // place log record // place log record - TaskManager.StartTask("WEB_SITE", "DELETE_VDIR", vdirName); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DELETE_VDIR", vdirName, siteItemId); + TaskManager.WriteParameter("Web site", siteItem.Name); try @@ -1804,8 +1797,8 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // place log record - TaskManager.StartTask("WEB_SITE", "INSTALL_FP", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "INSTALL_FP", siteItem.Name, siteItemId); + TaskManager.WriteParameter("FrontPage username", username); try @@ -1857,8 +1850,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "UNINSTALL_FP", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "UNINSTALL_FP", siteItem.Name, siteItemId); + TaskManager.WriteParameter("FrontPage username", siteItem.FrontPageAccount); try @@ -1898,8 +1891,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "CHANGE_FP_PASSWORD", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "CHANGE_FP_PASSWORD", siteItem.Name, siteItemId); + TaskManager.WriteParameter("FrontPage username", siteItem.FrontPageAccount); try @@ -1941,8 +1934,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "INSTALL_SECURED_FOLDERS", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "INSTALL_SECURED_FOLDERS", siteItem.Name, siteItemId); try { @@ -1975,8 +1967,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "UNINSTALL_SECURED_FOLDERS", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "UNINSTALL_SECURED_FOLDERS", siteItem.Name, siteItemId); try { @@ -2030,8 +2021,8 @@ namespace WebsitePanel.EnterpriseServer folder.Path = FilesController.CorrectRelativePath(folder.Path); // place log record - TaskManager.StartTask("WEB_SITE", "UPDATE_SECURED_FOLDER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "UPDATE_SECURED_FOLDER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Folder", folder.Path); try @@ -2060,8 +2051,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "DELETE_SECURED_FOLDER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DELETE_SECURED_FOLDER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Folder", folderPath); try @@ -2116,8 +2107,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "UPDATE_SECURED_USER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "UPDATE_SECURED_USER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("User", user.Name); try @@ -2146,8 +2137,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "DELETE_SECURED_USER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DELETE_SECURED_USER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("User", userName); try @@ -2202,8 +2193,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "UPDATE_SECURED_GROUP", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "UPDATE_SECURED_GROUP", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Group", group.Name); try @@ -2232,8 +2223,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "DELETE_SECURED_GROUP", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DELETE_SECURED_GROUP", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Group", groupName); try @@ -2397,9 +2388,12 @@ namespace WebsitePanel.EnterpriseServer dir.Name = sslDomain + "/" + vdirName; dir.PackageId = packageId; dir.ServiceId = serviceId; - TaskManager.ItemId = PackageController.AddPackageItem(dir); - return TaskManager.ItemId; + int itemId = PackageController.AddPackageItem(dir); + + TaskManager.ItemId = itemId; + + return itemId; } catch (Exception ex) { @@ -2423,8 +2417,7 @@ namespace WebsitePanel.EnterpriseServer return 0; // place log record - TaskManager.StartTask("WEB_SITE", "UPDATE_SSL_FOLDER", origVdir.Name); - TaskManager.ItemId = vdir.Id; + TaskManager.StartTask("WEB_SITE", "UPDATE_SSL_FOLDER", origVdir.Name, vdir.Id); try { @@ -2471,8 +2464,7 @@ namespace WebsitePanel.EnterpriseServer return 0; // place log record - TaskManager.StartTask("WEB_SITE", "DELETE_SSL_FOLDER", origVdir.Name); - TaskManager.ItemId = itemId; + TaskManager.StartTask("WEB_SITE", "DELETE_SSL_FOLDER", origVdir.Name, itemId); try { @@ -2975,8 +2967,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "ENABLE_HELICON_APE", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "ENABLE_HELICON_APE", siteItem.Name, siteItemId); try { @@ -3010,8 +3001,7 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "DISABLE_HELICON_APE", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DISABLE_HELICON_APE", siteItem.Name, siteItemId); try { @@ -3153,8 +3143,8 @@ namespace WebsitePanel.EnterpriseServer folder.Path = FilesController.CorrectRelativePath(folder.Path); // place log record - TaskManager.StartTask("WEB_SITE", "UPDATE_HELICON_APE_FOLDER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "UPDATE_HELICON_APE_FOLDER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Folder", folder.Path); try @@ -3209,8 +3199,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "DELETE_HELICON_APE_FOLDER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DELETE_HELICON_APE_FOLDER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Folder", folderPath); try @@ -3266,8 +3256,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "UPDATE_HELICON_APE_USER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "UPDATE_HELICON_APE_USER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("User", user.Name); try @@ -3296,8 +3286,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "DELETE_HELICON_APE_USER", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DELETE_HELICON_APE_USER", siteItem.Name, siteItemId); + TaskManager.WriteParameter("User", userName); try @@ -3352,8 +3342,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "UPDATE_HELICON_APE_GROUP", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "UPDATE_HELICON_APE_GROUP", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Group", group.Name); try @@ -3382,8 +3372,8 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND; // place log record - TaskManager.StartTask("WEB_SITE", "DELETE_HELICON_APE_GROUP", siteItem.Name); - TaskManager.ItemId = siteItemId; + TaskManager.StartTask("WEB_SITE", "DELETE_HELICON_APE_GROUP", siteItem.Name, siteItemId); + TaskManager.WriteParameter("Group", groupName); try @@ -4196,7 +4186,8 @@ Please ensure the space has been allocated {0} IP address as a dedicated one and IPAddressInfo ip = ServerController.GetIPAddress(item.SiteIPAddressId); if (ip != null) - item.SiteIPAddress = !String.IsNullOrEmpty(ip.InternalIP) ? ip.InternalIP : ip.ExternalIP; + //item.SiteIPAddress = !String.IsNullOrEmpty(ip.InternalIP) ? ip.InternalIP : ip.ExternalIP; + item.SiteIPAddress = ip.ExternalIP; certificate = server.installCertificate(certificate, item); if (certificate.SerialNumber == null) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebsitePanel.EnterpriseServer.Code.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebsitePanel.EnterpriseServer.Code.csproj new file mode 100644 index 00000000..dd145373 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebsitePanel.EnterpriseServer.Code.csproj @@ -0,0 +1,197 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {60E39314-659C-4FAD-AB91-D0D08E223578} + Library + Properties + WebsitePanel.EnterpriseServer.Code + WebsitePanel.EnterpriseServer.Code + v4.0 + 512 + + + true + full + false + ..\..\Bin\ + DEBUG;TRACE + prompt + 4 + AnyCPU + + + pdbonly + true + ..\..\Bin\ + TRACE + prompt + 4 + + + + ..\..\Lib\Ionic.Zip.Reduced.dll + + + ..\..\Lib\Microsoft.Web.Services3.dll + True + + + + + + + + + + + + + + + + False + ..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll + + + ..\..\Bin\WebsitePanel.Providers.Base.dll + + + ..\..\Bin\WebsitePanel.Server.Client.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {53D22D35-4013-415F-BA09-F67A0DBBB0C1} + WebsitePanel.Common.Utils + + + {387FA0EF-3927-45FF-8F8F-BCCD735540C6} + WebsitePanel.Templates + + + {7112B144-C5EE-43C2-9441-569D75D13CB9} + WebsitePanel.Whois + + + + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/UserCreationWizard.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Wizards/UserCreationWizard.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/UserCreationWizard.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Wizards/UserCreationWizard.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/WebApplicationsInstaller.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Wizards/WebApplicationsInstaller.cs similarity index 97% rename from WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/WebApplicationsInstaller.cs rename to WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Wizards/WebApplicationsInstaller.cs index 8ae1f11b..aa40c3dd 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/WebApplicationsInstaller.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Wizards/WebApplicationsInstaller.cs @@ -91,17 +91,21 @@ namespace WebsitePanel.EnterpriseServer public int InstallWebApplication(InstallationInfo inst) { // place log record - TaskManager.StartTask("APP_INSTALLER", "INSTALL_APPLICATION"); + TaskManager.StartTask("APP_INSTALLER", "INSTALL_APPLICATION", inst.PackageId); + TaskManager.WriteParameter("Virtual directory", inst.VirtualDir); TaskManager.WriteParameter("Database group", inst.DatabaseGroup); - TaskManager.ItemId = inst.PackageId; - + try { // get application info app = GetApplication(inst.PackageId, inst.ApplicationId); - TaskManager.ItemName = app.Name; + BackgroundTask topTask = TaskManager.TopTask; + + topTask.ItemName = app.Name; + + TaskController.UpdateTask(topTask); // check web site for existance WebSite webSite = WebServerController.GetWebSite(inst.WebSiteId); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.sln b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.sln index 36ca6285..5996e6ba 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.sln +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2010 +# Visual Studio 2012 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C57D3F9F-7BA0-4D38-A159-B6EDA5C19B13}" ProjectSection(SolutionItems) = preProject ..\..\LICENSE.txt = ..\..\LICENSE.txt @@ -10,6 +10,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.EnterpriseServer", "WebsitePanel.EnterpriseServer\WebsitePanel.EnterpriseServer.csproj", "{59C7623A-5181-48A5-880A-C9B82B48F589}" + ProjectSection(ProjectDependencies) = postProject + {C09CE910-F16B-48A1-B2CC-C99B8C1CF775} = {C09CE910-F16B-48A1-B2CC-C99B8C1CF775} + {60E39314-659C-4FAD-AB91-D0D08E223578} = {60E39314-659C-4FAD-AB91-D0D08E223578} + {4B344644-A570-477E-ADCC-F2B267D6C038} = {4B344644-A570-477E-ADCC-F2B267D6C038} + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.EnterpriseServer.Base", "WebsitePanel.EnterpriseServer.Base\WebsitePanel.EnterpriseServer.Base.csproj", "{C09CE910-F16B-48A1-B2CC-C99B8C1CF775}" EndProject @@ -21,12 +26,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Plugins.Author EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Plugins.PayPalPro", "WebsitePanel.Gateways.PayPal\WebsitePanel.Plugins.PayPalPro.csproj", "{D695D58C-99F7-409E-B3D8-C1B97A8E748A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Products.DomainName", "WebsitePanel.Products.DomainName\WebsitePanel.Products.DomainName.csproj", "{FFE9BFD3-AAB8-4703-AF8F-A41F0D878DB8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Products.HostingAddon", "WebsitePanel.Products.HostingAddon\WebsitePanel.Products.HostingAddon.csproj", "{338F816B-BEB4-4F18-9EA1-2EFD35DBA65B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Products.HostingPlan", "WebsitePanel.Products.HostingPlan\WebsitePanel.Products.HostingPlan.csproj", "{65FEDD1B-379C-413D-84D8-20E6C29C645D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Plugins.Enom", "WebsitePanel.Registrars.Enom\WebsitePanel.Plugins.Enom.csproj", "{39A6F585-4A27-4AAA-A43F-858FC32ADF98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Common.Utils", "WebsitePanel.Common.Utils\WebsitePanel.Common.Utils.csproj", "{53D22D35-4013-415F-BA09-F67A0DBBB0C1}" @@ -41,70 +40,173 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Plugins.PayPal EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Templates", "WebsitePanel.Templates\WebsitePanel.Templates.csproj", "{387FA0EF-3927-45FF-8F8F-BCCD735540C6}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.EnterpriseServer.Code", "WebsitePanel.EnterpriseServer.Code\WebsitePanel.EnterpriseServer.Code.csproj", "{60E39314-659C-4FAD-AB91-D0D08E223578}" + ProjectSection(ProjectDependencies) = postProject + {C09CE910-F16B-48A1-B2CC-C99B8C1CF775} = {C09CE910-F16B-48A1-B2CC-C99B8C1CF775} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.SchedulerService", "WebsitePanel.SchedulerService\WebsitePanel.SchedulerService.csproj", "{5B823520-0450-44A9-AC86-9658B41DFA7C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {59C7623A-5181-48A5-880A-C9B82B48F589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {59C7623A-5181-48A5-880A-C9B82B48F589}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59C7623A-5181-48A5-880A-C9B82B48F589}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {59C7623A-5181-48A5-880A-C9B82B48F589}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {59C7623A-5181-48A5-880A-C9B82B48F589}.Debug|x86.ActiveCfg = Debug|Any CPU {59C7623A-5181-48A5-880A-C9B82B48F589}.Release|Any CPU.ActiveCfg = Release|Any CPU {59C7623A-5181-48A5-880A-C9B82B48F589}.Release|Any CPU.Build.0 = Release|Any CPU + {59C7623A-5181-48A5-880A-C9B82B48F589}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {59C7623A-5181-48A5-880A-C9B82B48F589}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {59C7623A-5181-48A5-880A-C9B82B48F589}.Release|x86.ActiveCfg = Release|Any CPU {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Debug|x86.ActiveCfg = Debug|Any CPU {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Release|Any CPU.ActiveCfg = Release|Any CPU {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Release|Any CPU.Build.0 = Release|Any CPU + {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {C09CE910-F16B-48A1-B2CC-C99B8C1CF775}.Release|x86.ActiveCfg = Release|Any CPU {4B344644-A570-477E-ADCC-F2B267D6C038}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4B344644-A570-477E-ADCC-F2B267D6C038}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B344644-A570-477E-ADCC-F2B267D6C038}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4B344644-A570-477E-ADCC-F2B267D6C038}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4B344644-A570-477E-ADCC-F2B267D6C038}.Debug|x86.ActiveCfg = Debug|Any CPU {4B344644-A570-477E-ADCC-F2B267D6C038}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B344644-A570-477E-ADCC-F2B267D6C038}.Release|Any CPU.Build.0 = Release|Any CPU + {4B344644-A570-477E-ADCC-F2B267D6C038}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4B344644-A570-477E-ADCC-F2B267D6C038}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4B344644-A570-477E-ADCC-F2B267D6C038}.Release|x86.ActiveCfg = Release|Any CPU {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Debug|x86.ActiveCfg = Debug|Any CPU {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Release|Any CPU.ActiveCfg = Release|Any CPU {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Release|Any CPU.Build.0 = Release|Any CPU + {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {1222B073-8757-4163-9D1A-1A1EAE697DD3}.Release|x86.ActiveCfg = Release|Any CPU {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Debug|x86.ActiveCfg = Debug|Any CPU {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Release|Any CPU.ActiveCfg = Release|Any CPU {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Release|Any CPU.Build.0 = Release|Any CPU + {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DB852295-2A86-44AB-8CF8-A73FEAF15368}.Release|x86.ActiveCfg = Release|Any CPU {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Debug|x86.ActiveCfg = Debug|Any CPU {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Release|Any CPU.ActiveCfg = Release|Any CPU {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Release|Any CPU.Build.0 = Release|Any CPU - {FFE9BFD3-AAB8-4703-AF8F-A41F0D878DB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FFE9BFD3-AAB8-4703-AF8F-A41F0D878DB8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {338F816B-BEB4-4F18-9EA1-2EFD35DBA65B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {338F816B-BEB4-4F18-9EA1-2EFD35DBA65B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65FEDD1B-379C-413D-84D8-20E6C29C645D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65FEDD1B-379C-413D-84D8-20E6C29C645D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {D695D58C-99F7-409E-B3D8-C1B97A8E748A}.Release|x86.ActiveCfg = Release|Any CPU {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Debug|x86.ActiveCfg = Debug|Any CPU {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Release|Any CPU.ActiveCfg = Release|Any CPU {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Release|Any CPU.Build.0 = Release|Any CPU + {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Release|x86.ActiveCfg = Release|Any CPU {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Debug|x86.ActiveCfg = Debug|Any CPU {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Release|Any CPU.ActiveCfg = Release|Any CPU {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Release|Any CPU.Build.0 = Release|Any CPU + {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {53D22D35-4013-415F-BA09-F67A0DBBB0C1}.Release|x86.ActiveCfg = Release|Any CPU {01D3213A-B615-47D2-99F0-005CF05CE920}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {01D3213A-B615-47D2-99F0-005CF05CE920}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01D3213A-B615-47D2-99F0-005CF05CE920}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {01D3213A-B615-47D2-99F0-005CF05CE920}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {01D3213A-B615-47D2-99F0-005CF05CE920}.Debug|x86.ActiveCfg = Debug|Any CPU {01D3213A-B615-47D2-99F0-005CF05CE920}.Release|Any CPU.ActiveCfg = Release|Any CPU {01D3213A-B615-47D2-99F0-005CF05CE920}.Release|Any CPU.Build.0 = Release|Any CPU + {01D3213A-B615-47D2-99F0-005CF05CE920}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {01D3213A-B615-47D2-99F0-005CF05CE920}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {01D3213A-B615-47D2-99F0-005CF05CE920}.Release|x86.ActiveCfg = Release|Any CPU {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Debug|x86.ActiveCfg = Debug|Any CPU {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Release|Any CPU.ActiveCfg = Release|Any CPU {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Release|Any CPU.Build.0 = Release|Any CPU + {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {1FED69FB-68EB-46A8-9B9C-B08760AD4514}.Release|x86.ActiveCfg = Release|Any CPU {7112B144-C5EE-43C2-9441-569D75D13CB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7112B144-C5EE-43C2-9441-569D75D13CB9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7112B144-C5EE-43C2-9441-569D75D13CB9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7112B144-C5EE-43C2-9441-569D75D13CB9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7112B144-C5EE-43C2-9441-569D75D13CB9}.Debug|x86.ActiveCfg = Debug|Any CPU {7112B144-C5EE-43C2-9441-569D75D13CB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {7112B144-C5EE-43C2-9441-569D75D13CB9}.Release|Any CPU.Build.0 = Release|Any CPU + {7112B144-C5EE-43C2-9441-569D75D13CB9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {7112B144-C5EE-43C2-9441-569D75D13CB9}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7112B144-C5EE-43C2-9441-569D75D13CB9}.Release|x86.ActiveCfg = Release|Any CPU {9247B024-F931-4506-8ECD-27E862C0EA1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9247B024-F931-4506-8ECD-27E862C0EA1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9247B024-F931-4506-8ECD-27E862C0EA1D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9247B024-F931-4506-8ECD-27E862C0EA1D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {9247B024-F931-4506-8ECD-27E862C0EA1D}.Debug|x86.ActiveCfg = Debug|Any CPU {9247B024-F931-4506-8ECD-27E862C0EA1D}.Release|Any CPU.ActiveCfg = Release|Any CPU {9247B024-F931-4506-8ECD-27E862C0EA1D}.Release|Any CPU.Build.0 = Release|Any CPU + {9247B024-F931-4506-8ECD-27E862C0EA1D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {9247B024-F931-4506-8ECD-27E862C0EA1D}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {9247B024-F931-4506-8ECD-27E862C0EA1D}.Release|x86.ActiveCfg = Release|Any CPU {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Debug|x86.ActiveCfg = Debug|Any CPU {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Release|Any CPU.ActiveCfg = Release|Any CPU {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Release|Any CPU.Build.0 = Release|Any CPU + {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {387FA0EF-3927-45FF-8F8F-BCCD735540C6}.Release|x86.ActiveCfg = Release|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Debug|x86.ActiveCfg = Debug|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Release|Any CPU.Build.0 = Release|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {60E39314-659C-4FAD-AB91-D0D08E223578}.Release|x86.ActiveCfg = Release|Any CPU + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Debug|Any CPU.ActiveCfg = Debug|x86 + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Debug|x86.ActiveCfg = Debug|x86 + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Debug|x86.Build.0 = Debug|x86 + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Release|Any CPU.ActiveCfg = Release|x86 + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Release|x86.ActiveCfg = Release|x86 + {5B823520-0450-44A9-AC86-9658B41DFA7C}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ObjectUtils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ObjectUtils.cs deleted file mode 100644 index 1a705eac..00000000 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ObjectUtils.cs +++ /dev/null @@ -1,659 +0,0 @@ -// Copyright (c) 2012, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Reflection; -using System.Data; -using System.Collections; -using System.Collections.Generic; - -using WebsitePanel.Providers; - -namespace WebsitePanel.EnterpriseServer -{ - /// - /// Summary description for ObjectUtils. - /// - public class ObjectUtils - { - public static DT ConvertObject(ST so) - { - Dictionary sProps = GetTypePropertiesHash(typeof(ST)); - Dictionary dProps = GetTypePropertiesHash(typeof(DT)); - - DT dobj = (DT)Activator.CreateInstance(typeof(DT)); - - // copy properties - foreach (string propName in sProps.Keys) - { - if (dProps.ContainsKey(propName) && sProps[propName].Name != "Item") - { - if (sProps[propName].CanRead) - { - object val = sProps[propName].GetValue(so, null); - if (dProps[propName] != null) - { - if (val != null && dProps[propName].CanWrite) - { - dProps[propName].SetValue(dobj, val, null); - } - } - } - } - } - return dobj; - } - - private static Hashtable typeProperties = new Hashtable(); - - public static Hashtable GetObjectProperties(object obj, bool persistentOnly) - { - Hashtable hash = new Hashtable(); - - Type type = obj.GetType(); - PropertyInfo[] props = type.GetProperties(BindingFlags.Instance - | BindingFlags.Public); - foreach (PropertyInfo prop in props) - { - // check for persistent attribute - object[] attrs = prop.GetCustomAttributes(typeof(PersistentAttribute), false); - if (!persistentOnly || (persistentOnly && attrs.Length > 0)) - { - object val = prop.GetValue(obj, null); - string s = ""; - if (val != null) - { - if (prop.PropertyType == typeof(string[])) - s = String.Join(";", (string[])val); - else if (prop.PropertyType == typeof(int[])) - { - int[] ivals = (int[])val; - string[] svals = new string[ivals.Length]; - for (int i = 0; i < svals.Length; i++) - svals[i] = ivals[i].ToString(); - s = String.Join(";", svals); - } - else - s = val.ToString(); - } - - // add property to hash - hash.Add(prop.Name, s); - } - } - - return hash; - } - - public static void FillCollectionFromDataSet(List list, DataSet ds) - { - if(ds.Tables.Count == 0) - return; - - FillCollectionFromDataView(list, ds.Tables[0].DefaultView); - } - - public static void FillCollectionFromDataView(List list, DataView dv) - { - Type type = typeof(T); - - PropertyInfo[] props = GetTypeProperties(type); - - foreach(DataRowView dr in dv) - { - // create an instance - T obj = (T)Activator.CreateInstance(type); - list.Add(obj); - - // fill properties - for(int i = 0; i < props.Length; i++) - { - string propName = props[i].Name; - if(dv.Table.Columns[propName] == null) - continue; - - object propVal = dr[propName]; - if(propVal == DBNull.Value) - props[i].SetValue(obj, GetNull(props[i].PropertyType), null); - else - { - try - { - // try implicit type conversion - props[i].SetValue(obj, propVal, null); - } - catch - { - // convert to string and then set property value - try - { - string strVal = propVal.ToString(); - props[i].SetValue(obj, Cast(strVal, props[i].PropertyType), null); - } - catch - { - // skip property init - } - } - } - } // for properties - } // for rows - } - - public static List CreateListFromDataReader(IDataReader reader) - { - List list = new List(); - FillCollectionFromDataReader(list, reader); - return list; - } - - public static List CreateListFromDataSet(DataSet ds) - { - List list = new List(); - FillCollectionFromDataSet(list, ds); - return list; - } - - public static void FillCollectionFromDataReader(List list, IDataReader reader) - { - Type type = typeof(T); - - try - { - // get type properties - PropertyInfo[] props = GetTypeProperties(type); - - // iterate through reader - while(reader.Read()) - { - T obj = (T)Activator.CreateInstance(type); - list.Add(obj); - - // set properties - for(int i = 0; i < props.Length; i++) - { - string propName = props[i].Name; - - try - { - - object propVal = reader[propName]; - if(propVal == DBNull.Value) - props[i].SetValue(obj, GetNull(props[i].PropertyType), null); - else - { - try - { - // try implicit type conversion - props[i].SetValue(obj, propVal, null); - } - catch - { - // convert to string and then set property value - try - { - string strVal = propVal.ToString(); - props[i].SetValue(obj, Cast(strVal, props[i].PropertyType), null); - } - catch - { - // skip property init - } - } - } - } - catch{} // just skip - } // for properties - } - } - finally - { - reader.Close(); - } - } - - public static T FillObjectFromDataView(DataView dv) - { - Type type = typeof(T); - T obj = default(T); - - // get type properties - PropertyInfo[] props = GetTypeProperties(type); - - // iterate through reader - foreach(DataRowView dr in dv) - { - obj = (T)Activator.CreateInstance(type); - - // set properties - for(int i = 0; i < props.Length; i++) - { - string propName = props[i].Name; - - try - { - // verify if there is such a column - if (!dr.Row.Table.Columns.Contains(propName.ToLower())) - { - // if not, we move to another property - // because this one we cannot set - continue; - } - - object propVal = dr[propName]; - if(propVal == DBNull.Value) - props[i].SetValue(obj, GetNull(props[i].PropertyType), null); - else - { - try - { - string strVal = propVal.ToString(); - - //convert to DateTime - if (props[i].PropertyType.UnderlyingSystemType.FullName == typeof(DateTime).FullName) - { - DateTime date = DateTime.MinValue; - if (DateTime.TryParse(strVal, out date)) - { - props[i].SetValue(obj, date, null); - } - } - else - { - //Convert generic - props[i].SetValue(obj, Cast(strVal, props[i].PropertyType), null); - } - } - catch - { - // skip property init - } - } - } - catch{} // just skip - } // for properties - } - - return obj; - } - - public static T FillObjectFromDataReader(IDataReader reader) - { - Type type = typeof(T); - - T obj = default(T); - - try - { - // get type properties - PropertyInfo[] props = GetTypeProperties(type); - - // iterate through reader - while(reader.Read()) - { - obj = (T)Activator.CreateInstance(type); - - // set properties - for(int i = 0; i < props.Length; i++) - { - string propName = props[i].Name; - - try - { - if (!IsColumnExists(propName, reader.GetSchemaTable())) - { - continue; - } - object propVal = reader[propName]; - - if(propVal == DBNull.Value) - props[i].SetValue(obj, GetNull(props[i].PropertyType), null); - else - { - try - { - //try string first - if (props[i].PropertyType.UnderlyingSystemType.FullName == typeof(String).FullName) - { - props[i].SetValue(obj, propVal.ToString(), null); - } - else - { - // then, try implicit type conversion - props[i].SetValue(obj, propVal, null); - } - } - catch - { - // convert to string and then set property value - try - { - string strVal = propVal.ToString(); - props[i].SetValue(obj, Cast(strVal, props[i].PropertyType), null); - } - catch - { - // skip property init - } - } - } - } - catch{} // just skip - } // for properties - } - } - finally - { - reader.Close(); - } - - return obj; - } - - private static Hashtable propertiesCache = new Hashtable(); - - public static object CreateObjectFromDataview(Type type, DataView dv, - string nameColumn, string valueColumn, bool persistentOnly) - { - // create hash of properties from datareader - Hashtable propValues = new Hashtable(); - foreach (DataRowView dr in dv) - { - if (propValues[dr[nameColumn]] == null && !propValues.ContainsKey(dr[nameColumn])) - propValues.Add(dr[nameColumn], dr[valueColumn]); - } - - return CreateObjectFromHash(type, propValues, persistentOnly); - } - - public static object CreateObjectFromDataReader(Type type, IDataReader reader, - string nameColumn, string valueColumn, bool persistentOnly) - { - // create hash of properties from datareader - Hashtable propValues = new Hashtable(); - while (reader.Read()) - { - if (propValues[reader[nameColumn]] == null) - propValues.Add(reader[nameColumn], reader[valueColumn]); - } - reader.Close(); - - return CreateObjectFromHash(type, propValues, persistentOnly); - } - - public static object CreateObjectFromHash(Type type, Hashtable propValues, bool persistentOnly) - { - // create object - object obj = Activator.CreateInstance(type); - - CreateObjectFromHash(obj, propValues, persistentOnly); - - return obj; - } - - public static void CopyPersistentPropertiesFromSource(T source, T target) - where T : ServiceProviderItem - { - // - var typeSource = source.GetType(); - var typeTarget = target.GetType(); - // get all property infos - Hashtable props = null; - if (propertiesCache[typeSource.Name] != null) - { - // load properties from cache - props = (Hashtable)propertiesCache[typeSource.Name]; - } - else - { - // create properties cache - props = new Hashtable(); - // - PropertyInfo[] objProps = typeSource.GetProperties(BindingFlags.Instance - //| BindingFlags.DeclaredOnly - | BindingFlags.Public); - foreach (PropertyInfo prop in objProps) - { - // check for persistent attribute - object[] attrs = prop.GetCustomAttributes(typeof(PersistentAttribute), false); - // Persistent only - if (attrs.Length > 0) - { - // add property to hash - props.Add(prop.Name, prop); - } - } - // add to cache - propertiesCache.Add(typeSource.Name, props); - } - - // Copy the data - foreach (PropertyInfo propertyInfo in props.Values) - { - propertyInfo.SetValue(target, propertyInfo.GetValue(source, null), null); - } - } - - public static void CreateObjectFromHash(object obj, Hashtable propValues, bool persistentOnly) - { - Type type = obj.GetType(); - - // get all property infos - Hashtable props = null; - if (propertiesCache[type.Name] != null) - { - // load properties from cache - props = (Hashtable)propertiesCache[type.Name]; - } - else - { - // create properties cache - props = new Hashtable(); - PropertyInfo[] objProps = type.GetProperties(BindingFlags.Instance - //| BindingFlags.DeclaredOnly - | BindingFlags.Public); - foreach (PropertyInfo prop in objProps) - { - // check for persistent attribute - object[] attrs = prop.GetCustomAttributes(typeof(PersistentAttribute), false); - if (!persistentOnly || (persistentOnly && attrs.Length > 0) && !props.ContainsKey(prop.Name)) - { - // add property to hash - props.Add(prop.Name, prop); - } - } - - // add to cache - propertiesCache.Add(type.Name, props); - } - - // fill properties - foreach (string propName in propValues.Keys) - { - // try to locate specified property - if (props[propName] != null) - { - // set property - // we support: - // String - // Int32 - // Boolean - // Float - PropertyInfo prop = (PropertyInfo)props[propName]; - string val = propValues[propName].ToString(); - if (prop.PropertyType == typeof(String)) - prop.SetValue(obj, val, null); - else if (prop.PropertyType == typeof(Int32)) - prop.SetValue(obj, Int32.Parse(val), null); - else - if (prop.PropertyType == typeof(long)) - prop.SetValue(obj, long.Parse(val), null); - else - if (prop.PropertyType == typeof(Boolean)) - prop.SetValue(obj, Boolean.Parse(val), null); - else if (prop.PropertyType == typeof(Single)) - prop.SetValue(obj, Single.Parse(val), null); - else if (prop.PropertyType.IsEnum) - prop.SetValue(obj, Enum.Parse(prop.PropertyType, val, true), null); - else - if (prop.PropertyType == typeof(Guid)) - prop.SetValue(obj, new Guid(val), null); - else - if (prop.PropertyType == typeof(string[])) - { - if (val == "") - prop.SetValue(obj, new string[0], null); - else - prop.SetValue(obj, val.Split(';'), null); - } - else if (prop.PropertyType == typeof(int[])) - { - string[] svals = val.Split(';'); - int[] ivals = new int[svals.Length]; - - for (int i = 0; i < svals.Length; i++) - ivals[i] = Int32.Parse(svals[i]); - - if (val == "") - ivals = new int[0]; - - prop.SetValue(obj, ivals, null); - } - } - } - } - - private static Dictionary GetTypePropertiesHash(Type type) - { - Dictionary hash = new Dictionary(); - PropertyInfo[] props = GetTypeProperties(type); - foreach (PropertyInfo prop in props) - hash.Add(prop.Name, prop); - return hash; - } - - private static PropertyInfo[] GetTypeProperties(Type type) - { - string typeName = type.AssemblyQualifiedName; - if(typeProperties[typeName] != null) - return (PropertyInfo[])typeProperties[typeName]; - - PropertyInfo[] props = type.GetProperties(BindingFlags.Instance | BindingFlags.Public); - typeProperties[typeName] = props; - return props; - } - - public static object GetNull(Type type) - { - if(type == typeof(string)) - return null; - if(type == typeof(Int32)) - return 0; - if(type == typeof(Int64)) - return 0; - if(type == typeof(Boolean)) - return false; - if(type == typeof(Decimal)) - return 0M; - else - return null; - } - - public static object Cast(string val, Type type) - { - if(type == typeof(string)) - return val; - if(type == typeof(Int32)) - return Int32.Parse(val); - if(type == typeof(Int64)) - return Int64.Parse(val); - if(type == typeof(Boolean)) - return Boolean.Parse(val); - if(type == typeof(Decimal)) - return Decimal.Parse(val); - if(type == typeof(string[]) && val != null) - { - return val.Split(';'); - } - if (type.IsEnum) - return Enum.Parse(type, val, true); - - if (type == typeof(int[]) && val != null) - { - string[] sarr = val.Split(';'); - int[] iarr = new int[sarr.Length]; - for (int i = 0; i < sarr.Length; i++) - iarr[i] = Int32.Parse(sarr[i]); - return iarr; - } - else - return val; - } - - public static string GetTypeFullName(Type type) - { - return type.FullName + ", " + type.Assembly.GetName().Name; - } - - - #region Helper Functions - - /// - /// This function is used to determine whether IDataReader contains a Column. - /// - /// Name of the column. - /// The schema that decribes result-set contains. - /// True, when required column exists in the . Otherwise, false. - /// - /// The followin example shows how to look for the "Role" column in the . - /// - /// IDataReader reader = .... - /// if (!IsColumnExists("Role", reader.GetSchemaTable()) - /// { - /// continue; - /// } - /// - /// object roleValue = reader["Role"]; - /// - /// - static bool IsColumnExists(string columnName, DataTable schemaTable) - { - foreach (DataRow row in schemaTable.Rows) - { - if (String.Compare(row[0].ToString(), columnName, StringComparison.OrdinalIgnoreCase) == 0) - { - return true; - } - } - - return false; - } - - #endregion - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs deleted file mode 100644 index f69cb478..00000000 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs +++ /dev/null @@ -1,649 +0,0 @@ -// Copyright (c) 2012, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.IO; -using System.Threading; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Web; -using System.Web.Caching; -using System.Xml; -using System.Reflection; -using WebsitePanel.Providers.Common; - -namespace WebsitePanel.EnterpriseServer -{ - public class TaskManager - { - private static Hashtable tasks = Hashtable.Synchronized(new Hashtable()); - private static Hashtable eventHandlers = null; - - // purge timer, used for killing old tasks from the hash - static Timer purgeTimer = new Timer(new TimerCallback(PurgeCompletedTasks), - null, - 60000, // start from 1 minute - 60000); // invoke each minute - - private static BackgroundTask RootTask - { - get { return TasksStack.Count > 0 ? TasksStack[0] : null; } - } - - private static BackgroundTask TopTask - { - get { return TasksStack.Count > 0 ? TasksStack[TasksStack.Count - 1] : null; } - } - - private static List TasksStack - { - get - { - List stack = (List)Thread.GetData(Thread.GetNamedDataSlot("BackgroundTasksStack")); - if (stack == null) - { - stack = new List(); - Thread.SetData(Thread.GetNamedDataSlot("BackgroundTasksStack"), stack); - } - return stack; - } - } - - public static void StartTask(string source, string taskName) - { - StartTask(null, source, taskName, null); - } - - public static void StartTask(string source, string taskName, object itemName) - { - StartTask(null, source, taskName, itemName); - } - - public static void StartTask(string taskId, string source, string taskName, object itemName) - { - // create new task object - BackgroundTask task = new BackgroundTask(); - task.TaskId = String.IsNullOrEmpty(taskId) ? Guid.NewGuid().ToString("N") : taskId; - task.UserId = SecurityContext.User.UserId; - task.EffectiveUserId = SecurityContext.User.IsPeer ? SecurityContext.User.OwnerId : task.UserId; - task.StartDate = DateTime.Now; - task.Source = source; - task.TaskName = taskName; - task.ItemName = itemName != null ? itemName.ToString() : ""; - task.Severity = 0; //info - task.TaskThread = Thread.CurrentThread; - - // new "parent" task? - if (TasksStack.Count == 0) - { - // register task globally - tasks[task.TaskId] = task; - } - else - { - // child task - // add log record to the root task - BackgroundTaskLogRecord logRecord = new BackgroundTaskLogRecord(); - logRecord.InnerTaskStart = true; - logRecord.Text = source + "_" + taskName; - logRecord.TextParameters = new string[] { itemName != null ? itemName.ToString() : "" }; - logRecord.TextIdent = TasksStack.Count - 1; - RootTask.LogRecords.Add(logRecord); - - // change log records destination - // for nested task - task.LogRecords = RootTask.LogRecords; - } - - // call event handler - CallTaskEventHandler(task, false); - - // push task on the stack - TasksStack.Add(task); - } - - public static void WriteParameter(string parameterName, object parameterValue) - { - string val = parameterValue != null ? parameterValue.ToString() : ""; - WriteLogRecord(0, parameterName + ": " + val, null, null); - } - - public static void Write(string text, params string[] textParameters) - { - // INFO - WriteLogRecord(0, text, null, textParameters); - } - - public static void WriteWarning(string text, params string[] textParameters) - { - // WARNING - WriteLogRecord(1, text, null, textParameters); - } - - public static Exception WriteError(Exception ex) - { - // ERROR - WriteLogRecord(2, ex.Message, ex.StackTrace); - return new Exception((TopTask != null) ? String.Format("Error executing '{0}' task on '{1}' {2}", - TopTask.TaskName, TopTask.ItemName, TopTask.Source) : String.Format("Error executing task"), ex); - } - - public static void WriteError(Exception ex, string text, params string[] textParameters) - { - // ERROR - string[] prms = new string[] { ex.Message }; - if (textParameters != null && textParameters.Length > 0) - { - prms = new string[textParameters.Length + 1]; - Array.Copy(textParameters, 0, prms, 1, textParameters.Length); - prms[0] = ex.Message; - } - - WriteLogRecord(2, text, ex.Message + "\n" + ex.StackTrace, prms); - } - - public static void WriteError(string text, params string[] textParameters) - { - // ERROR - WriteLogRecord(2, text, null, textParameters); - } - - private static void WriteLogRecord(int severity, string text, string stackTrace, params string[] textParameters) - { - BackgroundTaskLogRecord logRecord = new BackgroundTaskLogRecord(); - logRecord.Severity = severity; - logRecord.Text = text; - logRecord.TextParameters = textParameters; - logRecord.TextIdent = TasksStack.Count - 1; - logRecord.ExceptionStackTrace = stackTrace; - if (RootTask != null) - { - RootTask.LogRecords.Add(logRecord); - RootTask.LastLogRecord = logRecord; - - // change entire task severity - if (severity > RootTask.Severity) - RootTask.Severity = severity; - } - } - - public static void CompleteTask() - { - if (TasksStack.Count == 0) - return; - - // call event handler - CallTaskEventHandler(TopTask, true); - - // finish task - TopTask.FinishDate = DateTime.Now; - TopTask.Completed = true; - - // write task execution result to database - if (TasksStack.Count == 1) // single task - { - // unregister task globally - // tasks.Remove(TopTask.TaskId); - - // write to database - string itemName = TopTask.ItemName != null ? TopTask.ItemName.ToString() : null; - string executionLog = FormatExecutionLog(TopTask); - UserInfo user = UserController.GetUserInternally(TopTask.UserId); - string username = user != null ? user.Username : null; - - AuditLog.AddAuditLogRecord(TopTask.TaskId, TopTask.Severity, TopTask.UserId, - username, TopTask.PackageId, TopTask.ItemId, - itemName, TopTask.StartDate, TopTask.FinishDate, TopTask.Source, - TopTask.TaskName, executionLog); - } - - // remove task from the stack - TasksStack.RemoveAt(TasksStack.Count - 1); - } - - static string FormatExecutionLog(BackgroundTask task) - { - StringWriter sw = new StringWriter(); - XmlWriter writer = new XmlTextWriter(sw); - - writer.WriteStartElement("log"); - - // parameters - writer.WriteStartElement("parameters"); - foreach (string name in task.Parameters.Keys) - { - string val = task.Parameters[name] != null ? task.Parameters[name].ToString() : ""; - writer.WriteStartElement("parameter"); - writer.WriteAttributeString("name", name); - writer.WriteString(val); - writer.WriteEndElement(); - } - writer.WriteEndElement(); // parameters - - // records - writer.WriteStartElement("records"); - foreach (BackgroundTaskLogRecord record in task.LogRecords) - { - writer.WriteStartElement("record"); - writer.WriteAttributeString("severity", record.Severity.ToString()); - writer.WriteAttributeString("date", record.Date.ToString(System.Globalization.CultureInfo.InvariantCulture)); - writer.WriteAttributeString("ident", record.TextIdent.ToString()); - - // text - writer.WriteElementString("text", record.Text); - - // text parameters - if (record.TextParameters != null && record.TextParameters.Length > 0) - { - writer.WriteStartElement("textParameters"); - foreach (string prm in record.TextParameters) - { - writer.WriteElementString("value", prm); - } - writer.WriteEndElement(); // textParameters - } - - // stack trace - writer.WriteElementString("stackTrace", record.ExceptionStackTrace); - writer.WriteEndElement(); - } - writer.WriteEndElement(); - writer.WriteEndElement(); - - return sw.ToString(); - } - - static void PurgeCompletedTasks(object obj) - { - // remove completed tasks - List completedTasks = new List(); - foreach (BackgroundTask task in tasks.Values) - { - if (task.MaximumExecutionTime != -1 - && ((TimeSpan)(DateTime.Now - task.StartDate)).TotalSeconds > task.MaximumExecutionTime) - { - // terminate task - try - { - task.TaskThread.Abort(); - } - catch - { - // nope - } - - // add to the list - completedTasks.Add(task.TaskId); - } - - if ((task.FinishDate != DateTime.MinValue - && ((TimeSpan)(DateTime.Now - task.FinishDate)).TotalMinutes > 2)) - { - // add to the list - completedTasks.Add(task.TaskId); - } - } - - // remove tasks - foreach (string taskId in completedTasks) - tasks.Remove(taskId); - } - - public static int PackageId - { - get { return TopTask.PackageId; } - set { TopTask.PackageId = value; } - } - - public static int ItemId - { - get { return TopTask.ItemId; } - set { TopTask.ItemId = value; } - } - - public static string ItemName - { - get { return TopTask.ItemName; } - set { TopTask.ItemName = value; } - } - - public static string TaskName - { - get { return TopTask.TaskName; } - } - - public static string TaskSource - { - get { return TopTask.Source; } - } - - public static int IndicatorMaximum - { - get { return TopTask.IndicatorMaximum; } - set { TopTask.IndicatorMaximum = value; } - } - - public static int IndicatorCurrent - { - get { return TopTask.IndicatorCurrent; } - set { TopTask.IndicatorCurrent = value; } - } - - public static int MaximumExecutionTime - { - get { return TopTask.MaximumExecutionTime; } - set { TopTask.MaximumExecutionTime = value; } - } - - public static int ScheduleId - { - get { return TopTask.ScheduleId; } - set { TopTask.ScheduleId = value; } - } - - public static bool HasErrors - { - get { return (TopTask.Severity == 2); } - } - - public static BackgroundTask GetTask(string taskId) - { - BackgroundTask task = (BackgroundTask)tasks[taskId]; - if (task == null) - return null; - - task.LastLogRecords.Clear(); - return task; - } - - public static BackgroundTask GetTaskWithLogRecords(string taskId, DateTime startLogTime) - { - BackgroundTask task = GetTask(taskId); - if (task == null) - return null; - - // fill log records - foreach (BackgroundTaskLogRecord record in task.LogRecords) - { - if (record.Date >= startLogTime) - task.LastLogRecords.Add(record); - } - - return task; - } - - public static Dictionary GetScheduledTasks() - { - Dictionary scheduledTasks = new Dictionary(); - try - { - foreach (BackgroundTask task in tasks.Values) - { - if (task.ScheduleId > 0 - && !task.Completed - && !scheduledTasks.ContainsKey(task.ScheduleId)) - scheduledTasks.Add(task.ScheduleId, task); - } - } - catch (Exception) - { - } - return scheduledTasks; - } - - public static void SetTaskNotifyOnComplete(string taskId) - { - BackgroundTask task = (BackgroundTask)tasks[taskId]; - if (task == null) - return; - - task.NotifyOnComplete = true; - } - - public static void StopTask(string taskId) - { - BackgroundTask task = (BackgroundTask)tasks[taskId]; - if (task == null) - return; - - try - { - task.TaskThread.Abort(); - } - catch - { - // nope - } - - // remove it from stack - tasks.Remove(taskId); - } - - public static Hashtable TaskParameters - { - get { return TopTask.Parameters; } - } - - internal static int GetTasksNumber() - { - return tasks.Count; - } - - internal static List GetUserTasks(int userId) - { - List list = new List(); - - // try to get user first - UserInfo user = UserController.GetUser(userId); - if (user == null) - return list; // prohibited user - - // get user tasks - foreach (BackgroundTask task in tasks.Values) - { - if(task.EffectiveUserId == userId && !task.Completed) - list.Add(task); - } - return list; - } - - internal static List GetUserCompletedTasks(int userId) - { - // get user tasks - List list = GetUserTasks(userId); - - // extract completed only - List completedTasks = new List(); - foreach (BackgroundTask task in list) - { - if (task.Completed && task.NotifyOnComplete) - { - // add to the list - completedTasks.Add(task); - - // remove from hash - tasks.Remove(task.TaskId); - } - } - return completedTasks; - } - - #region Private Helpers - private static void CallTaskEventHandler(BackgroundTask task, bool onComplete) - { - string[] taskHandlers = GetTaskEventHandlers(task.Source, task.TaskName); - if (taskHandlers != null) - { - foreach(string taskHandler in taskHandlers) - { - try - { - Type handlerType = Type.GetType(taskHandler); - TaskEventHandler handler = (TaskEventHandler)Activator.CreateInstance(handlerType); - - if (handler != null) - { - if (onComplete) - handler.OnComplete(); - else - handler.OnStart(); - } - } - catch (Exception ex) - { - WriteError(ex, "Error executing task event handler: {0}", ex.Message); - } - } - } - } - - private static string[] GetTaskEventHandlers(string source, string taskName) - { - // load configuration - string appRoot = AppDomain.CurrentDomain.BaseDirectory; - string path = Path.Combine(appRoot, "TaskEventHandlers.config"); - - if (eventHandlers == null) - { - eventHandlers = Hashtable.Synchronized(new Hashtable()); - - // load from XML - if (File.Exists(path)) - { - List xmlConfigs = new List(); - xmlConfigs.Add(new XmlDocument()); - xmlConfigs[0].Load(path); - // Lookup for external references first - XmlNodeList xmlReferences = xmlConfigs[0].SelectNodes("//reference"); - foreach (XmlElement xmlReference in xmlReferences) - { - string referencePath = Path.Combine(appRoot, xmlReference.GetAttribute("src")); - if (File.Exists(referencePath)) - { - XmlDocument xmldoc = new XmlDocument(); - xmldoc.Load(referencePath); - xmlConfigs.Add(xmldoc); - } - } - - // parse XML - foreach (XmlDocument xml in xmlConfigs) - { - XmlNodeList xmlHandlers = xml.SelectNodes("//handler"); - foreach (XmlNode xmlHandler in xmlHandlers) - { - string keyName = xmlHandler.ParentNode.Attributes["source"].Value - + xmlHandler.ParentNode.Attributes["name"].Value; - - // get handlers collection - List taskHandlers = (List)eventHandlers[keyName]; - if (taskHandlers == null) - { - taskHandlers = new List(); - eventHandlers[keyName] = taskHandlers; - } - - string handlerType = xmlHandler.Attributes["type"].Value; - taskHandlers.Add(handlerType); - } - } - } - } - - string fullTaskName = source + taskName; - List handlersList = (List)eventHandlers[fullTaskName]; - return handlersList == null ? null : handlersList.ToArray(); - } - #endregion - - - #region ResultTasks - - public static void CompleteResultTask(ResultObject res, string errorCode, Exception ex, string errorMessage) - { - if (res != null) - { - res.IsSuccess = false; - - if (!string.IsNullOrEmpty(errorCode)) - res.ErrorCodes.Add(errorCode); - } - - if (ex != null) - TaskManager.WriteError(ex); - - if (!string.IsNullOrEmpty(errorMessage)) - TaskManager.WriteError(errorMessage); - - //LogRecord. - CompleteTask(); - - - } - - public static void CompleteResultTask(ResultObject res, string errorCode, Exception ex) - { - CompleteResultTask(res, errorCode, ex, null); - } - - public static void CompleteResultTask(ResultObject res, string errorCode) - { - CompleteResultTask(res, errorCode, null, null); - } - - public static void CompleteResultTask(ResultObject res) - { - CompleteResultTask(res, null); - } - - public static void CompleteResultTask() - { - CompleteResultTask(null); - } - - public static T StartResultTask(string source, string taskName, Guid taskId) where T : ResultObject, new() - { - StartTask(taskId.ToString(), source, taskName, null); - T res = new T(); - res.IsSuccess = true; - return res; - } - - public static T StartResultTask(string source, string taskName) where T : ResultObject, new() - { - StartTask(source, taskName); - T res = new T(); - res.IsSuccess = true; - return res; - } - - - #endregion - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs index 64282fa2..f864aaf3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs @@ -46,12 +46,6 @@ namespace WebsitePanel.EnterpriseServer protected void Application_Start(object sender, EventArgs e) { - if (ConfigurationManager.AppSettings["WebsitePanel.DistableScheduler"] != null) - if (Boolean.Parse(ConfigurationManager.AppSettings["WebsitePanel.DistableScheduler"]) == false) - { - if (Scheduler.nextSchedule == null) - Scheduler.Start(); - } } protected void Application_End(object sender, EventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config index d5f08cc5..7a73a914 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config @@ -5,7 +5,7 @@ - + @@ -50,7 +50,7 @@ - + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj index 98a5db62..b06b2e81 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj @@ -47,12 +47,7 @@ 618 - - False - ..\..\Lib\Ionic.Zip.Reduced.dll - - - False + ..\..\Lib\Microsoft.Web.Services3.dll True @@ -73,8 +68,13 @@ - - False + + ..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll + + + ..\..\Bin\WebsitePanel.EnterpriseServer.Code.dll + + ..\..\Bin\WebsitePanel.Providers.Base.dll @@ -122,131 +122,6 @@ VersionInfo.cs - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - Code - - - - - - - Code - - - Code - - - - - - - - - - - - - - - - - - - - - - - Code - - - - Code - - - Code - - - - Code - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - esHeliconZoo.asmx Component @@ -395,24 +270,6 @@ - - - {53D22D35-4013-415F-BA09-F67A0DBBB0C1} - WebsitePanel.Common.Utils - - - {C09CE910-F16B-48A1-B2CC-C99B8C1CF775} - WebsitePanel.EnterpriseServer.Base - - - {387FA0EF-3927-45FF-8F8F-BCCD735540C6} - WebsitePanel.Templates - - - {7112B144-C5EE-43C2-9441-569D75D13CB9} - WebsitePanel.Whois - - @@ -424,7 +281,6 @@ - 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WsePolicyCache.Config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WsePolicyCache.Config index 9e3b5477..a57b49a4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WsePolicyCache.Config +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WsePolicyCache.Config @@ -1,6 +1,6 @@ - + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs index 864a87da..0d43f107 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs @@ -37,15 +37,15 @@ using Microsoft.Web.Services3; namespace WebsitePanel.EnterpriseServer { - /// - /// Summary description for esApplicationsInstaller - /// - [WebService(Namespace = "http://smbsaas/websitepanel/enterpriseserver")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [Policy("ServerPolicy")] - [ToolboxItem(false)] - public class esExchangeServer : WebService - { + /// + /// Summary description for esApplicationsInstaller + /// + [WebService(Namespace = "http://smbsaas/websitepanel/enterpriseserver")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [Policy("ServerPolicy")] + [ToolboxItem(false)] + public class esExchangeServer : WebService + { #region Organizations [WebMethod] public DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive, @@ -86,7 +86,7 @@ namespace WebsitePanel.EnterpriseServer { return ExchangeServerController.GetOrganizationStatisticsByOrganization(itemId); } - + [WebMethod] public int DeleteOrganization(int itemId) { @@ -470,6 +470,25 @@ namespace WebsitePanel.EnterpriseServer return ExchangeServerController.GetDistributionListPermissions(itemId, accountId); } + [WebMethod] + public ExchangeAccount[] GetDistributionListsByMember(int itemId, int accountId) + { + return ExchangeServerController.GetDistributionListsByMember(itemId, accountId); + } + + [WebMethod] + public int AddDistributionListMember(int itemId, string distributionListName, int memberId) + { + return ExchangeServerController.AddDistributionListMember(itemId, distributionListName, memberId); + } + + [WebMethod] + public int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) + { + return ExchangeServerController.DeleteDistributionListMember(itemId, distributionListName, memberId); + } + + #endregion #region MobileDevice @@ -547,94 +566,138 @@ namespace WebsitePanel.EnterpriseServer #endregion - #region Public Folders - [WebMethod] - public int CreatePublicFolder(int itemId, string parentFolder, string folderName, - bool mailEnabled, string accountName, string domain) - { - return ExchangeServerController.CreatePublicFolder(itemId, parentFolder, folderName, - mailEnabled, accountName, domain); - } + #region Public Folders + [WebMethod] + public int CreatePublicFolder(int itemId, string parentFolder, string folderName, + bool mailEnabled, string accountName, string domain) + { + return ExchangeServerController.CreatePublicFolder(itemId, parentFolder, folderName, + mailEnabled, accountName, domain); + } - [WebMethod] - public int DeletePublicFolders(int itemId, int[] accountIds) - { - return ExchangeServerController.DeletePublicFolders(itemId, accountIds); - } + [WebMethod] + public int DeletePublicFolders(int itemId, int[] accountIds) + { + return ExchangeServerController.DeletePublicFolders(itemId, accountIds); + } - [WebMethod] - public int DeletePublicFolder(int itemId, int accountId) - { - return ExchangeServerController.DeletePublicFolder(itemId, accountId); - } + [WebMethod] + public int DeletePublicFolder(int itemId, int accountId) + { + return ExchangeServerController.DeletePublicFolder(itemId, accountId); + } - [WebMethod] - public int EnableMailPublicFolder(int itemId, int accountId, - string name, string domain) - { - return ExchangeServerController.EnableMailPublicFolder(itemId, accountId, name, domain); - } + [WebMethod] + public int EnableMailPublicFolder(int itemId, int accountId, + string name, string domain) + { + return ExchangeServerController.EnableMailPublicFolder(itemId, accountId, name, domain); + } - [WebMethod] - public int DisableMailPublicFolder(int itemId, int accountId) - { - return ExchangeServerController.DisableMailPublicFolder(itemId, accountId); - } + [WebMethod] + public int DisableMailPublicFolder(int itemId, int accountId) + { + return ExchangeServerController.DisableMailPublicFolder(itemId, accountId); + } - [WebMethod] - public ExchangePublicFolder GetPublicFolderGeneralSettings(int itemId, int accountId) - { - return ExchangeServerController.GetPublicFolderGeneralSettings(itemId, accountId); - } + [WebMethod] + public ExchangePublicFolder GetPublicFolderGeneralSettings(int itemId, int accountId) + { + return ExchangeServerController.GetPublicFolderGeneralSettings(itemId, accountId); + } - [WebMethod] - public int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, - bool hideAddressBook, ExchangeAccount[] accounts) - { - return ExchangeServerController.SetPublicFolderGeneralSettings(itemId, accountId, newName, - hideAddressBook, accounts); - } + [WebMethod] + public int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, + bool hideAddressBook, ExchangeAccount[] accounts) + { + return ExchangeServerController.SetPublicFolderGeneralSettings(itemId, accountId, newName, + hideAddressBook, accounts); + } - [WebMethod] - public ExchangePublicFolder GetPublicFolderMailFlowSettings(int itemId, int accountId) - { - return ExchangeServerController.GetPublicFolderMailFlowSettings(itemId, accountId); - } + [WebMethod] + public ExchangePublicFolder GetPublicFolderMailFlowSettings(int itemId, int accountId) + { + return ExchangeServerController.GetPublicFolderMailFlowSettings(itemId, accountId); + } - [WebMethod] - public int SetPublicFolderMailFlowSettings(int itemId, int accountId, - string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - return ExchangeServerController.SetPublicFolderMailFlowSettings(itemId, accountId, - acceptAccounts, rejectAccounts, requireSenderAuthentication); - } + [WebMethod] + public int SetPublicFolderMailFlowSettings(int itemId, int accountId, + string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { + return ExchangeServerController.SetPublicFolderMailFlowSettings(itemId, accountId, + acceptAccounts, rejectAccounts, requireSenderAuthentication); + } - [WebMethod] - public ExchangeEmailAddress[] GetPublicFolderEmailAddresses(int itemId, int accountId) - { - return ExchangeServerController.GetPublicFolderEmailAddresses(itemId, accountId); - } + [WebMethod] + public ExchangeEmailAddress[] GetPublicFolderEmailAddresses(int itemId, int accountId) + { + return ExchangeServerController.GetPublicFolderEmailAddresses(itemId, accountId); + } - [WebMethod] - public int AddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress) - { - return ExchangeServerController.AddPublicFolderEmailAddress(itemId, accountId, emailAddress); - } + [WebMethod] + public int AddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress) + { + return ExchangeServerController.AddPublicFolderEmailAddress(itemId, accountId, emailAddress); + } - [WebMethod] - public int SetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress) - { - return ExchangeServerController.SetPublicFolderPrimaryEmailAddress(itemId, accountId, emailAddress); - } + [WebMethod] + public int SetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress) + { + return ExchangeServerController.SetPublicFolderPrimaryEmailAddress(itemId, accountId, emailAddress); + } - [WebMethod] - public int DeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses) - { - return ExchangeServerController.DeletePublicFolderEmailAddresses(itemId, accountId, emailAddresses); - } - #endregion + [WebMethod] + public int DeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses) + { + return ExchangeServerController.DeletePublicFolderEmailAddresses(itemId, accountId, emailAddresses); + } + #endregion + #region Disclaimers + [WebMethod] + public int AddExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer) + { + return ExchangeServerController.AddExchangeDisclaimer(itemId, disclaimer); + } + + [WebMethod] + public int UpdateExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer) + { + return ExchangeServerController.UpdateExchangeDisclaimer(itemId, disclaimer); + } + + [WebMethod] + public int DeleteExchangeDisclaimer(int itemId, int exchangeDisclaimerId) + { + return ExchangeServerController.DeleteExchangeDisclaimer(itemId, exchangeDisclaimerId); + } + + [WebMethod] + public ExchangeDisclaimer GetExchangeDisclaimer(int itemId, int exchangeDisclaimerId) + { + return ExchangeServerController.GetExchangeDisclaimer(itemId, exchangeDisclaimerId); + } + + [WebMethod] + public List GetExchangeDisclaimers(int itemId) + { + return ExchangeServerController.GetExchangeDisclaimers(itemId); + } + + [WebMethod] + public int SetExchangeAccountDisclaimerId(int itemId, int AccountID, int ExchangeDisclaimerId) + { + return ExchangeServerController.SetExchangeAccountDisclaimerId(itemId, AccountID, ExchangeDisclaimerId); + } + [WebMethod] + + public int GetExchangeAccountDisclaimerId(int itemId, int AccountID) + { + return ExchangeServerController.GetExchangeAccountDisclaimerId(itemId, AccountID); + } + + #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDisclaimer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDisclaimer.cs new file mode 100644 index 00000000..dab00abc --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDisclaimer.cs @@ -0,0 +1,67 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class ExchangeDisclaimer + { + int exchangeDisclaimerId; + int itemId; + string disclaimerName; + string disclaimerText; + + public int ItemId + { + get { return this.itemId; } + set { this.itemId = value; } + } + + public int ExchangeDisclaimerId + { + get { return this.exchangeDisclaimerId; } + set { this.exchangeDisclaimerId = value; } + } + + public string DisclaimerName + { + get { return this.disclaimerName; } + set { this.disclaimerName = value; } + } + + public string DisclaimerText + { + get { return this.disclaimerText; } + set { this.disclaimerText = value; } + } + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IExchangeServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IExchangeServer.cs index b2a71770..197a7a0c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IExchangeServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IExchangeServer.cs @@ -126,5 +126,9 @@ namespace WebsitePanel.Providers.HostedSolution void WipeDataFromDevice(string id); void CancelRemoteWipeRequest(string id); void RemoveDevice(string id); + + // Disclaimers + int NewDisclaimerTransportRule(string Name, string From, string Text); + int RemoveTransportRule(string Name); } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj index 4aa7d9d3..1e1c8954 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj @@ -83,6 +83,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs index 9dbb49b9..fbfecf14 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs @@ -478,12 +478,11 @@ namespace WebsitePanel.Providers.Database string cmd = Path.Combine(MySqlBinFolder, "mysqldump.exe"); string bakFile = Path.Combine(BackupTempFolder, backupName); - string args = string.Format(" --host={0} --port={1} --user={2} --password={3} --opt --skip-extended-insert --skip-quick --skip-comments {4}", - ServerName, ServerPort, - RootLogin, RootPassword, databaseName); + string args = string.Format(" --host={0} --port={1} --user={2} --password={3} --opt --skip-extended-insert --skip-quick --skip-comments --result-file=\"{4}\" {5}", + ServerName, ServerPort, RootLogin, RootPassword, bakFile, databaseName); // backup database - FileUtils.ExecuteSystemCommand(cmd, args, bakFile); + FileUtils.ExecuteSystemCommand(cmd, args); return bakFile; } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index 0669805a..94c4ebe7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -55,6 +55,8 @@ using Microsoft.Exchange.Data; using Microsoft.Exchange.Data.Directory; using Microsoft.Exchange.Data.Storage; +using Microsoft.Web.Administration; + namespace WebsitePanel.Providers.HostedSolution { public class Exchange2013 : HostingServiceProviderBase, IExchangeServer @@ -2012,6 +2014,7 @@ namespace WebsitePanel.Providers.HostedSolution finally { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } } @@ -2340,6 +2343,7 @@ namespace WebsitePanel.Providers.HostedSolution { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } ExchangeLog.LogEnd("GetMailboxGeneralSettingsInternal"); return info; @@ -2578,6 +2582,7 @@ namespace WebsitePanel.Providers.HostedSolution { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } ExchangeLog.LogEnd("GetMailboxAdvancedSettingsInternal"); return info; @@ -2645,6 +2650,7 @@ namespace WebsitePanel.Providers.HostedSolution { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } ExchangeLog.LogEnd("SetMailboxAdvancedSettingsInternal"); } @@ -3090,6 +3096,7 @@ namespace WebsitePanel.Providers.HostedSolution finally { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } ExchangeLog.LogEnd("GetMailboxStatisticsInternal"); return info; @@ -5930,14 +5937,27 @@ namespace WebsitePanel.Providers.HostedSolution if (connectionInfo == null) { - PSCredential credential = (PSCredential)null; + ServerManager mgr = new ServerManager(); + ApplicationPool myAppPool = mgr.ApplicationPools["WebsitePanel Server Pool"]; + + SecureString password = new SecureString(); + string str_password = myAppPool.ProcessModel.Password; + string username = myAppPool.ProcessModel.UserName; + + foreach (char x in str_password) + { + password.AppendChar(x); + } + + PSCredential credential = new PSCredential(username, password); connectionInfo = new WSManConnectionInfo(new Uri(PowerShellUrl), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", credential); - connectionInfo.AuthenticationMechanism = AuthenticationMechanism.NegotiateWithImplicitCredential; + connectionInfo.AuthenticationMechanism = AuthenticationMechanism.Negotiate; connectionInfo.SkipCNCheck = true; + connectionInfo.SkipCACheck = true; } Runspace runSpace = RunspaceFactory.CreateRunspace(connectionInfo); @@ -5945,7 +5965,7 @@ namespace WebsitePanel.Providers.HostedSolution runSpace.Open(); ExchangeLog.LogEnd("OpenRunspace"); - + Command cmd = new Command("Set-ADServerSettings"); cmd.Parameters.Add("PreferredServer", PrimaryDomainController); ExecuteShellCommand(runSpace, cmd, false); @@ -5972,7 +5992,7 @@ namespace WebsitePanel.Providers.HostedSolution { try { - if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened) + if (runspace != null) { runspace.Dispose(); runspace = null; @@ -6410,6 +6430,7 @@ namespace WebsitePanel.Providers.HostedSolution Command cmd = new Command("Set-AcceptedDomain"); cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("DomainType", domainType.ToString()); + cmd.Parameters.Add("AddressBookEnabled", !(domainType == ExchangeAcceptedDomainType.InternalRelay)); cmd.Parameters.Add("Confirm", false); ExecuteShellCommand(runSpace, cmd); ExchangeLog.LogEnd("SetAcceptedDomainType"); @@ -7222,6 +7243,78 @@ namespace WebsitePanel.Providers.HostedSolution } return bResult; } + + #region Disclaimers + + public int NewDisclaimerTransportRule(string Name, string From, string Text) + { + return NewDisclaimerTransportRuleInternal(Name, From, Text); + } + + public int RemoveTransportRule(string Name) + { + return RemoveTransportRuleInternal(Name); + } + + internal virtual int NewDisclaimerTransportRuleInternal(string Name, string From, string Text) + { + ExchangeLog.LogStart("NewDisclaimerTransportRuleInternal"); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + Command cmd = new Command("New-TransportRule"); + cmd.Parameters.Add("Name", Name); + cmd.Parameters.Add("From", From); + cmd.Parameters.Add("Enabled", true); + cmd.Parameters.Add("ApplyHtmlDisclaimerLocation", "Append"); + cmd.Parameters.Add("ApplyHtmlDisclaimerText", Text); + cmd.Parameters.Add("ApplyHtmlDisclaimerFallbackAction", "Wrap"); + ExecuteShellCommand(runSpace, cmd); + } + catch (Exception exc) + { + ExchangeLog.LogError(exc); + return -1; + } + finally + { + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("NewDisclaimerTransportRuleInternal"); + + return 0; + + } + + internal virtual int RemoveTransportRuleInternal(string Name) + { + ExchangeLog.LogStart("RemoveTransportRuleInternal"); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + Command cmd = new Command("Remove-TransportRule"); + cmd.Parameters.Add("Identity", Name); + cmd.Parameters.Add("Confirm", false); + ExecuteShellCommand(runSpace, cmd); + } + catch (Exception exc) + { + ExchangeLog.LogError(exc); + return -1; + } + finally + { + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("RemoveTransportRuleInternal"); + + return 0; + } + + #endregion + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/WebsitePanel.Providers.HostedSolution.Exchange2013.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/WebsitePanel.Providers.HostedSolution.Exchange2013.csproj index c17fce0c..eb303e4c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/WebsitePanel.Providers.HostedSolution.Exchange2013.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/WebsitePanel.Providers.HostedSolution.Exchange2013.csproj @@ -60,6 +60,10 @@ ..\..\Lib\References\Microsoft\Exchange2013\Microsoft.Exchange.Net.dll False + + False + ..\..\Lib\References\Microsoft\Microsoft.Web.Administration.dll + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.SharePoint2013/HostedSharePointServer2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.SharePoint2013/HostedSharePointServer2013.cs index 9244de46..dc7faca0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.SharePoint2013/HostedSharePointServer2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.SharePoint2013/HostedSharePointServer2013.cs @@ -29,6 +29,8 @@ using System; using System.Collections.Generic; using System.IO; +using System.Text.RegularExpressions; +using System.Xml; using Microsoft.Win32; using WebsitePanel.Providers.SharePoint; using WebsitePanel.Providers.Utils; @@ -306,13 +308,13 @@ namespace WebsitePanel.Providers.HostedSolution try { - Type type = typeof (HostedSharePointServer2013Impl); - var info = new AppDomainSetup {ApplicationBase = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory), PrivateBinPath = "bin; bin/debug"}; + Type type = typeof(HostedSharePointServer2013Impl); + var info = new AppDomainSetup { ApplicationBase = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory), PrivateBinPath = GetPrivateBinPath() }; domain = AppDomain.CreateDomain("WSS30", null, info); - var impl = (HostedSharePointServer2013Impl) domain.CreateInstanceAndUnwrap(type.Assembly.FullName, type.FullName); + var impl = (HostedSharePointServer2013Impl)domain.CreateInstanceAndUnwrap(type.Assembly.FullName, type.FullName); return action(impl); - } + } finally { if (domain != null) @@ -320,6 +322,29 @@ namespace WebsitePanel.Providers.HostedSolution AppDomain.Unload(domain); } } + + throw new ArgumentNullException("action"); + } + + /// Getting PrivatePath from web.config. + /// The PrivateBinPath. + private static string GetPrivateBinPath() + { + var lines = new List{ "bin", "bin/debug" }; + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "web.config"); + + if (File.Exists(path)) + { + using (var reader = new StreamReader(path)) + { + string content = reader.ReadToEnd(); + var pattern = new Regex(@"(?<=probing .*?privatePath\s*=\s*"")[^""]+(?="".*?>)"); + Match match = pattern.Match(content); + lines.AddRange(match.Value.Split(';')); + } + } + + return string.Join(Path.PathSeparator.ToString(), lines.ToArray()); } #endregion diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs index c7d412c8..a21d05b7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs @@ -6050,6 +6050,7 @@ namespace WebsitePanel.Providers.HostedSolution Command cmd = new Command("Set-AcceptedDomain"); cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("DomainType", domainType.ToString()); + cmd.Parameters.Add("AddressBookEnabled", !(domainType == ExchangeAcceptedDomainType.InternalRelay)); cmd.Parameters.Add("Confirm", false); ExecuteShellCommand(runSpace, cmd); ExchangeLog.LogEnd("SetAcceptedDomainType"); @@ -6874,5 +6875,76 @@ namespace WebsitePanel.Providers.HostedSolution } } #endregion + + #region Disclaimers + + public int NewDisclaimerTransportRule(string Name, string From, string Text) + { + return NewDisclaimerTransportRuleInternal(Name, From, Text); + } + + public int RemoveTransportRule(string Name) + { + return RemoveTransportRuleInternal(Name); + } + + internal virtual int NewDisclaimerTransportRuleInternal(string Name, string From, string Text) + { + ExchangeLog.LogStart("NewDisclaimerTransportRuleInternal"); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + Command cmd = new Command("New-TransportRule"); + cmd.Parameters.Add("Name", Name); + cmd.Parameters.Add("From", From); + cmd.Parameters.Add("Enabled", true); + cmd.Parameters.Add("ApplyHtmlDisclaimerLocation", "Append"); + cmd.Parameters.Add("ApplyHtmlDisclaimerText", Text); + cmd.Parameters.Add("ApplyHtmlDisclaimerFallbackAction", "Wrap"); + ExecuteShellCommand(runSpace, cmd); + } + catch (Exception exc) + { + ExchangeLog.LogError(exc); + return -1; + } + finally + { + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("NewDisclaimerTransportRuleInternal"); + + return 0; + + } + + internal virtual int RemoveTransportRuleInternal(string Name) + { + ExchangeLog.LogStart("RemoveTransportRuleInternal"); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + Command cmd = new Command("Remove-TransportRule"); + cmd.Parameters.Add("Identity", Name); + cmd.Parameters.Add("Confirm", false); + ExecuteShellCommand(runSpace, cmd); + } + catch(Exception exc) + { + ExchangeLog.LogError(exc); + return -1; + } + finally + { + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("RemoveTransportRuleInternal"); + + return 0; + } + + #endregion } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/Program.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/Program.cs new file mode 100644 index 00000000..f646790c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/Program.cs @@ -0,0 +1,52 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.ServiceProcess; +using System.Text; + +namespace WebsitePanel.SchedulerService +{ + static class Program + { + /// + /// The main entry point for the application. + /// + static void Main() + { + ServiceBase[] ServicesToRun; + ServicesToRun = new ServiceBase[] + { + new SchedulerService() + }; + ServiceBase.Run(ServicesToRun); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/Properties/AssemblyInfo.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..a8507d4f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/Properties/AssemblyInfo.cs @@ -0,0 +1,64 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WebsitePanel.SchedulerService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("OM-3")] +[assembly: AssemblyProduct("WebsitePanel.SchedulerService")] +[assembly: AssemblyCopyright("Copyright © OM-3 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f552691a-f316-4030-aa74-25cb23ad1791")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.Designer.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.Designer.cs new file mode 100644 index 00000000..bc7321d8 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.Designer.cs @@ -0,0 +1,65 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +namespace WebsitePanel.SchedulerService +{ + partial class SchedulerService + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.ServiceName = "WebsitePanel.SchedulerService"; + } + + #endregion + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.cs new file mode 100644 index 00000000..5e82a911 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.cs @@ -0,0 +1,70 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System.ServiceProcess; +using System.Threading; +using WebsitePanel.EnterpriseServer; + +namespace WebsitePanel.SchedulerService +{ + public partial class SchedulerService : ServiceBase + { + private Timer _Timer; + private static bool _isRuninng; + #region Construcor + + public SchedulerService() + { + InitializeComponent(); + + _Timer = new Timer(Process, null, 5000, 5000); + _isRuninng = false; + } + + #endregion + + #region Methods + + protected override void OnStart(string[] args) + { + } + + protected static void Process(object callback) + { + //check running service + if (_isRuninng) + return; + + _isRuninng = true; + Scheduler.Start(); + _isRuninng = false; + } + + #endregion + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerServiceInstaller.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerServiceInstaller.cs new file mode 100644 index 00000000..6b3d1320 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerServiceInstaller.cs @@ -0,0 +1,56 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System.ComponentModel; +using System.Configuration.Install; +using System.ServiceProcess; + +namespace WebsitePanel.SchedulerService +{ + [RunInstaller(true)] + public class SchedulerServiceInstaller : Installer + { + #region Constructor + + public SchedulerServiceInstaller() + { + var processInstaller = new ServiceProcessInstaller(); + var serviceInstaller = new ServiceInstaller(); + + processInstaller.Account = ServiceAccount.LocalSystem; + serviceInstaller.DisplayName = "WebsitePanel Scheduler"; + serviceInstaller.StartType = ServiceStartMode.Automatic; + serviceInstaller.ServiceName = "WebsitePanel Scheduler"; + + Installers.Add(processInstaller); + Installers.Add(serviceInstaller); + } + + #endregion + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj b/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj new file mode 100644 index 00000000..475ed6fe --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj @@ -0,0 +1,96 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {5B823520-0450-44A9-AC86-9658B41DFA7C} + WinExe + Properties + WebsitePanel.SchedulerService + WebsitePanel.SchedulerService + v4.0 + + + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + ..\WebsitePanel.EnterpriseServer\bin\ + DEBUG;TRACE + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + ..\WebsitePanel.EnterpriseServer\bin\ + TRACE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + + + + + + + + + + + + + + + Component + + + SchedulerService.cs + + + Component + + + + + {60E39314-659C-4FAD-AB91-D0D08E223578} + WebsitePanel.EnterpriseServer.Code + + + + + + + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/app.config b/WebsitePanel/Sources/WebsitePanel.SchedulerService/app.config new file mode 100644 index 00000000..f4df3fb3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/app.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs index a934bf30..37fc060b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs @@ -29,7 +29,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.6400 +// Runtime Version:2.0.50727.5466 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -37,9 +37,10 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by wsdl, Version=2.0.50727.3038. +// This source code was auto-generated by wsdl, Version=2.0.50727.42. // -namespace WebsitePanel.Providers.Exchange { +namespace WebsitePanel.Providers.Exchange +{ using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; @@ -50,434 +51,871 @@ namespace WebsitePanel.Providers.Exchange { using WebsitePanel.Providers.HostedSolution; /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="ExchangeServerSoap", Namespace="http://smbsaas/websitepanel/server/")] + [System.Web.Services.WebServiceBindingAttribute(Name = "ExchangeServerSoap", Namespace = "http://smbsaas/websitepanel/server/")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(BaseStatistics))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class ExchangeServer : Microsoft.Web.Services3.WebServicesClientProtocol { - + public partial class ExchangeServer : Microsoft.Web.Services3.WebServicesClientProtocol + { + public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue; - - private System.Threading.SendOrPostCallback CheckAccountCredentialsOperationCompleted; - - private System.Threading.SendOrPostCallback ExtendToExchangeOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback CreateMailEnableUserOperationCompleted; - - private System.Threading.SendOrPostCallback CreateOrganizationOfflineAddressBookOperationCompleted; - - private System.Threading.SendOrPostCallback UpdateOrganizationOfflineAddressBookOperationCompleted; - - private System.Threading.SendOrPostCallback GetOABVirtualDirectoryOperationCompleted; - - private System.Threading.SendOrPostCallback CreateOrganizationAddressBookPolicyOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback SetOrganizationStorageLimitsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxesStatisticsOperationCompleted; - - private System.Threading.SendOrPostCallback AddAuthoritativeDomainOperationCompleted; - - private System.Threading.SendOrPostCallback ChangeAcceptedDomainTypeOperationCompleted; - - private System.Threading.SendOrPostCallback GetAuthoritativeDomainsOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteAuthoritativeDomainOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteMailboxOperationCompleted; - - private System.Threading.SendOrPostCallback DisableMailboxOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxAdvancedSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxAdvancedSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxPrimaryEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxStatisticsOperationCompleted; - - private System.Threading.SendOrPostCallback CreateContactOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteContactOperationCompleted; - - private System.Threading.SendOrPostCallback GetContactGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetContactGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetContactMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetContactMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback CreateDistributionListOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteDistributionListOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListPrimaryEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback CreatePublicFolderOperationCompleted; - - private System.Threading.SendOrPostCallback DeletePublicFolderOperationCompleted; - - private System.Threading.SendOrPostCallback EnableMailPublicFolderOperationCompleted; - - private System.Threading.SendOrPostCallback DisableMailPublicFolderOperationCompleted; - - private System.Threading.SendOrPostCallback GetPublicFolderGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetPublicFolderGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetPublicFolderMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetPublicFolderMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetPublicFolderEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback SetPublicFolderEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback SetPublicFolderPrimaryEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback GetPublicFoldersStatisticsOperationCompleted; - - private System.Threading.SendOrPostCallback GetPublicFoldersRecursiveOperationCompleted; - - private System.Threading.SendOrPostCallback GetPublicFolderSizeOperationCompleted; - - private System.Threading.SendOrPostCallback CreateOrganizationActiveSyncPolicyOperationCompleted; - - private System.Threading.SendOrPostCallback GetActiveSyncPolicyOperationCompleted; - + private System.Threading.SendOrPostCallback SetActiveSyncPolicyOperationCompleted; - + private System.Threading.SendOrPostCallback GetMobileDevicesOperationCompleted; - + private System.Threading.SendOrPostCallback GetMobileDeviceOperationCompleted; - + private System.Threading.SendOrPostCallback WipeDataFromDeviceOperationCompleted; - + private System.Threading.SendOrPostCallback CancelRemoteWipeRequestOperationCompleted; - + private System.Threading.SendOrPostCallback RemoveDeviceOperationCompleted; - + + private System.Threading.SendOrPostCallback CheckAccountCredentialsOperationCompleted; + + private System.Threading.SendOrPostCallback ExtendToExchangeOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback CreateMailEnableUserOperationCompleted; + + private System.Threading.SendOrPostCallback CreateOrganizationOfflineAddressBookOperationCompleted; + + private System.Threading.SendOrPostCallback UpdateOrganizationOfflineAddressBookOperationCompleted; + + private System.Threading.SendOrPostCallback GetOABVirtualDirectoryOperationCompleted; + + private System.Threading.SendOrPostCallback CreateOrganizationAddressBookPolicyOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback SetOrganizationStorageLimitsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxesStatisticsOperationCompleted; + + private System.Threading.SendOrPostCallback AddAuthoritativeDomainOperationCompleted; + + private System.Threading.SendOrPostCallback ChangeAcceptedDomainTypeOperationCompleted; + + private System.Threading.SendOrPostCallback GetAuthoritativeDomainsOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteAuthoritativeDomainOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteMailboxOperationCompleted; + + private System.Threading.SendOrPostCallback DisableMailboxOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxAdvancedSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxAdvancedSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxPrimaryEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxStatisticsOperationCompleted; + + private System.Threading.SendOrPostCallback CreateContactOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteContactOperationCompleted; + + private System.Threading.SendOrPostCallback GetContactGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetContactGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetContactMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetContactMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback CreateDistributionListOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteDistributionListOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListPrimaryEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback NewDisclaimerTransportRuleOperationCompleted; + + private System.Threading.SendOrPostCallback RemoveTransportRuleOperationCompleted; + + private System.Threading.SendOrPostCallback CreatePublicFolderOperationCompleted; + + private System.Threading.SendOrPostCallback DeletePublicFolderOperationCompleted; + + private System.Threading.SendOrPostCallback EnableMailPublicFolderOperationCompleted; + + private System.Threading.SendOrPostCallback DisableMailPublicFolderOperationCompleted; + + private System.Threading.SendOrPostCallback GetPublicFolderGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetPublicFolderGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetPublicFolderMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetPublicFolderMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetPublicFolderEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback SetPublicFolderEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback SetPublicFolderPrimaryEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback GetPublicFoldersStatisticsOperationCompleted; + + private System.Threading.SendOrPostCallback GetPublicFoldersRecursiveOperationCompleted; + + private System.Threading.SendOrPostCallback GetPublicFolderSizeOperationCompleted; + + private System.Threading.SendOrPostCallback CreateOrganizationActiveSyncPolicyOperationCompleted; + + private System.Threading.SendOrPostCallback GetActiveSyncPolicyOperationCompleted; + /// - public ExchangeServer() { + public ExchangeServer() + { this.Url = "http://localhost:9003/ExchangeServer.asmx"; } - - /// - public event CheckAccountCredentialsCompletedEventHandler CheckAccountCredentialsCompleted; - - /// - public event ExtendToExchangeOrganizationCompletedEventHandler ExtendToExchangeOrganizationCompleted; - - /// - public event CreateMailEnableUserCompletedEventHandler CreateMailEnableUserCompleted; - - /// - public event CreateOrganizationOfflineAddressBookCompletedEventHandler CreateOrganizationOfflineAddressBookCompleted; - - /// - public event UpdateOrganizationOfflineAddressBookCompletedEventHandler UpdateOrganizationOfflineAddressBookCompleted; - - /// - public event GetOABVirtualDirectoryCompletedEventHandler GetOABVirtualDirectoryCompleted; - - /// - public event CreateOrganizationAddressBookPolicyCompletedEventHandler CreateOrganizationAddressBookPolicyCompleted; - - /// - public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; - - /// - public event SetOrganizationStorageLimitsCompletedEventHandler SetOrganizationStorageLimitsCompleted; - - /// - public event GetMailboxesStatisticsCompletedEventHandler GetMailboxesStatisticsCompleted; - - /// - public event AddAuthoritativeDomainCompletedEventHandler AddAuthoritativeDomainCompleted; - - /// - public event ChangeAcceptedDomainTypeCompletedEventHandler ChangeAcceptedDomainTypeCompleted; - - /// - public event GetAuthoritativeDomainsCompletedEventHandler GetAuthoritativeDomainsCompleted; - - /// - public event DeleteAuthoritativeDomainCompletedEventHandler DeleteAuthoritativeDomainCompleted; - - /// - public event DeleteMailboxCompletedEventHandler DeleteMailboxCompleted; - - /// - public event DisableMailboxCompletedEventHandler DisableMailboxCompleted; - - /// - public event GetMailboxGeneralSettingsCompletedEventHandler GetMailboxGeneralSettingsCompleted; - - /// - public event SetMailboxGeneralSettingsCompletedEventHandler SetMailboxGeneralSettingsCompleted; - - /// - public event GetMailboxMailFlowSettingsCompletedEventHandler GetMailboxMailFlowSettingsCompleted; - - /// - public event SetMailboxMailFlowSettingsCompletedEventHandler SetMailboxMailFlowSettingsCompleted; - - /// - public event GetMailboxAdvancedSettingsCompletedEventHandler GetMailboxAdvancedSettingsCompleted; - - /// - public event SetMailboxAdvancedSettingsCompletedEventHandler SetMailboxAdvancedSettingsCompleted; - - /// - public event GetMailboxEmailAddressesCompletedEventHandler GetMailboxEmailAddressesCompleted; - - /// - public event SetMailboxEmailAddressesCompletedEventHandler SetMailboxEmailAddressesCompleted; - - /// - public event SetMailboxPrimaryEmailAddressCompletedEventHandler SetMailboxPrimaryEmailAddressCompleted; - - /// - public event SetMailboxPermissionsCompletedEventHandler SetMailboxPermissionsCompleted; - - /// - public event GetMailboxPermissionsCompletedEventHandler GetMailboxPermissionsCompleted; - - /// - public event GetMailboxStatisticsCompletedEventHandler GetMailboxStatisticsCompleted; - - /// - public event CreateContactCompletedEventHandler CreateContactCompleted; - - /// - public event DeleteContactCompletedEventHandler DeleteContactCompleted; - - /// - public event GetContactGeneralSettingsCompletedEventHandler GetContactGeneralSettingsCompleted; - - /// - public event SetContactGeneralSettingsCompletedEventHandler SetContactGeneralSettingsCompleted; - - /// - public event GetContactMailFlowSettingsCompletedEventHandler GetContactMailFlowSettingsCompleted; - - /// - public event SetContactMailFlowSettingsCompletedEventHandler SetContactMailFlowSettingsCompleted; - - /// - public event CreateDistributionListCompletedEventHandler CreateDistributionListCompleted; - - /// - public event DeleteDistributionListCompletedEventHandler DeleteDistributionListCompleted; - - /// - public event GetDistributionListGeneralSettingsCompletedEventHandler GetDistributionListGeneralSettingsCompleted; - - /// - public event SetDistributionListGeneralSettingsCompletedEventHandler SetDistributionListGeneralSettingsCompleted; - - /// - public event GetDistributionListMailFlowSettingsCompletedEventHandler GetDistributionListMailFlowSettingsCompleted; - - /// - public event SetDistributionListMailFlowSettingsCompletedEventHandler SetDistributionListMailFlowSettingsCompleted; - - /// - public event GetDistributionListEmailAddressesCompletedEventHandler GetDistributionListEmailAddressesCompleted; - - /// - public event SetDistributionListEmailAddressesCompletedEventHandler SetDistributionListEmailAddressesCompleted; - - /// - public event SetDistributionListPrimaryEmailAddressCompletedEventHandler SetDistributionListPrimaryEmailAddressCompleted; - - /// - public event SetDistributionListPermissionsCompletedEventHandler SetDistributionListPermissionsCompleted; - - /// - public event GetDistributionListPermissionsCompletedEventHandler GetDistributionListPermissionsCompleted; - - /// - public event CreatePublicFolderCompletedEventHandler CreatePublicFolderCompleted; - - /// - public event DeletePublicFolderCompletedEventHandler DeletePublicFolderCompleted; - - /// - public event EnableMailPublicFolderCompletedEventHandler EnableMailPublicFolderCompleted; - - /// - public event DisableMailPublicFolderCompletedEventHandler DisableMailPublicFolderCompleted; - - /// - public event GetPublicFolderGeneralSettingsCompletedEventHandler GetPublicFolderGeneralSettingsCompleted; - - /// - public event SetPublicFolderGeneralSettingsCompletedEventHandler SetPublicFolderGeneralSettingsCompleted; - - /// - public event GetPublicFolderMailFlowSettingsCompletedEventHandler GetPublicFolderMailFlowSettingsCompleted; - - /// - public event SetPublicFolderMailFlowSettingsCompletedEventHandler SetPublicFolderMailFlowSettingsCompleted; - - /// - public event GetPublicFolderEmailAddressesCompletedEventHandler GetPublicFolderEmailAddressesCompleted; - - /// - public event SetPublicFolderEmailAddressesCompletedEventHandler SetPublicFolderEmailAddressesCompleted; - - /// - public event SetPublicFolderPrimaryEmailAddressCompletedEventHandler SetPublicFolderPrimaryEmailAddressCompleted; - - /// - public event GetPublicFoldersStatisticsCompletedEventHandler GetPublicFoldersStatisticsCompleted; - - /// - public event GetPublicFoldersRecursiveCompletedEventHandler GetPublicFoldersRecursiveCompleted; - - /// - public event GetPublicFolderSizeCompletedEventHandler GetPublicFolderSizeCompleted; - - /// - public event CreateOrganizationActiveSyncPolicyCompletedEventHandler CreateOrganizationActiveSyncPolicyCompleted; - - /// - public event GetActiveSyncPolicyCompletedEventHandler GetActiveSyncPolicyCompleted; - + /// public event SetActiveSyncPolicyCompletedEventHandler SetActiveSyncPolicyCompleted; - + /// public event GetMobileDevicesCompletedEventHandler GetMobileDevicesCompleted; - + /// public event GetMobileDeviceCompletedEventHandler GetMobileDeviceCompleted; - + /// public event WipeDataFromDeviceCompletedEventHandler WipeDataFromDeviceCompleted; - + /// public event CancelRemoteWipeRequestCompletedEventHandler CancelRemoteWipeRequestCompleted; - + /// public event RemoveDeviceCompletedEventHandler RemoveDeviceCompleted; - + + /// + public event CheckAccountCredentialsCompletedEventHandler CheckAccountCredentialsCompleted; + + /// + public event ExtendToExchangeOrganizationCompletedEventHandler ExtendToExchangeOrganizationCompleted; + + /// + public event CreateMailEnableUserCompletedEventHandler CreateMailEnableUserCompleted; + + /// + public event CreateOrganizationOfflineAddressBookCompletedEventHandler CreateOrganizationOfflineAddressBookCompleted; + + /// + public event UpdateOrganizationOfflineAddressBookCompletedEventHandler UpdateOrganizationOfflineAddressBookCompleted; + + /// + public event GetOABVirtualDirectoryCompletedEventHandler GetOABVirtualDirectoryCompleted; + + /// + public event CreateOrganizationAddressBookPolicyCompletedEventHandler CreateOrganizationAddressBookPolicyCompleted; + + /// + public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; + + /// + public event SetOrganizationStorageLimitsCompletedEventHandler SetOrganizationStorageLimitsCompleted; + + /// + public event GetMailboxesStatisticsCompletedEventHandler GetMailboxesStatisticsCompleted; + + /// + public event AddAuthoritativeDomainCompletedEventHandler AddAuthoritativeDomainCompleted; + + /// + public event ChangeAcceptedDomainTypeCompletedEventHandler ChangeAcceptedDomainTypeCompleted; + + /// + public event GetAuthoritativeDomainsCompletedEventHandler GetAuthoritativeDomainsCompleted; + + /// + public event DeleteAuthoritativeDomainCompletedEventHandler DeleteAuthoritativeDomainCompleted; + + /// + public event DeleteMailboxCompletedEventHandler DeleteMailboxCompleted; + + /// + public event DisableMailboxCompletedEventHandler DisableMailboxCompleted; + + /// + public event GetMailboxGeneralSettingsCompletedEventHandler GetMailboxGeneralSettingsCompleted; + + /// + public event SetMailboxGeneralSettingsCompletedEventHandler SetMailboxGeneralSettingsCompleted; + + /// + public event GetMailboxMailFlowSettingsCompletedEventHandler GetMailboxMailFlowSettingsCompleted; + + /// + public event SetMailboxMailFlowSettingsCompletedEventHandler SetMailboxMailFlowSettingsCompleted; + + /// + public event GetMailboxAdvancedSettingsCompletedEventHandler GetMailboxAdvancedSettingsCompleted; + + /// + public event SetMailboxAdvancedSettingsCompletedEventHandler SetMailboxAdvancedSettingsCompleted; + + /// + public event GetMailboxEmailAddressesCompletedEventHandler GetMailboxEmailAddressesCompleted; + + /// + public event SetMailboxEmailAddressesCompletedEventHandler SetMailboxEmailAddressesCompleted; + + /// + public event SetMailboxPrimaryEmailAddressCompletedEventHandler SetMailboxPrimaryEmailAddressCompleted; + + /// + public event SetMailboxPermissionsCompletedEventHandler SetMailboxPermissionsCompleted; + + /// + public event GetMailboxPermissionsCompletedEventHandler GetMailboxPermissionsCompleted; + + /// + public event GetMailboxStatisticsCompletedEventHandler GetMailboxStatisticsCompleted; + + /// + public event CreateContactCompletedEventHandler CreateContactCompleted; + + /// + public event DeleteContactCompletedEventHandler DeleteContactCompleted; + + /// + public event GetContactGeneralSettingsCompletedEventHandler GetContactGeneralSettingsCompleted; + + /// + public event SetContactGeneralSettingsCompletedEventHandler SetContactGeneralSettingsCompleted; + + /// + public event GetContactMailFlowSettingsCompletedEventHandler GetContactMailFlowSettingsCompleted; + + /// + public event SetContactMailFlowSettingsCompletedEventHandler SetContactMailFlowSettingsCompleted; + + /// + public event CreateDistributionListCompletedEventHandler CreateDistributionListCompleted; + + /// + public event DeleteDistributionListCompletedEventHandler DeleteDistributionListCompleted; + + /// + public event GetDistributionListGeneralSettingsCompletedEventHandler GetDistributionListGeneralSettingsCompleted; + + /// + public event SetDistributionListGeneralSettingsCompletedEventHandler SetDistributionListGeneralSettingsCompleted; + + /// + public event GetDistributionListMailFlowSettingsCompletedEventHandler GetDistributionListMailFlowSettingsCompleted; + + /// + public event SetDistributionListMailFlowSettingsCompletedEventHandler SetDistributionListMailFlowSettingsCompleted; + + /// + public event GetDistributionListEmailAddressesCompletedEventHandler GetDistributionListEmailAddressesCompleted; + + /// + public event SetDistributionListEmailAddressesCompletedEventHandler SetDistributionListEmailAddressesCompleted; + + /// + public event SetDistributionListPrimaryEmailAddressCompletedEventHandler SetDistributionListPrimaryEmailAddressCompleted; + + /// + public event SetDistributionListPermissionsCompletedEventHandler SetDistributionListPermissionsCompleted; + + /// + public event GetDistributionListPermissionsCompletedEventHandler GetDistributionListPermissionsCompleted; + + /// + public event NewDisclaimerTransportRuleCompletedEventHandler NewDisclaimerTransportRuleCompleted; + + /// + public event RemoveTransportRuleCompletedEventHandler RemoveTransportRuleCompleted; + + /// + public event CreatePublicFolderCompletedEventHandler CreatePublicFolderCompleted; + + /// + public event DeletePublicFolderCompletedEventHandler DeletePublicFolderCompleted; + + /// + public event EnableMailPublicFolderCompletedEventHandler EnableMailPublicFolderCompleted; + + /// + public event DisableMailPublicFolderCompletedEventHandler DisableMailPublicFolderCompleted; + + /// + public event GetPublicFolderGeneralSettingsCompletedEventHandler GetPublicFolderGeneralSettingsCompleted; + + /// + public event SetPublicFolderGeneralSettingsCompletedEventHandler SetPublicFolderGeneralSettingsCompleted; + + /// + public event GetPublicFolderMailFlowSettingsCompletedEventHandler GetPublicFolderMailFlowSettingsCompleted; + + /// + public event SetPublicFolderMailFlowSettingsCompletedEventHandler SetPublicFolderMailFlowSettingsCompleted; + + /// + public event GetPublicFolderEmailAddressesCompletedEventHandler GetPublicFolderEmailAddressesCompleted; + + /// + public event SetPublicFolderEmailAddressesCompletedEventHandler SetPublicFolderEmailAddressesCompleted; + + /// + public event SetPublicFolderPrimaryEmailAddressCompletedEventHandler SetPublicFolderPrimaryEmailAddressCompleted; + + /// + public event GetPublicFoldersStatisticsCompletedEventHandler GetPublicFoldersStatisticsCompleted; + + /// + public event GetPublicFoldersRecursiveCompletedEventHandler GetPublicFoldersRecursiveCompleted; + + /// + public event GetPublicFolderSizeCompletedEventHandler GetPublicFolderSizeCompleted; + + /// + public event CreateOrganizationActiveSyncPolicyCompletedEventHandler CreateOrganizationActiveSyncPolicyCompleted; + + /// + public event GetActiveSyncPolicyCompletedEventHandler GetActiveSyncPolicyCompleted; + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckAccountCredentials", 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 CheckAccountCredentials(string username, string password) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetActiveSyncPolicy", 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 void SetActiveSyncPolicy( + string id, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInterval) + { + this.Invoke("SetActiveSyncPolicy", new object[] { + id, + allowNonProvisionableDevices, + attachmentsEnabled, + maxAttachmentSizeKB, + uncAccessEnabled, + wssAccessEnabled, + devicePasswordEnabled, + alphanumericPasswordRequired, + passwordRecoveryEnabled, + deviceEncryptionEnabled, + allowSimplePassword, + maxPasswordFailedAttempts, + minPasswordLength, + inactivityLockMin, + passwordExpirationDays, + passwordHistory, + refreshInterval}); + } + + /// + public System.IAsyncResult BeginSetActiveSyncPolicy( + string id, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInterval, + System.AsyncCallback callback, + object asyncState) + { + return this.BeginInvoke("SetActiveSyncPolicy", new object[] { + id, + allowNonProvisionableDevices, + attachmentsEnabled, + maxAttachmentSizeKB, + uncAccessEnabled, + wssAccessEnabled, + devicePasswordEnabled, + alphanumericPasswordRequired, + passwordRecoveryEnabled, + deviceEncryptionEnabled, + allowSimplePassword, + maxPasswordFailedAttempts, + minPasswordLength, + inactivityLockMin, + passwordExpirationDays, + passwordHistory, + refreshInterval}, callback, asyncState); + } + + /// + public void EndSetActiveSyncPolicy(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void SetActiveSyncPolicyAsync( + string id, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInterval) + { + this.SetActiveSyncPolicyAsync(id, allowNonProvisionableDevices, attachmentsEnabled, maxAttachmentSizeKB, uncAccessEnabled, wssAccessEnabled, devicePasswordEnabled, alphanumericPasswordRequired, passwordRecoveryEnabled, deviceEncryptionEnabled, allowSimplePassword, maxPasswordFailedAttempts, minPasswordLength, inactivityLockMin, passwordExpirationDays, passwordHistory, refreshInterval, null); + } + + /// + public void SetActiveSyncPolicyAsync( + string id, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInterval, + object userState) + { + if ((this.SetActiveSyncPolicyOperationCompleted == null)) + { + this.SetActiveSyncPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetActiveSyncPolicyOperationCompleted); + } + this.InvokeAsync("SetActiveSyncPolicy", new object[] { + id, + allowNonProvisionableDevices, + attachmentsEnabled, + maxAttachmentSizeKB, + uncAccessEnabled, + wssAccessEnabled, + devicePasswordEnabled, + alphanumericPasswordRequired, + passwordRecoveryEnabled, + deviceEncryptionEnabled, + allowSimplePassword, + maxPasswordFailedAttempts, + minPasswordLength, + inactivityLockMin, + passwordExpirationDays, + passwordHistory, + refreshInterval}, this.SetActiveSyncPolicyOperationCompleted, userState); + } + + private void OnSetActiveSyncPolicyOperationCompleted(object arg) + { + if ((this.SetActiveSyncPolicyCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetActiveSyncPolicyCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMobileDevices", 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 ExchangeMobileDevice[] GetMobileDevices(string accountName) + { + object[] results = this.Invoke("GetMobileDevices", new object[] { + accountName}); + return ((ExchangeMobileDevice[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetMobileDevices(string accountName, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetMobileDevices", new object[] { + accountName}, callback, asyncState); + } + + /// + public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeMobileDevice[])(results[0])); + } + + /// + public void GetMobileDevicesAsync(string accountName) + { + this.GetMobileDevicesAsync(accountName, null); + } + + /// + public void GetMobileDevicesAsync(string accountName, object userState) + { + if ((this.GetMobileDevicesOperationCompleted == null)) + { + this.GetMobileDevicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDevicesOperationCompleted); + } + this.InvokeAsync("GetMobileDevices", new object[] { + accountName}, this.GetMobileDevicesOperationCompleted, userState); + } + + private void OnGetMobileDevicesOperationCompleted(object arg) + { + if ((this.GetMobileDevicesCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetMobileDevicesCompleted(this, new GetMobileDevicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMobileDevice", 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 ExchangeMobileDevice GetMobileDevice(string id) + { + object[] results = this.Invoke("GetMobileDevice", new object[] { + id}); + return ((ExchangeMobileDevice)(results[0])); + } + + /// + public System.IAsyncResult BeginGetMobileDevice(string id, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetMobileDevice", new object[] { + id}, callback, asyncState); + } + + /// + public ExchangeMobileDevice EndGetMobileDevice(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeMobileDevice)(results[0])); + } + + /// + public void GetMobileDeviceAsync(string id) + { + this.GetMobileDeviceAsync(id, null); + } + + /// + public void GetMobileDeviceAsync(string id, object userState) + { + if ((this.GetMobileDeviceOperationCompleted == null)) + { + this.GetMobileDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDeviceOperationCompleted); + } + this.InvokeAsync("GetMobileDevice", new object[] { + id}, this.GetMobileDeviceOperationCompleted, userState); + } + + private void OnGetMobileDeviceOperationCompleted(object arg) + { + if ((this.GetMobileDeviceCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetMobileDeviceCompleted(this, new GetMobileDeviceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/WipeDataFromDevice", 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 void WipeDataFromDevice(string id) + { + this.Invoke("WipeDataFromDevice", new object[] { + id}); + } + + /// + public System.IAsyncResult BeginWipeDataFromDevice(string id, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("WipeDataFromDevice", new object[] { + id}, callback, asyncState); + } + + /// + public void EndWipeDataFromDevice(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void WipeDataFromDeviceAsync(string id) + { + this.WipeDataFromDeviceAsync(id, null); + } + + /// + public void WipeDataFromDeviceAsync(string id, object userState) + { + if ((this.WipeDataFromDeviceOperationCompleted == null)) + { + this.WipeDataFromDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWipeDataFromDeviceOperationCompleted); + } + this.InvokeAsync("WipeDataFromDevice", new object[] { + id}, this.WipeDataFromDeviceOperationCompleted, userState); + } + + private void OnWipeDataFromDeviceOperationCompleted(object arg) + { + if ((this.WipeDataFromDeviceCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.WipeDataFromDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CancelRemoteWipeRequest", 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 void CancelRemoteWipeRequest(string id) + { + this.Invoke("CancelRemoteWipeRequest", new object[] { + id}); + } + + /// + public System.IAsyncResult BeginCancelRemoteWipeRequest(string id, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("CancelRemoteWipeRequest", new object[] { + id}, callback, asyncState); + } + + /// + public void EndCancelRemoteWipeRequest(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void CancelRemoteWipeRequestAsync(string id) + { + this.CancelRemoteWipeRequestAsync(id, null); + } + + /// + public void CancelRemoteWipeRequestAsync(string id, object userState) + { + if ((this.CancelRemoteWipeRequestOperationCompleted == null)) + { + this.CancelRemoteWipeRequestOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelRemoteWipeRequestOperationCompleted); + } + this.InvokeAsync("CancelRemoteWipeRequest", new object[] { + id}, this.CancelRemoteWipeRequestOperationCompleted, userState); + } + + private void OnCancelRemoteWipeRequestOperationCompleted(object arg) + { + if ((this.CancelRemoteWipeRequestCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CancelRemoteWipeRequestCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveDevice", 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 void RemoveDevice(string id) + { + this.Invoke("RemoveDevice", new object[] { + id}); + } + + /// + public System.IAsyncResult BeginRemoveDevice(string id, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("RemoveDevice", new object[] { + id}, callback, asyncState); + } + + /// + public void EndRemoveDevice(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void RemoveDeviceAsync(string id) + { + this.RemoveDeviceAsync(id, null); + } + + /// + public void RemoveDeviceAsync(string id, object userState) + { + if ((this.RemoveDeviceOperationCompleted == null)) + { + this.RemoveDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveDeviceOperationCompleted); + } + this.InvokeAsync("RemoveDevice", new object[] { + id}, this.RemoveDeviceOperationCompleted, userState); + } + + private void OnRemoveDeviceOperationCompleted(object arg) + { + if ((this.RemoveDeviceCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RemoveDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckAccountCredentials", 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 CheckAccountCredentials(string username, string password) + { object[] results = this.Invoke("CheckAccountCredentials", new object[] { username, password}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckAccountCredentials(string username, string password, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCheckAccountCredentials(string username, string password, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CheckAccountCredentials", new object[] { username, password}, callback, asyncState); } - + /// - public bool EndCheckAccountCredentials(System.IAsyncResult asyncResult) { + public bool EndCheckAccountCredentials(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckAccountCredentialsAsync(string username, string password) { + public void CheckAccountCredentialsAsync(string username, string password) + { this.CheckAccountCredentialsAsync(username, password, null); } - + /// - public void CheckAccountCredentialsAsync(string username, string password, object userState) { - if ((this.CheckAccountCredentialsOperationCompleted == null)) { + public void CheckAccountCredentialsAsync(string username, string password, object userState) + { + if ((this.CheckAccountCredentialsOperationCompleted == null)) + { this.CheckAccountCredentialsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckAccountCredentialsOperationCompleted); } this.InvokeAsync("CheckAccountCredentials", new object[] { username, password}, this.CheckAccountCredentialsOperationCompleted, userState); } - - private void OnCheckAccountCredentialsOperationCompleted(object arg) { - if ((this.CheckAccountCredentialsCompleted != null)) { + + private void OnCheckAccountCredentialsOperationCompleted(object arg) + { + if ((this.CheckAccountCredentialsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckAccountCredentialsCompleted(this, new CheckAccountCredentialsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ExtendToExchangeOrganization", 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 Organization ExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ExtendToExchangeOrganization", 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 Organization ExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer) + { object[] results = this.Invoke("ExtendToExchangeOrganization", new object[] { organizationId, securityGroup, IsConsumer}); return ((Organization)(results[0])); } - + /// - public System.IAsyncResult BeginExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("ExtendToExchangeOrganization", new object[] { organizationId, securityGroup, IsConsumer}, callback, asyncState); } - + /// - public Organization EndExtendToExchangeOrganization(System.IAsyncResult asyncResult) { + public Organization EndExtendToExchangeOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization)(results[0])); } - + /// - public void ExtendToExchangeOrganizationAsync(string organizationId, string securityGroup, bool IsConsumer) { + public void ExtendToExchangeOrganizationAsync(string organizationId, string securityGroup, bool IsConsumer) + { this.ExtendToExchangeOrganizationAsync(organizationId, securityGroup, IsConsumer, null); } - + /// - public void ExtendToExchangeOrganizationAsync(string organizationId, string securityGroup, bool IsConsumer, object userState) { - if ((this.ExtendToExchangeOrganizationOperationCompleted == null)) { + public void ExtendToExchangeOrganizationAsync(string organizationId, string securityGroup, bool IsConsumer, object userState) + { + if ((this.ExtendToExchangeOrganizationOperationCompleted == null)) + { this.ExtendToExchangeOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnExtendToExchangeOrganizationOperationCompleted); } this.InvokeAsync("ExtendToExchangeOrganization", new object[] { @@ -485,43 +923,46 @@ namespace WebsitePanel.Providers.Exchange { securityGroup, IsConsumer}, this.ExtendToExchangeOrganizationOperationCompleted, userState); } - - private void OnExtendToExchangeOrganizationOperationCompleted(object arg) { - if ((this.ExtendToExchangeOrganizationCompleted != null)) { + + private void OnExtendToExchangeOrganizationOperationCompleted(object arg) + { + if ((this.ExtendToExchangeOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ExtendToExchangeOrganizationCompleted(this, new ExtendToExchangeOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateMailEnableUser", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateMailEnableUser", 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 CreateMailEnableUser( - string upn, - string organizationId, - string organizationDistinguishedName, - ExchangeAccountType accountType, - string mailboxDatabase, - string offlineAddressBook, - string addressBookPolicy, - string accountName, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - long issueWarningKB, - long prohibitSendKB, - long prohibitSendReceiveKB, - int keepDeletedItemsDays, - int maxRecipients, - int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, - bool hideFromAddressBook, - bool isConsumer, - bool enabledLitigationHold, - long recoverabelItemsSpace, - long recoverabelItemsWarning) { + string upn, + string organizationId, + string organizationDistinguishedName, + ExchangeAccountType accountType, + string mailboxDatabase, + string offlineAddressBook, + string addressBookPolicy, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + long issueWarningKB, + long prohibitSendKB, + long prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool hideFromAddressBook, + bool isConsumer, + bool enabledLitigationHold, + long recoverabelItemsSpace, + long recoverabelItemsWarning) + { object[] results = this.Invoke("CreateMailEnableUser", new object[] { upn, organizationId, @@ -550,36 +991,37 @@ namespace WebsitePanel.Providers.Exchange { recoverabelItemsWarning}); return ((string)(results[0])); } - + /// public System.IAsyncResult BeginCreateMailEnableUser( - string upn, - string organizationId, - string organizationDistinguishedName, - ExchangeAccountType accountType, - string mailboxDatabase, - string offlineAddressBook, - string addressBookPolicy, - string accountName, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - long issueWarningKB, - long prohibitSendKB, - long prohibitSendReceiveKB, - int keepDeletedItemsDays, - int maxRecipients, - int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, - bool hideFromAddressBook, - bool isConsumer, - bool enabledLitigationHold, - long recoverabelItemsSpace, - long recoverabelItemsWarning, - System.AsyncCallback callback, - object asyncState) { + string upn, + string organizationId, + string organizationDistinguishedName, + ExchangeAccountType accountType, + string mailboxDatabase, + string offlineAddressBook, + string addressBookPolicy, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + long issueWarningKB, + long prohibitSendKB, + long prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool hideFromAddressBook, + bool isConsumer, + bool enabledLitigationHold, + long recoverabelItemsSpace, + long recoverabelItemsWarning, + System.AsyncCallback callback, + object asyncState) + { return this.BeginInvoke("CreateMailEnableUser", new object[] { upn, organizationId, @@ -607,72 +1049,76 @@ namespace WebsitePanel.Providers.Exchange { recoverabelItemsSpace, recoverabelItemsWarning}, callback, asyncState); } - + /// - public string EndCreateMailEnableUser(System.IAsyncResult asyncResult) { + public string EndCreateMailEnableUser(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// public void CreateMailEnableUserAsync( - string upn, - string organizationId, - string organizationDistinguishedName, - ExchangeAccountType accountType, - string mailboxDatabase, - string offlineAddressBook, - string addressBookPolicy, - string accountName, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - long issueWarningKB, - long prohibitSendKB, - long prohibitSendReceiveKB, - int keepDeletedItemsDays, - int maxRecipients, - int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, - bool hideFromAddressBook, - bool isConsumer, - bool enabledLitigationHold, - long recoverabelItemsSpace, - long recoverabelItemsWarning) { + string upn, + string organizationId, + string organizationDistinguishedName, + ExchangeAccountType accountType, + string mailboxDatabase, + string offlineAddressBook, + string addressBookPolicy, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + long issueWarningKB, + long prohibitSendKB, + long prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool hideFromAddressBook, + bool isConsumer, + bool enabledLitigationHold, + long recoverabelItemsSpace, + long recoverabelItemsWarning) + { this.CreateMailEnableUserAsync(upn, organizationId, organizationDistinguishedName, accountType, mailboxDatabase, offlineAddressBook, addressBookPolicy, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, hideFromAddressBook, isConsumer, enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning, null); } - + /// public void CreateMailEnableUserAsync( - string upn, - string organizationId, - string organizationDistinguishedName, - ExchangeAccountType accountType, - string mailboxDatabase, - string offlineAddressBook, - string addressBookPolicy, - string accountName, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - long issueWarningKB, - long prohibitSendKB, - long prohibitSendReceiveKB, - int keepDeletedItemsDays, - int maxRecipients, - int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, - bool hideFromAddressBook, - bool isConsumer, - bool enabledLitigationHold, - long recoverabelItemsSpace, - long recoverabelItemsWarning, - object userState) { - if ((this.CreateMailEnableUserOperationCompleted == null)) { + string upn, + string organizationId, + string organizationDistinguishedName, + ExchangeAccountType accountType, + string mailboxDatabase, + string offlineAddressBook, + string addressBookPolicy, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + long issueWarningKB, + long prohibitSendKB, + long prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool hideFromAddressBook, + bool isConsumer, + bool enabledLitigationHold, + long recoverabelItemsSpace, + long recoverabelItemsWarning, + object userState) + { + if ((this.CreateMailEnableUserOperationCompleted == null)) + { this.CreateMailEnableUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateMailEnableUserOperationCompleted); } this.InvokeAsync("CreateMailEnableUser", new object[] { @@ -702,47 +1148,55 @@ namespace WebsitePanel.Providers.Exchange { recoverabelItemsSpace, recoverabelItemsWarning}, this.CreateMailEnableUserOperationCompleted, userState); } - - private void OnCreateMailEnableUserOperationCompleted(object arg) { - if ((this.CreateMailEnableUserCompleted != null)) { + + private void OnCreateMailEnableUserOperationCompleted(object arg) + { + if ((this.CreateMailEnableUserCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateMailEnableUserCompleted(this, new CreateMailEnableUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganizationOfflineAddressBook", 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 Organization CreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganizationOfflineAddressBook", 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 Organization CreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir) + { object[] results = this.Invoke("CreateOrganizationOfflineAddressBook", new object[] { organizationId, securityGroup, oabVirtualDir}); return ((Organization)(results[0])); } - + /// - public System.IAsyncResult BeginCreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateOrganizationOfflineAddressBook", new object[] { organizationId, securityGroup, oabVirtualDir}, callback, asyncState); } - + /// - public Organization EndCreateOrganizationOfflineAddressBook(System.IAsyncResult asyncResult) { + public Organization EndCreateOrganizationOfflineAddressBook(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization)(results[0])); } - + /// - public void CreateOrganizationOfflineAddressBookAsync(string organizationId, string securityGroup, string oabVirtualDir) { + public void CreateOrganizationOfflineAddressBookAsync(string organizationId, string securityGroup, string oabVirtualDir) + { this.CreateOrganizationOfflineAddressBookAsync(organizationId, securityGroup, oabVirtualDir, null); } - + /// - public void CreateOrganizationOfflineAddressBookAsync(string organizationId, string securityGroup, string oabVirtualDir, object userState) { - if ((this.CreateOrganizationOfflineAddressBookOperationCompleted == null)) { + public void CreateOrganizationOfflineAddressBookAsync(string organizationId, string securityGroup, string oabVirtualDir, object userState) + { + if ((this.CreateOrganizationOfflineAddressBookOperationCompleted == null)) + { this.CreateOrganizationOfflineAddressBookOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOfflineAddressBookOperationCompleted); } this.InvokeAsync("CreateOrganizationOfflineAddressBook", new object[] { @@ -750,97 +1204,116 @@ namespace WebsitePanel.Providers.Exchange { securityGroup, oabVirtualDir}, this.CreateOrganizationOfflineAddressBookOperationCompleted, userState); } - - private void OnCreateOrganizationOfflineAddressBookOperationCompleted(object arg) { - if ((this.CreateOrganizationOfflineAddressBookCompleted != null)) { + + private void OnCreateOrganizationOfflineAddressBookOperationCompleted(object arg) + { + if ((this.CreateOrganizationOfflineAddressBookCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateOrganizationOfflineAddressBookCompleted(this, new CreateOrganizationOfflineAddressBookCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/UpdateOrganizationOfflineAddressBook", 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 void UpdateOrganizationOfflineAddressBook(string id) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/UpdateOrganizationOfflineAddressBook", 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 void UpdateOrganizationOfflineAddressBook(string id) + { this.Invoke("UpdateOrganizationOfflineAddressBook", new object[] { id}); } - + /// - public System.IAsyncResult BeginUpdateOrganizationOfflineAddressBook(string id, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateOrganizationOfflineAddressBook(string id, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateOrganizationOfflineAddressBook", new object[] { id}, callback, asyncState); } - + /// - public void EndUpdateOrganizationOfflineAddressBook(System.IAsyncResult asyncResult) { + public void EndUpdateOrganizationOfflineAddressBook(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void UpdateOrganizationOfflineAddressBookAsync(string id) { + public void UpdateOrganizationOfflineAddressBookAsync(string id) + { this.UpdateOrganizationOfflineAddressBookAsync(id, null); } - + /// - public void UpdateOrganizationOfflineAddressBookAsync(string id, object userState) { - if ((this.UpdateOrganizationOfflineAddressBookOperationCompleted == null)) { + public void UpdateOrganizationOfflineAddressBookAsync(string id, object userState) + { + if ((this.UpdateOrganizationOfflineAddressBookOperationCompleted == null)) + { this.UpdateOrganizationOfflineAddressBookOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateOrganizationOfflineAddressBookOperationCompleted); } this.InvokeAsync("UpdateOrganizationOfflineAddressBook", new object[] { id}, this.UpdateOrganizationOfflineAddressBookOperationCompleted, userState); } - - private void OnUpdateOrganizationOfflineAddressBookOperationCompleted(object arg) { - if ((this.UpdateOrganizationOfflineAddressBookCompleted != null)) { + + private void OnUpdateOrganizationOfflineAddressBookOperationCompleted(object arg) + { + if ((this.UpdateOrganizationOfflineAddressBookCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateOrganizationOfflineAddressBookCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetOABVirtualDirectory", 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 GetOABVirtualDirectory() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetOABVirtualDirectory", 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 GetOABVirtualDirectory() + { object[] results = this.Invoke("GetOABVirtualDirectory", new object[0]); return ((string)(results[0])); } - + /// - public System.IAsyncResult BeginGetOABVirtualDirectory(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOABVirtualDirectory(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOABVirtualDirectory", new object[0], callback, asyncState); } - + /// - public string EndGetOABVirtualDirectory(System.IAsyncResult asyncResult) { + public string EndGetOABVirtualDirectory(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// - public void GetOABVirtualDirectoryAsync() { + public void GetOABVirtualDirectoryAsync() + { this.GetOABVirtualDirectoryAsync(null); } - + /// - public void GetOABVirtualDirectoryAsync(object userState) { - if ((this.GetOABVirtualDirectoryOperationCompleted == null)) { + public void GetOABVirtualDirectoryAsync(object userState) + { + if ((this.GetOABVirtualDirectoryOperationCompleted == null)) + { this.GetOABVirtualDirectoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOABVirtualDirectoryOperationCompleted); } this.InvokeAsync("GetOABVirtualDirectory", new object[0], this.GetOABVirtualDirectoryOperationCompleted, userState); } - - private void OnGetOABVirtualDirectoryOperationCompleted(object arg) { - if ((this.GetOABVirtualDirectoryCompleted != null)) { + + private void OnGetOABVirtualDirectoryOperationCompleted(object arg) + { + if ((this.GetOABVirtualDirectoryCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOABVirtualDirectoryCompleted(this, new GetOABVirtualDirectoryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganizationAddressBookPolicy", 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 Organization CreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganizationAddressBookPolicy", 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 Organization CreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab) + { object[] results = this.Invoke("CreateOrganizationAddressBookPolicy", new object[] { organizationId, gal, @@ -849,9 +1322,10 @@ namespace WebsitePanel.Providers.Exchange { oab}); return ((Organization)(results[0])); } - + /// - public System.IAsyncResult BeginCreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateOrganizationAddressBookPolicy", new object[] { organizationId, gal, @@ -859,21 +1333,25 @@ namespace WebsitePanel.Providers.Exchange { roomList, oab}, callback, asyncState); } - + /// - public Organization EndCreateOrganizationAddressBookPolicy(System.IAsyncResult asyncResult) { + public Organization EndCreateOrganizationAddressBookPolicy(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization)(results[0])); } - + /// - public void CreateOrganizationAddressBookPolicyAsync(string organizationId, string gal, string addressBook, string roomList, string oab) { + public void CreateOrganizationAddressBookPolicyAsync(string organizationId, string gal, string addressBook, string roomList, string oab) + { this.CreateOrganizationAddressBookPolicyAsync(organizationId, gal, addressBook, roomList, oab, null); } - + /// - public void CreateOrganizationAddressBookPolicyAsync(string organizationId, string gal, string addressBook, string roomList, string oab, object userState) { - if ((this.CreateOrganizationAddressBookPolicyOperationCompleted == null)) { + public void CreateOrganizationAddressBookPolicyAsync(string organizationId, string gal, string addressBook, string roomList, string oab, object userState) + { + if ((this.CreateOrganizationAddressBookPolicyOperationCompleted == null)) + { this.CreateOrganizationAddressBookPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationAddressBookPolicyOperationCompleted); } this.InvokeAsync("CreateOrganizationAddressBookPolicy", new object[] { @@ -883,18 +1361,21 @@ namespace WebsitePanel.Providers.Exchange { roomList, oab}, this.CreateOrganizationAddressBookPolicyOperationCompleted, userState); } - - private void OnCreateOrganizationAddressBookPolicyOperationCompleted(object arg) { - if ((this.CreateOrganizationAddressBookPolicyCompleted != null)) { + + private void OnCreateOrganizationAddressBookPolicyOperationCompleted(object arg) + { + if ((this.CreateOrganizationAddressBookPolicyCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateOrganizationAddressBookPolicyCompleted(this, new CreateOrganizationAddressBookPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", 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 DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", 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 DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy) + { object[] results = this.Invoke("DeleteOrganization", new object[] { organizationId, distinguishedName, @@ -906,9 +1387,10 @@ namespace WebsitePanel.Providers.Exchange { addressBookPolicy}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteOrganization", new object[] { organizationId, distinguishedName, @@ -919,21 +1401,25 @@ namespace WebsitePanel.Providers.Exchange { securityGroup, addressBookPolicy}, callback, asyncState); } - + /// - public bool EndDeleteOrganization(System.IAsyncResult asyncResult) { + public bool EndDeleteOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void DeleteOrganizationAsync(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy) { + public void DeleteOrganizationAsync(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy) + { this.DeleteOrganizationAsync(organizationId, distinguishedName, globalAddressList, addressList, roomList, offlineAddressBook, securityGroup, addressBookPolicy, null); } - + /// - public void DeleteOrganizationAsync(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy, object userState) { - if ((this.DeleteOrganizationOperationCompleted == null)) { + public void DeleteOrganizationAsync(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy, object userState) + { + if ((this.DeleteOrganizationOperationCompleted == null)) + { this.DeleteOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationOperationCompleted); } this.InvokeAsync("DeleteOrganization", new object[] { @@ -946,18 +1432,21 @@ namespace WebsitePanel.Providers.Exchange { securityGroup, addressBookPolicy}, this.DeleteOrganizationOperationCompleted, userState); } - - private void OnDeleteOrganizationOperationCompleted(object arg) { - if ((this.DeleteOrganizationCompleted != null)) { + + private void OnDeleteOrganizationOperationCompleted(object arg) + { + if ((this.DeleteOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteOrganizationCompleted(this, new DeleteOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetOrganizationStorageLimits", 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 void SetOrganizationStorageLimits(string organizationDistinguishedName, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetOrganizationStorageLimits", 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 void SetOrganizationStorageLimits(string organizationDistinguishedName, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays) + { this.Invoke("SetOrganizationStorageLimits", new object[] { organizationDistinguishedName, issueWarningKB, @@ -965,9 +1454,10 @@ namespace WebsitePanel.Providers.Exchange { prohibitSendReceiveKB, keepDeletedItemsDays}); } - + /// - public System.IAsyncResult BeginSetOrganizationStorageLimits(string organizationDistinguishedName, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetOrganizationStorageLimits(string organizationDistinguishedName, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetOrganizationStorageLimits", new object[] { organizationDistinguishedName, issueWarningKB, @@ -975,20 +1465,24 @@ namespace WebsitePanel.Providers.Exchange { prohibitSendReceiveKB, keepDeletedItemsDays}, callback, asyncState); } - + /// - public void EndSetOrganizationStorageLimits(System.IAsyncResult asyncResult) { + public void EndSetOrganizationStorageLimits(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetOrganizationStorageLimitsAsync(string organizationDistinguishedName, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays) { + public void SetOrganizationStorageLimitsAsync(string organizationDistinguishedName, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays) + { this.SetOrganizationStorageLimitsAsync(organizationDistinguishedName, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, null); } - + /// - public void SetOrganizationStorageLimitsAsync(string organizationDistinguishedName, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, object userState) { - if ((this.SetOrganizationStorageLimitsOperationCompleted == null)) { + public void SetOrganizationStorageLimitsAsync(string organizationDistinguishedName, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, object userState) + { + if ((this.SetOrganizationStorageLimitsOperationCompleted == null)) + { this.SetOrganizationStorageLimitsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationStorageLimitsOperationCompleted); } this.InvokeAsync("SetOrganizationStorageLimits", new object[] { @@ -998,371 +1492,443 @@ namespace WebsitePanel.Providers.Exchange { prohibitSendReceiveKB, keepDeletedItemsDays}, this.SetOrganizationStorageLimitsOperationCompleted, userState); } - - private void OnSetOrganizationStorageLimitsOperationCompleted(object arg) { - if ((this.SetOrganizationStorageLimitsCompleted != null)) { + + private void OnSetOrganizationStorageLimitsOperationCompleted(object arg) + { + if ((this.SetOrganizationStorageLimitsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetOrganizationStorageLimitsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxesStatistics", 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 ExchangeItemStatistics[] GetMailboxesStatistics(string organizationDistinguishedName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxesStatistics", 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 ExchangeItemStatistics[] GetMailboxesStatistics(string organizationDistinguishedName) + { object[] results = this.Invoke("GetMailboxesStatistics", new object[] { organizationDistinguishedName}); return ((ExchangeItemStatistics[])(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxesStatistics(string organizationDistinguishedName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxesStatistics(string organizationDistinguishedName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxesStatistics", new object[] { organizationDistinguishedName}, callback, asyncState); } - + /// - public ExchangeItemStatistics[] EndGetMailboxesStatistics(System.IAsyncResult asyncResult) { + public ExchangeItemStatistics[] EndGetMailboxesStatistics(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeItemStatistics[])(results[0])); } - + /// - public void GetMailboxesStatisticsAsync(string organizationDistinguishedName) { + public void GetMailboxesStatisticsAsync(string organizationDistinguishedName) + { this.GetMailboxesStatisticsAsync(organizationDistinguishedName, null); } - + /// - public void GetMailboxesStatisticsAsync(string organizationDistinguishedName, object userState) { - if ((this.GetMailboxesStatisticsOperationCompleted == null)) { + public void GetMailboxesStatisticsAsync(string organizationDistinguishedName, object userState) + { + if ((this.GetMailboxesStatisticsOperationCompleted == null)) + { this.GetMailboxesStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxesStatisticsOperationCompleted); } this.InvokeAsync("GetMailboxesStatistics", new object[] { organizationDistinguishedName}, this.GetMailboxesStatisticsOperationCompleted, userState); } - - private void OnGetMailboxesStatisticsOperationCompleted(object arg) { - if ((this.GetMailboxesStatisticsCompleted != null)) { + + private void OnGetMailboxesStatisticsOperationCompleted(object arg) + { + if ((this.GetMailboxesStatisticsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxesStatisticsCompleted(this, new GetMailboxesStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddAuthoritativeDomain", 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 void AddAuthoritativeDomain(string domain) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddAuthoritativeDomain", 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 void AddAuthoritativeDomain(string domain) + { this.Invoke("AddAuthoritativeDomain", new object[] { domain}); } - + /// - public System.IAsyncResult BeginAddAuthoritativeDomain(string domain, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddAuthoritativeDomain(string domain, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddAuthoritativeDomain", new object[] { domain}, callback, asyncState); } - + /// - public void EndAddAuthoritativeDomain(System.IAsyncResult asyncResult) { + public void EndAddAuthoritativeDomain(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void AddAuthoritativeDomainAsync(string domain) { + public void AddAuthoritativeDomainAsync(string domain) + { this.AddAuthoritativeDomainAsync(domain, null); } - + /// - public void AddAuthoritativeDomainAsync(string domain, object userState) { - if ((this.AddAuthoritativeDomainOperationCompleted == null)) { + public void AddAuthoritativeDomainAsync(string domain, object userState) + { + if ((this.AddAuthoritativeDomainOperationCompleted == null)) + { this.AddAuthoritativeDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddAuthoritativeDomainOperationCompleted); } this.InvokeAsync("AddAuthoritativeDomain", new object[] { domain}, this.AddAuthoritativeDomainOperationCompleted, userState); } - - private void OnAddAuthoritativeDomainOperationCompleted(object arg) { - if ((this.AddAuthoritativeDomainCompleted != null)) { + + private void OnAddAuthoritativeDomainOperationCompleted(object arg) + { + if ((this.AddAuthoritativeDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddAuthoritativeDomainCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ChangeAcceptedDomainType", 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 void ChangeAcceptedDomainType(string domain, ExchangeAcceptedDomainType domainType) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ChangeAcceptedDomainType", 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 void ChangeAcceptedDomainType(string domain, ExchangeAcceptedDomainType domainType) + { this.Invoke("ChangeAcceptedDomainType", new object[] { domain, domainType}); } - + /// - public System.IAsyncResult BeginChangeAcceptedDomainType(string domain, ExchangeAcceptedDomainType domainType, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginChangeAcceptedDomainType(string domain, ExchangeAcceptedDomainType domainType, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("ChangeAcceptedDomainType", new object[] { domain, domainType}, callback, asyncState); } - + /// - public void EndChangeAcceptedDomainType(System.IAsyncResult asyncResult) { + public void EndChangeAcceptedDomainType(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void ChangeAcceptedDomainTypeAsync(string domain, ExchangeAcceptedDomainType domainType) { + public void ChangeAcceptedDomainTypeAsync(string domain, ExchangeAcceptedDomainType domainType) + { this.ChangeAcceptedDomainTypeAsync(domain, domainType, null); } - + /// - public void ChangeAcceptedDomainTypeAsync(string domain, ExchangeAcceptedDomainType domainType, object userState) { - if ((this.ChangeAcceptedDomainTypeOperationCompleted == null)) { + public void ChangeAcceptedDomainTypeAsync(string domain, ExchangeAcceptedDomainType domainType, object userState) + { + if ((this.ChangeAcceptedDomainTypeOperationCompleted == null)) + { this.ChangeAcceptedDomainTypeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnChangeAcceptedDomainTypeOperationCompleted); } this.InvokeAsync("ChangeAcceptedDomainType", new object[] { domain, domainType}, this.ChangeAcceptedDomainTypeOperationCompleted, userState); } - - private void OnChangeAcceptedDomainTypeOperationCompleted(object arg) { - if ((this.ChangeAcceptedDomainTypeCompleted != null)) { + + private void OnChangeAcceptedDomainTypeOperationCompleted(object arg) + { + if ((this.ChangeAcceptedDomainTypeCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ChangeAcceptedDomainTypeCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetAuthoritativeDomains", 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[] GetAuthoritativeDomains() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetAuthoritativeDomains", 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[] GetAuthoritativeDomains() + { object[] results = this.Invoke("GetAuthoritativeDomains", new object[0]); return ((string[])(results[0])); } - + /// - public System.IAsyncResult BeginGetAuthoritativeDomains(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetAuthoritativeDomains(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetAuthoritativeDomains", new object[0], callback, asyncState); } - + /// - public string[] EndGetAuthoritativeDomains(System.IAsyncResult asyncResult) { + public string[] EndGetAuthoritativeDomains(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string[])(results[0])); } - + /// - public void GetAuthoritativeDomainsAsync() { + public void GetAuthoritativeDomainsAsync() + { this.GetAuthoritativeDomainsAsync(null); } - + /// - public void GetAuthoritativeDomainsAsync(object userState) { - if ((this.GetAuthoritativeDomainsOperationCompleted == null)) { + public void GetAuthoritativeDomainsAsync(object userState) + { + if ((this.GetAuthoritativeDomainsOperationCompleted == null)) + { this.GetAuthoritativeDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAuthoritativeDomainsOperationCompleted); } this.InvokeAsync("GetAuthoritativeDomains", new object[0], this.GetAuthoritativeDomainsOperationCompleted, userState); } - - private void OnGetAuthoritativeDomainsOperationCompleted(object arg) { - if ((this.GetAuthoritativeDomainsCompleted != null)) { + + private void OnGetAuthoritativeDomainsOperationCompleted(object arg) + { + if ((this.GetAuthoritativeDomainsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAuthoritativeDomainsCompleted(this, new GetAuthoritativeDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteAuthoritativeDomain", 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 void DeleteAuthoritativeDomain(string domain) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteAuthoritativeDomain", 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 void DeleteAuthoritativeDomain(string domain) + { this.Invoke("DeleteAuthoritativeDomain", new object[] { domain}); } - + /// - public System.IAsyncResult BeginDeleteAuthoritativeDomain(string domain, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteAuthoritativeDomain(string domain, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteAuthoritativeDomain", new object[] { domain}, callback, asyncState); } - + /// - public void EndDeleteAuthoritativeDomain(System.IAsyncResult asyncResult) { + public void EndDeleteAuthoritativeDomain(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DeleteAuthoritativeDomainAsync(string domain) { + public void DeleteAuthoritativeDomainAsync(string domain) + { this.DeleteAuthoritativeDomainAsync(domain, null); } - + /// - public void DeleteAuthoritativeDomainAsync(string domain, object userState) { - if ((this.DeleteAuthoritativeDomainOperationCompleted == null)) { + public void DeleteAuthoritativeDomainAsync(string domain, object userState) + { + if ((this.DeleteAuthoritativeDomainOperationCompleted == null)) + { this.DeleteAuthoritativeDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteAuthoritativeDomainOperationCompleted); } this.InvokeAsync("DeleteAuthoritativeDomain", new object[] { domain}, this.DeleteAuthoritativeDomainOperationCompleted, userState); } - - private void OnDeleteAuthoritativeDomainOperationCompleted(object arg) { - if ((this.DeleteAuthoritativeDomainCompleted != null)) { + + private void OnDeleteAuthoritativeDomainOperationCompleted(object arg) + { + if ((this.DeleteAuthoritativeDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteAuthoritativeDomainCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteMailbox", 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 void DeleteMailbox(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteMailbox", 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 void DeleteMailbox(string accountName) + { this.Invoke("DeleteMailbox", new object[] { accountName}); } - + /// - public System.IAsyncResult BeginDeleteMailbox(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteMailbox(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteMailbox", new object[] { accountName}, callback, asyncState); } - + /// - public void EndDeleteMailbox(System.IAsyncResult asyncResult) { + public void EndDeleteMailbox(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DeleteMailboxAsync(string accountName) { + public void DeleteMailboxAsync(string accountName) + { this.DeleteMailboxAsync(accountName, null); } - + /// - public void DeleteMailboxAsync(string accountName, object userState) { - if ((this.DeleteMailboxOperationCompleted == null)) { + public void DeleteMailboxAsync(string accountName, object userState) + { + if ((this.DeleteMailboxOperationCompleted == null)) + { this.DeleteMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteMailboxOperationCompleted); } this.InvokeAsync("DeleteMailbox", new object[] { accountName}, this.DeleteMailboxOperationCompleted, userState); } - - private void OnDeleteMailboxOperationCompleted(object arg) { - if ((this.DeleteMailboxCompleted != null)) { + + private void OnDeleteMailboxOperationCompleted(object arg) + { + if ((this.DeleteMailboxCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteMailboxCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DisableMailbox", 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 void DisableMailbox(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DisableMailbox", 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 void DisableMailbox(string accountName) + { this.Invoke("DisableMailbox", new object[] { accountName}); } - + /// - public System.IAsyncResult BeginDisableMailbox(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDisableMailbox(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DisableMailbox", new object[] { accountName}, callback, asyncState); } - + /// - public void EndDisableMailbox(System.IAsyncResult asyncResult) { + public void EndDisableMailbox(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DisableMailboxAsync(string accountName) { + public void DisableMailboxAsync(string accountName) + { this.DisableMailboxAsync(accountName, null); } - + /// - public void DisableMailboxAsync(string accountName, object userState) { - if ((this.DisableMailboxOperationCompleted == null)) { + public void DisableMailboxAsync(string accountName, object userState) + { + if ((this.DisableMailboxOperationCompleted == null)) + { this.DisableMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableMailboxOperationCompleted); } this.InvokeAsync("DisableMailbox", new object[] { accountName}, this.DisableMailboxOperationCompleted, userState); } - - private void OnDisableMailboxOperationCompleted(object arg) { - if ((this.DisableMailboxCompleted != null)) { + + private void OnDisableMailboxOperationCompleted(object arg) + { + if ((this.DisableMailboxCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DisableMailboxCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxGeneralSettings", 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 ExchangeMailbox GetMailboxGeneralSettings(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxGeneralSettings", 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 ExchangeMailbox GetMailboxGeneralSettings(string accountName) + { object[] results = this.Invoke("GetMailboxGeneralSettings", new object[] { accountName}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxGeneralSettings(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxGeneralSettings(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxGeneralSettings", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxGeneralSettings(System.IAsyncResult asyncResult) { + public ExchangeMailbox EndGetMailboxGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxGeneralSettingsAsync(string accountName) { + public void GetMailboxGeneralSettingsAsync(string accountName) + { this.GetMailboxGeneralSettingsAsync(accountName, null); } - + /// - public void GetMailboxGeneralSettingsAsync(string accountName, object userState) { - if ((this.GetMailboxGeneralSettingsOperationCompleted == null)) { + public void GetMailboxGeneralSettingsAsync(string accountName, object userState) + { + if ((this.GetMailboxGeneralSettingsOperationCompleted == null)) + { this.GetMailboxGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxGeneralSettingsOperationCompleted); } this.InvokeAsync("GetMailboxGeneralSettings", new object[] { accountName}, this.GetMailboxGeneralSettingsOperationCompleted, userState); } - - private void OnGetMailboxGeneralSettingsOperationCompleted(object arg) { - if ((this.GetMailboxGeneralSettingsCompleted != null)) { + + private void OnGetMailboxGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetMailboxGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxGeneralSettingsCompleted(this, new GetMailboxGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxGeneralSettings", 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 void SetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxGeneralSettings", 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 void SetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled) + { this.Invoke("SetMailboxGeneralSettings", new object[] { accountName, hideFromAddressBook, disabled}); } - + /// - public System.IAsyncResult BeginSetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxGeneralSettings", new object[] { accountName, hideFromAddressBook, disabled}, callback, asyncState); } - + /// - public void EndSetMailboxGeneralSettings(System.IAsyncResult asyncResult) { + public void EndSetMailboxGeneralSettings(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetMailboxGeneralSettingsAsync(string accountName, bool hideFromAddressBook, bool disabled) { + public void SetMailboxGeneralSettingsAsync(string accountName, bool hideFromAddressBook, bool disabled) + { this.SetMailboxGeneralSettingsAsync(accountName, hideFromAddressBook, disabled, null); } - + /// - public void SetMailboxGeneralSettingsAsync(string accountName, bool hideFromAddressBook, bool disabled, object userState) { - if ((this.SetMailboxGeneralSettingsOperationCompleted == null)) { + public void SetMailboxGeneralSettingsAsync(string accountName, bool hideFromAddressBook, bool disabled, object userState) + { + if ((this.SetMailboxGeneralSettingsOperationCompleted == null)) + { this.SetMailboxGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxGeneralSettingsOperationCompleted); } this.InvokeAsync("SetMailboxGeneralSettings", new object[] { @@ -1370,60 +1936,71 @@ namespace WebsitePanel.Providers.Exchange { hideFromAddressBook, disabled}, this.SetMailboxGeneralSettingsOperationCompleted, userState); } - - private void OnSetMailboxGeneralSettingsOperationCompleted(object arg) { - if ((this.SetMailboxGeneralSettingsCompleted != null)) { + + private void OnSetMailboxGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetMailboxGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxGeneralSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxMailFlowSettings", 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 ExchangeMailbox GetMailboxMailFlowSettings(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxMailFlowSettings", 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 ExchangeMailbox GetMailboxMailFlowSettings(string accountName) + { object[] results = this.Invoke("GetMailboxMailFlowSettings", new object[] { accountName}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxMailFlowSettings(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxMailFlowSettings(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxMailFlowSettings", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxMailFlowSettings(System.IAsyncResult asyncResult) { + public ExchangeMailbox EndGetMailboxMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxMailFlowSettingsAsync(string accountName) { + public void GetMailboxMailFlowSettingsAsync(string accountName) + { this.GetMailboxMailFlowSettingsAsync(accountName, null); } - + /// - public void GetMailboxMailFlowSettingsAsync(string accountName, object userState) { - if ((this.GetMailboxMailFlowSettingsOperationCompleted == null)) { + public void GetMailboxMailFlowSettingsAsync(string accountName, object userState) + { + if ((this.GetMailboxMailFlowSettingsOperationCompleted == null)) + { this.GetMailboxMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetMailboxMailFlowSettings", new object[] { accountName}, this.GetMailboxMailFlowSettingsOperationCompleted, userState); } - - private void OnGetMailboxMailFlowSettingsOperationCompleted(object arg) { - if ((this.GetMailboxMailFlowSettingsCompleted != null)) { + + private void OnGetMailboxMailFlowSettingsOperationCompleted(object arg) + { + if ((this.GetMailboxMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxMailFlowSettingsCompleted(this, new GetMailboxMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxMailFlowSettings", 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 void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxMailFlowSettings", 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 void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { this.Invoke("SetMailboxMailFlowSettings", new object[] { accountName, enableForwarding, @@ -1434,9 +2011,10 @@ namespace WebsitePanel.Providers.Exchange { rejectAccounts, requireSenderAuthentication}); } - + /// - public System.IAsyncResult BeginSetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxMailFlowSettings", new object[] { accountName, enableForwarding, @@ -1447,20 +2025,24 @@ namespace WebsitePanel.Providers.Exchange { rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public void EndSetMailboxMailFlowSettings(System.IAsyncResult asyncResult) { + public void EndSetMailboxMailFlowSettings(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetMailboxMailFlowSettingsAsync(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + public void SetMailboxMailFlowSettingsAsync(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { this.SetMailboxMailFlowSettingsAsync(accountName, enableForwarding, forwardingAccountName, forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetMailboxMailFlowSettingsAsync(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { - if ((this.SetMailboxMailFlowSettingsOperationCompleted == null)) { + public void SetMailboxMailFlowSettingsAsync(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) + { + if ((this.SetMailboxMailFlowSettingsOperationCompleted == null)) + { this.SetMailboxMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetMailboxMailFlowSettings", new object[] { @@ -1473,79 +2055,90 @@ namespace WebsitePanel.Providers.Exchange { rejectAccounts, requireSenderAuthentication}, this.SetMailboxMailFlowSettingsOperationCompleted, userState); } - - private void OnSetMailboxMailFlowSettingsOperationCompleted(object arg) { - if ((this.SetMailboxMailFlowSettingsCompleted != null)) { + + private void OnSetMailboxMailFlowSettingsOperationCompleted(object arg) + { + if ((this.SetMailboxMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxMailFlowSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxAdvancedSettings", 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 ExchangeMailbox GetMailboxAdvancedSettings(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxAdvancedSettings", 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 ExchangeMailbox GetMailboxAdvancedSettings(string accountName) + { object[] results = this.Invoke("GetMailboxAdvancedSettings", new object[] { accountName}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxAdvancedSettings(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxAdvancedSettings(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxAdvancedSettings", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxAdvancedSettings(System.IAsyncResult asyncResult) { + public ExchangeMailbox EndGetMailboxAdvancedSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxAdvancedSettingsAsync(string accountName) { + public void GetMailboxAdvancedSettingsAsync(string accountName) + { this.GetMailboxAdvancedSettingsAsync(accountName, null); } - + /// - public void GetMailboxAdvancedSettingsAsync(string accountName, object userState) { - if ((this.GetMailboxAdvancedSettingsOperationCompleted == null)) { + public void GetMailboxAdvancedSettingsAsync(string accountName, object userState) + { + if ((this.GetMailboxAdvancedSettingsOperationCompleted == null)) + { this.GetMailboxAdvancedSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxAdvancedSettingsOperationCompleted); } this.InvokeAsync("GetMailboxAdvancedSettings", new object[] { accountName}, this.GetMailboxAdvancedSettingsOperationCompleted, userState); } - - private void OnGetMailboxAdvancedSettingsOperationCompleted(object arg) { - if ((this.GetMailboxAdvancedSettingsCompleted != null)) { + + private void OnGetMailboxAdvancedSettingsOperationCompleted(object arg) + { + if ((this.GetMailboxAdvancedSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxAdvancedSettingsCompleted(this, new GetMailboxAdvancedSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxAdvancedSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxAdvancedSettings", 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 void SetMailboxAdvancedSettings( - string organizationId, - string accountName, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - long issueWarningKB, - long prohibitSendKB, - long prohibitSendReceiveKB, - int keepDeletedItemsDays, - int maxRecipients, - int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, - bool enabledLitigationHold, - long recoverabelItemsSpace, - long recoverabelItemsWarning, - string litigationHoldUrl, - string litigationHoldMsg) { + string organizationId, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + long issueWarningKB, + long prohibitSendKB, + long prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool enabledLitigationHold, + long recoverabelItemsSpace, + long recoverabelItemsWarning, + string litigationHoldUrl, + string litigationHoldMsg) + { this.Invoke("SetMailboxAdvancedSettings", new object[] { organizationId, accountName, @@ -1567,30 +2160,31 @@ namespace WebsitePanel.Providers.Exchange { litigationHoldUrl, litigationHoldMsg}); } - + /// public System.IAsyncResult BeginSetMailboxAdvancedSettings( - string organizationId, - string accountName, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - long issueWarningKB, - long prohibitSendKB, - long prohibitSendReceiveKB, - int keepDeletedItemsDays, - int maxRecipients, - int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, - bool enabledLitigationHold, - long recoverabelItemsSpace, - long recoverabelItemsWarning, - string litigationHoldUrl, - string litigationHoldMsg, - System.AsyncCallback callback, - object asyncState) { + string organizationId, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + long issueWarningKB, + long prohibitSendKB, + long prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool enabledLitigationHold, + long recoverabelItemsSpace, + long recoverabelItemsWarning, + string litigationHoldUrl, + string litigationHoldMsg, + System.AsyncCallback callback, + object asyncState) + { return this.BeginInvoke("SetMailboxAdvancedSettings", new object[] { organizationId, accountName, @@ -1612,59 +2206,63 @@ namespace WebsitePanel.Providers.Exchange { litigationHoldUrl, litigationHoldMsg}, callback, asyncState); } - + /// - public void EndSetMailboxAdvancedSettings(System.IAsyncResult asyncResult) { + public void EndSetMailboxAdvancedSettings(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// public void SetMailboxAdvancedSettingsAsync( - string organizationId, - string accountName, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - long issueWarningKB, - long prohibitSendKB, - long prohibitSendReceiveKB, - int keepDeletedItemsDays, - int maxRecipients, - int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, - bool enabledLitigationHold, - long recoverabelItemsSpace, - long recoverabelItemsWarning, - string litigationHoldUrl, - string litigationHoldMsg) { + string organizationId, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + long issueWarningKB, + long prohibitSendKB, + long prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool enabledLitigationHold, + long recoverabelItemsSpace, + long recoverabelItemsWarning, + string litigationHoldUrl, + string litigationHoldMsg) + { this.SetMailboxAdvancedSettingsAsync(organizationId, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning, litigationHoldUrl, litigationHoldMsg, null); } - + /// public void SetMailboxAdvancedSettingsAsync( - string organizationId, - string accountName, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - long issueWarningKB, - long prohibitSendKB, - long prohibitSendReceiveKB, - int keepDeletedItemsDays, - int maxRecipients, - int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, - bool enabledLitigationHold, - long recoverabelItemsSpace, - long recoverabelItemsWarning, - string litigationHoldUrl, - string litigationHoldMsg, - object userState) { - if ((this.SetMailboxAdvancedSettingsOperationCompleted == null)) { + string organizationId, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + long issueWarningKB, + long prohibitSendKB, + long prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool enabledLitigationHold, + long recoverabelItemsSpace, + long recoverabelItemsWarning, + string litigationHoldUrl, + string litigationHoldMsg, + object userState) + { + if ((this.SetMailboxAdvancedSettingsOperationCompleted == null)) + { this.SetMailboxAdvancedSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxAdvancedSettingsOperationCompleted); } this.InvokeAsync("SetMailboxAdvancedSettings", new object[] { @@ -1688,175 +2286,207 @@ namespace WebsitePanel.Providers.Exchange { litigationHoldUrl, litigationHoldMsg}, this.SetMailboxAdvancedSettingsOperationCompleted, userState); } - - private void OnSetMailboxAdvancedSettingsOperationCompleted(object arg) { - if ((this.SetMailboxAdvancedSettingsCompleted != null)) { + + private void OnSetMailboxAdvancedSettingsOperationCompleted(object arg) + { + if ((this.SetMailboxAdvancedSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxAdvancedSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxEmailAddresses", 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 ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxEmailAddresses", 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 ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName) + { object[] results = this.Invoke("GetMailboxEmailAddresses", new object[] { accountName}); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxEmailAddresses(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxEmailAddresses(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxEmailAddresses", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeEmailAddress[] EndGetMailboxEmailAddresses(System.IAsyncResult asyncResult) { + public ExchangeEmailAddress[] EndGetMailboxEmailAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public void GetMailboxEmailAddressesAsync(string accountName) { + public void GetMailboxEmailAddressesAsync(string accountName) + { this.GetMailboxEmailAddressesAsync(accountName, null); } - + /// - public void GetMailboxEmailAddressesAsync(string accountName, object userState) { - if ((this.GetMailboxEmailAddressesOperationCompleted == null)) { + public void GetMailboxEmailAddressesAsync(string accountName, object userState) + { + if ((this.GetMailboxEmailAddressesOperationCompleted == null)) + { this.GetMailboxEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxEmailAddressesOperationCompleted); } this.InvokeAsync("GetMailboxEmailAddresses", new object[] { accountName}, this.GetMailboxEmailAddressesOperationCompleted, userState); } - - private void OnGetMailboxEmailAddressesOperationCompleted(object arg) { - if ((this.GetMailboxEmailAddressesCompleted != null)) { + + private void OnGetMailboxEmailAddressesOperationCompleted(object arg) + { + if ((this.GetMailboxEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxEmailAddressesCompleted(this, new GetMailboxEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxEmailAddresses", 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 void SetMailboxEmailAddresses(string accountName, string[] emailAddresses) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxEmailAddresses", 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 void SetMailboxEmailAddresses(string accountName, string[] emailAddresses) + { this.Invoke("SetMailboxEmailAddresses", new object[] { accountName, emailAddresses}); } - + /// - public System.IAsyncResult BeginSetMailboxEmailAddresses(string accountName, string[] emailAddresses, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxEmailAddresses(string accountName, string[] emailAddresses, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxEmailAddresses", new object[] { accountName, emailAddresses}, callback, asyncState); } - + /// - public void EndSetMailboxEmailAddresses(System.IAsyncResult asyncResult) { + public void EndSetMailboxEmailAddresses(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetMailboxEmailAddressesAsync(string accountName, string[] emailAddresses) { + public void SetMailboxEmailAddressesAsync(string accountName, string[] emailAddresses) + { this.SetMailboxEmailAddressesAsync(accountName, emailAddresses, null); } - + /// - public void SetMailboxEmailAddressesAsync(string accountName, string[] emailAddresses, object userState) { - if ((this.SetMailboxEmailAddressesOperationCompleted == null)) { + public void SetMailboxEmailAddressesAsync(string accountName, string[] emailAddresses, object userState) + { + if ((this.SetMailboxEmailAddressesOperationCompleted == null)) + { this.SetMailboxEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxEmailAddressesOperationCompleted); } this.InvokeAsync("SetMailboxEmailAddresses", new object[] { accountName, emailAddresses}, this.SetMailboxEmailAddressesOperationCompleted, userState); } - - private void OnSetMailboxEmailAddressesOperationCompleted(object arg) { - if ((this.SetMailboxEmailAddressesCompleted != null)) { + + private void OnSetMailboxEmailAddressesOperationCompleted(object arg) + { + if ((this.SetMailboxEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxEmailAddressesCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxPrimaryEmailAddress", 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 void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxPrimaryEmailAddress", 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 void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress) + { this.Invoke("SetMailboxPrimaryEmailAddress", new object[] { accountName, emailAddress}); } - + /// - public System.IAsyncResult BeginSetMailboxPrimaryEmailAddress(string accountName, string emailAddress, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxPrimaryEmailAddress(string accountName, string emailAddress, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxPrimaryEmailAddress", new object[] { accountName, emailAddress}, callback, asyncState); } - + /// - public void EndSetMailboxPrimaryEmailAddress(System.IAsyncResult asyncResult) { + public void EndSetMailboxPrimaryEmailAddress(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetMailboxPrimaryEmailAddressAsync(string accountName, string emailAddress) { + public void SetMailboxPrimaryEmailAddressAsync(string accountName, string emailAddress) + { this.SetMailboxPrimaryEmailAddressAsync(accountName, emailAddress, null); } - + /// - public void SetMailboxPrimaryEmailAddressAsync(string accountName, string emailAddress, object userState) { - if ((this.SetMailboxPrimaryEmailAddressOperationCompleted == null)) { + public void SetMailboxPrimaryEmailAddressAsync(string accountName, string emailAddress, object userState) + { + if ((this.SetMailboxPrimaryEmailAddressOperationCompleted == null)) + { this.SetMailboxPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxPrimaryEmailAddressOperationCompleted); } this.InvokeAsync("SetMailboxPrimaryEmailAddress", new object[] { accountName, emailAddress}, this.SetMailboxPrimaryEmailAddressOperationCompleted, userState); } - - private void OnSetMailboxPrimaryEmailAddressOperationCompleted(object arg) { - if ((this.SetMailboxPrimaryEmailAddressCompleted != null)) { + + private void OnSetMailboxPrimaryEmailAddressOperationCompleted(object arg) + { + if ((this.SetMailboxPrimaryEmailAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxPrimaryEmailAddressCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxPermissions", 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 void SetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxPermissions", 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 void SetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts) + { this.Invoke("SetMailboxPermissions", new object[] { organizationId, accountName, sendAsAccounts, fullAccessAccounts}); } - + /// - public System.IAsyncResult BeginSetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetMailboxPermissions", new object[] { organizationId, accountName, sendAsAccounts, fullAccessAccounts}, callback, asyncState); } - + /// - public void EndSetMailboxPermissions(System.IAsyncResult asyncResult) { + public void EndSetMailboxPermissions(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetMailboxPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts) { + public void SetMailboxPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts) + { this.SetMailboxPermissionsAsync(organizationId, accountName, sendAsAccounts, fullAccessAccounts, null); } - + /// - public void SetMailboxPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts, object userState) { - if ((this.SetMailboxPermissionsOperationCompleted == null)) { + public void SetMailboxPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts, object userState) + { + if ((this.SetMailboxPermissionsOperationCompleted == null)) + { this.SetMailboxPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxPermissionsOperationCompleted); } this.InvokeAsync("SetMailboxPermissions", new object[] { @@ -1865,105 +2495,124 @@ namespace WebsitePanel.Providers.Exchange { sendAsAccounts, fullAccessAccounts}, this.SetMailboxPermissionsOperationCompleted, userState); } - - private void OnSetMailboxPermissionsOperationCompleted(object arg) { - if ((this.SetMailboxPermissionsCompleted != null)) { + + private void OnSetMailboxPermissionsOperationCompleted(object arg) + { + if ((this.SetMailboxPermissionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxPermissionsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxPermissions", 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 ExchangeMailbox GetMailboxPermissions(string organizationId, string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxPermissions", 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 ExchangeMailbox GetMailboxPermissions(string organizationId, string accountName) + { object[] results = this.Invoke("GetMailboxPermissions", new object[] { organizationId, accountName}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxPermissions(string organizationId, string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxPermissions(string organizationId, string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxPermissions", new object[] { organizationId, accountName}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxPermissions(System.IAsyncResult asyncResult) { + public ExchangeMailbox EndGetMailboxPermissions(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxPermissionsAsync(string organizationId, string accountName) { + public void GetMailboxPermissionsAsync(string organizationId, string accountName) + { this.GetMailboxPermissionsAsync(organizationId, accountName, null); } - + /// - public void GetMailboxPermissionsAsync(string organizationId, string accountName, object userState) { - if ((this.GetMailboxPermissionsOperationCompleted == null)) { + public void GetMailboxPermissionsAsync(string organizationId, string accountName, object userState) + { + if ((this.GetMailboxPermissionsOperationCompleted == null)) + { this.GetMailboxPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxPermissionsOperationCompleted); } this.InvokeAsync("GetMailboxPermissions", new object[] { organizationId, accountName}, this.GetMailboxPermissionsOperationCompleted, userState); } - - private void OnGetMailboxPermissionsOperationCompleted(object arg) { - if ((this.GetMailboxPermissionsCompleted != null)) { + + private void OnGetMailboxPermissionsOperationCompleted(object arg) + { + if ((this.GetMailboxPermissionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxPermissionsCompleted(this, new GetMailboxPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxStatistics", 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 ExchangeMailboxStatistics GetMailboxStatistics(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMailboxStatistics", 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 ExchangeMailboxStatistics GetMailboxStatistics(string accountName) + { object[] results = this.Invoke("GetMailboxStatistics", new object[] { accountName}); return ((ExchangeMailboxStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxStatistics(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMailboxStatistics(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMailboxStatistics", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeMailboxStatistics EndGetMailboxStatistics(System.IAsyncResult asyncResult) { + public ExchangeMailboxStatistics EndGetMailboxStatistics(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailboxStatistics)(results[0])); } - + /// - public void GetMailboxStatisticsAsync(string accountName) { + public void GetMailboxStatisticsAsync(string accountName) + { this.GetMailboxStatisticsAsync(accountName, null); } - + /// - public void GetMailboxStatisticsAsync(string accountName, object userState) { - if ((this.GetMailboxStatisticsOperationCompleted == null)) { + public void GetMailboxStatisticsAsync(string accountName, object userState) + { + if ((this.GetMailboxStatisticsOperationCompleted == null)) + { this.GetMailboxStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxStatisticsOperationCompleted); } this.InvokeAsync("GetMailboxStatistics", new object[] { accountName}, this.GetMailboxStatisticsOperationCompleted, userState); } - - private void OnGetMailboxStatisticsOperationCompleted(object arg) { - if ((this.GetMailboxStatisticsCompleted != null)) { + + private void OnGetMailboxStatisticsOperationCompleted(object arg) + { + if ((this.GetMailboxStatisticsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxStatisticsCompleted(this, new GetMailboxStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateContact", 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 void CreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateContact", 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 void CreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain) + { this.Invoke("CreateContact", new object[] { organizationId, organizationDistinguishedName, @@ -1972,9 +2621,10 @@ namespace WebsitePanel.Providers.Exchange { contactEmail, defaultOrganizationDomain}); } - + /// - public System.IAsyncResult BeginCreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateContact", new object[] { organizationId, organizationDistinguishedName, @@ -1983,20 +2633,24 @@ namespace WebsitePanel.Providers.Exchange { contactEmail, defaultOrganizationDomain}, callback, asyncState); } - + /// - public void EndCreateContact(System.IAsyncResult asyncResult) { + public void EndCreateContact(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void CreateContactAsync(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain) { + public void CreateContactAsync(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain) + { this.CreateContactAsync(organizationId, organizationDistinguishedName, contactDisplayName, contactAccountName, contactEmail, defaultOrganizationDomain, null); } - + /// - public void CreateContactAsync(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain, object userState) { - if ((this.CreateContactOperationCompleted == null)) { + public void CreateContactAsync(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain, object userState) + { + if ((this.CreateContactOperationCompleted == null)) + { this.CreateContactOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateContactOperationCompleted); } this.InvokeAsync("CreateContact", new object[] { @@ -2007,126 +2661,145 @@ namespace WebsitePanel.Providers.Exchange { contactEmail, defaultOrganizationDomain}, this.CreateContactOperationCompleted, userState); } - - private void OnCreateContactOperationCompleted(object arg) { - if ((this.CreateContactCompleted != null)) { + + private void OnCreateContactOperationCompleted(object arg) + { + if ((this.CreateContactCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateContactCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteContact", 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 void DeleteContact(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteContact", 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 void DeleteContact(string accountName) + { this.Invoke("DeleteContact", new object[] { accountName}); } - + /// - public System.IAsyncResult BeginDeleteContact(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteContact(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteContact", new object[] { accountName}, callback, asyncState); } - + /// - public void EndDeleteContact(System.IAsyncResult asyncResult) { + public void EndDeleteContact(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DeleteContactAsync(string accountName) { + public void DeleteContactAsync(string accountName) + { this.DeleteContactAsync(accountName, null); } - + /// - public void DeleteContactAsync(string accountName, object userState) { - if ((this.DeleteContactOperationCompleted == null)) { + public void DeleteContactAsync(string accountName, object userState) + { + if ((this.DeleteContactOperationCompleted == null)) + { this.DeleteContactOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteContactOperationCompleted); } this.InvokeAsync("DeleteContact", new object[] { accountName}, this.DeleteContactOperationCompleted, userState); } - - private void OnDeleteContactOperationCompleted(object arg) { - if ((this.DeleteContactCompleted != null)) { + + private void OnDeleteContactOperationCompleted(object arg) + { + if ((this.DeleteContactCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteContactCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetContactGeneralSettings", 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 ExchangeContact GetContactGeneralSettings(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetContactGeneralSettings", 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 ExchangeContact GetContactGeneralSettings(string accountName) + { object[] results = this.Invoke("GetContactGeneralSettings", new object[] { accountName}); return ((ExchangeContact)(results[0])); } - + /// - public System.IAsyncResult BeginGetContactGeneralSettings(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetContactGeneralSettings(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetContactGeneralSettings", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeContact EndGetContactGeneralSettings(System.IAsyncResult asyncResult) { + public ExchangeContact EndGetContactGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeContact)(results[0])); } - + /// - public void GetContactGeneralSettingsAsync(string accountName) { + public void GetContactGeneralSettingsAsync(string accountName) + { this.GetContactGeneralSettingsAsync(accountName, null); } - + /// - public void GetContactGeneralSettingsAsync(string accountName, object userState) { - if ((this.GetContactGeneralSettingsOperationCompleted == null)) { + public void GetContactGeneralSettingsAsync(string accountName, object userState) + { + if ((this.GetContactGeneralSettingsOperationCompleted == null)) + { this.GetContactGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetContactGeneralSettingsOperationCompleted); } this.InvokeAsync("GetContactGeneralSettings", new object[] { accountName}, this.GetContactGeneralSettingsOperationCompleted, userState); } - - private void OnGetContactGeneralSettingsOperationCompleted(object arg) { - if ((this.GetContactGeneralSettingsCompleted != null)) { + + private void OnGetContactGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetContactGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetContactGeneralSettingsCompleted(this, new GetContactGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetContactGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetContactGeneralSettings", 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 void SetContactGeneralSettings( - string accountName, - string displayName, - string email, - bool hideFromAddressBook, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - int useMapiRichTextFormat, - string defaultDomain) { + string accountName, + string displayName, + string email, + bool hideFromAddressBook, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + int useMapiRichTextFormat, + string defaultDomain) + { this.Invoke("SetContactGeneralSettings", new object[] { accountName, displayName, @@ -2155,37 +2828,38 @@ namespace WebsitePanel.Providers.Exchange { useMapiRichTextFormat, defaultDomain}); } - + /// public System.IAsyncResult BeginSetContactGeneralSettings( - string accountName, - string displayName, - string email, - bool hideFromAddressBook, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - int useMapiRichTextFormat, - string defaultDomain, - System.AsyncCallback callback, - object asyncState) { + string accountName, + string displayName, + string email, + bool hideFromAddressBook, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + int useMapiRichTextFormat, + string defaultDomain, + System.AsyncCallback callback, + object asyncState) + { return this.BeginInvoke("SetContactGeneralSettings", new object[] { accountName, displayName, @@ -2214,73 +2888,77 @@ namespace WebsitePanel.Providers.Exchange { useMapiRichTextFormat, defaultDomain}, callback, asyncState); } - + /// - public void EndSetContactGeneralSettings(System.IAsyncResult asyncResult) { + public void EndSetContactGeneralSettings(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// public void SetContactGeneralSettingsAsync( - string accountName, - string displayName, - string email, - bool hideFromAddressBook, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - int useMapiRichTextFormat, - string defaultDomain) { + string accountName, + string displayName, + string email, + bool hideFromAddressBook, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + int useMapiRichTextFormat, + string defaultDomain) + { this.SetContactGeneralSettingsAsync(accountName, displayName, email, hideFromAddressBook, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, useMapiRichTextFormat, defaultDomain, null); } - + /// public void SetContactGeneralSettingsAsync( - string accountName, - string displayName, - string email, - bool hideFromAddressBook, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - int useMapiRichTextFormat, - string defaultDomain, - object userState) { - if ((this.SetContactGeneralSettingsOperationCompleted == null)) { + string accountName, + string displayName, + string email, + bool hideFromAddressBook, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + int useMapiRichTextFormat, + string defaultDomain, + object userState) + { + if ((this.SetContactGeneralSettingsOperationCompleted == null)) + { this.SetContactGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetContactGeneralSettingsOperationCompleted); } this.InvokeAsync("SetContactGeneralSettings", new object[] { @@ -2311,89 +2989,105 @@ namespace WebsitePanel.Providers.Exchange { useMapiRichTextFormat, defaultDomain}, this.SetContactGeneralSettingsOperationCompleted, userState); } - - private void OnSetContactGeneralSettingsOperationCompleted(object arg) { - if ((this.SetContactGeneralSettingsCompleted != null)) { + + private void OnSetContactGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetContactGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetContactGeneralSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetContactMailFlowSettings", 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 ExchangeContact GetContactMailFlowSettings(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetContactMailFlowSettings", 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 ExchangeContact GetContactMailFlowSettings(string accountName) + { object[] results = this.Invoke("GetContactMailFlowSettings", new object[] { accountName}); return ((ExchangeContact)(results[0])); } - + /// - public System.IAsyncResult BeginGetContactMailFlowSettings(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetContactMailFlowSettings(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetContactMailFlowSettings", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeContact EndGetContactMailFlowSettings(System.IAsyncResult asyncResult) { + public ExchangeContact EndGetContactMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeContact)(results[0])); } - + /// - public void GetContactMailFlowSettingsAsync(string accountName) { + public void GetContactMailFlowSettingsAsync(string accountName) + { this.GetContactMailFlowSettingsAsync(accountName, null); } - + /// - public void GetContactMailFlowSettingsAsync(string accountName, object userState) { - if ((this.GetContactMailFlowSettingsOperationCompleted == null)) { + public void GetContactMailFlowSettingsAsync(string accountName, object userState) + { + if ((this.GetContactMailFlowSettingsOperationCompleted == null)) + { this.GetContactMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetContactMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetContactMailFlowSettings", new object[] { accountName}, this.GetContactMailFlowSettingsOperationCompleted, userState); } - - private void OnGetContactMailFlowSettingsOperationCompleted(object arg) { - if ((this.GetContactMailFlowSettingsCompleted != null)) { + + private void OnGetContactMailFlowSettingsOperationCompleted(object arg) + { + if ((this.GetContactMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetContactMailFlowSettingsCompleted(this, new GetContactMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetContactMailFlowSettings", 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 void SetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetContactMailFlowSettings", 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 void SetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { this.Invoke("SetContactMailFlowSettings", new object[] { accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication}); } - + /// - public System.IAsyncResult BeginSetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetContactMailFlowSettings", new object[] { accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public void EndSetContactMailFlowSettings(System.IAsyncResult asyncResult) { + public void EndSetContactMailFlowSettings(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetContactMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + public void SetContactMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { this.SetContactMailFlowSettingsAsync(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetContactMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { - if ((this.SetContactMailFlowSettingsOperationCompleted == null)) { + public void SetContactMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) + { + if ((this.SetContactMailFlowSettingsOperationCompleted == null)) + { this.SetContactMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetContactMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetContactMailFlowSettings", new object[] { @@ -2402,18 +3096,21 @@ namespace WebsitePanel.Providers.Exchange { rejectAccounts, requireSenderAuthentication}, this.SetContactMailFlowSettingsOperationCompleted, userState); } - - private void OnSetContactMailFlowSettingsOperationCompleted(object arg) { - if ((this.SetContactMailFlowSettingsCompleted != null)) { + + private void OnSetContactMailFlowSettingsOperationCompleted(object arg) + { + if ((this.SetContactMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetContactMailFlowSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateDistributionList", 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 void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateDistributionList", 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 void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists) + { this.Invoke("CreateDistributionList", new object[] { organizationId, organizationDistinguishedName, @@ -2424,9 +3121,10 @@ namespace WebsitePanel.Providers.Exchange { managedBy, addressLists}); } - + /// - public System.IAsyncResult BeginCreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateDistributionList", new object[] { organizationId, organizationDistinguishedName, @@ -2437,20 +3135,24 @@ namespace WebsitePanel.Providers.Exchange { managedBy, addressLists}, callback, asyncState); } - + /// - public void EndCreateDistributionList(System.IAsyncResult asyncResult) { + public void EndCreateDistributionList(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void CreateDistributionListAsync(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists) { + public void CreateDistributionListAsync(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists) + { this.CreateDistributionListAsync(organizationId, organizationDistinguishedName, displayName, accountName, name, domain, managedBy, addressLists, null); } - + /// - public void CreateDistributionListAsync(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists, object userState) { - if ((this.CreateDistributionListOperationCompleted == null)) { + public void CreateDistributionListAsync(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists, object userState) + { + if ((this.CreateDistributionListOperationCompleted == null)) + { this.CreateDistributionListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateDistributionListOperationCompleted); } this.InvokeAsync("CreateDistributionList", new object[] { @@ -2463,100 +3165,119 @@ namespace WebsitePanel.Providers.Exchange { managedBy, addressLists}, this.CreateDistributionListOperationCompleted, userState); } - - private void OnCreateDistributionListOperationCompleted(object arg) { - if ((this.CreateDistributionListCompleted != null)) { + + private void OnCreateDistributionListOperationCompleted(object arg) + { + if ((this.CreateDistributionListCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateDistributionListCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteDistributionList", 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 void DeleteDistributionList(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteDistributionList", 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 void DeleteDistributionList(string accountName) + { this.Invoke("DeleteDistributionList", new object[] { accountName}); } - + /// - public System.IAsyncResult BeginDeleteDistributionList(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteDistributionList(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteDistributionList", new object[] { accountName}, callback, asyncState); } - + /// - public void EndDeleteDistributionList(System.IAsyncResult asyncResult) { + public void EndDeleteDistributionList(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DeleteDistributionListAsync(string accountName) { + public void DeleteDistributionListAsync(string accountName) + { this.DeleteDistributionListAsync(accountName, null); } - + /// - public void DeleteDistributionListAsync(string accountName, object userState) { - if ((this.DeleteDistributionListOperationCompleted == null)) { + public void DeleteDistributionListAsync(string accountName, object userState) + { + if ((this.DeleteDistributionListOperationCompleted == null)) + { this.DeleteDistributionListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDistributionListOperationCompleted); } this.InvokeAsync("DeleteDistributionList", new object[] { accountName}, this.DeleteDistributionListOperationCompleted, userState); } - - private void OnDeleteDistributionListOperationCompleted(object arg) { - if ((this.DeleteDistributionListCompleted != null)) { + + private void OnDeleteDistributionListOperationCompleted(object arg) + { + if ((this.DeleteDistributionListCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteDistributionListCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetDistributionListGeneralSettings", 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 ExchangeDistributionList GetDistributionListGeneralSettings(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetDistributionListGeneralSettings", 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 ExchangeDistributionList GetDistributionListGeneralSettings(string accountName) + { object[] results = this.Invoke("GetDistributionListGeneralSettings", new object[] { accountName}); return ((ExchangeDistributionList)(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListGeneralSettings(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDistributionListGeneralSettings(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDistributionListGeneralSettings", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeDistributionList EndGetDistributionListGeneralSettings(System.IAsyncResult asyncResult) { + public ExchangeDistributionList EndGetDistributionListGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDistributionList)(results[0])); } - + /// - public void GetDistributionListGeneralSettingsAsync(string accountName) { + public void GetDistributionListGeneralSettingsAsync(string accountName) + { this.GetDistributionListGeneralSettingsAsync(accountName, null); } - + /// - public void GetDistributionListGeneralSettingsAsync(string accountName, object userState) { - if ((this.GetDistributionListGeneralSettingsOperationCompleted == null)) { + public void GetDistributionListGeneralSettingsAsync(string accountName, object userState) + { + if ((this.GetDistributionListGeneralSettingsOperationCompleted == null)) + { this.GetDistributionListGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListGeneralSettingsOperationCompleted); } this.InvokeAsync("GetDistributionListGeneralSettings", new object[] { accountName}, this.GetDistributionListGeneralSettingsOperationCompleted, userState); } - - private void OnGetDistributionListGeneralSettingsOperationCompleted(object arg) { - if ((this.GetDistributionListGeneralSettingsCompleted != null)) { + + private void OnGetDistributionListGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetDistributionListGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListGeneralSettingsCompleted(this, new GetDistributionListGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListGeneralSettings", 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 void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListGeneralSettings", 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 void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists) + { this.Invoke("SetDistributionListGeneralSettings", new object[] { accountName, displayName, @@ -2566,9 +3287,10 @@ namespace WebsitePanel.Providers.Exchange { notes, addressLists}); } - + /// - public System.IAsyncResult BeginSetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetDistributionListGeneralSettings", new object[] { accountName, displayName, @@ -2578,20 +3300,24 @@ namespace WebsitePanel.Providers.Exchange { notes, addressLists}, callback, asyncState); } - + /// - public void EndSetDistributionListGeneralSettings(System.IAsyncResult asyncResult) { + public void EndSetDistributionListGeneralSettings(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetDistributionListGeneralSettingsAsync(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists) { + public void SetDistributionListGeneralSettingsAsync(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists) + { this.SetDistributionListGeneralSettingsAsync(accountName, displayName, hideFromAddressBook, managedBy, members, notes, addressLists, null); } - + /// - public void SetDistributionListGeneralSettingsAsync(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists, object userState) { - if ((this.SetDistributionListGeneralSettingsOperationCompleted == null)) { + public void SetDistributionListGeneralSettingsAsync(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists, object userState) + { + if ((this.SetDistributionListGeneralSettingsOperationCompleted == null)) + { this.SetDistributionListGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListGeneralSettingsOperationCompleted); } this.InvokeAsync("SetDistributionListGeneralSettings", new object[] { @@ -2603,60 +3329,71 @@ namespace WebsitePanel.Providers.Exchange { notes, addressLists}, this.SetDistributionListGeneralSettingsOperationCompleted, userState); } - - private void OnSetDistributionListGeneralSettingsOperationCompleted(object arg) { - if ((this.SetDistributionListGeneralSettingsCompleted != null)) { + + private void OnSetDistributionListGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetDistributionListGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListGeneralSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetDistributionListMailFlowSettings", 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 ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetDistributionListMailFlowSettings", 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 ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName) + { object[] results = this.Invoke("GetDistributionListMailFlowSettings", new object[] { accountName}); return ((ExchangeDistributionList)(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListMailFlowSettings(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDistributionListMailFlowSettings(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDistributionListMailFlowSettings", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeDistributionList EndGetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) { + public ExchangeDistributionList EndGetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDistributionList)(results[0])); } - + /// - public void GetDistributionListMailFlowSettingsAsync(string accountName) { + public void GetDistributionListMailFlowSettingsAsync(string accountName) + { this.GetDistributionListMailFlowSettingsAsync(accountName, null); } - + /// - public void GetDistributionListMailFlowSettingsAsync(string accountName, object userState) { - if ((this.GetDistributionListMailFlowSettingsOperationCompleted == null)) { + public void GetDistributionListMailFlowSettingsAsync(string accountName, object userState) + { + if ((this.GetDistributionListMailFlowSettingsOperationCompleted == null)) + { this.GetDistributionListMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetDistributionListMailFlowSettings", new object[] { accountName}, this.GetDistributionListMailFlowSettingsOperationCompleted, userState); } - - private void OnGetDistributionListMailFlowSettingsOperationCompleted(object arg) { - if ((this.GetDistributionListMailFlowSettingsCompleted != null)) { + + private void OnGetDistributionListMailFlowSettingsOperationCompleted(object arg) + { + if ((this.GetDistributionListMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListMailFlowSettingsCompleted(this, new GetDistributionListMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListMailFlowSettings", 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 void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListMailFlowSettings", 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 void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists) + { this.Invoke("SetDistributionListMailFlowSettings", new object[] { accountName, acceptAccounts, @@ -2664,9 +3401,10 @@ namespace WebsitePanel.Providers.Exchange { requireSenderAuthentication, addressLists}); } - + /// - public System.IAsyncResult BeginSetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetDistributionListMailFlowSettings", new object[] { accountName, acceptAccounts, @@ -2674,20 +3412,24 @@ namespace WebsitePanel.Providers.Exchange { requireSenderAuthentication, addressLists}, callback, asyncState); } - + /// - public void EndSetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) { + public void EndSetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetDistributionListMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists) { + public void SetDistributionListMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists) + { this.SetDistributionListMailFlowSettingsAsync(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication, addressLists, null); } - + /// - public void SetDistributionListMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists, object userState) { - if ((this.SetDistributionListMailFlowSettingsOperationCompleted == null)) { + public void SetDistributionListMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists, object userState) + { + if ((this.SetDistributionListMailFlowSettingsOperationCompleted == null)) + { this.SetDistributionListMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetDistributionListMailFlowSettings", new object[] { @@ -2697,87 +3439,103 @@ namespace WebsitePanel.Providers.Exchange { requireSenderAuthentication, addressLists}, this.SetDistributionListMailFlowSettingsOperationCompleted, userState); } - - private void OnSetDistributionListMailFlowSettingsOperationCompleted(object arg) { - if ((this.SetDistributionListMailFlowSettingsCompleted != null)) { + + private void OnSetDistributionListMailFlowSettingsOperationCompleted(object arg) + { + if ((this.SetDistributionListMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListMailFlowSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetDistributionListEmailAddresses", 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 ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetDistributionListEmailAddresses", 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 ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName) + { object[] results = this.Invoke("GetDistributionListEmailAddresses", new object[] { accountName}); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListEmailAddresses(string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDistributionListEmailAddresses(string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDistributionListEmailAddresses", new object[] { accountName}, callback, asyncState); } - + /// - public ExchangeEmailAddress[] EndGetDistributionListEmailAddresses(System.IAsyncResult asyncResult) { + public ExchangeEmailAddress[] EndGetDistributionListEmailAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public void GetDistributionListEmailAddressesAsync(string accountName) { + public void GetDistributionListEmailAddressesAsync(string accountName) + { this.GetDistributionListEmailAddressesAsync(accountName, null); } - + /// - public void GetDistributionListEmailAddressesAsync(string accountName, object userState) { - if ((this.GetDistributionListEmailAddressesOperationCompleted == null)) { + public void GetDistributionListEmailAddressesAsync(string accountName, object userState) + { + if ((this.GetDistributionListEmailAddressesOperationCompleted == null)) + { this.GetDistributionListEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListEmailAddressesOperationCompleted); } this.InvokeAsync("GetDistributionListEmailAddresses", new object[] { accountName}, this.GetDistributionListEmailAddressesOperationCompleted, userState); } - - private void OnGetDistributionListEmailAddressesOperationCompleted(object arg) { - if ((this.GetDistributionListEmailAddressesCompleted != null)) { + + private void OnGetDistributionListEmailAddressesOperationCompleted(object arg) + { + if ((this.GetDistributionListEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListEmailAddressesCompleted(this, new GetDistributionListEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListEmailAddresses", 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 void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListEmailAddresses", 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 void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists) + { this.Invoke("SetDistributionListEmailAddresses", new object[] { accountName, emailAddresses, addressLists}); } - + /// - public System.IAsyncResult BeginSetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetDistributionListEmailAddresses", new object[] { accountName, emailAddresses, addressLists}, callback, asyncState); } - + /// - public void EndSetDistributionListEmailAddresses(System.IAsyncResult asyncResult) { + public void EndSetDistributionListEmailAddresses(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetDistributionListEmailAddressesAsync(string accountName, string[] emailAddresses, string[] addressLists) { + public void SetDistributionListEmailAddressesAsync(string accountName, string[] emailAddresses, string[] addressLists) + { this.SetDistributionListEmailAddressesAsync(accountName, emailAddresses, addressLists, null); } - + /// - public void SetDistributionListEmailAddressesAsync(string accountName, string[] emailAddresses, string[] addressLists, object userState) { - if ((this.SetDistributionListEmailAddressesOperationCompleted == null)) { + public void SetDistributionListEmailAddressesAsync(string accountName, string[] emailAddresses, string[] addressLists, object userState) + { + if ((this.SetDistributionListEmailAddressesOperationCompleted == null)) + { this.SetDistributionListEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListEmailAddressesOperationCompleted); } this.InvokeAsync("SetDistributionListEmailAddresses", new object[] { @@ -2785,45 +3543,53 @@ namespace WebsitePanel.Providers.Exchange { emailAddresses, addressLists}, this.SetDistributionListEmailAddressesOperationCompleted, userState); } - - private void OnSetDistributionListEmailAddressesOperationCompleted(object arg) { - if ((this.SetDistributionListEmailAddressesCompleted != null)) { + + private void OnSetDistributionListEmailAddressesOperationCompleted(object arg) + { + if ((this.SetDistributionListEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListEmailAddressesCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListPrimaryEmailAddress", 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 void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListPrimaryEmailAddress", 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 void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists) + { this.Invoke("SetDistributionListPrimaryEmailAddress", new object[] { accountName, emailAddress, addressLists}); } - + /// - public System.IAsyncResult BeginSetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetDistributionListPrimaryEmailAddress", new object[] { accountName, emailAddress, addressLists}, callback, asyncState); } - + /// - public void EndSetDistributionListPrimaryEmailAddress(System.IAsyncResult asyncResult) { + public void EndSetDistributionListPrimaryEmailAddress(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetDistributionListPrimaryEmailAddressAsync(string accountName, string emailAddress, string[] addressLists) { + public void SetDistributionListPrimaryEmailAddressAsync(string accountName, string emailAddress, string[] addressLists) + { this.SetDistributionListPrimaryEmailAddressAsync(accountName, emailAddress, addressLists, null); } - + /// - public void SetDistributionListPrimaryEmailAddressAsync(string accountName, string emailAddress, string[] addressLists, object userState) { - if ((this.SetDistributionListPrimaryEmailAddressOperationCompleted == null)) { + public void SetDistributionListPrimaryEmailAddressAsync(string accountName, string emailAddress, string[] addressLists, object userState) + { + if ((this.SetDistributionListPrimaryEmailAddressOperationCompleted == null)) + { this.SetDistributionListPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListPrimaryEmailAddressOperationCompleted); } this.InvokeAsync("SetDistributionListPrimaryEmailAddress", new object[] { @@ -2831,18 +3597,21 @@ namespace WebsitePanel.Providers.Exchange { emailAddress, addressLists}, this.SetDistributionListPrimaryEmailAddressOperationCompleted, userState); } - - private void OnSetDistributionListPrimaryEmailAddressOperationCompleted(object arg) { - if ((this.SetDistributionListPrimaryEmailAddressCompleted != null)) { + + private void OnSetDistributionListPrimaryEmailAddressOperationCompleted(object arg) + { + if ((this.SetDistributionListPrimaryEmailAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListPrimaryEmailAddressCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListPermissions", 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 void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListPermissions", 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 void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists) + { this.Invoke("SetDistributionListPermissions", new object[] { organizationId, accountName, @@ -2850,9 +3619,10 @@ namespace WebsitePanel.Providers.Exchange { sendOnBehalfAccounts, addressLists}); } - + /// - public System.IAsyncResult BeginSetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetDistributionListPermissions", new object[] { organizationId, accountName, @@ -2860,20 +3630,24 @@ namespace WebsitePanel.Providers.Exchange { sendOnBehalfAccounts, addressLists}, callback, asyncState); } - + /// - public void EndSetDistributionListPermissions(System.IAsyncResult asyncResult) { + public void EndSetDistributionListPermissions(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetDistributionListPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists) { + public void SetDistributionListPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists) + { this.SetDistributionListPermissionsAsync(organizationId, accountName, sendAsAccounts, sendOnBehalfAccounts, addressLists, null); } - + /// - public void SetDistributionListPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists, object userState) { - if ((this.SetDistributionListPermissionsOperationCompleted == null)) { + public void SetDistributionListPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists, object userState) + { + if ((this.SetDistributionListPermissionsOperationCompleted == null)) + { this.SetDistributionListPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListPermissionsOperationCompleted); } this.InvokeAsync("SetDistributionListPermissions", new object[] { @@ -2883,63 +3657,180 @@ namespace WebsitePanel.Providers.Exchange { sendOnBehalfAccounts, addressLists}, this.SetDistributionListPermissionsOperationCompleted, userState); } - - private void OnSetDistributionListPermissionsOperationCompleted(object arg) { - if ((this.SetDistributionListPermissionsCompleted != null)) { + + private void OnSetDistributionListPermissionsOperationCompleted(object arg) + { + if ((this.SetDistributionListPermissionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListPermissionsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetDistributionListPermissions", 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 ExchangeDistributionList GetDistributionListPermissions(string organizationId, string accountName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetDistributionListPermissions", 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 ExchangeDistributionList GetDistributionListPermissions(string organizationId, string accountName) + { object[] results = this.Invoke("GetDistributionListPermissions", new object[] { organizationId, accountName}); return ((ExchangeDistributionList)(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListPermissions(string organizationId, string accountName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDistributionListPermissions(string organizationId, string accountName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDistributionListPermissions", new object[] { organizationId, accountName}, callback, asyncState); } - + /// - public ExchangeDistributionList EndGetDistributionListPermissions(System.IAsyncResult asyncResult) { + public ExchangeDistributionList EndGetDistributionListPermissions(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDistributionList)(results[0])); } - + /// - public void GetDistributionListPermissionsAsync(string organizationId, string accountName) { + public void GetDistributionListPermissionsAsync(string organizationId, string accountName) + { this.GetDistributionListPermissionsAsync(organizationId, accountName, null); } - + /// - public void GetDistributionListPermissionsAsync(string organizationId, string accountName, object userState) { - if ((this.GetDistributionListPermissionsOperationCompleted == null)) { + public void GetDistributionListPermissionsAsync(string organizationId, string accountName, object userState) + { + if ((this.GetDistributionListPermissionsOperationCompleted == null)) + { this.GetDistributionListPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListPermissionsOperationCompleted); } this.InvokeAsync("GetDistributionListPermissions", new object[] { organizationId, accountName}, this.GetDistributionListPermissionsOperationCompleted, userState); } - - private void OnGetDistributionListPermissionsOperationCompleted(object arg) { - if ((this.GetDistributionListPermissionsCompleted != null)) { + + private void OnGetDistributionListPermissionsOperationCompleted(object arg) + { + if ((this.GetDistributionListPermissionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListPermissionsCompleted(this, new GetDistributionListPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreatePublicFolder", 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 void CreatePublicFolder(string organizationDistinguishedName, string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/NewDisclaimerTransportRule", 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 int NewDisclaimerTransportRule(string Name, string From, string Text) + { + object[] results = this.Invoke("NewDisclaimerTransportRule", new object[] { + Name, + From, + Text}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginNewDisclaimerTransportRule(string Name, string From, string Text, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("NewDisclaimerTransportRule", new object[] { + Name, + From, + Text}, callback, asyncState); + } + + /// + public int EndNewDisclaimerTransportRule(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void NewDisclaimerTransportRuleAsync(string Name, string From, string Text) + { + this.NewDisclaimerTransportRuleAsync(Name, From, Text, null); + } + + /// + public void NewDisclaimerTransportRuleAsync(string Name, string From, string Text, object userState) + { + if ((this.NewDisclaimerTransportRuleOperationCompleted == null)) + { + this.NewDisclaimerTransportRuleOperationCompleted = new System.Threading.SendOrPostCallback(this.OnNewDisclaimerTransportRuleOperationCompleted); + } + this.InvokeAsync("NewDisclaimerTransportRule", new object[] { + Name, + From, + Text}, this.NewDisclaimerTransportRuleOperationCompleted, userState); + } + + private void OnNewDisclaimerTransportRuleOperationCompleted(object arg) + { + if ((this.NewDisclaimerTransportRuleCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.NewDisclaimerTransportRuleCompleted(this, new NewDisclaimerTransportRuleCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveTransportRule", 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 int RemoveTransportRule(string Name) + { + object[] results = this.Invoke("RemoveTransportRule", new object[] { + Name}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginRemoveTransportRule(string Name, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("RemoveTransportRule", new object[] { + Name}, callback, asyncState); + } + + /// + public int EndRemoveTransportRule(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void RemoveTransportRuleAsync(string Name) + { + this.RemoveTransportRuleAsync(Name, null); + } + + /// + public void RemoveTransportRuleAsync(string Name, object userState) + { + if ((this.RemoveTransportRuleOperationCompleted == null)) + { + this.RemoveTransportRuleOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveTransportRuleOperationCompleted); + } + this.InvokeAsync("RemoveTransportRule", new object[] { + Name}, this.RemoveTransportRuleOperationCompleted, userState); + } + + private void OnRemoveTransportRuleOperationCompleted(object arg) + { + if ((this.RemoveTransportRuleCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RemoveTransportRuleCompleted(this, new RemoveTransportRuleCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreatePublicFolder", 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 void CreatePublicFolder(string organizationDistinguishedName, string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain) + { this.Invoke("CreatePublicFolder", new object[] { organizationDistinguishedName, organizationId, @@ -2951,9 +3842,10 @@ namespace WebsitePanel.Providers.Exchange { name, domain}); } - + /// - public System.IAsyncResult BeginCreatePublicFolder(string organizationDistinguishedName, string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreatePublicFolder(string organizationDistinguishedName, string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreatePublicFolder", new object[] { organizationDistinguishedName, organizationId, @@ -2965,20 +3857,24 @@ namespace WebsitePanel.Providers.Exchange { name, domain}, callback, asyncState); } - + /// - public void EndCreatePublicFolder(System.IAsyncResult asyncResult) { + public void EndCreatePublicFolder(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void CreatePublicFolderAsync(string organizationDistinguishedName, string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain) { + public void CreatePublicFolderAsync(string organizationDistinguishedName, string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain) + { this.CreatePublicFolderAsync(organizationDistinguishedName, organizationId, securityGroup, parentFolder, folderName, mailEnabled, accountName, name, domain, null); } - + /// - public void CreatePublicFolderAsync(string organizationDistinguishedName, string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain, object userState) { - if ((this.CreatePublicFolderOperationCompleted == null)) { + public void CreatePublicFolderAsync(string organizationDistinguishedName, string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain, object userState) + { + if ((this.CreatePublicFolderOperationCompleted == null)) + { this.CreatePublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreatePublicFolderOperationCompleted); } this.InvokeAsync("CreatePublicFolder", new object[] { @@ -2992,61 +3888,72 @@ namespace WebsitePanel.Providers.Exchange { name, domain}, this.CreatePublicFolderOperationCompleted, userState); } - - private void OnCreatePublicFolderOperationCompleted(object arg) { - if ((this.CreatePublicFolderCompleted != null)) { + + private void OnCreatePublicFolderOperationCompleted(object arg) + { + if ((this.CreatePublicFolderCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreatePublicFolderCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeletePublicFolder", 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 void DeletePublicFolder(string organizationId, string folder) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeletePublicFolder", 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 void DeletePublicFolder(string organizationId, string folder) + { this.Invoke("DeletePublicFolder", new object[] { organizationId, folder}); } - + /// - public System.IAsyncResult BeginDeletePublicFolder(string organizationId, string folder, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeletePublicFolder(string organizationId, string folder, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeletePublicFolder", new object[] { organizationId, folder}, callback, asyncState); } - + /// - public void EndDeletePublicFolder(System.IAsyncResult asyncResult) { + public void EndDeletePublicFolder(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DeletePublicFolderAsync(string organizationId, string folder) { + public void DeletePublicFolderAsync(string organizationId, string folder) + { this.DeletePublicFolderAsync(organizationId, folder, null); } - + /// - public void DeletePublicFolderAsync(string organizationId, string folder, object userState) { - if ((this.DeletePublicFolderOperationCompleted == null)) { + public void DeletePublicFolderAsync(string organizationId, string folder, object userState) + { + if ((this.DeletePublicFolderOperationCompleted == null)) + { this.DeletePublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFolderOperationCompleted); } this.InvokeAsync("DeletePublicFolder", new object[] { organizationId, folder}, this.DeletePublicFolderOperationCompleted, userState); } - - private void OnDeletePublicFolderOperationCompleted(object arg) { - if ((this.DeletePublicFolderCompleted != null)) { + + private void OnDeletePublicFolderOperationCompleted(object arg) + { + if ((this.DeletePublicFolderCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeletePublicFolderCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/EnableMailPublicFolder", 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 void EnableMailPublicFolder(string organizationId, string folder, string accountName, string name, string domain) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/EnableMailPublicFolder", 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 void EnableMailPublicFolder(string organizationId, string folder, string accountName, string name, string domain) + { this.Invoke("EnableMailPublicFolder", new object[] { organizationId, folder, @@ -3054,9 +3961,10 @@ namespace WebsitePanel.Providers.Exchange { name, domain}); } - + /// - public System.IAsyncResult BeginEnableMailPublicFolder(string organizationId, string folder, string accountName, string name, string domain, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginEnableMailPublicFolder(string organizationId, string folder, string accountName, string name, string domain, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("EnableMailPublicFolder", new object[] { organizationId, folder, @@ -3064,20 +3972,24 @@ namespace WebsitePanel.Providers.Exchange { name, domain}, callback, asyncState); } - + /// - public void EndEnableMailPublicFolder(System.IAsyncResult asyncResult) { + public void EndEnableMailPublicFolder(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void EnableMailPublicFolderAsync(string organizationId, string folder, string accountName, string name, string domain) { + public void EnableMailPublicFolderAsync(string organizationId, string folder, string accountName, string name, string domain) + { this.EnableMailPublicFolderAsync(organizationId, folder, accountName, name, domain, null); } - + /// - public void EnableMailPublicFolderAsync(string organizationId, string folder, string accountName, string name, string domain, object userState) { - if ((this.EnableMailPublicFolderOperationCompleted == null)) { + public void EnableMailPublicFolderAsync(string organizationId, string folder, string accountName, string name, string domain, object userState) + { + if ((this.EnableMailPublicFolderOperationCompleted == null)) + { this.EnableMailPublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnableMailPublicFolderOperationCompleted); } this.InvokeAsync("EnableMailPublicFolder", new object[] { @@ -3087,106 +3999,125 @@ namespace WebsitePanel.Providers.Exchange { name, domain}, this.EnableMailPublicFolderOperationCompleted, userState); } - - private void OnEnableMailPublicFolderOperationCompleted(object arg) { - if ((this.EnableMailPublicFolderCompleted != null)) { + + private void OnEnableMailPublicFolderOperationCompleted(object arg) + { + if ((this.EnableMailPublicFolderCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.EnableMailPublicFolderCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DisableMailPublicFolder", 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 void DisableMailPublicFolder(string organizationId, string folder) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DisableMailPublicFolder", 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 void DisableMailPublicFolder(string organizationId, string folder) + { this.Invoke("DisableMailPublicFolder", new object[] { organizationId, folder}); } - + /// - public System.IAsyncResult BeginDisableMailPublicFolder(string organizationId, string folder, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDisableMailPublicFolder(string organizationId, string folder, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DisableMailPublicFolder", new object[] { organizationId, folder}, callback, asyncState); } - + /// - public void EndDisableMailPublicFolder(System.IAsyncResult asyncResult) { + public void EndDisableMailPublicFolder(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DisableMailPublicFolderAsync(string organizationId, string folder) { + public void DisableMailPublicFolderAsync(string organizationId, string folder) + { this.DisableMailPublicFolderAsync(organizationId, folder, null); } - + /// - public void DisableMailPublicFolderAsync(string organizationId, string folder, object userState) { - if ((this.DisableMailPublicFolderOperationCompleted == null)) { + public void DisableMailPublicFolderAsync(string organizationId, string folder, object userState) + { + if ((this.DisableMailPublicFolderOperationCompleted == null)) + { this.DisableMailPublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableMailPublicFolderOperationCompleted); } this.InvokeAsync("DisableMailPublicFolder", new object[] { organizationId, folder}, this.DisableMailPublicFolderOperationCompleted, userState); } - - private void OnDisableMailPublicFolderOperationCompleted(object arg) { - if ((this.DisableMailPublicFolderCompleted != null)) { + + private void OnDisableMailPublicFolderOperationCompleted(object arg) + { + if ((this.DisableMailPublicFolderCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DisableMailPublicFolderCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFolderGeneralSettings", 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 ExchangePublicFolder GetPublicFolderGeneralSettings(string organizationId, string folder) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFolderGeneralSettings", 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 ExchangePublicFolder GetPublicFolderGeneralSettings(string organizationId, string folder) + { object[] results = this.Invoke("GetPublicFolderGeneralSettings", new object[] { organizationId, folder}); return ((ExchangePublicFolder)(results[0])); } - + /// - public System.IAsyncResult BeginGetPublicFolderGeneralSettings(string organizationId, string folder, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPublicFolderGeneralSettings(string organizationId, string folder, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPublicFolderGeneralSettings", new object[] { organizationId, folder}, callback, asyncState); } - + /// - public ExchangePublicFolder EndGetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) { + public ExchangePublicFolder EndGetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangePublicFolder)(results[0])); } - + /// - public void GetPublicFolderGeneralSettingsAsync(string organizationId, string folder) { + public void GetPublicFolderGeneralSettingsAsync(string organizationId, string folder) + { this.GetPublicFolderGeneralSettingsAsync(organizationId, folder, null); } - + /// - public void GetPublicFolderGeneralSettingsAsync(string organizationId, string folder, object userState) { - if ((this.GetPublicFolderGeneralSettingsOperationCompleted == null)) { + public void GetPublicFolderGeneralSettingsAsync(string organizationId, string folder, object userState) + { + if ((this.GetPublicFolderGeneralSettingsOperationCompleted == null)) + { this.GetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderGeneralSettingsOperationCompleted); } this.InvokeAsync("GetPublicFolderGeneralSettings", new object[] { organizationId, folder}, this.GetPublicFolderGeneralSettingsOperationCompleted, userState); } - - private void OnGetPublicFolderGeneralSettingsOperationCompleted(object arg) { - if ((this.GetPublicFolderGeneralSettingsCompleted != null)) { + + private void OnGetPublicFolderGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetPublicFolderGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPublicFolderGeneralSettingsCompleted(this, new GetPublicFolderGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPublicFolderGeneralSettings", 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 void SetPublicFolderGeneralSettings(string organizationId, string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPublicFolderGeneralSettings", 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 void SetPublicFolderGeneralSettings(string organizationId, string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts) + { this.Invoke("SetPublicFolderGeneralSettings", new object[] { organizationId, folder, @@ -3194,9 +4125,10 @@ namespace WebsitePanel.Providers.Exchange { hideFromAddressBook, accounts}); } - + /// - public System.IAsyncResult BeginSetPublicFolderGeneralSettings(string organizationId, string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetPublicFolderGeneralSettings(string organizationId, string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetPublicFolderGeneralSettings", new object[] { organizationId, folder, @@ -3204,20 +4136,24 @@ namespace WebsitePanel.Providers.Exchange { hideFromAddressBook, accounts}, callback, asyncState); } - + /// - public void EndSetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) { + public void EndSetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetPublicFolderGeneralSettingsAsync(string organizationId, string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts) { + public void SetPublicFolderGeneralSettingsAsync(string organizationId, string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts) + { this.SetPublicFolderGeneralSettingsAsync(organizationId, folder, newFolderName, hideFromAddressBook, accounts, null); } - + /// - public void SetPublicFolderGeneralSettingsAsync(string organizationId, string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts, object userState) { - if ((this.SetPublicFolderGeneralSettingsOperationCompleted == null)) { + public void SetPublicFolderGeneralSettingsAsync(string organizationId, string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts, object userState) + { + if ((this.SetPublicFolderGeneralSettingsOperationCompleted == null)) + { this.SetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderGeneralSettingsOperationCompleted); } this.InvokeAsync("SetPublicFolderGeneralSettings", new object[] { @@ -3227,63 +4163,74 @@ namespace WebsitePanel.Providers.Exchange { hideFromAddressBook, accounts}, this.SetPublicFolderGeneralSettingsOperationCompleted, userState); } - - private void OnSetPublicFolderGeneralSettingsOperationCompleted(object arg) { - if ((this.SetPublicFolderGeneralSettingsCompleted != null)) { + + private void OnSetPublicFolderGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetPublicFolderGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetPublicFolderGeneralSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFolderMailFlowSettings", 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 ExchangePublicFolder GetPublicFolderMailFlowSettings(string organizationId, string folder) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFolderMailFlowSettings", 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 ExchangePublicFolder GetPublicFolderMailFlowSettings(string organizationId, string folder) + { object[] results = this.Invoke("GetPublicFolderMailFlowSettings", new object[] { organizationId, folder}); return ((ExchangePublicFolder)(results[0])); } - + /// - public System.IAsyncResult BeginGetPublicFolderMailFlowSettings(string organizationId, string folder, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPublicFolderMailFlowSettings(string organizationId, string folder, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPublicFolderMailFlowSettings", new object[] { organizationId, folder}, callback, asyncState); } - + /// - public ExchangePublicFolder EndGetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) { + public ExchangePublicFolder EndGetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangePublicFolder)(results[0])); } - + /// - public void GetPublicFolderMailFlowSettingsAsync(string organizationId, string folder) { + public void GetPublicFolderMailFlowSettingsAsync(string organizationId, string folder) + { this.GetPublicFolderMailFlowSettingsAsync(organizationId, folder, null); } - + /// - public void GetPublicFolderMailFlowSettingsAsync(string organizationId, string folder, object userState) { - if ((this.GetPublicFolderMailFlowSettingsOperationCompleted == null)) { + public void GetPublicFolderMailFlowSettingsAsync(string organizationId, string folder, object userState) + { + if ((this.GetPublicFolderMailFlowSettingsOperationCompleted == null)) + { this.GetPublicFolderMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetPublicFolderMailFlowSettings", new object[] { organizationId, folder}, this.GetPublicFolderMailFlowSettingsOperationCompleted, userState); } - - private void OnGetPublicFolderMailFlowSettingsOperationCompleted(object arg) { - if ((this.GetPublicFolderMailFlowSettingsCompleted != null)) { + + private void OnGetPublicFolderMailFlowSettingsOperationCompleted(object arg) + { + if ((this.GetPublicFolderMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPublicFolderMailFlowSettingsCompleted(this, new GetPublicFolderMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPublicFolderMailFlowSettings", 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 void SetPublicFolderMailFlowSettings(string organizationId, string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPublicFolderMailFlowSettings", 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 void SetPublicFolderMailFlowSettings(string organizationId, string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { this.Invoke("SetPublicFolderMailFlowSettings", new object[] { organizationId, folder, @@ -3291,9 +4238,10 @@ namespace WebsitePanel.Providers.Exchange { rejectAccounts, requireSenderAuthentication}); } - + /// - public System.IAsyncResult BeginSetPublicFolderMailFlowSettings(string organizationId, string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetPublicFolderMailFlowSettings(string organizationId, string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetPublicFolderMailFlowSettings", new object[] { organizationId, folder, @@ -3301,20 +4249,24 @@ namespace WebsitePanel.Providers.Exchange { rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public void EndSetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) { + public void EndSetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetPublicFolderMailFlowSettingsAsync(string organizationId, string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + public void SetPublicFolderMailFlowSettingsAsync(string organizationId, string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { this.SetPublicFolderMailFlowSettingsAsync(organizationId, folder, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetPublicFolderMailFlowSettingsAsync(string organizationId, string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { - if ((this.SetPublicFolderMailFlowSettingsOperationCompleted == null)) { + public void SetPublicFolderMailFlowSettingsAsync(string organizationId, string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) + { + if ((this.SetPublicFolderMailFlowSettingsOperationCompleted == null)) + { this.SetPublicFolderMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetPublicFolderMailFlowSettings", new object[] { @@ -3324,90 +4276,106 @@ namespace WebsitePanel.Providers.Exchange { rejectAccounts, requireSenderAuthentication}, this.SetPublicFolderMailFlowSettingsOperationCompleted, userState); } - - private void OnSetPublicFolderMailFlowSettingsOperationCompleted(object arg) { - if ((this.SetPublicFolderMailFlowSettingsCompleted != null)) { + + private void OnSetPublicFolderMailFlowSettingsOperationCompleted(object arg) + { + if ((this.SetPublicFolderMailFlowSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetPublicFolderMailFlowSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFolderEmailAddresses", 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 ExchangeEmailAddress[] GetPublicFolderEmailAddresses(string organizationId, string folder) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFolderEmailAddresses", 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 ExchangeEmailAddress[] GetPublicFolderEmailAddresses(string organizationId, string folder) + { object[] results = this.Invoke("GetPublicFolderEmailAddresses", new object[] { organizationId, folder}); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public System.IAsyncResult BeginGetPublicFolderEmailAddresses(string organizationId, string folder, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPublicFolderEmailAddresses(string organizationId, string folder, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPublicFolderEmailAddresses", new object[] { organizationId, folder}, callback, asyncState); } - + /// - public ExchangeEmailAddress[] EndGetPublicFolderEmailAddresses(System.IAsyncResult asyncResult) { + public ExchangeEmailAddress[] EndGetPublicFolderEmailAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public void GetPublicFolderEmailAddressesAsync(string organizationId, string folder) { + public void GetPublicFolderEmailAddressesAsync(string organizationId, string folder) + { this.GetPublicFolderEmailAddressesAsync(organizationId, folder, null); } - + /// - public void GetPublicFolderEmailAddressesAsync(string organizationId, string folder, object userState) { - if ((this.GetPublicFolderEmailAddressesOperationCompleted == null)) { + public void GetPublicFolderEmailAddressesAsync(string organizationId, string folder, object userState) + { + if ((this.GetPublicFolderEmailAddressesOperationCompleted == null)) + { this.GetPublicFolderEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderEmailAddressesOperationCompleted); } this.InvokeAsync("GetPublicFolderEmailAddresses", new object[] { organizationId, folder}, this.GetPublicFolderEmailAddressesOperationCompleted, userState); } - - private void OnGetPublicFolderEmailAddressesOperationCompleted(object arg) { - if ((this.GetPublicFolderEmailAddressesCompleted != null)) { + + private void OnGetPublicFolderEmailAddressesOperationCompleted(object arg) + { + if ((this.GetPublicFolderEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPublicFolderEmailAddressesCompleted(this, new GetPublicFolderEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPublicFolderEmailAddresses", 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 void SetPublicFolderEmailAddresses(string organizationId, string folder, string[] emailAddresses) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPublicFolderEmailAddresses", 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 void SetPublicFolderEmailAddresses(string organizationId, string folder, string[] emailAddresses) + { this.Invoke("SetPublicFolderEmailAddresses", new object[] { organizationId, folder, emailAddresses}); } - + /// - public System.IAsyncResult BeginSetPublicFolderEmailAddresses(string organizationId, string folder, string[] emailAddresses, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetPublicFolderEmailAddresses(string organizationId, string folder, string[] emailAddresses, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetPublicFolderEmailAddresses", new object[] { organizationId, folder, emailAddresses}, callback, asyncState); } - + /// - public void EndSetPublicFolderEmailAddresses(System.IAsyncResult asyncResult) { + public void EndSetPublicFolderEmailAddresses(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetPublicFolderEmailAddressesAsync(string organizationId, string folder, string[] emailAddresses) { + public void SetPublicFolderEmailAddressesAsync(string organizationId, string folder, string[] emailAddresses) + { this.SetPublicFolderEmailAddressesAsync(organizationId, folder, emailAddresses, null); } - + /// - public void SetPublicFolderEmailAddressesAsync(string organizationId, string folder, string[] emailAddresses, object userState) { - if ((this.SetPublicFolderEmailAddressesOperationCompleted == null)) { + public void SetPublicFolderEmailAddressesAsync(string organizationId, string folder, string[] emailAddresses, object userState) + { + if ((this.SetPublicFolderEmailAddressesOperationCompleted == null)) + { this.SetPublicFolderEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderEmailAddressesOperationCompleted); } this.InvokeAsync("SetPublicFolderEmailAddresses", new object[] { @@ -3415,45 +4383,53 @@ namespace WebsitePanel.Providers.Exchange { folder, emailAddresses}, this.SetPublicFolderEmailAddressesOperationCompleted, userState); } - - private void OnSetPublicFolderEmailAddressesOperationCompleted(object arg) { - if ((this.SetPublicFolderEmailAddressesCompleted != null)) { + + private void OnSetPublicFolderEmailAddressesOperationCompleted(object arg) + { + if ((this.SetPublicFolderEmailAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetPublicFolderEmailAddressesCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPublicFolderPrimaryEmailAddress", 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 void SetPublicFolderPrimaryEmailAddress(string organizationId, string folder, string emailAddress) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPublicFolderPrimaryEmailAddress", 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 void SetPublicFolderPrimaryEmailAddress(string organizationId, string folder, string emailAddress) + { this.Invoke("SetPublicFolderPrimaryEmailAddress", new object[] { organizationId, folder, emailAddress}); } - + /// - public System.IAsyncResult BeginSetPublicFolderPrimaryEmailAddress(string organizationId, string folder, string emailAddress, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetPublicFolderPrimaryEmailAddress(string organizationId, string folder, string emailAddress, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetPublicFolderPrimaryEmailAddress", new object[] { organizationId, folder, emailAddress}, callback, asyncState); } - + /// - public void EndSetPublicFolderPrimaryEmailAddress(System.IAsyncResult asyncResult) { + public void EndSetPublicFolderPrimaryEmailAddress(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void SetPublicFolderPrimaryEmailAddressAsync(string organizationId, string folder, string emailAddress) { + public void SetPublicFolderPrimaryEmailAddressAsync(string organizationId, string folder, string emailAddress) + { this.SetPublicFolderPrimaryEmailAddressAsync(organizationId, folder, emailAddress, null); } - + /// - public void SetPublicFolderPrimaryEmailAddressAsync(string organizationId, string folder, string emailAddress, object userState) { - if ((this.SetPublicFolderPrimaryEmailAddressOperationCompleted == null)) { + public void SetPublicFolderPrimaryEmailAddressAsync(string organizationId, string folder, string emailAddress, object userState) + { + if ((this.SetPublicFolderPrimaryEmailAddressOperationCompleted == null)) + { this.SetPublicFolderPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderPrimaryEmailAddressOperationCompleted); } this.InvokeAsync("SetPublicFolderPrimaryEmailAddress", new object[] { @@ -3461,1525 +4437,1385 @@ namespace WebsitePanel.Providers.Exchange { folder, emailAddress}, this.SetPublicFolderPrimaryEmailAddressOperationCompleted, userState); } - - private void OnSetPublicFolderPrimaryEmailAddressOperationCompleted(object arg) { - if ((this.SetPublicFolderPrimaryEmailAddressCompleted != null)) { + + private void OnSetPublicFolderPrimaryEmailAddressOperationCompleted(object arg) + { + if ((this.SetPublicFolderPrimaryEmailAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetPublicFolderPrimaryEmailAddressCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFoldersStatistics", 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 ExchangeItemStatistics[] GetPublicFoldersStatistics(string organizationId, string[] folders) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFoldersStatistics", 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 ExchangeItemStatistics[] GetPublicFoldersStatistics(string organizationId, string[] folders) + { object[] results = this.Invoke("GetPublicFoldersStatistics", new object[] { organizationId, folders}); return ((ExchangeItemStatistics[])(results[0])); } - + /// - public System.IAsyncResult BeginGetPublicFoldersStatistics(string organizationId, string[] folders, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPublicFoldersStatistics(string organizationId, string[] folders, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPublicFoldersStatistics", new object[] { organizationId, folders}, callback, asyncState); } - + /// - public ExchangeItemStatistics[] EndGetPublicFoldersStatistics(System.IAsyncResult asyncResult) { + public ExchangeItemStatistics[] EndGetPublicFoldersStatistics(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeItemStatistics[])(results[0])); } - + /// - public void GetPublicFoldersStatisticsAsync(string organizationId, string[] folders) { + public void GetPublicFoldersStatisticsAsync(string organizationId, string[] folders) + { this.GetPublicFoldersStatisticsAsync(organizationId, folders, null); } - + /// - public void GetPublicFoldersStatisticsAsync(string organizationId, string[] folders, object userState) { - if ((this.GetPublicFoldersStatisticsOperationCompleted == null)) { + public void GetPublicFoldersStatisticsAsync(string organizationId, string[] folders, object userState) + { + if ((this.GetPublicFoldersStatisticsOperationCompleted == null)) + { this.GetPublicFoldersStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFoldersStatisticsOperationCompleted); } this.InvokeAsync("GetPublicFoldersStatistics", new object[] { organizationId, folders}, this.GetPublicFoldersStatisticsOperationCompleted, userState); } - - private void OnGetPublicFoldersStatisticsOperationCompleted(object arg) { - if ((this.GetPublicFoldersStatisticsCompleted != null)) { + + private void OnGetPublicFoldersStatisticsOperationCompleted(object arg) + { + if ((this.GetPublicFoldersStatisticsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPublicFoldersStatisticsCompleted(this, new GetPublicFoldersStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFoldersRecursive", 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[] GetPublicFoldersRecursive(string organizationId, string parent) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFoldersRecursive", 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[] GetPublicFoldersRecursive(string organizationId, string parent) + { object[] results = this.Invoke("GetPublicFoldersRecursive", new object[] { organizationId, parent}); return ((string[])(results[0])); } - + /// - public System.IAsyncResult BeginGetPublicFoldersRecursive(string organizationId, string parent, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPublicFoldersRecursive(string organizationId, string parent, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPublicFoldersRecursive", new object[] { organizationId, parent}, callback, asyncState); } - + /// - public string[] EndGetPublicFoldersRecursive(System.IAsyncResult asyncResult) { + public string[] EndGetPublicFoldersRecursive(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string[])(results[0])); } - + /// - public void GetPublicFoldersRecursiveAsync(string organizationId, string parent) { + public void GetPublicFoldersRecursiveAsync(string organizationId, string parent) + { this.GetPublicFoldersRecursiveAsync(organizationId, parent, null); } - + /// - public void GetPublicFoldersRecursiveAsync(string organizationId, string parent, object userState) { - if ((this.GetPublicFoldersRecursiveOperationCompleted == null)) { + public void GetPublicFoldersRecursiveAsync(string organizationId, string parent, object userState) + { + if ((this.GetPublicFoldersRecursiveOperationCompleted == null)) + { this.GetPublicFoldersRecursiveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFoldersRecursiveOperationCompleted); } this.InvokeAsync("GetPublicFoldersRecursive", new object[] { organizationId, parent}, this.GetPublicFoldersRecursiveOperationCompleted, userState); } - - private void OnGetPublicFoldersRecursiveOperationCompleted(object arg) { - if ((this.GetPublicFoldersRecursiveCompleted != null)) { + + private void OnGetPublicFoldersRecursiveOperationCompleted(object arg) + { + if ((this.GetPublicFoldersRecursiveCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPublicFoldersRecursiveCompleted(this, new GetPublicFoldersRecursiveCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFolderSize", 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 long GetPublicFolderSize(string organizationId, string folder) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPublicFolderSize", 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 long GetPublicFolderSize(string organizationId, string folder) + { object[] results = this.Invoke("GetPublicFolderSize", new object[] { organizationId, folder}); return ((long)(results[0])); } - + /// - public System.IAsyncResult BeginGetPublicFolderSize(string organizationId, string folder, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPublicFolderSize(string organizationId, string folder, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPublicFolderSize", new object[] { organizationId, folder}, callback, asyncState); } - + /// - public long EndGetPublicFolderSize(System.IAsyncResult asyncResult) { + public long EndGetPublicFolderSize(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((long)(results[0])); } - + /// - public void GetPublicFolderSizeAsync(string organizationId, string folder) { + public void GetPublicFolderSizeAsync(string organizationId, string folder) + { this.GetPublicFolderSizeAsync(organizationId, folder, null); } - + /// - public void GetPublicFolderSizeAsync(string organizationId, string folder, object userState) { - if ((this.GetPublicFolderSizeOperationCompleted == null)) { + public void GetPublicFolderSizeAsync(string organizationId, string folder, object userState) + { + if ((this.GetPublicFolderSizeOperationCompleted == null)) + { this.GetPublicFolderSizeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderSizeOperationCompleted); } this.InvokeAsync("GetPublicFolderSize", new object[] { organizationId, folder}, this.GetPublicFolderSizeOperationCompleted, userState); } - - private void OnGetPublicFolderSizeOperationCompleted(object arg) { - if ((this.GetPublicFolderSizeCompleted != null)) { + + private void OnGetPublicFolderSizeOperationCompleted(object arg) + { + if ((this.GetPublicFolderSizeCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPublicFolderSizeCompleted(this, new GetPublicFolderSizeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganizationActiveSyncPolicy", 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 void CreateOrganizationActiveSyncPolicy(string organizationId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganizationActiveSyncPolicy", 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 void CreateOrganizationActiveSyncPolicy(string organizationId) + { this.Invoke("CreateOrganizationActiveSyncPolicy", new object[] { organizationId}); } - + /// - public System.IAsyncResult BeginCreateOrganizationActiveSyncPolicy(string organizationId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateOrganizationActiveSyncPolicy(string organizationId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateOrganizationActiveSyncPolicy", new object[] { organizationId}, callback, asyncState); } - + /// - public void EndCreateOrganizationActiveSyncPolicy(System.IAsyncResult asyncResult) { + public void EndCreateOrganizationActiveSyncPolicy(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void CreateOrganizationActiveSyncPolicyAsync(string organizationId) { + public void CreateOrganizationActiveSyncPolicyAsync(string organizationId) + { this.CreateOrganizationActiveSyncPolicyAsync(organizationId, null); } - + /// - public void CreateOrganizationActiveSyncPolicyAsync(string organizationId, object userState) { - if ((this.CreateOrganizationActiveSyncPolicyOperationCompleted == null)) { + public void CreateOrganizationActiveSyncPolicyAsync(string organizationId, object userState) + { + if ((this.CreateOrganizationActiveSyncPolicyOperationCompleted == null)) + { this.CreateOrganizationActiveSyncPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationActiveSyncPolicyOperationCompleted); } this.InvokeAsync("CreateOrganizationActiveSyncPolicy", new object[] { organizationId}, this.CreateOrganizationActiveSyncPolicyOperationCompleted, userState); } - - private void OnCreateOrganizationActiveSyncPolicyOperationCompleted(object arg) { - if ((this.CreateOrganizationActiveSyncPolicyCompleted != null)) { + + private void OnCreateOrganizationActiveSyncPolicyOperationCompleted(object arg) + { + if ((this.CreateOrganizationActiveSyncPolicyCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateOrganizationActiveSyncPolicyCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetActiveSyncPolicy", 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 ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetActiveSyncPolicy", 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 ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId) + { object[] results = this.Invoke("GetActiveSyncPolicy", new object[] { organizationId}); return ((ExchangeActiveSyncPolicy)(results[0])); } - + /// - public System.IAsyncResult BeginGetActiveSyncPolicy(string organizationId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetActiveSyncPolicy(string organizationId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetActiveSyncPolicy", new object[] { organizationId}, callback, asyncState); } - + /// - public ExchangeActiveSyncPolicy EndGetActiveSyncPolicy(System.IAsyncResult asyncResult) { + public ExchangeActiveSyncPolicy EndGetActiveSyncPolicy(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ExchangeActiveSyncPolicy)(results[0])); } - + /// - public void GetActiveSyncPolicyAsync(string organizationId) { + public void GetActiveSyncPolicyAsync(string organizationId) + { this.GetActiveSyncPolicyAsync(organizationId, null); } - + /// - public void GetActiveSyncPolicyAsync(string organizationId, object userState) { - if ((this.GetActiveSyncPolicyOperationCompleted == null)) { + public void GetActiveSyncPolicyAsync(string organizationId, object userState) + { + if ((this.GetActiveSyncPolicyOperationCompleted == null)) + { this.GetActiveSyncPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetActiveSyncPolicyOperationCompleted); } this.InvokeAsync("GetActiveSyncPolicy", new object[] { organizationId}, this.GetActiveSyncPolicyOperationCompleted, userState); } - - private void OnGetActiveSyncPolicyOperationCompleted(object arg) { - if ((this.GetActiveSyncPolicyCompleted != null)) { + + private void OnGetActiveSyncPolicyOperationCompleted(object arg) + { + if ((this.GetActiveSyncPolicyCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetActiveSyncPolicyCompleted(this, new GetActiveSyncPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetActiveSyncPolicy", 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 void SetActiveSyncPolicy( - string id, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInterval) { - this.Invoke("SetActiveSyncPolicy", new object[] { - id, - allowNonProvisionableDevices, - attachmentsEnabled, - maxAttachmentSizeKB, - uncAccessEnabled, - wssAccessEnabled, - devicePasswordEnabled, - alphanumericPasswordRequired, - passwordRecoveryEnabled, - deviceEncryptionEnabled, - allowSimplePassword, - maxPasswordFailedAttempts, - minPasswordLength, - inactivityLockMin, - passwordExpirationDays, - passwordHistory, - refreshInterval}); - } - - /// - public System.IAsyncResult BeginSetActiveSyncPolicy( - string id, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInterval, - System.AsyncCallback callback, - object asyncState) { - return this.BeginInvoke("SetActiveSyncPolicy", new object[] { - id, - allowNonProvisionableDevices, - attachmentsEnabled, - maxAttachmentSizeKB, - uncAccessEnabled, - wssAccessEnabled, - devicePasswordEnabled, - alphanumericPasswordRequired, - passwordRecoveryEnabled, - deviceEncryptionEnabled, - allowSimplePassword, - maxPasswordFailedAttempts, - minPasswordLength, - inactivityLockMin, - passwordExpirationDays, - passwordHistory, - refreshInterval}, callback, asyncState); - } - - /// - public void EndSetActiveSyncPolicy(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void SetActiveSyncPolicyAsync( - string id, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInterval) { - this.SetActiveSyncPolicyAsync(id, allowNonProvisionableDevices, attachmentsEnabled, maxAttachmentSizeKB, uncAccessEnabled, wssAccessEnabled, devicePasswordEnabled, alphanumericPasswordRequired, passwordRecoveryEnabled, deviceEncryptionEnabled, allowSimplePassword, maxPasswordFailedAttempts, minPasswordLength, inactivityLockMin, passwordExpirationDays, passwordHistory, refreshInterval, null); - } - - /// - public void SetActiveSyncPolicyAsync( - string id, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInterval, - object userState) { - if ((this.SetActiveSyncPolicyOperationCompleted == null)) { - this.SetActiveSyncPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetActiveSyncPolicyOperationCompleted); - } - this.InvokeAsync("SetActiveSyncPolicy", new object[] { - id, - allowNonProvisionableDevices, - attachmentsEnabled, - maxAttachmentSizeKB, - uncAccessEnabled, - wssAccessEnabled, - devicePasswordEnabled, - alphanumericPasswordRequired, - passwordRecoveryEnabled, - deviceEncryptionEnabled, - allowSimplePassword, - maxPasswordFailedAttempts, - minPasswordLength, - inactivityLockMin, - passwordExpirationDays, - passwordHistory, - refreshInterval}, this.SetActiveSyncPolicyOperationCompleted, userState); - } - - private void OnSetActiveSyncPolicyOperationCompleted(object arg) { - if ((this.SetActiveSyncPolicyCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.SetActiveSyncPolicyCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMobileDevices", 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 ExchangeMobileDevice[] GetMobileDevices(string accountName) { - object[] results = this.Invoke("GetMobileDevices", new object[] { - accountName}); - return ((ExchangeMobileDevice[])(results[0])); - } - - /// - public System.IAsyncResult BeginGetMobileDevices(string accountName, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetMobileDevices", new object[] { - accountName}, callback, asyncState); - } - - /// - public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeMobileDevice[])(results[0])); - } - - /// - public void GetMobileDevicesAsync(string accountName) { - this.GetMobileDevicesAsync(accountName, null); - } - - /// - public void GetMobileDevicesAsync(string accountName, object userState) { - if ((this.GetMobileDevicesOperationCompleted == null)) { - this.GetMobileDevicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDevicesOperationCompleted); - } - this.InvokeAsync("GetMobileDevices", new object[] { - accountName}, this.GetMobileDevicesOperationCompleted, userState); - } - - private void OnGetMobileDevicesOperationCompleted(object arg) { - if ((this.GetMobileDevicesCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetMobileDevicesCompleted(this, new GetMobileDevicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetMobileDevice", 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 ExchangeMobileDevice GetMobileDevice(string id) { - object[] results = this.Invoke("GetMobileDevice", new object[] { - id}); - return ((ExchangeMobileDevice)(results[0])); - } - - /// - public System.IAsyncResult BeginGetMobileDevice(string id, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetMobileDevice", new object[] { - id}, callback, asyncState); - } - - /// - public ExchangeMobileDevice EndGetMobileDevice(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeMobileDevice)(results[0])); - } - - /// - public void GetMobileDeviceAsync(string id) { - this.GetMobileDeviceAsync(id, null); - } - - /// - public void GetMobileDeviceAsync(string id, object userState) { - if ((this.GetMobileDeviceOperationCompleted == null)) { - this.GetMobileDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDeviceOperationCompleted); - } - this.InvokeAsync("GetMobileDevice", new object[] { - id}, this.GetMobileDeviceOperationCompleted, userState); - } - - private void OnGetMobileDeviceOperationCompleted(object arg) { - if ((this.GetMobileDeviceCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetMobileDeviceCompleted(this, new GetMobileDeviceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/WipeDataFromDevice", 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 void WipeDataFromDevice(string id) { - this.Invoke("WipeDataFromDevice", new object[] { - id}); - } - - /// - public System.IAsyncResult BeginWipeDataFromDevice(string id, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("WipeDataFromDevice", new object[] { - id}, callback, asyncState); - } - - /// - public void EndWipeDataFromDevice(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void WipeDataFromDeviceAsync(string id) { - this.WipeDataFromDeviceAsync(id, null); - } - - /// - public void WipeDataFromDeviceAsync(string id, object userState) { - if ((this.WipeDataFromDeviceOperationCompleted == null)) { - this.WipeDataFromDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWipeDataFromDeviceOperationCompleted); - } - this.InvokeAsync("WipeDataFromDevice", new object[] { - id}, this.WipeDataFromDeviceOperationCompleted, userState); - } - - private void OnWipeDataFromDeviceOperationCompleted(object arg) { - if ((this.WipeDataFromDeviceCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.WipeDataFromDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CancelRemoteWipeRequest", 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 void CancelRemoteWipeRequest(string id) { - this.Invoke("CancelRemoteWipeRequest", new object[] { - id}); - } - - /// - public System.IAsyncResult BeginCancelRemoteWipeRequest(string id, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("CancelRemoteWipeRequest", new object[] { - id}, callback, asyncState); - } - - /// - public void EndCancelRemoteWipeRequest(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void CancelRemoteWipeRequestAsync(string id) { - this.CancelRemoteWipeRequestAsync(id, null); - } - - /// - public void CancelRemoteWipeRequestAsync(string id, object userState) { - if ((this.CancelRemoteWipeRequestOperationCompleted == null)) { - this.CancelRemoteWipeRequestOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelRemoteWipeRequestOperationCompleted); - } - this.InvokeAsync("CancelRemoteWipeRequest", new object[] { - id}, this.CancelRemoteWipeRequestOperationCompleted, userState); - } - - private void OnCancelRemoteWipeRequestOperationCompleted(object arg) { - if ((this.CancelRemoteWipeRequestCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.CancelRemoteWipeRequestCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveDevice", 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 void RemoveDevice(string id) { - this.Invoke("RemoveDevice", new object[] { - id}); - } - - /// - public System.IAsyncResult BeginRemoveDevice(string id, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("RemoveDevice", new object[] { - id}, callback, asyncState); - } - - /// - public void EndRemoveDevice(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void RemoveDeviceAsync(string id) { - this.RemoveDeviceAsync(id, null); - } - - /// - public void RemoveDeviceAsync(string id, object userState) { - if ((this.RemoveDeviceOperationCompleted == null)) { - this.RemoveDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveDeviceOperationCompleted); - } - this.InvokeAsync("RemoveDevice", new object[] { - id}, this.RemoveDeviceOperationCompleted, userState); - } - - private void OnRemoveDeviceOperationCompleted(object arg) { - if ((this.RemoveDeviceCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.RemoveDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - public new void CancelAsync(object userState) { + public new void CancelAsync(object userState) + { base.CancelAsync(userState); } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CheckAccountCredentialsCompletedEventHandler(object sender, CheckAccountCredentialsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckAccountCredentialsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CheckAccountCredentialsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public bool Result { - get { - this.RaiseExceptionIfNecessary(); - return ((bool)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void ExtendToExchangeOrganizationCompletedEventHandler(object sender, ExtendToExchangeOrganizationCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class ExtendToExchangeOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal ExtendToExchangeOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public Organization Result { - get { - this.RaiseExceptionIfNecessary(); - return ((Organization)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateMailEnableUserCompletedEventHandler(object sender, CreateMailEnableUserCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateMailEnableUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreateMailEnableUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public string Result { - get { - this.RaiseExceptionIfNecessary(); - return ((string)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateOrganizationOfflineAddressBookCompletedEventHandler(object sender, CreateOrganizationOfflineAddressBookCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateOrganizationOfflineAddressBookCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreateOrganizationOfflineAddressBookCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public Organization Result { - get { - this.RaiseExceptionIfNecessary(); - return ((Organization)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void UpdateOrganizationOfflineAddressBookCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetOABVirtualDirectoryCompletedEventHandler(object sender, GetOABVirtualDirectoryCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOABVirtualDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetOABVirtualDirectoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public string Result { - get { - this.RaiseExceptionIfNecessary(); - return ((string)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateOrganizationAddressBookPolicyCompletedEventHandler(object sender, CreateOrganizationAddressBookPolicyCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateOrganizationAddressBookPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreateOrganizationAddressBookPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public Organization Result { - get { - this.RaiseExceptionIfNecessary(); - return ((Organization)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public bool Result { - get { - this.RaiseExceptionIfNecessary(); - return ((bool)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetOrganizationStorageLimitsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxesStatisticsCompletedEventHandler(object sender, GetMailboxesStatisticsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxesStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxesStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeItemStatistics[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeItemStatistics[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void AddAuthoritativeDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void ChangeAcceptedDomainTypeCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetAuthoritativeDomainsCompletedEventHandler(object sender, GetAuthoritativeDomainsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAuthoritativeDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetAuthoritativeDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public string[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((string[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteAuthoritativeDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteMailboxCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DisableMailboxCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxGeneralSettingsCompletedEventHandler(object sender, GetMailboxGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailbox Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailbox)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxMailFlowSettingsCompletedEventHandler(object sender, GetMailboxMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailbox Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailbox)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxAdvancedSettingsCompletedEventHandler(object sender, GetMailboxAdvancedSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxAdvancedSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxAdvancedSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailbox Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailbox)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxAdvancedSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxEmailAddressesCompletedEventHandler(object sender, GetMailboxEmailAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeEmailAddress[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeEmailAddress[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxEmailAddressesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxPrimaryEmailAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxPermissionsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxPermissionsCompletedEventHandler(object sender, GetMailboxPermissionsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailbox Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailbox)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxStatisticsCompletedEventHandler(object sender, GetMailboxStatisticsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMailboxStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailboxStatistics Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailboxStatistics)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateContactCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteContactCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetContactGeneralSettingsCompletedEventHandler(object sender, GetContactGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetContactGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeContact Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeContact)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetContactGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetContactMailFlowSettingsCompletedEventHandler(object sender, GetContactMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetContactMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeContact Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeContact)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetContactMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateDistributionListCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeleteDistributionListCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetDistributionListGeneralSettingsCompletedEventHandler(object sender, GetDistributionListGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDistributionListGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeDistributionList Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeDistributionList)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetDistributionListGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetDistributionListMailFlowSettingsCompletedEventHandler(object sender, GetDistributionListMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDistributionListMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeDistributionList Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeDistributionList)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetDistributionListMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetDistributionListEmailAddressesCompletedEventHandler(object sender, GetDistributionListEmailAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDistributionListEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeEmailAddress[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeEmailAddress[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetDistributionListEmailAddressesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetDistributionListPrimaryEmailAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetDistributionListPermissionsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetDistributionListPermissionsCompletedEventHandler(object sender, GetDistributionListPermissionsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeDistributionList Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeDistributionList)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreatePublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeletePublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void EnableMailPublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DisableMailPublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFolderGeneralSettingsCompletedEventHandler(object sender, GetPublicFolderGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangePublicFolder Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangePublicFolder)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetPublicFolderGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, GetPublicFolderMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangePublicFolder Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangePublicFolder)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFolderEmailAddressesCompletedEventHandler(object sender, GetPublicFolderEmailAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeEmailAddress[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeEmailAddress[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetPublicFolderEmailAddressesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetPublicFolderPrimaryEmailAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFoldersStatisticsCompletedEventHandler(object sender, GetPublicFoldersStatisticsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFoldersStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPublicFoldersStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeItemStatistics[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeItemStatistics[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFoldersRecursiveCompletedEventHandler(object sender, GetPublicFoldersRecursiveCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFoldersRecursiveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPublicFoldersRecursiveCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public string[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((string[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFolderSizeCompletedEventHandler(object sender, GetPublicFolderSizeCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderSizeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPublicFolderSizeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public long Result { - get { - this.RaiseExceptionIfNecessary(); - return ((long)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateOrganizationActiveSyncPolicyCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetActiveSyncPolicyCompletedEventHandler(object sender, GetActiveSyncPolicyCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetActiveSyncPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeActiveSyncPolicy Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeActiveSyncPolicy)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetActiveSyncPolicyCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMobileDevicesCompletedEventHandler(object sender, GetMobileDevicesCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetMobileDevicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetMobileDevicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ExchangeMobileDevice[] Result { - get { + public ExchangeMobileDevice[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ExchangeMobileDevice[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMobileDeviceCompletedEventHandler(object sender, GetMobileDeviceCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMobileDeviceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetMobileDeviceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetMobileDeviceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetMobileDeviceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ExchangeMobileDevice Result { - get { + public ExchangeMobileDevice Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ExchangeMobileDevice)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void WipeDataFromDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CancelRemoteWipeRequestCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void RemoveDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CheckAccountCredentialsCompletedEventHandler(object sender, CheckAccountCredentialsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CheckAccountCredentialsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CheckAccountCredentialsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public bool Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void ExtendToExchangeOrganizationCompletedEventHandler(object sender, ExtendToExchangeOrganizationCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ExtendToExchangeOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal ExtendToExchangeOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public Organization Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((Organization)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateMailEnableUserCompletedEventHandler(object sender, CreateMailEnableUserCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateMailEnableUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateMailEnableUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public string Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateOrganizationOfflineAddressBookCompletedEventHandler(object sender, CreateOrganizationOfflineAddressBookCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateOrganizationOfflineAddressBookCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateOrganizationOfflineAddressBookCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public Organization Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((Organization)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void UpdateOrganizationOfflineAddressBookCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetOABVirtualDirectoryCompletedEventHandler(object sender, GetOABVirtualDirectoryCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetOABVirtualDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetOABVirtualDirectoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public string Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateOrganizationAddressBookPolicyCompletedEventHandler(object sender, CreateOrganizationAddressBookPolicyCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateOrganizationAddressBookPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateOrganizationAddressBookPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public Organization Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((Organization)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public bool Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetOrganizationStorageLimitsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxesStatisticsCompletedEventHandler(object sender, GetMailboxesStatisticsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxesStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxesStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeItemStatistics[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeItemStatistics[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddAuthoritativeDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void ChangeAcceptedDomainTypeCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetAuthoritativeDomainsCompletedEventHandler(object sender, GetAuthoritativeDomainsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetAuthoritativeDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetAuthoritativeDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public string[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteAuthoritativeDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteMailboxCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DisableMailboxCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxGeneralSettingsCompletedEventHandler(object sender, GetMailboxGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailbox Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailbox)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxMailFlowSettingsCompletedEventHandler(object sender, GetMailboxMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailbox Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailbox)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxAdvancedSettingsCompletedEventHandler(object sender, GetMailboxAdvancedSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxAdvancedSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxAdvancedSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailbox Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailbox)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxAdvancedSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxEmailAddressesCompletedEventHandler(object sender, GetMailboxEmailAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeEmailAddress[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeEmailAddress[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxEmailAddressesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxPrimaryEmailAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetMailboxPermissionsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxPermissionsCompletedEventHandler(object sender, GetMailboxPermissionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailbox Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailbox)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxStatisticsCompletedEventHandler(object sender, GetMailboxStatisticsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMailboxStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMailboxStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeMailboxStatistics Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailboxStatistics)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateContactCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteContactCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetContactGeneralSettingsCompletedEventHandler(object sender, GetContactGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetContactGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeContact Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeContact)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetContactGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetContactMailFlowSettingsCompletedEventHandler(object sender, GetContactMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetContactMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeContact Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeContact)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetContactMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateDistributionListCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteDistributionListCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDistributionListGeneralSettingsCompletedEventHandler(object sender, GetDistributionListGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDistributionListGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeDistributionList Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeDistributionList)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetDistributionListGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDistributionListMailFlowSettingsCompletedEventHandler(object sender, GetDistributionListMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDistributionListMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeDistributionList Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeDistributionList)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetDistributionListMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDistributionListEmailAddressesCompletedEventHandler(object sender, GetDistributionListEmailAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDistributionListEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeEmailAddress[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeEmailAddress[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetDistributionListEmailAddressesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetDistributionListPrimaryEmailAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetDistributionListPermissionsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDistributionListPermissionsCompletedEventHandler(object sender, GetDistributionListPermissionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeDistributionList Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeDistributionList)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void NewDisclaimerTransportRuleCompletedEventHandler(object sender, NewDisclaimerTransportRuleCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class NewDisclaimerTransportRuleCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal NewDisclaimerTransportRuleCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void RemoveTransportRuleCompletedEventHandler(object sender, RemoveTransportRuleCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RemoveTransportRuleCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal RemoveTransportRuleCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreatePublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeletePublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void EnableMailPublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DisableMailPublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPublicFolderGeneralSettingsCompletedEventHandler(object sender, GetPublicFolderGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangePublicFolder Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangePublicFolder)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetPublicFolderGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, GetPublicFolderMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangePublicFolder Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangePublicFolder)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPublicFolderEmailAddressesCompletedEventHandler(object sender, GetPublicFolderEmailAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetPublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeEmailAddress[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeEmailAddress[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetPublicFolderEmailAddressesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetPublicFolderPrimaryEmailAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPublicFoldersStatisticsCompletedEventHandler(object sender, GetPublicFoldersStatisticsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPublicFoldersStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetPublicFoldersStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeItemStatistics[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeItemStatistics[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPublicFoldersRecursiveCompletedEventHandler(object sender, GetPublicFoldersRecursiveCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPublicFoldersRecursiveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetPublicFoldersRecursiveCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public string[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPublicFolderSizeCompletedEventHandler(object sender, GetPublicFolderSizeCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPublicFolderSizeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetPublicFolderSizeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public long Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((long)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateOrganizationActiveSyncPolicyCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetActiveSyncPolicyCompletedEventHandler(object sender, GetActiveSyncPolicyCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetActiveSyncPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeActiveSyncPolicy Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeActiveSyncPolicy)(this.results[0])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServer.asmx.cs index 8999ac9d..ff1bf012 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServer.asmx.cs @@ -818,10 +818,24 @@ namespace WebsitePanel.Server #endregion - - + #region Disclaimers + + [WebMethod, SoapHeader("settings")] + public int NewDisclaimerTransportRule(string Name, string From, string Text) + { + return ES.NewDisclaimerTransportRule(Name, From, Text); + } + + [WebMethod, SoapHeader("settings")] + public int RemoveTransportRule(string Name) + { + return ES.RemoveTransportRule(Name); + } + + #endregion + #region Public Folders - [WebMethod, SoapHeader("settings")] + [WebMethod, SoapHeader("settings")] public void CreatePublicFolder(string organizationDistinguishedName, string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config index 496315ef..63db8671 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config @@ -474,7 +474,14 @@ - + + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index c51c4818..09d7a912 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -2892,6 +2892,9 @@ Maximum Receive Message Size (Kb) + + Disclaimers Allowed + Hosted Exchange @@ -2919,6 +2922,9 @@ Error deleting distribution list. See audit log for more details. + + Error deleting disclaimer. See audit log for more details. + Error deleting mailbox. See audit log for more details. @@ -2980,6 +2986,9 @@ Error reading distribution list general settings. See audit log for more details. + + Error reading disclaimer. See audit log for more details. + Error reading mailbox advanced settings. See audit log for more details. @@ -3031,6 +3040,9 @@ Error updating distribution list general settings. See audit log for more details. + + Error updating disclaimer. See audit log for more details. + Error updating mailbox advanced settings. See audit log for more details. @@ -3064,6 +3076,9 @@ Error reading organization distribution lists + + Error reading organization disclaimer lists + Error updating storage settings. See audit log for more details. @@ -3122,6 +3137,9 @@ Distribution list general settings have been successfully updated. + + Disclaimer successfully updated. + Public folder mail flow settings have been successfully updated. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.cs index 7c52e8f0..a4276f84 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.cs @@ -99,7 +99,7 @@ namespace WebsitePanel.Portal { get { - return ddlDomains.SelectedItem.Text; + return ddlDomains.SelectedItem.Text.ToLower(); } } @@ -192,7 +192,7 @@ namespace WebsitePanel.Portal else if (HideDomainsSubDomains && !(domain.IsDomainPointer)) continue; - ddlDomains.Items.Add(new ListItem(domain.DomainName, domain.DomainId.ToString())); + ddlDomains.Items.Add(new ListItem(domain.DomainName.ToLower(), domain.DomainId.ToString())); } if (Request.Cookies["CreatedDomainId"] != null) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDisclaimerGeneralSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDisclaimerGeneralSettings.ascx.resx new file mode 100644 index 00000000..0e8f02a1 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDisclaimerGeneralSettings.ascx.resx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ShowProgressDialog('Updating Disclaimer ...'); + + + Save Changes + + + + + + Text: + + + Edit Disclaimer + + + Disclaimer + + + Enter Display Name + + + * + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDisclaimers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDisclaimers.ascx.resx new file mode 100644 index 00000000..23f6559e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDisclaimers.ascx.resx @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Create New Disclaimer + + + if(!confirm('Are you sure you want to delete this disclaimer?')) return false; else ShowProgressDialog('Deleting disclaimer list...'); + + + Delete + + + Delete Disclaimer + + + Search + + + Display Name + + + + + + No disclaimer have been created. To create a new disclaimer click "Create New Disclaimer" button. + + + Display Name + + + Disclaimer Created: + + + Disclaimers + + + Disclaimers + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDistributionListMemberOf.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDistributionListMemberOf.ascx.resx new file mode 100644 index 00000000..f4f15196 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDistributionListMemberOf.ascx.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ShowProgressDialog('Updating...'); + + + Save Changes + + + Edit Distribution List + + + General + + + Distribution Lists + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx new file mode 100644 index 00000000..c243cc33 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ShowProgressDialog('Updating...'); + + + Save Changes + + + Edit Mailbox + + + General + + + Mailboxes + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx new file mode 100644 index 00000000..81ca9211 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ShowProgressDialog('Updating...'); + + + Save Changes + + + Edit User + + + General + + + Users + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx new file mode 100644 index 00000000..cdbf314c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx @@ -0,0 +1,55 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeDisclaimerGeneralSettings.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeDisclaimerGeneralSettings" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> +<%@ Register Src="UserControls/MailboxSelector.ascx" TagName="MailboxSelector" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> + + + +
+
+
+ +
+
+ +
+
+
+
+ + + - + +
+
+ + + + + + + + + + +
+ + +
+ +
+ +
+ + +
+
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.cs new file mode 100644 index 00000000..7129c952 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.cs @@ -0,0 +1,126 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.EnterpriseServer; + +namespace WebsitePanel.Portal.ExchangeServer +{ + public partial class ExchangeDisclaimerGeneralSettings : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindSettings(); + } + + + } + + private void BindSettings() + { + try + { + if (PanelRequest.AccountID != 0) + { + // get settings + ExchangeDisclaimer disclaimer = ES.Services.ExchangeServer.GetExchangeDisclaimer( + PanelRequest.ItemID, PanelRequest.AccountID); + + litDisplayName.Text = PortalAntiXSS.Encode(disclaimer.DisclaimerName); + + // bind form + txtDisplayName.Text = disclaimer.DisclaimerName; + txtNotes.Text = disclaimer.DisclaimerText; + } + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_GET_DISCLAIMER_SETTINGS", ex); + } + } + + private void SaveSettings() + { + if (!Page.IsValid) + return; + + try + { + int result = 0; + ExchangeDisclaimer disclaimer = new ExchangeDisclaimer(); + disclaimer.DisclaimerName = txtDisplayName.Text; + disclaimer.DisclaimerText = txtNotes.Text; + + if (PanelRequest.AccountID == 0) + { + int id = ES.Services.ExchangeServer.AddExchangeDisclaimer(PanelRequest.ItemID, disclaimer); + } + else + { + disclaimer.ExchangeDisclaimerId = PanelRequest.AccountID; + + result = ES.Services.ExchangeServer.UpdateExchangeDisclaimer( + PanelRequest.ItemID, disclaimer); + } + + if (result < 0) + { + messageBox.ShowResultMessage(result); + return; + } + + litDisplayName.Text = PortalAntiXSS.Encode(txtDisplayName.Text); + + messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DISCLAIMER_SETTINGS"); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_UPDATE_DISCLAIMER_SETTINGS", ex); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + SaveSettings(); + } + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs new file mode 100644 index 00000000..accdff07 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs @@ -0,0 +1,141 @@ +//------------------------------------------------------------------------------ +// <àâòîìàòè÷åñêè ñîçäàâàåìîå> +// Ýòîò êîä ñîçäàí ïðîãðàììîé. +// +// Èçìåíåíèÿ â ýòîì ôàéëå ìîãóò ïðèâåñòè ê íåïðàâèëüíîé ðàáîòå è áóäóò ïîòåðÿíû â ñëó÷àå +// ïîâòîðíîé ãåíåðàöèè êîäà. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.ExchangeServer { + + + public partial class ExchangeDisclaimerGeneralSettings { + + /// + /// asyncTasks ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// breadcrumb ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + + /// + /// menu ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; + + /// + /// Image1 ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// locTitle ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// litDisplayName ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Literal litDisplayName; + + /// + /// messageBox ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// locDisplayName ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Localize locDisplayName; + + /// + /// txtDisplayName ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.TextBox txtDisplayName; + + /// + /// valRequireDisplayName ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireDisplayName; + + /// + /// locNotes ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Localize locNotes; + + /// + /// txtNotes ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.TextBox txtNotes; + + /// + /// btnSave ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Button btnSave; + + /// + /// ValidationSummary1 ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx new file mode 100644 index 00000000..58dab9b0 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx @@ -0,0 +1,86 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeDisclaimers.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeDisclaimers" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> + + + +
+
+
+ +
+
+ +
+
+
+
+ + +
+ +
+ +
+
+ +
+
+ <%-- + + + + 10 + 20 + 50 + 100 + + + + DisplayName + + + --%> +
+
+ + + + + + + + <%# Eval("DisclaimerName")%> + + + + + + + + + + +
+ +     + + + +
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.cs new file mode 100644 index 00000000..363cd97d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.cs @@ -0,0 +1,137 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.EnterpriseServer; + +namespace WebsitePanel.Portal.ExchangeServer +{ + public partial class ExchangeDisclaimers : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindDisclaimers(); + + BindStats(); + } + } + + ExchangeDisclaimer[] disclaimerList = null; + private void BindDisclaimers() + { + disclaimerList = ES.Services.ExchangeServer.GetExchangeDisclaimers(PanelRequest.ItemID); + + gvLists.DataSource = disclaimerList; + gvLists.DataBind(); + } + + private void BindStats() + { + listsQuota.QuotaValue = -1; + if (disclaimerList!=null) + listsQuota.QuotaUsedValue = disclaimerList.Length; + } + + protected void btnCreateList_Click(object sender, EventArgs e) + { + Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "disclaimers_settings", + "SpaceID=" + PanelSecurity.PackageId.ToString())); + } + + public string GetListEditUrl(string accountId) + { + return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "disclaimers_settings", + "AccountID=" + accountId, + "ItemID=" + PanelRequest.ItemID.ToString()); + } + + protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e) + { + if (e.Exception != null) + { + messageBox.ShowErrorMessage("EXCHANGE_DISCLAIMERS_LISTS", e.Exception); + e.ExceptionHandled = true; + } + } + + protected void gvLists_RowCommand(object sender, GridViewCommandEventArgs e) + { + if (e.CommandName == "DeleteItem") + { + + int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0); + + try + { + int result = ES.Services.ExchangeServer.DeleteExchangeDisclaimer(PanelRequest.ItemID, accountId); + if (result < 0) + { + messageBox.ShowResultMessage(result); + return; + } + + // rebind grid + BindDisclaimers(); + + BindStats(); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_DELETE_DISCLAIMER", ex); + } + } + + } + + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + //gvLists.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue); + + // rebind grid + BindDisclaimers(); + + // bind stats + BindStats(); + + } + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.designer.cs new file mode 100644 index 00000000..1bc66c57 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.designer.cs @@ -0,0 +1,133 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.ExchangeServer { + + + public partial class ExchangeDisclaimers { + + /// + /// asyncTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// breadcrumb control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + + /// + /// menu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; + + /// + /// Image1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// locTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// btnCreateList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnCreateList; + + /// + /// gvLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView gvLists; + + /// + /// locQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locQuota; + + /// + /// listsQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.QuotaViewer listsQuota; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx new file mode 100644 index 00000000..3ee22461 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx @@ -0,0 +1,57 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeDistributionListMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeDistributionListMemberOf" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> +<%@ Register Src="UserControls/MailboxSelector.ascx" TagName="MailboxSelector" TagPrefix="wsp" %> +<%@ Register Src="UserControls/DistributionListTabs.ascx" TagName="DistributionListTabs" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> + + + +
+
+
+ +
+
+ +
+
+
+
+ + + - + +
+
+ + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.cs new file mode 100644 index 00000000..0a9340e4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.cs @@ -0,0 +1,114 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Collections.Generic; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.EnterpriseServer; + +namespace WebsitePanel.Portal.ExchangeServer +{ + public partial class ExchangeDistributionListMemberOf : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindSettings(); + } + + + } + + private void BindSettings() + { + try + { + // get settings + ExchangeDistributionList dlist = ES.Services.ExchangeServer.GetDistributionListGeneralSettings( + PanelRequest.ItemID, PanelRequest.AccountID); + + litDisplayName.Text = PortalAntiXSS.Encode(dlist.DisplayName); + + ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + + distrlists.SetAccounts(dLists); + + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_GET_DLIST_SETTINGS", ex); + } + } + + private void SaveSettings() + { + if (!Page.IsValid) + return; + + try + { + ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + List newDistributionLists = new List(distrlists.GetAccounts()); + foreach (ExchangeAccount oldlist in oldDistributionLists) + { + if (newDistributionLists.Contains(oldlist.AccountName)) + newDistributionLists.Remove(oldlist.AccountName); + else + ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID); + } + + foreach (string newlist in newDistributionLists) + ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID); + + messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DLIST_SETTINGS"); + BindSettings(); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_UPDATE_DLIST_SETTINGS", ex); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + SaveSettings(); + } + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.designer.cs new file mode 100644 index 00000000..4cd03a2d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.designer.cs @@ -0,0 +1,141 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.ExchangeServer { + + + public partial class ExchangeDistributionListMemberOf { + + /// + /// asyncTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// breadcrumb control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + + /// + /// menu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; + + /// + /// Image1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// locTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// litDisplayName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litDisplayName; + + /// + /// tabs control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.DistributionListTabs tabs; + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// secDistributionLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists; + + /// + /// DistributionLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel DistributionLists; + + /// + /// GeneralUpdatePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel; + + /// + /// distrlists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; + + /// + /// btnSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSave; + + /// + /// ValidationSummary1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx index d2fbeeeb..ba8d6e3b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx @@ -55,6 +55,12 @@ + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs index 2c0c949d..1b06ac3a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs @@ -38,13 +38,28 @@ namespace WebsitePanel.Portal.ExchangeServer { if (!IsPostBack) { + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx)) + { + ddDisclaimer.Items.Add(new System.Web.UI.WebControls.ListItem("None", "-1")); + ExchangeDisclaimer[] disclaimers = ES.Services.ExchangeServer.GetExchangeDisclaimers(PanelRequest.ItemID); + foreach (ExchangeDisclaimer disclaimer in disclaimers) + ddDisclaimer.Items.Add(new System.Web.UI.WebControls.ListItem(disclaimer.DisclaimerName, disclaimer.ExchangeDisclaimerId.ToString())); + } + else + { + locDisclaimer.Visible = false; + ddDisclaimer.Visible = false; + } + BindSettings(); UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId); if (user != null) { - PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx))) { chkHideAddressBook.Visible = false; @@ -98,7 +113,7 @@ namespace WebsitePanel.Portal.ExchangeServer } mailboxSize.QuotaUsedValue = Convert.ToInt32(stats.TotalSize / 1024 / 1024); - mailboxSize.QuotaValue = (stats.MaxSize == -1) ? -1: (int)Math.Round((double)(stats.MaxSize / 1024 / 1024)); + mailboxSize.QuotaValue = (stats.MaxSize == -1) ? -1 : (int)Math.Round((double)(stats.MaxSize / 1024 / 1024)); secCalendarSettings.Visible = ((account.AccountType == ExchangeAccountType.Equipment) | (account.AccountType == ExchangeAccountType.Room)); @@ -107,7 +122,12 @@ namespace WebsitePanel.Portal.ExchangeServer litigationHoldSpace.QuotaUsedValue = Convert.ToInt32(stats.LitigationHoldTotalSize / 1024 / 1024); litigationHoldSpace.QuotaValue = (stats.LitigationHoldMaxSize == -1) ? -1 : (int)Math.Round((double)(stats.LitigationHoldMaxSize / 1024 / 1024)); - + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx)) + { + int disclaimerId = ES.Services.ExchangeServer.GetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID); + ddDisclaimer.SelectedValue = disclaimerId.ToString(); + } } catch (Exception ex) @@ -149,6 +169,14 @@ namespace WebsitePanel.Portal.ExchangeServer } } + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx)) + { + int disclaimerId; + if (int.TryParse(ddDisclaimer.SelectedValue, out disclaimerId)) + ES.Services.ExchangeServer.SetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID, disclaimerId); + } + messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS"); BindSettings(); } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.designer.cs index 70d4ca38..becef2d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.designer.cs @@ -175,6 +175,24 @@ namespace WebsitePanel.Portal.ExchangeServer { ///
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector; + /// + /// locDisclaimer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locDisclaimer; + + /// + /// ddDisclaimer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddDisclaimer; + /// /// locQuota control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx new file mode 100644 index 00000000..aa56e6a5 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx @@ -0,0 +1,60 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeMailboxMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeMailboxMemberOf" %> +<%@ Register Src="UserControls/CountrySelector.ascx" TagName="CountrySelector" TagPrefix="wsp" %> +<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="UserControls/MailboxTabs.ascx" TagName="MailboxTabs" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> + + + +
+
+
+ +
+
+ +
+
+
+
+ + + - + +
+
+ + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.cs new file mode 100644 index 00000000..1dedb147 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.cs @@ -0,0 +1,110 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.EnterpriseServer; + +namespace WebsitePanel.Portal.ExchangeServer +{ + public partial class ExchangeMailboxMemberOf : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + + BindSettings(); + + UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId); + + } + + } + + private void BindSettings() + { + try + { + // get settings + ExchangeMailbox mailbox = ES.Services.ExchangeServer.GetMailboxGeneralSettings(PanelRequest.ItemID, + PanelRequest.AccountID); + + // title + litDisplayName.Text = mailbox.DisplayName; + + ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + + distrlists.SetAccounts(dLists); + + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_GET_MAILBOX_SETTINGS", ex); + } + } + + private void SaveSettings() + { + if (!Page.IsValid) + return; + + try + { + ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + List newDistributionLists = new List(distrlists.GetAccounts()); + foreach (ExchangeAccount oldlist in oldDistributionLists) + { + if (newDistributionLists.Contains(oldlist.AccountName)) + newDistributionLists.Remove(oldlist.AccountName); + else + ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID); + } + + foreach (string newlist in newDistributionLists) + ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID); + + messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS"); + BindSettings(); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS", ex); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + SaveSettings(); + } + + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs new file mode 100644 index 00000000..8ae1757e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs @@ -0,0 +1,141 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.ExchangeServer { + + + public partial class ExchangeMailboxMemberOf { + + /// + /// asyncTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// breadcrumb control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + + /// + /// menu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; + + /// + /// Image1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// locTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// litDisplayName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litDisplayName; + + /// + /// tabs control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxTabs tabs; + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// secDistributionLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists; + + /// + /// DistributionLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel DistributionLists; + + /// + /// GeneralUpdatePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel; + + /// + /// distrlists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; + + /// + /// btnSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSave; + + /// + /// ValidationSummary1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx new file mode 100644 index 00000000..b2479926 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx @@ -0,0 +1,70 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationUserMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.HostedSolution.UserMemberOf" %> +<%@ Register Src="UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %> +<%@ Register Src="UserControls/CountrySelector.ascx" TagName="CountrySelector" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> + +<%@ Register Src="../UserControls/PasswordControl.ascx" TagName="PasswordControl" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> +<%@ Register Src="UserControls/EmailAddress.ascx" TagName="EmailAddress" TagPrefix="wsp" %> +<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> + + + +<%@ Register src="UserControls/UserTabs.ascx" tagname="UserTabs" tagprefix="uc1" %> +<%@ Register src="UserControls/MailboxTabs.ascx" tagname="MailboxTabs" tagprefix="uc1" %> + + + + + +
+
+
+ +
+
+ +
+
+
+
+ + + - + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.cs new file mode 100644 index 00000000..e105b864 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.cs @@ -0,0 +1,109 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Web.UI.WebControls; +using System.Collections.Generic; +using WebsitePanel.EnterpriseServer; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.ResultObjects; + +namespace WebsitePanel.Portal.HostedSolution +{ + public partial class UserMemberOf : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindSettings(); + + MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox"); + UserTabsId.Visible = (PanelRequest.Context == "User"); + } + } + + private void BindSettings() + { + try + { + // get settings + ExchangeMailbox mailbox = ES.Services.ExchangeServer.GetMailboxGeneralSettings(PanelRequest.ItemID, + PanelRequest.AccountID); + + // title + litDisplayName.Text = mailbox.DisplayName; + + ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + + distrlists.SetAccounts(dLists); + + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_GET_MAILBOX_SETTINGS", ex); + } + } + + private void SaveSettings() + { + if (!Page.IsValid) + return; + + try + { + ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + List newDistributionLists = new List(distrlists.GetAccounts()); + foreach (ExchangeAccount oldlist in oldDistributionLists) + { + if (newDistributionLists.Contains(oldlist.AccountName)) + newDistributionLists.Remove(oldlist.AccountName); + else + ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID); + } + + foreach (string newlist in newDistributionLists) + ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID); + + messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS"); + BindSettings(); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS", ex); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + SaveSettings(); + } + + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs new file mode 100644 index 00000000..72bbeccd --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.HostedSolution { + + + public partial class UserMemberOf { + + /// + /// asyncTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// breadcrumb control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + + /// + /// menu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; + + /// + /// Image1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// locTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// litDisplayName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litDisplayName; + + /// + /// UserTabsId control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.UserTabs UserTabsId; + + /// + /// MailboxTabsId control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxTabs MailboxTabsId; + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// secDistributionLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists; + + /// + /// DistributionLists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel DistributionLists; + + /// + /// GeneralUpdatePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel; + + /// + /// distrlists control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; + + /// + /// btnSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSave; + + /// + /// ValidationSummary1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/DistributionListTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/DistributionListTabs.ascx.resx index 431fe655..54222974 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/DistributionListTabs.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/DistributionListTabs.ascx.resx @@ -129,4 +129,7 @@ Permissions + + Member Of + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx index f994c831..ceab2564 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx @@ -144,4 +144,7 @@ Spam + + Member Of + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx index 0f2f1e19..88b4cd31 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx @@ -126,6 +126,9 @@ Distribution Lists + + Disclaimers + Domains diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx index fe15515c..cd4207d0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx @@ -129,4 +129,7 @@ Setup Instructions + + Member Of + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs index 9f2cd8b7..3dc73fc4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs @@ -29,6 +29,9 @@ using System; using System.Collections.Generic; using WebsitePanel.Portal.Code.UserControls; +using WebsitePanel.WebPortal; +using WebsitePanel.EnterpriseServer; + namespace WebsitePanel.Portal.ExchangeServer.UserControls { @@ -54,6 +57,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls tabsList.Add(CreateTab("dlist_mailflow", "Tab.Mailflow")); tabsList.Add(CreateTab("dlist_permissions", "Tab.Permissions")); + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx)) + tabsList.Add(CreateTab("dlist_memberof", "Tab.MemberOf")); + // find selected menu item int idx = 0; foreach (Tab tab in tabsList) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs index fb43a86e..77e53f16 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs @@ -55,9 +55,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId); + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + if (user != null) { - PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx))) hideItems = true; } @@ -76,7 +77,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls if (!hideItems) tabsList.Add(CreateTab("mailbox_mobile", "Tab.Mobile")); //tabsList.Add(CreateTab("mailbddox_spam", "Tab.Spam")); - + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx)) + tabsList.Add(CreateTab("mailbox_memberof", "Tab.MemberOf")); // find selected menu item int idx = 0; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs index 9f3475ae..3792ae03 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs @@ -32,9 +32,9 @@ using WebsitePanel.WebPortal; using WebsitePanel.EnterpriseServer; namespace WebsitePanel.Portal.ExchangeServer.UserControls { - public partial class Menu : WebsitePanelControlBase - { - + public partial class Menu : WebsitePanelControlBase + { + public class MenuGroup { private string text; @@ -56,7 +56,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls public string ImageUrl { get { return imageUrl; } - set { imageUrl = value;} + set { imageUrl = value; } } public MenuGroup(string text, string imageUrl) @@ -67,42 +67,42 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls } } - + public class MenuItem - { + { private string url; - private string text; - private string key; + private string text; + private string key; public string Url - { - get { return url; } - set { url = value; } - } + { + get { return url; } + set { url = value; } + } - public string Text - { - get { return text; } - set { text = value; } - } + public string Text + { + get { return text; } + set { text = value; } + } - public string Key - { - get { return key; } - set { key = value; } - } + public string Key + { + get { return key; } + set { key = value; } + } - } + } + + private string selectedItem; + public string SelectedItem + { + get { return selectedItem; } + set { selectedItem = value; } + } - private string selectedItem; - public string SelectedItem - { - get { return selectedItem; } - set { selectedItem = value; } - } - private void PrepareExchangeMenu(PackageContext cntx, List groups, string imagePath) { bool hideItems = false; @@ -143,13 +143,17 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls if (!hideItems) if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx)) - exchangeGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "storage_usage")); + exchangeGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "storage_usage")); + + if (!hideItems) + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx)) + exchangeGroup.MenuItems.Add(CreateMenuItem("Disclaimers", "disclaimers")); if (exchangeGroup.MenuItems.Count > 0) groups.Add(exchangeGroup); } - + private void PrepareOrganizationMenu(PackageContext cntx, List groups, string imagePath) { bool hideItems = false; @@ -165,7 +169,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls if (!hideItems) { MenuGroup organizationGroup = new MenuGroup(GetLocalizedString("Text.OrganizationGroup"), imagePath + "company24.png"); - + if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx) == false) { if (Utils.CheckQouta(Quotas.ORGANIZATION_DOMAINS, cntx)) @@ -177,7 +181,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls if (organizationGroup.MenuItems.Count > 0) groups.Add(organizationGroup); } - + } private void PrepareCRMMenu(PackageContext cntx, List groups, string imagePath) @@ -186,10 +190,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls crmGroup.MenuItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails")); crmGroup.MenuItems.Add(CreateMenuItem("CRMUsers", "CRMUsers")); - + if (crmGroup.MenuItems.Count > 0) groups.Add(crmGroup); - + } private void PrepareBlackBerryMenu(PackageContext cntx, List groups, string imagePath) @@ -197,7 +201,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls MenuGroup bbGroup = new MenuGroup(GetLocalizedString("Text.BlackBerryGroup"), imagePath + "blackberry16.png"); bbGroup.MenuItems.Add(CreateMenuItem("BlackBerryUsers", "blackberry_users")); - + if (bbGroup.MenuItems.Count > 0) groups.Add(bbGroup); @@ -211,19 +215,19 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls sharepointGroup.MenuItems.Add(CreateMenuItem("SiteCollections", "sharepoint_sitecollections")); sharepointGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "sharepoint_storage_usage")); sharepointGroup.MenuItems.Add(CreateMenuItem("StorageLimits", "sharepoint_storage_settings")); - + groups.Add(sharepointGroup); } - + private void PrepareOCSMenu(PackageContext cntx, List groups, string imagePath) { MenuGroup ocsGroup = new MenuGroup(GetLocalizedString("Text.OCSGroup"), imagePath + "ocs16.png"); ocsGroup.MenuItems.Add(CreateMenuItem("OCSUsers", "ocs_users")); - - + + groups.Add(ocsGroup); } @@ -243,18 +247,18 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls } private List PrepareMenu() - { + { PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); - + List groups = new List(); string imagePath = String.Concat("~/", DefaultPage.THEMES_FOLDER, "/", Page.Theme, "/", "Images/Exchange", "/"); - + //Organization menu group; if (cntx.Groups.ContainsKey(ResourceGroups.HostedOrganizations)) PrepareOrganizationMenu(cntx, groups, imagePath); - - + + //Exchange menu group; if (cntx.Groups.ContainsKey(ResourceGroups.Exchange)) PrepareExchangeMenu(cntx, groups, imagePath); @@ -262,11 +266,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls //BlackBerry Menu if (cntx.Groups.ContainsKey(ResourceGroups.BlackBerry)) PrepareBlackBerryMenu(cntx, groups, imagePath); - + //SharePoint menu group; if (cntx.Groups.ContainsKey(ResourceGroups.HostedSharePoint)) - { - PrepareSharePointMenu(cntx, groups, imagePath); + { + PrepareSharePointMenu(cntx, groups, imagePath); } //CRM Menu @@ -281,38 +285,38 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls //Lync Menu if (cntx.Groups.ContainsKey(ResourceGroups.Lync)) PrepareLyncMenu(cntx, groups, imagePath); - + return groups; - } - + } + protected void Page_Load(object sender, EventArgs e) - { + { List groups = PrepareMenu(); - + /*repMenu.SelectedIndex = -1; - for(int i = 0; i < items.Count; i++) - { - if (String.Compare(SelectedItem, items[i].Key, true) == 0) - { - repMenu.SelectedIndex = i; - break; - } - }*/ + for(int i = 0; i < items.Count; i++) + { + if (String.Compare(SelectedItem, items[i].Key, true) == 0) + { + repMenu.SelectedIndex = i; + break; + } + }*/ - // bind + // bind repMenu.DataSource = groups; - repMenu.DataBind(); - } + repMenu.DataBind(); + } - private MenuItem CreateMenuItem(string text, string key) - { - MenuItem item = new MenuItem(); - item.Key = key; - item.Text = GetLocalizedString("Text." + text); - item.Url = HostModule.EditUrl("ItemID", PanelRequest.ItemID.ToString(), key, - "SpaceID=" + PanelSecurity.PackageId); - return item; - } - } + private MenuItem CreateMenuItem(string text, string key) + { + MenuItem item = new MenuItem(); + item.Key = key; + item.Text = GetLocalizedString("Text." + text); + item.Url = HostModule.EditUrl("ItemID", PanelRequest.ItemID.ToString(), key, + "SpaceID=" + PanelSecurity.PackageId); + return item; + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs index da968986..cdedb8aa 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs @@ -29,6 +29,8 @@ using System; using System.Collections.Generic; using WebsitePanel.Portal.Code.UserControls; +using WebsitePanel.WebPortal; +using WebsitePanel.EnterpriseServer; namespace WebsitePanel.Portal.ExchangeServer.UserControls { @@ -55,6 +57,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls if (!string.IsNullOrEmpty(instructions)) tabsList.Add(CreateTab("organization_user_setup", "Tab.Setup")); + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx)) + tabsList.Add(CreateTab("user_memberof", "Tab.MemberOf")); + // find selected menu item int idx = 0; foreach (Tab tab in tabsList) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx index 7e6c19f5..9c718a88 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx @@ -5,6 +5,8 @@ <%@ Register Src="UserControls/Quota.ascx" TagName="Quota" TagPrefix="uc4" %> <%@ Import Namespace="WebsitePanel.Portal" %> + +
@@ -15,6 +17,12 @@
+ + + + + + - \ No newline at end of file + + + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx.designer.cs index 93e0d3c0..aaf0e874 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx.designer.cs @@ -40,6 +40,15 @@ namespace WebsitePanel.Portal { public partial class Schedules { + /// + /// tasksTimer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.Timer tasksTimer; + /// /// btnAddItem control. /// @@ -67,6 +76,15 @@ namespace WebsitePanel.Portal { ///
protected global::WebsitePanel.Portal.SearchBox searchBox; + /// + /// schedulesUpdatePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UpdatePanel schedulesUpdatePanel; + /// /// gvSchedules control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Scripts/AjaxUtils.js b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Scripts/AjaxUtils.js index f54b1aec..182477c9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Scripts/AjaxUtils.js +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Scripts/AjaxUtils.js @@ -134,45 +134,47 @@ function ReloadProgressImage() function GetTaskProgress() { - requestSimpleService = WebsitePanel.Portal.TaskManager.GetTask( + requestSimpleService = WebsitePanel.Portal.TaskManager.GetTaskWithLogRecords( _taskId, //params + new Date(1, 2, 3, 4), OnGetTaskProgressComplete, //Complete event OnGetTaskProgressTimeout //Timeout event ); } -function OnGetTaskProgressComplete(task) +function OnGetTaskProgressComplete(task) { - if(task.LastLogRecord != null) - { - $get('objProgressDialogStep').innerHTML = task.LastLogRecord.Text; - } - - // set progress indicator - if(task.IndicatorMaximum > 0) - $get("objProgressDialogProgressBar").style.width = task.IndicatorCurrent / task.IndicatorMaximum * 100 + "%"; - - if(task.Completed) - { - // switch buttons + if (task == null || task.Completed) { + // switch buttons $get("objProgressDialogCommandButtons").style.display = "none"; $get("objProgressDialogCloseButton").style.display = "block"; - + // stop timer StopTimer(); - + // hide image indicator $get("imgAjaxIndicator").style.display = "none"; - + // show success message $get('objProgressDialogStep').innerHTML = _completeMessage; - } - else - { - $find('ModalPopupProperties')._layout(); - //alert(result); - window.setTimeout(GetTaskProgress, 1000); + + $get("objProgressDialogProgressBar").style.width = 100 + "%"; + + return; } + + if (task.Logs != null) { + $get('objProgressDialogStep').innerHTML = task.Logs.length > 0 ? task.Logs[task.Logs.length - 1].Text : ""; + } + + // set progress indicator + if (task.IndicatorMaximum > 0) + $get("objProgressDialogProgressBar").style.width = task.IndicatorCurrent / task.IndicatorMaximum * 100 + "%"; + + + $find('ModalPopupProperties')._layout(); + //alert(result); + window.setTimeout(GetTaskProgress, 1000); } function OnGetTaskProgressTimeout(result) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Tasks.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Tasks.ascx.designer.cs index 4bc94460..bab25fce 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Tasks.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Tasks.ascx.designer.cs @@ -1,19 +1,79 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.42 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ namespace WebsitePanel.Portal { + public partial class Tasks { - protected System.Web.UI.Timer tasksTimer; - protected System.Web.UI.UpdatePanel tasksUpdatePanel; - protected System.Web.UI.WebControls.GridView gvTasks; - protected System.Web.UI.WebControls.ObjectDataSource odsTasks; + + /// + /// tasksTimer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.Timer tasksTimer; + + /// + /// tasksUpdatePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UpdatePanel tasksUpdatePanel; + + /// + /// gvTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView gvTasks; + + /// + /// odsTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsTasks; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/TasksTaskDetails.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/TasksTaskDetails.ascx.cs index 7f3ee84a..35287472 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/TasksTaskDetails.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/TasksTaskDetails.ascx.cs @@ -63,7 +63,7 @@ namespace WebsitePanel.Portal litTitle.Text = String.Format("{0} "{1}"", GetAuditLogTaskName(task.Source, task.TaskName), task.ItemName); - litStep.Text = LocalizeActivityText(task.LastLogRecord.Text); + litStep.Text = LocalizeActivityText(task.GetLogs().Count > 0 ? task.GetLogs()[0].Text : String.Empty); litStartTime.Text = task.StartDate.ToString(); // progress @@ -77,18 +77,19 @@ namespace WebsitePanel.Portal // execution log StringBuilder log = new StringBuilder(); - task.LastLogRecords.Reverse(); - if (task.LastLogRecords.Count > 0) - ViewState["lastLogDate"] = task.LastLogRecords[0].Date.AddTicks(1); + if (task.GetLogs().Count > 0) + ViewState["lastLogDate"] = task.GetLogs()[0].Date.AddTicks(1); - foreach (BackgroundTaskLogRecord logRecord in task.LastLogRecords) + + + foreach (BackgroundTaskLogRecord logRecord in task.GetLogs()) { log.Append("[").Append(GetDurationText(task.StartDate, logRecord.Date)).Append("] "); log.Append(GetLogLineIdent(logRecord.TextIdent)); log.Append(LocalizeActivityText(logRecord.Text)); log.Append("
"); } - litLog.Text = log.ToString() + litLog.Text; + litLog.Text = log.ToString();//+ litLog.Text; if(task.Completed) btnStop.Visible = false; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS/UserControls/ServerTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS/UserControls/ServerTabs.ascx.cs index 19e861d7..30b8f974 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS/UserControls/ServerTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS/UserControls/ServerTabs.ascx.cs @@ -176,7 +176,7 @@ namespace WebsitePanel.Portal.VPS.UserControls litElapsed.Text = new TimeSpan(d.Hours, d.Minutes, d.Seconds).ToString(); // bind records - repRecords.DataSource = task.LastLogRecords; + repRecords.DataSource = task.GetLogs(); repRecords.DataBind(); } @@ -213,7 +213,7 @@ namespace WebsitePanel.Portal.VPS.UserControls // gauge gauge.Visible = false; - if (e.Item.ItemIndex == task.LastLogRecords.Count - 1) + if (e.Item.ItemIndex == task.GetLogs().Count - 1) { gauge.Visible = true; gauge.Total = task.IndicatorMaximum; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPSForPC/UserControls/ServerTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPSForPC/UserControls/ServerTabs.ascx.cs index 4b265375..14cc380e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPSForPC/UserControls/ServerTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPSForPC/UserControls/ServerTabs.ascx.cs @@ -183,7 +183,7 @@ namespace WebsitePanel.Portal.VPSForPC.UserControls litElapsed.Text = new TimeSpan(d.Hours, d.Minutes, d.Seconds).ToString(); // bind records - repRecords.DataSource = task.LastLogRecords; + repRecords.DataSource = task.GetLogs(); repRecords.DataBind(); } @@ -228,7 +228,7 @@ namespace WebsitePanel.Portal.VPSForPC.UserControls // gauge gauge.Visible = false; - if (e.Item.ItemIndex == task.LastLogRecords.Count - 1) + if (e.Item.ItemIndex == task.GetLogs().Count - 1) { gauge.Visible = true; gauge.Total = task.IndicatorMaximum; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index ce7bb695..0596b4b6 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -209,6 +209,20 @@ + + ExchangeDistributionListMemberOf.ascx + ASPXCodeBehind + + + ExchangeDistributionListMemberOf.ascx + + + ExchangeMailboxMemberOf.ascx + ASPXCodeBehind + + + ExchangeMailboxMemberOf.ascx + OrganizationAddDomainName.ascx ASPXCodeBehind @@ -237,6 +251,13 @@ ExchangeMailboxPlans.ascx + + OrganizationUserMemberOf.ascx + ASPXCodeBehind + + + OrganizationUserMemberOf.ascx + AccountsListWithPermissions.ascx ASPXCodeBehind @@ -255,6 +276,20 @@ UserTabs.ascx + + ExchangeDisclaimers.ascx + ASPXCodeBehind + + + ExchangeDisclaimers.ascx + + + ExchangeDisclaimerGeneralSettings.ascx + ASPXCodeBehind + + + ExchangeDisclaimerGeneralSettings.ascx + LyncAddFederationDomain.ascx ASPXCodeBehind @@ -3847,9 +3882,14 @@ + + + + + @@ -5008,7 +5048,9 @@ - + + Designer + @@ -5021,6 +5063,15 @@ + + Designer + + + Designer + + + + Designer diff --git a/WebsitePanel/build.xml b/WebsitePanel/build.xml index 9178c818..503d7485 100644 --- a/WebsitePanel/build.xml +++ b/WebsitePanel/build.xml @@ -29,20 +29,22 @@ $(TrunkFolder)\Sources\WebsitePanel.WebPortal $(TrunkFolder)\Sources\WebsitePanel.Server $(TrunkFolder)\Sources\WebsitePanel.EnterpriseServer + $(TrunkFolder)\Sources\WebsitePanel.SchedulerService $(TrunkFolder)\Sources\Tools\WebsitePanel.Import.CsvBulk\bin\$(BuildConfiguration) $(RootFolder)\WebsitePanel.HyperV.Utils\Sources\WebsitePanel.HyperV.Utils\bin\$(BuildConfiguration) - $(RootFolder)\WebsitePanel.VmConfig\Sources\WebsitePanel.VmConfig\bin\$(BuildConfiguration) - $(TrunkFolder)\Sources\Tools\WebsitePanel.Import.Enterprise\bin\$(BuildConfiguration) + $(RootFolder)\WebsitePanel.VmConfig\Sources\WebsitePanel.VmConfig\bin\$(BuildConfiguration) + $(TrunkFolder)\Sources\Tools\WebsitePanel.Import.Enterprise\bin\$(BuildConfiguration) $(TrunkFolder)\Sources\Tools\WebsitePanel.AWStats.Viewer $(TrunkFolder)\Sources\Tools\WSPTransportAgent $(BuildFolder)\Server $(BuildFolder)\EnterpriseServer + $(BuildFolder)\SchedulerService $(BuildFolder)\Portal $(BuildFolder)\Import.CsvBulk $(BuildFolder)\HyperVUtils $(BuildFolder)\VMConfig - $(BuildFolder)\Import.Enterprise + $(BuildFolder)\Import.Enterprise $(BuildFolder)\AWStats.Viewer $(BuildFolder)\WSPTransportAgent $(BuildFolder)\LocalizationToolkit @@ -58,11 +60,11 @@ - - - - http://www.websitepanel.net/files/$(Version)/WebsitePanelInstaller-$(Version)-webpi.msi - + + + + http://www.websitepanel.net/files/$(Version)/WebsitePanelInstaller-$(Version)-webpi.msi + @@ -84,17 +86,18 @@ - + + - - + + @@ -104,9 +107,10 @@ + - - + + @@ -179,7 +183,7 @@ - + @@ -302,6 +306,17 @@ + + + + + + + + + @@ -315,14 +330,15 @@ $(DeployFolder)\Install $(InstallFolder)\Server $(InstallFolder)\EnterpriseServer + $(InstallFolder)\SchedulerServive $(InstallFolder)\Portal $(InstallFolder)\StandaloneServerSetup $(DeployFolder)\Tools $(ToolsFolder)\Import.CsvBulk - $(ToolsFolder)\HyperVUtils - $(ToolsFolder)\VMconfig + $(ToolsFolder)\HyperVUtils + $(ToolsFolder)\VMconfig $(ToolsFolder)\Import.Enterprise $(ToolsFolder)\AWStats.Viewer $(ToolsFolder)\WSPTransportAgent @@ -361,8 +377,10 @@ - - + + + + @@ -724,9 +742,10 @@ - + +