From 56e31088cc1dfbdec90f126d1fa3058d1e81e1c9 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Mon, 24 Jun 2013 09:49:37 +0300 Subject: [PATCH 01/16] MSI output file name changed --- .../Setup.SchedulerService/Setup.SchedulerService.wixproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel.Installer/Sources/Setup.SchedulerService/Setup.SchedulerService.wixproj b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Setup.SchedulerService.wixproj index 12733ad4..e067c9b7 100644 --- a/WebsitePanel.Installer/Sources/Setup.SchedulerService/Setup.SchedulerService.wixproj +++ b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Setup.SchedulerService.wixproj @@ -6,7 +6,7 @@ 3.7 {ead7c528-ea3d-40e8-9688-9f1d8dc8d758} 2.0 - Setup.SchedulerService + Websitepanel-SchedulerService Package $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets From 0ec87fc5f49f070c6270ac0a9bc280d32b9c0ae0 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Tue, 25 Jun 2013 22:09:35 +0400 Subject: [PATCH 02/16] wsp-10106: Implement Exchange Tenant Disclaimer. --- WebsitePanel/Database/update_db.sql | 179 + .../ExchangeServerProxy.cs | 10003 +++++++++------- .../Code/Data/DataProvider.cs | 92 + .../ExchangeServerController.cs | 189 + .../esExchangeServer.asmx.cs | 212 +- .../HostedSolution/ExchangeDisclaimer.cs | 39 + .../HostedSolution/IExchangeServer.cs | 4 + .../WebsitePanel.Providers.Base.csproj | 1 + .../Exchange2013.cs | 72 + .../Exchange2007.cs | 71 + .../ExchangeServerProxy.cs | 6414 +++++----- .../ExchangeServer.asmx.cs | 20 +- .../App_Data/WebsitePanel_Modules.config | 5 +- .../WebsitePanel_SharedResources.ascx.resx | 15 + ...xchangeDisclaimerGeneralSettings.ascx.resx | 144 + .../ExchangeDisclaimers.ascx.resx | 156 + .../ExchangeDisclaimerGeneralSettings.ascx | 56 + .../ExchangeDisclaimerGeneralSettings.ascx.cs | 126 + ...DisclaimerGeneralSettings.ascx.designer.cs | 141 + .../ExchangeServer/ExchangeDisclaimers.ascx | 86 + .../ExchangeDisclaimers.ascx.cs | 137 + .../ExchangeDisclaimers.ascx.designer.cs | 105 + .../ExchangeMailboxGeneralSettings.ascx | 6 + .../ExchangeMailboxGeneralSettings.ascx.cs | 14 +- ...ngeMailboxGeneralSettings.ascx.designer.cs | 46 +- .../App_LocalResources/Menu.ascx.resx | 3 + .../ExchangeServer/UserControls/Menu.ascx.cs | 153 +- .../WebsitePanel.Portal.Modules.csproj | 22 + 28 files changed, 11296 insertions(+), 7215 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDisclaimer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDisclaimerGeneralSettings.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDisclaimers.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.designer.cs diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index dc73f195..205ee432 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -454,3 +454,182 @@ 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) GO + +-- Disclaimers + + +GO +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +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) +) + + +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 + + + + +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 diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs index e6ead22e..6465e74f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs @@ -1,34 +1,7 @@ -// 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.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 +9,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 +26,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 +1899,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 +1912,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 +1942,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 +1966,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 +1979,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 +2009,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 +2330,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 +2342,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 +2371,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 +2621,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 +2663,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 +2738,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 +2866,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 +2879,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 +2909,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 +3039,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 +3054,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 +3086,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 +3245,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 +3274,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 +3292,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 +3327,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 +3556,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 +3593,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 +3700,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 +3755,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 +3810,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 +3888,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 +3903,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 +3935,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 +3990,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 +4012,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 +4023,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 +4051,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 +4073,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 +4084,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 +4112,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 +4133,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 +4170,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 +4243,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 +4280,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 +4335,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 +4508,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 +4568,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 +4670,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 +4744,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 +4755,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 +4783,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 +4805,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 +4816,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 +4844,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 +4972,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 +4985,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 +5015,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 +5089,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 +5100,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 +5128,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 +5235,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 +5291,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 +5347,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 +5368,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 +5405,2922 @@ 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/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/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs index 0aaf98a5..b689b695 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs @@ -2679,6 +2679,98 @@ namespace WebsitePanel.EnterpriseServer #endregion + #region Exchange Disclaimer + 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) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs index 8e0a1a82..1d6f2906 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs @@ -4956,5 +4956,194 @@ namespace WebsitePanel.EnterpriseServer TaskManager.CompleteTask(); } } + + 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"); + TaskManager.ItemId = 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"); + TaskManager.ItemId = 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"); + TaskManager.ItemId = 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"); + TaskManager.ItemId = 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"); + TaskManager.ItemId = 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"); + TaskManager.ItemId = 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"); + TaskManager.ItemId = AccountID; + + try + { + return DataProvider.GetExchangeAccountDisclaimerId(AccountID); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs index 864a87da..8b5ddff7 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) { @@ -547,94 +547,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..58685a99 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDisclaimer.cs @@ -0,0 +1,39 @@ +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 9b6ebfe7..5d78b301 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.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index 0669805a..15e61400 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -7222,6 +7222,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", true); + 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/Exchange2007.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs index c7d412c8..d8741eb8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs @@ -6874,5 +6874,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.Server.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs index a934bf30..d7ff1985 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs @@ -1,35 +1,7 @@ -// 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.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 +9,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 +23,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 +895,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 +963,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 +1021,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 +1120,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 +1176,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 +1294,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 +1305,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 +1333,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 +1359,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 +1373,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 +1404,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 +1426,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 +1437,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 +1464,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 +1908,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 +1983,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 +1997,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 +2027,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 +2132,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 +2178,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 +2258,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 +2467,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 +2593,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 +2605,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 +2633,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 +2800,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 +2860,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 +2961,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 +3068,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 +3093,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 +3107,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 +3137,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 +3259,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 +3272,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 +3301,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 +3373,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 +3384,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 +3411,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 +3515,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 +3569,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 +3591,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 +3602,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 +3629,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 +3814,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 +3829,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 +3860,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 +3933,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 +3944,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 +3971,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 +4097,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 +4108,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 +4135,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 +4210,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 +4221,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 +4248,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 +4355,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 +4409,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..14931af0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config @@ -473,8 +473,11 @@ + + + - + 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 ac187873..91835c2c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -2919,6 +2919,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 +2983,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 +3037,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 +3073,9 @@ Error reading organization distribution lists + + Error reading organization disclaimer lists + Error updating storage settings. See audit log for more details. @@ -3122,6 +3134,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/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/ExchangeDisclaimerGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx new file mode 100644 index 00000000..3981e8f3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx @@ -0,0 +1,56 @@ +<%@ 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/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/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..ae7b517f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.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 ExchangeDisclaimerGeneralSettings { + + /// + /// 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; + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// locDisplayName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locDisplayName; + + /// + /// txtDisplayName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtDisplayName; + + /// + /// valRequireDisplayName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireDisplayName; + + /// + /// locNotes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locNotes; + + /// + /// txtNotes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtNotes; + + /// + /// 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/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..392d69b8 --- /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") + { + // delete distribution list + 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..5c3bbd9e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.designer.cs @@ -0,0 +1,105 @@ +//------------------------------------------------------------------------------ +// +// 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/ExchangeMailboxGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx index d2fbeeeb..d49dff02 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..8c86f07c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs @@ -38,6 +38,11 @@ namespace WebsitePanel.Portal.ExchangeServer { if (!IsPostBack) { + 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())); + BindSettings(); UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId); @@ -98,7 +103,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 +112,8 @@ 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)); - + int disclaimerId = ES.Services.ExchangeServer.GetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID); + ddDisclaimer.SelectedValue = disclaimerId.ToString(); } catch (Exception ex) @@ -149,6 +155,10 @@ namespace WebsitePanel.Portal.ExchangeServer } } + 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..a6612e0d 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 @@ -1,31 +1,3 @@ -// 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. @@ -175,6 +147,24 @@ namespace WebsitePanel.Portal.ExchangeServer { ///
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector; + /// + /// Localize1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize Localize1; + + /// + /// 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/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/Menu.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs index 9f3475ae..e12b42ab 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,16 @@ 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) + 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 +168,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 +180,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 +189,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 +200,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 +214,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 +246,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 +265,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 +284,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/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index ce7bb695..cc9bed4d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -255,6 +255,20 @@ UserTabs.ascx + + ExchangeDisclaimers.ascx + ASPXCodeBehind + + + ExchangeDisclaimers.ascx + + + ExchangeDisclaimerGeneralSettings.ascx + ASPXCodeBehind + + + ExchangeDisclaimerGeneralSettings.ascx + LyncAddFederationDomain.ascx ASPXCodeBehind @@ -3850,6 +3864,8 @@ + + @@ -5021,6 +5037,12 @@ + + Designer + + + Designer + Designer From 6afbb17d014246cac77d810222d24b4772ae45a7 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Tue, 25 Jun 2013 22:49:50 +0400 Subject: [PATCH 03/16] fix --- .../Exchange2013.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index 15e61400..7d878843 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -7275,7 +7275,7 @@ namespace WebsitePanel.Providers.HostedSolution runSpace = OpenRunspace(); Command cmd = new Command("Remove-TransportRule"); cmd.Parameters.Add("Identity", Name); - cmd.Parameters.Add("Confirm", true); + cmd.Parameters.Add("Confirm", false); ExecuteShellCommand(runSpace, cmd); } catch (Exception exc) From 38604866ce0b4581166693b668d22b9b2e56d88e Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Wed, 26 Jun 2013 01:44:36 +0400 Subject: [PATCH 04/16] added Disclaimers Quota. --- WebsitePanel/Database/update_db.sql | 5 +++ .../Packages/Quotas.cs | 3 +- .../WebsitePanel_SharedResources.ascx.resx | 3 ++ .../ExchangeMailboxGeneralSettings.ascx | 2 +- .../ExchangeMailboxGeneralSettings.ascx.cs | 38 ++++++++++++++----- ...ngeMailboxGeneralSettings.ascx.designer.cs | 4 +- .../ExchangeServer/UserControls/Menu.ascx.cs | 3 +- 7 files changed, 43 insertions(+), 15 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 205ee432..31d358ec 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -633,3 +633,8 @@ WHERE RETURN' END GO + + +-- add Disclaimers Quota +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) +GO 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.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index 91835c2c..6ce646b8 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 diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx index d49dff02..ba8d6e3b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx @@ -58,7 +58,7 @@ - + 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 8c86f07c..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,10 +38,20 @@ namespace WebsitePanel.Portal.ExchangeServer { if (!IsPostBack) { - 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())); + 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(); @@ -49,7 +59,7 @@ namespace WebsitePanel.Portal.ExchangeServer if (user != null) { - PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx))) { chkHideAddressBook.Visible = false; @@ -112,8 +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)); - int disclaimerId = ES.Services.ExchangeServer.GetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID); - ddDisclaimer.SelectedValue = disclaimerId.ToString(); + 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) @@ -155,9 +169,13 @@ namespace WebsitePanel.Portal.ExchangeServer } } - int disclaimerId; - if (int.TryParse(ddDisclaimer.SelectedValue, out disclaimerId)) - ES.Services.ExchangeServer.SetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID, disclaimerId); + 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 a6612e0d..3cbfa50e 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 @@ -148,13 +148,13 @@ namespace WebsitePanel.Portal.ExchangeServer { protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector; /// - /// Localize1 control. + /// locDisclaimer control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Localize Localize1; + protected global::System.Web.UI.WebControls.Localize locDisclaimer; /// /// ddDisclaimer control. 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 e12b42ab..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 @@ -146,7 +146,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls exchangeGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "storage_usage")); if (!hideItems) - exchangeGroup.MenuItems.Add(CreateMenuItem("Disclaimers", "disclaimers")); + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx)) + exchangeGroup.MenuItems.Add(CreateMenuItem("Disclaimers", "disclaimers")); if (exchangeGroup.MenuItems.Count > 0) groups.Add(exchangeGroup); From 013166c133eb21d53a3e1e5751d0f14df52fe09f Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Wed, 26 Jun 2013 12:58:58 +0400 Subject: [PATCH 05/16] Merge --- .../Code/Data/DataProvider.cs | 3792 ------------ .../ExchangeServerController.cs | 5149 ----------------- 2 files changed, 8941 deletions(-) delete mode 100644 WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs delete mode 100644 WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs deleted file mode 100644 index b689b695..00000000 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs +++ /dev/null @@ -1,3792 +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.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 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 Disclaimer - 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) - ); - - 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) - ); - } - - 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/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs deleted file mode 100644 index 1d6f2906..00000000 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs +++ /dev/null @@ -1,5149 +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.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Data; -using System.Net.Mail; -using System.Threading; -using WebsitePanel.EnterpriseServer.Code.HostedSolution; -using WebsitePanel.Providers; -using WebsitePanel.Providers.Common; -using WebsitePanel.Providers.Exchange; -using WebsitePanel.Providers.HostedSolution; -using WebsitePanel.Providers.OCS; -using WebsitePanel.Providers.ResultObjects; - - -namespace WebsitePanel.EnterpriseServer -{ - public class ExchangeServerController - { - #region Organizations - public static DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive, - string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { - #region Demo Mode - if (IsDemoMode) - { - DataSet ds = new DataSet(); - - // total records - DataTable dtTotal = ds.Tables.Add(); - dtTotal.Columns.Add("Records", typeof(int)); - dtTotal.Rows.Add(3); - - // organizations - DataTable dtItems = ds.Tables.Add(); - dtItems.Columns.Add("ItemID", typeof(int)); - dtItems.Columns.Add("OrganizationID", typeof(string)); - dtItems.Columns.Add("ItemName", typeof(string)); - dtItems.Columns.Add("PackageName", typeof(string)); - dtItems.Columns.Add("PackageID", typeof(int)); - dtItems.Columns.Add("Username", typeof(string)); - dtItems.Columns.Add("UserID", typeof(int)); - dtItems.Rows.Add(1, "fabrikam", "Fabrikam Inc", "Hosted Exchange", 1, "Customer", 1); - dtItems.Rows.Add(1, "contoso", "Contoso", "Hosted Exchange", 1, "Customer", 1); - dtItems.Rows.Add(1, "gencons", "General Consultants", "Hosted Exchange", 1, "Customer", 1); - - return ds; - } - #endregion - - return PackageController.GetRawPackageItemsPaged( - packageId, ResourceGroups.Exchange, typeof(Organization), - recursive, filterColumn, filterValue, sortColumn, startRow, maximumRows); - } - - public static OrganizationsPaged GetExchangeOrganizationsPaged(int packageId, bool recursive, - string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { - ServiceItemsPaged items = PackageController.GetPackageItemsPaged( - packageId, ResourceGroups.Exchange, typeof(Organization), - recursive, filterColumn, filterValue, sortColumn, startRow, maximumRows); - - OrganizationsPaged orgs = new OrganizationsPaged(); - orgs.RecordsCount = items.RecordsCount; - orgs.PageItems = new Organization[items.PageItems.Length]; - - for (int i = 0; i < orgs.PageItems.Length; i++) - orgs.PageItems[i] = (Organization)items.PageItems[i]; - - return orgs; - } - - public static List GetExchangeOrganizations(int packageId, bool recursive) - { - List items = PackageController.GetPackageItemsByType( - packageId, typeof(Organization), recursive); - - return items.ConvertAll( - new Converter( - delegate(ServiceProviderItem item) { return (Organization)item; })); - } - - public static List GetExchangeOrganizationsInternal(int packageId, bool recursive) - { - List items = PackageController.GetPackageItemsByTypeInternal(packageId, null, typeof(Organization), recursive); - - return items.ConvertAll( - new Converter( - delegate(ServiceProviderItem item) { return (Organization)item; })); - } - - public static Organization GetOrganization(int itemId) - { - #region Demo Mode - if (IsDemoMode) - { - // load package by user - Organization org = new Organization(); - org.PackageId = 0; - org.Id = 1; - org.OrganizationId = "fabrikam"; - org.Name = "Fabrikam Inc"; - org.KeepDeletedItemsDays = 14; - return org; - } - #endregion - - return (Organization)PackageController.GetPackageItem(itemId); - } - - public static OrganizationStatistics GetOrganizationStatistics(int itemId) - { - return GetOrganizationStatisticsInternal(itemId, false); - } - - public static OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId) - { - return GetOrganizationStatisticsInternal(itemId, true); - } - - - private static OrganizationStatistics GetOrganizationStatisticsInternal(int itemId, bool byOrganization) - { - #region Demo Mode - if (IsDemoMode) - { - OrganizationStatistics stats = new OrganizationStatistics(); - stats.AllocatedMailboxes = 10; - stats.CreatedMailboxes = 4; - stats.AllocatedContacts = 4; - stats.CreatedContacts = 2; - stats.AllocatedDistributionLists = 5; - stats.CreatedDistributionLists = 1; - stats.AllocatedPublicFolders = 40; - stats.CreatedPublicFolders = 4; - stats.AllocatedDomains = 5; - stats.CreatedDomains = 2; - stats.AllocatedDiskSpace = 200; - stats.UsedDiskSpace = 70; - return stats; - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_ORG_STATS"); - TaskManager.ItemId = itemId; - - try - { - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return null; - - OrganizationStatistics stats = new OrganizationStatistics(); - - if (byOrganization) - { - OrganizationStatistics tempStats = ObjectUtils.FillObjectFromDataReader(DataProvider.GetExchangeOrganizationStatistics(org.Id)); - - stats.CreatedMailboxes = tempStats.CreatedMailboxes; - stats.CreatedContacts = tempStats.CreatedContacts; - stats.CreatedDistributionLists = tempStats.CreatedDistributionLists; - stats.CreatedDomains = tempStats.CreatedDomains; - stats.CreatedPublicFolders = tempStats.CreatedPublicFolders; - stats.UsedDiskSpace = tempStats.UsedDiskSpace; - stats.UsedLitigationHoldSpace = tempStats.UsedLitigationHoldSpace; - } - else - { - UserInfo user = ObjectUtils.FillObjectFromDataReader(DataProvider.GetUserByExchangeOrganizationIdInternally(org.Id)); - List Packages = PackageController.GetPackages(user.UserId); - - if ((Packages != null) & (Packages.Count > 0)) - { - foreach (PackageInfo Package in Packages) - { - List orgs = null; - - orgs = GetExchangeOrganizations(Package.PackageId, false); - - if ((orgs != null) & (orgs.Count > 0)) - { - foreach (Organization o in orgs) - { - OrganizationStatistics tempStats = ObjectUtils.FillObjectFromDataReader(DataProvider.GetExchangeOrganizationStatistics(o.Id)); - - stats.CreatedMailboxes += tempStats.CreatedMailboxes; - stats.CreatedContacts += tempStats.CreatedContacts; - stats.CreatedDistributionLists += tempStats.CreatedDistributionLists; - stats.CreatedDomains += tempStats.CreatedDomains; - stats.CreatedPublicFolders += tempStats.CreatedPublicFolders; - stats.UsedDiskSpace += tempStats.UsedDiskSpace; - stats.UsedLitigationHoldSpace += tempStats.UsedLitigationHoldSpace; - } - } - } - } - } - - // disk space - //stats.UsedDiskSpace = org.DiskSpace; - - - // allocated quotas - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - stats.AllocatedMailboxes = cntx.Quotas[Quotas.EXCHANGE2007_MAILBOXES].QuotaAllocatedValue; - stats.AllocatedContacts = cntx.Quotas[Quotas.EXCHANGE2007_CONTACTS].QuotaAllocatedValue; - stats.AllocatedDistributionLists = cntx.Quotas[Quotas.EXCHANGE2007_DISTRIBUTIONLISTS].QuotaAllocatedValue; - stats.AllocatedPublicFolders = cntx.Quotas[Quotas.EXCHANGE2007_PUBLICFOLDERS].QuotaAllocatedValue; - stats.AllocatedDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; - stats.AllocatedLitigationHoldSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue; - - return stats; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - - - public static int CalculateOrganizationDiskspace(int itemId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "CALCULATE_DISKSPACE"); - TaskManager.ItemId = itemId; - - try - { - // create thread parameters - ThreadStartParameters prms = new ThreadStartParameters(); - prms.UserId = SecurityContext.User.UserId; - prms.Parameters = new object[] { itemId }; - - Thread t = new Thread(CalculateOrganizationDiskspaceAsync); - t.Start(prms); - return 0; - - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - private static void CalculateOrganizationDiskspaceAsync(object objPrms) - { - ThreadStartParameters prms = (ThreadStartParameters)objPrms; - - // impersonate thread - SecurityContext.SetThreadPrincipal(prms.UserId); - - int itemId = (int)prms.Parameters[0]; - - // calculate disk space - CalculateOrganizationDiskspaceInternal(itemId); - } - - internal static void CalculateOrganizationDiskspaceInternal(int itemId) - { - try - { - // calculate disk space - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return; - - SoapServiceProviderItem soapOrg = SoapServiceProviderItem.Wrap(org); - - - int exchangeServiceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.Exchange); - - if (exchangeServiceId != 0) - { - ServiceProvider exchange = GetServiceProvider(exchangeServiceId, org.ServiceId); - - ServiceProviderItemDiskSpace[] itemsDiskspace = exchange.GetServiceItemsDiskSpace(new SoapServiceProviderItem[] { soapOrg }); - - - if (itemsDiskspace != null && itemsDiskspace.Length > 0) - { - // set disk space - org.DiskSpace = (int)Math.Round(((float)itemsDiskspace[0].DiskSpace / 1024 / 1024)); - - // save organization - UpdateOrganization(org); - } - } - } - catch (Exception ex) - { - // write to audit log - TaskManager.WriteError(ex); - } - } - - private static bool OrganizationIdentifierExists(string organizationId) - { - return DataProvider.ExchangeOrganizationExists(organizationId); - } - - - - - - private static int ExtendToExchangeOrganization(ref Organization org) - { - // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_ORG", org.Name); - TaskManager.TaskParameters["Organization ID"] = org.OrganizationId; - - try - { - // provision organization in Exchange - int serviceId = GetExchangeServiceID(org.PackageId); - int[] hubTransportServiceIds; - int[] clientAccessServiceIds; - - GetExchangeServices(serviceId, out hubTransportServiceIds, out clientAccessServiceIds); - - - ExchangeServer mailboxRole = GetExchangeServer(serviceId, org.ServiceId); - - - bool authDomainCreated = false; - int itemId = 0; - bool organizationExtended = false; - - List domains = null; - try - { - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - - // 1) Create Organization (Mailbox) - // ================================ - Organization exchangeOrganization = mailboxRole.ExtendToExchangeOrganization(org.OrganizationId, - org.SecurityGroup, - Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue)); - - organizationExtended = true; - - exchangeOrganization.OrganizationId = org.OrganizationId; - exchangeOrganization.PackageId = org.PackageId; - exchangeOrganization.ServiceId = org.ServiceId; - - exchangeOrganization.DefaultDomain = org.DefaultDomain; - exchangeOrganization.Name = org.Name; - exchangeOrganization.Id = org.Id; - exchangeOrganization.SecurityGroup = org.SecurityGroup; - exchangeOrganization.DistinguishedName = org.DistinguishedName; - exchangeOrganization.CrmAdministratorId = org.CrmAdministratorId; - exchangeOrganization.CrmCollation = org.CrmCollation; - exchangeOrganization.CrmCurrency = org.CrmCurrency; - exchangeOrganization.CrmLanguadgeCode = org.CrmLanguadgeCode; - exchangeOrganization.CrmOrganizationId = org.CrmOrganizationId; - exchangeOrganization.CrmOrgState = org.CrmOrgState; - exchangeOrganization.CrmUrl = org.CrmUrl; - - org = exchangeOrganization; - - // 2) Get OAB virtual directories from Client Access servers and - // create Create Organization OAB (Mailbox) - // ========================================== - List oabVirtualDirs = new List(); - foreach (int id in clientAccessServiceIds) - { - ExchangeServer clientAccessRole = null; - try - { - clientAccessRole = GetExchangeServer(id, org.ServiceId); - } - catch(Exception ex) - { - TaskManager.WriteError(ex); - continue; - } - oabVirtualDirs.Add(clientAccessRole.GetOABVirtualDirectory()); - } - - Organization orgOAB = mailboxRole.CreateOrganizationOfflineAddressBook(org.OrganizationId, org.SecurityGroup, string.Join(",", oabVirtualDirs.ToArray())); - org.OfflineAddressBook = orgOAB.OfflineAddressBook; - - - // 3) Add organization domains (Hub Transport) - domains = OrganizationController.GetOrganizationDomains(org.Id); - - foreach (int id in hubTransportServiceIds) - { - ExchangeServer hubTransportRole = null; - try - { - hubTransportRole = GetExchangeServer(id, org.ServiceId); - } - catch(Exception ex) - { - TaskManager.WriteError(ex); - continue; - } - - string[] existingDomains = hubTransportRole.GetAuthoritativeDomains(); - if (existingDomains != null) - Array.Sort(existingDomains); - - foreach (OrganizationDomainName domain in domains) - { - if (existingDomains == null || Array.BinarySearch(existingDomains, domain.DomainName) < 0) - { - hubTransportRole.AddAuthoritativeDomain(domain.DomainName); - } - if (domain.DomainType != ExchangeAcceptedDomainType.Authoritative) - { - hubTransportRole.ChangeAcceptedDomainType(domain.DomainName, domain.DomainType); - } - } - authDomainCreated = true; - break; - } - - foreach (OrganizationDomainName d in domains) - { - DomainInfo domain = ServerController.GetDomain(d.DomainId); - - //Add the service records - if (domain != null) - { - if (domain.ZoneItemId != 0) - { - ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.Exchange, domain, ""); - ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.BlackBerry, domain, ""); - ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.OCS, domain, ""); - } - } - } - - - // 4) Add the address book policy (Exchange 2010 SP2 - // - // ========================================== - Organization OrgTmp = mailboxRole.CreateOrganizationAddressBookPolicy(org.OrganizationId, - org.GlobalAddressList, - org.AddressList, - org.RoomsAddressList, - org.OfflineAddressBook); - - org.AddressBookPolicy = OrgTmp.AddressBookPolicy; - - StringDictionary settings = ServerController.GetServiceSettings(serviceId); - org.KeepDeletedItemsDays = Utils.ParseInt(settings["KeepDeletedItemsDays"], 14); - - } - catch (Exception ex) - { - - // rollback organization creation - if (organizationExtended) - mailboxRole.DeleteOrganization(org.OrganizationId, org.DistinguishedName, - org.GlobalAddressList, org.AddressList, org.RoomsAddressList, org.OfflineAddressBook, org.SecurityGroup, org.AddressBookPolicy); - - // rollback domain - if (authDomainCreated) - foreach (int id in hubTransportServiceIds) - { - ExchangeServer hubTransportRole = null; - try - { - hubTransportRole = GetExchangeServer(id, org.ServiceId); - } - catch (Exception exe) - { - TaskManager.WriteError(exe); - continue; - } - - foreach (OrganizationDomainName domain in domains) - { - hubTransportRole.DeleteAuthoritativeDomain(domain.DomainName); - - } - - break; - } - - throw TaskManager.WriteError(ex); - } - - return itemId; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - private static int[] ParseMultiSetting(int mailboxServiceId, string settingName) - { - List retIds = new List(); - StringDictionary settings = ServerController.GetServiceSettings(mailboxServiceId); - 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(mailboxServiceId); - - return retIds.ToArray(); - - } - - private static void GetExchangeServices(int mailboxServiceId, - out int[] hubTransportServiceIds, out int[] clientAccessServiceIds) - { - hubTransportServiceIds = ParseMultiSetting(mailboxServiceId, "HubTransportServiceID"); - - clientAccessServiceIds = ParseMultiSetting(mailboxServiceId, "ClientAccessServiceID"); - } - - 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("EXCHANGE", "DELETE_ORG"); - TaskManager.ItemId = itemId; - - try - { - // delete organization in Exchange - //System.Threading.Thread.Sleep(5000); - Organization org = (Organization)PackageController.GetPackageItem(itemId); - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - bool successful = exchange.DeleteOrganization( - org.OrganizationId, - org.DistinguishedName, - org.GlobalAddressList, - org.AddressList, - org.RoomsAddressList, - org.OfflineAddressBook, - org.SecurityGroup, - org.AddressBookPolicy); - - - return successful ? 0 : BusinessErrorCodes.ERROR_EXCHANGE_DELETE_SOME_PROBLEMS; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static Organization GetOrganizationStorageLimits(int itemId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "GET_ORG_LIMITS"); - TaskManager.ItemId = itemId; - - try - { - return GetOrganization(itemId); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, - int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "SET_ORG_LIMITS"); - TaskManager.ItemId = itemId; - - try - { - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return 0; - - // load package context - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - - int maxDiskSpace = 0; - if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_DISKSPACE) - && cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue > 0) - maxDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue * 1024; - - if (maxDiskSpace > 0 && (issueWarningKB > maxDiskSpace || prohibitSendKB > maxDiskSpace || prohibitSendReceiveKB > maxDiskSpace || issueWarningKB == -1 || prohibitSendKB == -1 || prohibitSendReceiveKB == -1)) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - - // set limits - org.KeepDeletedItemsDays = keepDeletedItemsDays; - - // save organization - UpdateOrganization(org); - - if (applyToMailboxes) - { - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetOrganizationStorageLimits(org.DistinguishedName, - issueWarningKB, - prohibitSendKB, - prohibitSendReceiveKB, - keepDeletedItemsDays); - } - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeItemStatistics[] GetMailboxesStatistics(int itemId) - { - #region Demo Mode - if (IsDemoMode) - { - List items = new List(); - ExchangeItemStatistics item1 = new ExchangeItemStatistics(); - item1.ItemName = "John Smith"; - item1.TotalItems = 105; - item1.TotalSizeMB = 14; - item1.LastLogon = DateTime.Now; - item1.LastLogoff = DateTime.Now; - items.Add(item1); - - ExchangeItemStatistics item2 = new ExchangeItemStatistics(); - item2.ItemName = "Jack Brown"; - item2.TotalItems = 5; - item2.TotalSizeMB = 2; - item2.LastLogon = DateTime.Now; - item2.LastLogoff = DateTime.Now; - items.Add(item2); - - ExchangeItemStatistics item3 = new ExchangeItemStatistics(); - item3.ItemName = "Marry Smith"; - item3.TotalItems = 1302; - item3.TotalSizeMB = 45; - item3.LastLogon = DateTime.Now; - item3.LastLogoff = DateTime.Now; - items.Add(item3); - - return items.ToArray(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOXES_STATS"); - TaskManager.ItemId = itemId; - - try - { - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return null; - - - // get stats - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - return exchange.GetMailboxesStatistics(org.DistinguishedName); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_STATS"); - TaskManager.ItemId = itemId; - - try - { - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return null; - - - // get stats - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - return exchange.GetMailboxStatistics(account.UserPrincipalName); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - - public static ExchangeItemStatistics[] GetPublicFoldersStatistics(int itemId) - { - #region Demo Mode - if (IsDemoMode) - { - List items = new List(); - ExchangeItemStatistics item1 = new ExchangeItemStatistics(); - item1.ItemName = "\\fabrikam\\Documents"; - item1.TotalItems = 6; - item1.TotalSizeMB = 56; - item1.LastModificationTime = DateTime.Now; - item1.LastAccessTime = DateTime.Now; - items.Add(item1); - - ExchangeItemStatistics item2 = new ExchangeItemStatistics(); - item2.ItemName = "\\fabrikam\\Documents\\Legal"; - item2.TotalItems = 5; - item2.TotalSizeMB = 4; - item2.LastModificationTime = DateTime.Now; - item2.LastAccessTime = DateTime.Now; - items.Add(item2); - - ExchangeItemStatistics item3 = new ExchangeItemStatistics(); - item3.ItemName = "\\fabrikam\\Documents\\Contracts"; - item3.TotalItems = 8; - item3.TotalSizeMB = 2; - item3.LastModificationTime = DateTime.Now; - item3.LastAccessTime = DateTime.Now; - items.Add(item3); - - return items.ToArray(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_FOLDERS_STATS"); - TaskManager.ItemId = itemId; - - try - { - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return null; - - // get the list of all public folders - List folderNames = new List(); - List folders = GetAccounts(itemId, ExchangeAccountType.PublicFolder); - foreach (ExchangeAccount folder in folders) - folderNames.Add(folder.DisplayName); - - // get stats - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - return exchange.GetPublicFoldersStatistics(org.OrganizationId, folderNames.ToArray()); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeActiveSyncPolicy GetActiveSyncPolicy(int itemId) - { - #region Demo Mode - if (IsDemoMode) - { - ExchangeActiveSyncPolicy p = new ExchangeActiveSyncPolicy(); - p.MaxAttachmentSizeKB = -1; - p.MaxPasswordFailedAttempts = -1; - p.MinPasswordLength = 0; - p.InactivityLockMin = -1; - p.PasswordExpirationDays = -1; - p.PasswordHistory = 0; - return p; - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_ACTIVESYNC_POLICY"); - TaskManager.ItemId = itemId; - - try - { - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return null; - - // get policy - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - //Create Exchange Organization - if (string.IsNullOrEmpty(org.GlobalAddressList)) - { - ExtendToExchangeOrganization(ref org); - - PackageController.UpdatePackageItem(org); - } - ExchangeActiveSyncPolicy policy = exchange.GetActiveSyncPolicy(org.OrganizationId); - - // create policy if required - if (policy == null) - { - exchange.CreateOrganizationActiveSyncPolicy(org.OrganizationId); - return exchange.GetActiveSyncPolicy(org.OrganizationId); - } - - return policy; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static 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 refreshInterval) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "SET_ACTIVESYNC_POLICY"); - TaskManager.ItemId = itemId; - - try - { - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return 0; - - // get policy - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - exchange.SetActiveSyncPolicy(org.OrganizationId, allowNonProvisionableDevices, attachmentsEnabled, - maxAttachmentSizeKB, uncAccessEnabled, wssAccessEnabled, devicePasswordEnabled, alphanumericPasswordRequired, - passwordRecoveryEnabled, deviceEncryptionEnabled, allowSimplePassword, maxPasswordFailedAttempts, - minPasswordLength, inactivityLockMin, passwordExpirationDays, passwordHistory, refreshInterval); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - private static void UpdateOrganization(Organization organization) - { - PackageController.UpdatePackageItem(organization); - } - #endregion - - #region Accounts - - private static bool AccountExists(string accountName) - { - return DataProvider.ExchangeAccountExists(accountName); - } - - public static ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, - string filterColumn, string filterValue, string sortColumn, - int startRow, int maximumRows) - { - #region Demo Mode - if (IsDemoMode) - { - string []parseedAccountTypes = Utils.ParseDelimitedString(accountTypes, ','); - - ExchangeAccountsPaged res = new ExchangeAccountsPaged(); - res.PageItems = GetAccounts(itemId, (ExchangeAccountType)Utils.ParseInt(parseedAccountTypes[0], 1)).ToArray(); - res.RecordsCount = res.PageItems.Length; - return res; - } - #endregion - - DataSet ds = DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, - accountTypes, filterColumn, filterValue, sortColumn, startRow, maximumRows); - - ExchangeAccountsPaged result = new ExchangeAccountsPaged(); - result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; - - List accounts = new List(); - ObjectUtils.FillCollectionFromDataView(accounts, ds.Tables[1].DefaultView); - result.PageItems = accounts.ToArray(); - return result; - } - - public static List GetAccounts(int itemId, ExchangeAccountType accountType) - { - #region Demo Mode - if (IsDemoMode) - { - if (accountType == ExchangeAccountType.Mailbox) - return SearchAccounts(0, true, false, false, true, true, "", "", ""); - else if (accountType == ExchangeAccountType.Contact) - return SearchAccounts(0, false, true, false, false, false, "", "", ""); - else if (accountType == ExchangeAccountType.DistributionList) - return SearchAccounts(0, false, false, true, false, false, "", "", ""); - else - { - List demoAccounts = new List(); - ExchangeAccount f1 = new ExchangeAccount(); - f1.AccountId = 7; - f1.AccountName = "documents_fabrikam"; - f1.AccountType = ExchangeAccountType.PublicFolder; - f1.DisplayName = "\\fabrikam\\Documents"; - f1.PrimaryEmailAddress = "documents@fabrikam.net"; - f1.MailEnabledPublicFolder = true; - demoAccounts.Add(f1); - - ExchangeAccount f2 = new ExchangeAccount(); - f2.AccountId = 8; - f2.AccountName = "documents_fabrikam"; - f2.AccountType = ExchangeAccountType.PublicFolder; - f2.DisplayName = "\\fabrikam\\Documents\\Legal"; - f2.PrimaryEmailAddress = ""; - demoAccounts.Add(f2); - - ExchangeAccount f3 = new ExchangeAccount(); - f3.AccountId = 9; - f3.AccountName = "documents_fabrikam"; - f3.AccountType = ExchangeAccountType.PublicFolder; - f3.DisplayName = "\\fabrikam\\Documents\\Contracts"; - f3.PrimaryEmailAddress = ""; - demoAccounts.Add(f3); - return demoAccounts; - } - } - #endregion - - return ObjectUtils.CreateListFromDataReader( - DataProvider.GetExchangeAccounts(itemId, (int)accountType)); - } - - - public static List GetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId) - { - return ObjectUtils.CreateListFromDataReader(DataProvider.GetExchangeAccountByMailboxPlanId(itemId, mailboxPlanId)); - } - - - public static List GetExchangeMailboxes(int itemId) - { - return ObjectUtils.CreateListFromDataReader(DataProvider.GetExchangeMailboxes(itemId)); - } - - public static List SearchAccounts(int itemId, - bool includeMailboxes, bool includeContacts, bool includeDistributionLists, - bool includeRooms, bool includeEquipment, - string filterColumn, string filterValue, string sortColumn) - { - #region Demo Mode - if (IsDemoMode) - { - List demoAccounts = new List(); - - if (includeMailboxes) - { - ExchangeAccount m1 = new ExchangeAccount(); - m1.AccountId = 1; - m1.AccountName = "john_fabrikam"; - m1.AccountType = ExchangeAccountType.Mailbox; - m1.DisplayName = "John Smith"; - m1.PrimaryEmailAddress = "john@fabrikam.net"; - demoAccounts.Add(m1); - - - - ExchangeAccount m3 = new ExchangeAccount(); - m3.AccountId = 3; - m3.AccountName = "marry_fabrikam"; - m3.AccountType = ExchangeAccountType.Mailbox; - m3.DisplayName = "Marry Smith"; - m3.PrimaryEmailAddress = "marry@fabrikam.net"; - demoAccounts.Add(m3); - } - - if (includeRooms) - { - ExchangeAccount r1 = new ExchangeAccount(); - r1.AccountId = 20; - r1.AccountName = "room1_fabrikam"; - r1.AccountType = ExchangeAccountType.Room; - r1.DisplayName = "Meeting Room 1"; - r1.PrimaryEmailAddress = "room1@fabrikam.net"; - demoAccounts.Add(r1); - } - - if (includeEquipment) - { - ExchangeAccount e1 = new ExchangeAccount(); - e1.AccountId = 21; - e1.AccountName = "projector_fabrikam"; - e1.AccountType = ExchangeAccountType.Equipment; - e1.DisplayName = "Projector 1"; - e1.PrimaryEmailAddress = "projector@fabrikam.net"; - demoAccounts.Add(e1); - } - - if (includeContacts) - { - ExchangeAccount c1 = new ExchangeAccount(); - c1.AccountId = 4; - c1.AccountName = "pntr1_fabrikam"; - c1.AccountType = ExchangeAccountType.Contact; - c1.DisplayName = "WebsitePanel Support"; - c1.PrimaryEmailAddress = "support@websitepanel.net"; - demoAccounts.Add(c1); - - ExchangeAccount c2 = new ExchangeAccount(); - c2.AccountId = 5; - c2.AccountName = "acc1_fabrikam"; - c2.AccountType = ExchangeAccountType.Contact; - c2.DisplayName = "John Home Account"; - c2.PrimaryEmailAddress = "john@yahoo.com"; - demoAccounts.Add(c2); - } - - if (includeDistributionLists) - { - ExchangeAccount d1 = new ExchangeAccount(); - d1.AccountId = 6; - d1.AccountName = "sales_fabrikam"; - d1.AccountType = ExchangeAccountType.DistributionList; - d1.DisplayName = "Fabrikam Sales Dept"; - d1.PrimaryEmailAddress = "sales@fabrikam.net"; - demoAccounts.Add(d1); - } - - return demoAccounts; - } - #endregion - - return ObjectUtils.CreateListFromDataReader( - DataProvider.SearchExchangeAccounts(SecurityContext.User.UserId, itemId, includeMailboxes, includeContacts, - includeDistributionLists, includeRooms, includeEquipment, - filterColumn, filterValue, sortColumn)); - } - - - - public static ExchangeAccount GetAccount(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - ExchangeAccount m1 = new ExchangeAccount(); - m1.AccountId = 1; - m1.AccountName = "john_fabrikam"; - m1.AccountType = ExchangeAccountType.Mailbox; - m1.DisplayName = "John Smith"; - m1.PrimaryEmailAddress = "john@fabrikam.net"; - return m1; - } - #endregion - - ExchangeAccount account = ObjectUtils.FillObjectFromDataReader( - DataProvider.GetExchangeAccount(itemId, accountId)); - - if (account == null) - return null; - - // decrypt password - account.AccountPassword = CryptoUtils.Decrypt(account.AccountPassword); - - return account; - } - - public static bool CheckAccountCredentials(int itemId, string email, string password) - { - // place log record - TaskManager.StartTask("EXCHANGE", "AUTHENTICATE", email); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return false; - - // check credentials - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - return exchange.CheckAccountCredentials(email, password); - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - return false; - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeAccount SearchAccount(ExchangeAccountType accountType, string primaryEmailAddress) - { - ExchangeAccount account = ObjectUtils.FillObjectFromDataReader( - DataProvider.SearchExchangeAccount(SecurityContext.User.UserId, - (int)accountType, primaryEmailAddress)); - - if (account == null) - return null; - - // decrypt password - account.AccountPassword = CryptoUtils.Decrypt(account.AccountPassword); - - return account; - } - - private static int AddAccount(int itemId, ExchangeAccountType accountType, - string accountName, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, - MailboxManagerActions mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) - { - return DataProvider.AddExchangeAccount(itemId, (int)accountType, - accountName, displayName, primaryEmailAddress, mailEnabledPublicFolder, - mailboxManagerActions.ToString(), samAccountName, CryptoUtils.Encrypt(accountPassword), mailboxPlanId, (string.IsNullOrEmpty(subscriberNumber) ? null : subscriberNumber.Trim())); - } - - private static void UpdateAccount(ExchangeAccount account) - { - DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName, - account.PrimaryEmailAddress, account.MailEnabledPublicFolder, - account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, - (string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim())); - } - - private static void DeleteAccount(int itemId, int accountId) - { - // try to get organization - if (GetOrganization(itemId) == null) - return; - - DataProvider.DeleteExchangeAccount(itemId, accountId); - } - - private static string BuildAccountName(string orgId, string name) - { - string accountName = name = name.Replace(" ", ""); - int counter = 0; - bool bFound = false; - - if (!AccountExists(accountName)) return accountName; - - do - { - accountName = genSamLogin(name, counter.ToString("d5")); - - if (!AccountExists(accountName)) bFound = true; - - counter++; - } - while (!bFound); - - return accountName; - } - - private static string genSamLogin(string login, string strCounter) - { - int maxLogin = 20; - int fullLen = login.Length + strCounter.Length; - if (fullLen <= maxLogin) - return login + strCounter; - else - { - if (login.Length - (fullLen - maxLogin) > 0) - return login.Substring(0, login.Length - (fullLen - maxLogin)) + strCounter; - else return strCounter; // ???? - } - - } - - - #endregion - - #region Account Email Addresses - private static bool EmailAddressExists(string emailAddress) - { - return DataProvider.ExchangeAccountEmailAddressExists(emailAddress); - } - - - private static ExchangeEmailAddress[] GetAccountEmailAddresses(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - List demoEmails = new List(); - ExchangeEmailAddress e1 = new ExchangeEmailAddress(); - e1.EmailAddress = "john@fabrikam.net"; - e1.IsPrimary = true; - demoEmails.Add(e1); - - ExchangeEmailAddress e2 = new ExchangeEmailAddress(); - e2.EmailAddress = "john.smith@fabrikam.net"; - demoEmails.Add(e2); - - ExchangeEmailAddress e3 = new ExchangeEmailAddress(); - e3.EmailAddress = "john@fabrikam.hosted-exchange.com"; - demoEmails.Add(e3); - return demoEmails.ToArray(); - } - #endregion - - List emails = ObjectUtils.CreateListFromDataReader( - DataProvider.GetExchangeAccountEmailAddresses(accountId)); - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - foreach (ExchangeEmailAddress email in emails) - { - if (String.Compare(account.PrimaryEmailAddress, email.EmailAddress, true) == 0) - { - email.IsPrimary = true; - } - - if (String.Compare(account.UserPrincipalName, email.EmailAddress, true) == 0) - { - email.IsUserPrincipalName = true; - } - - } - - return emails.ToArray(); - } - - private static void AddAccountEmailAddress(int accountId, string emailAddress) - { - DataProvider.AddExchangeAccountEmailAddress(accountId, emailAddress); - } - - private static void DeleteAccountEmailAddresses(int accountId, string[] emailAddresses) - { - foreach (string emailAddress in emailAddresses) - DataProvider.DeleteExchangeAccountEmailAddress(accountId, emailAddress); - } - - #endregion - - #region Domains - public static List GetOrganizationDomains(int itemId) - { - #region Demo Mode - if (IsDemoMode) - { - List demoDomains = new List(); - ExchangeDomainName d1 = new ExchangeDomainName(); - d1.DomainId = 1; - d1.DomainName = "fabrikam.hosted-exchange.com"; - d1.IsDefault = false; - d1.IsHost = true; - demoDomains.Add(d1); - - ExchangeDomainName d2 = new ExchangeDomainName(); - d2.DomainId = 2; - d2.DomainName = "fabrikam.net"; - d2.IsDefault = true; - d2.IsHost = false; - demoDomains.Add(d2); - - return demoDomains; - } - #endregion - - // load organization - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return null; - - // load all domains - List domains = ObjectUtils.CreateListFromDataReader( - DataProvider.GetExchangeOrganizationDomains(itemId)); - - // set default domain - foreach (ExchangeDomainName domain in domains) - { - if (String.Compare(domain.DomainName, org.DefaultDomain, true) == 0) - { - domain.IsDefault = true; - break; - } - } - - return domains; - } - - public static int AddAuthoritativeDomain(int itemId, int domainId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "ADD_DOMAIN"); - TaskManager.TaskParameters["Domain ID"] = domainId; - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return -1; - - // load domain - DomainInfo domain = ServerController.GetDomain(domainId); - if (domain == null) - return -1; - - - // delete domain on Exchange - int[] hubTransportServiceIds; - int[] clientAccessServiceIds; - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - GetExchangeServices(exchangeServiceId, out hubTransportServiceIds, out clientAccessServiceIds); - - foreach (int id in hubTransportServiceIds) - { - ExchangeServer hubTransportRole = null; - try - { - hubTransportRole = GetExchangeServer(id, org.ServiceId); - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - continue; - } - - string[] domains = hubTransportRole.GetAuthoritativeDomains(); - if (domains != null) - Array.Sort(domains); - - if (domains == null || Array.BinarySearch(domains, domain.DomainName) < 0) - hubTransportRole.AddAuthoritativeDomain(domain.DomainName); - break; - } - - //Add the service records - if (domain != null) - { - if (domain.ZoneItemId != 0) - { - ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.Exchange, domain, ""); - } - } - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int ChangeAcceptedDomainType(int itemId, int domainId, ExchangeAcceptedDomainType domainType) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - 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; - - try - { - // load organization - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return -1; - - // load domain - DomainInfo domain = ServerController.GetDomain(domainId); - if (domain == null) - return -1; - - int[] hubTransportServiceIds; - int[] clientAccessServiceIds; - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - GetExchangeServices(exchangeServiceId, out hubTransportServiceIds, out clientAccessServiceIds); - - foreach (int id in hubTransportServiceIds) - { - ExchangeServer hubTransportRole = null; - try - { - hubTransportRole = GetExchangeServer(id, org.ServiceId); - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - continue; - } - - hubTransportRole.ChangeAcceptedDomainType(domain.DomainName, domainType); - break; - - } - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int DeleteAuthoritativeDomain(int itemId, int domainId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_DOMAIN"); - TaskManager.TaskParameters["Domain ID"] = domainId; - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = (Organization)PackageController.GetPackageItem(itemId); - if (org == null) - return -1; - - // load domain - DomainInfo domain = ServerController.GetDomain(domainId); - if(domain == null) - return -1; - - if (DataProvider.CheckDomainUsedByHostedOrganization(domain.DomainName) == 1) - { - return -1; - } - - // delete domain on Exchange - int[] hubTransportServiceIds; - int[] clientAccessServiceIds; - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - GetExchangeServices(exchangeServiceId, out hubTransportServiceIds, out clientAccessServiceIds); - - foreach (int id in hubTransportServiceIds) - { - ExchangeServer hubTransportRole = null; - try - { - hubTransportRole = GetExchangeServer(id, org.ServiceId); - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - continue; - } - - hubTransportRole.DeleteAuthoritativeDomain(domain.DomainName); - break; - - } - - //Add the service records - if (domain != null) - { - if (domain.ZoneItemId != 0) - { - ServerController.RemoveServiceDNSRecords(org.PackageId, ResourceGroups.Exchange, domain, "", false); - } - } - - - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - - #endregion - - #region Mailboxes - - private 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) - { - DataProvider.UpdateExchangeAccount(accountId, - accountName, - accountType, - displayName, - primaryEmailAddress, - mailEnabledPublicFolder, - mailboxManagerActions, - samAccountName, - CryptoUtils.Encrypt(accountPassword), - mailboxPlanId, - (string.IsNullOrEmpty(subscriberNumber) ? null : subscriberNumber.Trim())); - } - - - public static 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) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // check mailbox quota - OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); - if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes)) - return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT; - - - // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_MAILBOX"); - TaskManager.ItemId = itemId; - bool userCreated = false; - Organization org = null; - try - { - accountName = accountName.Trim(); - displayName = displayName.Trim(); - name = name.Trim(); - domain = domain.Trim(); - - - // load organization - org = GetOrganization(itemId); - if (org == null) - return -1; - - // e-mail - string email = name + "@" + domain; - bool enabled = (accountType == ExchangeAccountType.Mailbox); - - - // string accountName = string.Empty; - //Create AD user if needed - if (accountId == 0) - { - accountId = OrganizationController.CreateUser(org.Id, displayName, name, domain, password, subscriberNumber, enabled, false, string.Empty, out accountName); - if (accountId > 0) - userCreated = true; - } - if (accountId < 0) - return accountId; - - // get mailbox settings - Organizations orgProxy = OrganizationController.GetOrganizationProxy(org.ServiceId); - OrganizationUser retUser = orgProxy.GetUserGeneralSettings(accountName, org.OrganizationId); - - - int exchangeServiceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.Exchange); - - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - - //Create Exchange Organization - if (string.IsNullOrEmpty(org.GlobalAddressList)) - { - ExtendToExchangeOrganization(ref org); - - PackageController.UpdatePackageItem(org); - } - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - //verify if the mailbox fits in the storage quota - // load package context - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - - int maxDiskSpace = -1; - int quotaUsed = 0; - if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_DISKSPACE) - && cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue > 0) - { - maxDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; - quotaUsed = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaUsedValue; - } - - ExchangeMailboxPlan plan = GetExchangeMailboxPlan(itemId, mailboxPlanId); - if (maxDiskSpace != -1) - { - if (plan.MailboxSizeMB == -1) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - - if ((quotaUsed + plan.MailboxSizeMB) > (maxDiskSpace)) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - } - - int maxRecoverableItemsSpace = -1; - int quotaRecoverableItemsUsed = 0; - if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE) - && cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue > 0) - { - maxRecoverableItemsSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue; - quotaRecoverableItemsUsed = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaUsedValue; - } - - if (maxRecoverableItemsSpace != -1) - { - if (plan.RecoverableItemsSpace == -1) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - - if ((quotaRecoverableItemsUsed + plan.RecoverableItemsSpace) > (maxRecoverableItemsSpace)) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - } - - - //GetServiceSettings - StringDictionary primSettings = ServerController.GetServiceSettings(exchangeServiceId); - - string samAccount = exchange.CreateMailEnableUser(email, org.OrganizationId, org.DistinguishedName, accountType, primSettings["mailboxdatabase"], - org.OfflineAddressBook, - org.AddressBookPolicy, - retUser.SamAccountName, - plan.EnablePOP, - plan.EnableIMAP, - plan.EnableOWA, - plan.EnableMAPI, - plan.EnableActiveSync, - plan.MailboxSizeMB != -1 ? (((long)plan.IssueWarningPct * (long)plan.MailboxSizeMB * 1024) / 100) : -1, - plan.MailboxSizeMB != -1 ? (((long)plan.ProhibitSendPct * (long)plan.MailboxSizeMB * 1024) / 100) : -1, - plan.MailboxSizeMB != -1 ? (((long)plan.ProhibitSendReceivePct * (long)plan.MailboxSizeMB * 1024) / 100) : -1, - plan.KeepDeletedItemsDays, - plan.MaxRecipients, - plan.MaxSendMessageSizeKB, - plan.MaxReceiveMessageSizeKB, - plan.HideFromAddressBook, - Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue), - plan.AllowLitigationHold, - plan.RecoverableItemsSpace != -1 ? (plan.RecoverableItemsSpace * 1024) : -1, - plan.RecoverableItemsSpace != -1 ? (((long)plan.RecoverableItemsWarningPct * (long)plan.RecoverableItemsSpace * 1024) / 100) : -1); - - MailboxManagerActions pmmActions = MailboxManagerActions.GeneralSettings - | MailboxManagerActions.MailFlowSettings - | MailboxManagerActions.AdvancedSettings - | MailboxManagerActions.EmailAddresses; - - - UpdateExchangeAccount(accountId, accountName, accountType, displayName, email, false, pmmActions.ToString(), samAccount, password, mailboxPlanId, subscriberNumber); - - - - // send setup instructions - if (sendSetupInstructions) - { - try - { - // send setup instructions - int sendResult = SendMailboxSetupInstructions(itemId, accountId, true, setupInstructionMailAddress, null); - if (sendResult < 0) - TaskManager.WriteWarning("Setup instructions were not sent. Error code: " + sendResult); - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - } - } - - try - { - // update OAB - // check if this is the first mailbox within the organization - if (GetAccounts(itemId, ExchangeAccountType.Mailbox).Count == 1) - exchange.UpdateOrganizationOfflineAddressBook(org.OfflineAddressBook); - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - } - - return accountId; - } - catch (Exception ex) - { - //rollback AD user - if (userCreated) - { - try - { - OrganizationController.DeleteUser(org.Id, accountId); - } - catch (Exception rollbackException) - { - TaskManager.WriteError(rollbackException); - } - } - throw TaskManager.WriteError(ex); - - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int DisableMailbox(int itemId, int accountId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DISABLE_MAILBOX"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - if (BlackBerryController.CheckBlackBerryUserExists(accountId)) - { - BlackBerryController.DeleteBlackBerryUser(itemId, accountId); - } - - // delete mailbox - int serviceExchangeId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId); - exchange.DisableMailbox(account.UserPrincipalName); - - account.AccountType = ExchangeAccountType.User; - account.MailEnabledPublicFolder = false; - account.AccountPassword = null; - UpdateAccount(account); - DataProvider.DeleteUserEmailAddresses(account.AccountId, account.PrimaryEmailAddress); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - - public static int DeleteMailbox(int itemId, int accountId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_MAILBOX"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - if (BlackBerryController.CheckBlackBerryUserExists(accountId)) - { - BlackBerryController.DeleteBlackBerryUser(itemId, accountId); - } - - - // delete mailbox - int serviceExchangeId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId); - exchange.DeleteMailbox(account.UserPrincipalName); - - - - // unregister account - DeleteAccount(itemId, accountId); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - private static ExchangeMailbox GetDemoMailboxSettings() - { - ExchangeMailbox mb = new ExchangeMailbox(); - mb.DisplayName = "John Smith"; - mb.Domain = "HSTDEXCH1"; - mb.AccountName = "john_fabrikam"; - mb.EnableForwarding = true; - mb.EnableIMAP = true; - mb.EnableMAPI = true; - mb.EnablePOP = true; - mb.FirstName = "John"; - mb.LastName = "Smith"; - mb.ForwardingAccount = GetAccounts(0, ExchangeAccountType.Mailbox)[1]; - mb.EnableForwarding = true; - mb.IssueWarningKB = 150000; - mb.KeepDeletedItemsDays = 14; - mb.LastLogoff = DateTime.Now; - mb.LastLogon = DateTime.Now; - mb.ManagerAccount = GetAccounts(0, ExchangeAccountType.Mailbox)[1]; - mb.MaxReceiveMessageSizeKB = 20000; - mb.MaxRecipients = 30; - mb.MaxSendMessageSizeKB = 10000; - mb.ProhibitSendKB = 160000; - mb.ProhibitSendReceiveKB = 170000; - mb.TotalItems = 5; - mb.TotalSizeMB = 4; - return mb; - } - - public static ExchangeMailbox GetMailboxGeneralSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoMailboxSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_GENERAL"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - return exchange.GetMailboxGeneralSettings(account.UserPrincipalName); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - - if (Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue)) - hideAddressBook = true; - - exchange.SetMailboxGeneralSettings( - account.UserPrincipalName, - hideAddressBook, - disabled); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_ADDRESSES"); - TaskManager.ItemId = itemId; - - try - { - return GetAccountEmailAddresses(itemId, accountId); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int AddMailboxEmailAddress(int itemId, int accountId, string emailAddress) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "ADD_MAILBOX_ADDRESS"); - TaskManager.ItemId = itemId; - - try - { - // check - if (EmailAddressExists(emailAddress)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // add e-mail - AddAccountEmailAddress(accountId, emailAddress); - - // update e-mail addresses - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetMailboxEmailAddresses( - account.UserPrincipalName, - GetAccountSimpleEmailAddresses(itemId, accountId)); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - private static OCSServer GetOCSProxy(int itemId) - { - Organization org = OrganizationController.GetOrganization(itemId); - int serviceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.OCS); - - OCSServer ocs = new OCSServer(); - ServiceProviderProxy.Init(ocs, serviceId); - - - return ocs; - } - - public static int SetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_MAILBOX_ADDRESS"); - TaskManager.ItemId = itemId; - - try - { - // get account - ExchangeAccount account = GetAccount(itemId, accountId); - account.PrimaryEmailAddress = emailAddress; - - // update exchange - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetMailboxPrimaryEmailAddress( - account.UserPrincipalName, - emailAddress); - - if (DataProvider.CheckOCSUserExists(account.AccountId)) - { - OCSServer ocs = GetOCSProxy(itemId); - string instanceId = DataProvider.GetOCSUserInstanceID(account.AccountId); - ocs.SetUserPrimaryUri(instanceId, emailAddress); - } - - if (DataProvider.CheckLyncUserExists(account.AccountId)) - { - LyncController.SetLyncUserGeneralSettings(itemId, accountId, emailAddress, null); - } - - // save account - account.AccountPassword = null; - UpdateAccount(account); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int DeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_MAILBOX_ADDRESSES"); - TaskManager.ItemId = itemId; - - try - { - // get account - ExchangeAccount account = GetAccount(itemId, accountId); - - // delete e-mail addresses - List toDelete = new List(); - foreach (string emailAddress in emailAddresses) - { - if ((String.Compare(account.PrimaryEmailAddress, emailAddress, true) != 0) & - (String.Compare(account.UserPrincipalName, emailAddress, true) != 0)) - toDelete.Add(emailAddress); - } - - // delete from meta-base - DeleteAccountEmailAddresses(accountId, toDelete.ToArray()); - - // delete from Exchange - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // update e-mail addresses - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetMailboxEmailAddresses( - account.UserPrincipalName, - GetAccountSimpleEmailAddresses(itemId, accountId)); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeMailbox GetMailboxMailFlowSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoMailboxSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_MAILFLOW"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - ExchangeMailbox mailbox = exchange.GetMailboxMailFlowSettings(account.UserPrincipalName); - mailbox.DisplayName = account.DisplayName; - return mailbox; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetMailboxMailFlowSettings(int itemId, int accountId, - bool enableForwarding, string forwardingAccountName, bool forwardToBoth, - string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, - bool requireSenderAuthentication) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_MAILFLOW"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetMailboxMailFlowSettings(account.UserPrincipalName, - enableForwarding, - forwardingAccountName, - forwardToBoth, - sendOnBehalfAccounts, - acceptAccounts, - rejectAccounts, - requireSenderAuthentication); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - - public static ExchangeMailbox GetMailboxAdvancedSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoMailboxSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_ADVANCED"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - ExchangeMailbox mailbox = exchange.GetMailboxAdvancedSettings(account.UserPrincipalName); - mailbox.DisplayName = account.DisplayName; - return mailbox; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // PMM settings - if (pmmAllowed) account.MailboxManagerActions |= action; - else account.MailboxManagerActions &= ~action; - - // update account - account.AccountPassword = null; - UpdateAccount(account); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup) - { - #region Demo Mode - if (IsDemoMode) - { - return string.Empty; - } - #endregion - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load user info - UserInfo user = PackageController.GetPackageOwner(org.PackageId); - - // get letter settings - UserSettings settings = UserController.GetUserSettings(user.UserId, UserSettings.EXCHANGE_MAILBOX_SETUP_LETTER); - - string settingName = user.HtmlMail ? "HtmlBody" : "TextBody"; - string body = settings[settingName]; - if (String.IsNullOrEmpty(body)) - return null; - - string result = EvaluateMailboxTemplate(itemId, accountId, pmm, false, false, body); - return user.HtmlMail ? result : result.Replace("\n", "
"); - } - - private static string EvaluateMailboxTemplate(int itemId, int accountId, - bool pmm, bool emailMode, bool signup, string template) - { - Hashtable items = new Hashtable(); - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // add organization - items["Organization"] = org; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - if (account == null) - return null; - - // add account - items["Account"] = account; - items["AccountDomain"] = account.PrimaryEmailAddress.Substring(account.PrimaryEmailAddress.IndexOf("@") + 1); - items["DefaultDomain"] = org.DefaultDomain; - - if (!String.IsNullOrEmpty(account.SamAccountName)) - { - int idx = account.SamAccountName.IndexOf("\\"); - items["SamDomain"] = account.SamAccountName.Substring(0, idx); - items["SamUsername"] = account.SamAccountName.Substring(idx + 1); - } - - // name servers - PackageSettings packageSettings = PackageController.GetPackageSettings(org.PackageId, PackageSettings.NAME_SERVERS); - string[] nameServers = new string[] { }; - if (!String.IsNullOrEmpty(packageSettings["NameServers"])) - nameServers = packageSettings["NameServers"].Split(';'); - - items["NameServers"] = nameServers; - - // service settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - StringDictionary exchangeSettings = ServerController.GetServiceSettings(exchangeServiceId); - if (exchangeSettings != null) - { - items["TempDomain"] = exchangeSettings["TempDomain"]; - items["AutodiscoverIP"] = exchangeSettings["AutodiscoverIP"]; - items["AutodiscoverDomain"] = exchangeSettings["AutodiscoverDomain"]; - items["OwaUrl"] = exchangeSettings["OwaUrl"]; - items["ActiveSyncServer"] = exchangeSettings["ActiveSyncServer"]; - items["SmtpServers"] = Utils.ParseDelimitedString(exchangeSettings["SmtpServers"], '\n'); - } - - items["Email"] = emailMode; - items["Signup"] = signup; - items["PMM"] = pmm; - - // evaluate template - return PackageController.EvaluateTemplate(template, items); - } - - public static int SendMailboxSetupInstructions(int itemId, int accountId, bool signup, string to, string cc) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo); - if (accountCheck < 0) return accountCheck; - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // load user info - UserInfo user = PackageController.GetPackageOwner(org.PackageId); - - // get letter settings - UserSettings settings = UserController.GetUserSettings(user.UserId, UserSettings.EXCHANGE_MAILBOX_SETUP_LETTER); - - string from = settings["From"]; - if (cc == null) - cc = settings["CC"]; - string subject = settings["Subject"]; - string body = user.HtmlMail ? settings["HtmlBody"] : settings["TextBody"]; - bool isHtml = user.HtmlMail; - - MailPriority priority = MailPriority.Normal; - if (!String.IsNullOrEmpty(settings["Priority"])) - priority = (MailPriority)Enum.Parse(typeof(MailPriority), settings["Priority"], true); - - if (String.IsNullOrEmpty(body)) - return 0;// BusinessErrorCodes.ERROR_SETTINGS_ACCOUNT_LETTER_EMPTY_BODY; - - // load user info - if (to == null) - to = user.Email; - - subject = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, subject); - body = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, body); - - // send message - return MailHelper.SendMessage(from, to, cc, subject, body, priority, isHtml); - } - - - public static ExchangeMailbox GetMailboxPermissions(int itemId, int accountId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_PERMISSIONS"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - ExchangeMailbox mailbox = exchange.GetMailboxPermissions(org.OrganizationId, account.UserPrincipalName); - mailbox.DisplayName = account.DisplayName; - return mailbox; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "SET_MAILBOX_PERMISSIONS"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetMailboxPermissions(org.OrganizationId, account.UserPrincipalName, sendAsaccounts, fullAccessAcounts); - - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - - } - - - #endregion - - - #region Mailbox plan - public static int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "SET_MAILBOXPLAN"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // load package context - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - - int maxDiskSpace = -1; - int quotaUsed = 0; - if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_DISKSPACE) - && cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue > 0) - { - maxDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; - quotaUsed = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaUsedValue; - } - - ExchangeMailboxPlan plan = GetExchangeMailboxPlan(itemId, mailboxPlanId); - - if (maxDiskSpace != -1) - { - if (plan.MailboxSizeMB == -1) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - - ExchangeAccount exchangeAccount = GetAccount(itemId, accountId); - if (exchangeAccount.MailboxPlanId > 0) - { - ExchangeMailboxPlan oldPlan = GetExchangeMailboxPlan(itemId, exchangeAccount.MailboxPlanId); - - if (((quotaUsed - oldPlan.MailboxSizeMB) + plan.MailboxSizeMB) > (maxDiskSpace)) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - } - else - { - if ((quotaUsed + plan.MailboxSizeMB) > (maxDiskSpace)) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - } - } - - int maxRecoverableItemsSpace = -1; - int quotaRecoverableItemsUsed = 0; - if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE) - && cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue > 0) - { - maxRecoverableItemsSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue; - quotaRecoverableItemsUsed = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaUsedValue; - } - - if (maxRecoverableItemsSpace != -1) - { - if (plan.RecoverableItemsSpace == -1) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - - if ((quotaRecoverableItemsUsed + plan.RecoverableItemsSpace) > (maxRecoverableItemsSpace)) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - } - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetMailboxAdvancedSettings( - org.OrganizationId, - account.UserPrincipalName, - plan.EnablePOP, - plan.EnableIMAP, - plan.EnableOWA, - plan.EnableMAPI, - plan.EnableActiveSync, - plan.MailboxSizeMB != -1 ? (((long)plan.IssueWarningPct * (long)plan.MailboxSizeMB * 1024) / 100) : -1, - plan.MailboxSizeMB != -1 ? (((long)plan.ProhibitSendPct * (long)plan.MailboxSizeMB * 1024) / 100) : -1, - plan.MailboxSizeMB != -1 ? (((long)plan.ProhibitSendReceivePct * (long)plan.MailboxSizeMB * 1024) / 100) : -1, - plan.KeepDeletedItemsDays, - plan.MaxRecipients, - plan.MaxSendMessageSizeKB, - plan.MaxReceiveMessageSizeKB, - plan.AllowLitigationHold, - plan.RecoverableItemsSpace != -1 ? (plan.RecoverableItemsSpace * 1024) : -1, - plan.RecoverableItemsSpace != -1 ? (((long)plan.RecoverableItemsWarningPct * (long)plan.RecoverableItemsSpace * 1024) / 100) : -1, - plan.LitigationHoldUrl, - plan.LitigationHoldMsg); - - DataProvider.SetExchangeAccountMailboxPlan(accountId, mailboxPlanId); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static List GetExchangeMailboxPlans(int itemId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLANS"); - TaskManager.ItemId = itemId; - - try - { - List mailboxPlans = new List(); - - UserInfo user = ObjectUtils.FillObjectFromDataReader(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId)); - - if (user.Role == UserRole.User) - ExchangeServerController.GetExchangeMailboxPlansByUser(itemId, user, ref mailboxPlans); - else - ExchangeServerController.GetExchangeMailboxPlansByUser(0, user, ref mailboxPlans); - - - ExchangeOrganization ExchangeOrg = ObjectUtils.FillObjectFromDataReader(DataProvider.GetExchangeOrganization(itemId)); - - if (ExchangeOrg != null) - { - foreach (ExchangeMailboxPlan p in mailboxPlans) - { - p.IsDefault = (p.MailboxPlanId == ExchangeOrg.ExchangeMailboxPlanID); - } - } - - return mailboxPlans; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - private static void GetExchangeMailboxPlansByUser(int itemId, UserInfo user, ref ListmailboxPlans) - { - if ((user != null)) - { - List orgs = null; - - if (user.UserId != 1) - { - List Packages = PackageController.GetPackages(user.UserId); - - if ((Packages != null) & (Packages.Count > 0)) - { - orgs = GetExchangeOrganizationsInternal(Packages[0].PackageId, false); - } - } - else - { - orgs = 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.GetExchangeMailboxPlans(OrgId)); - - foreach (ExchangeMailboxPlan p in Plans) - { - mailboxPlans.Add(p); - } - } - - UserInfo owner = UserController.GetUserInternally(user.OwnerId); - - GetExchangeMailboxPlansByUser(0, owner, ref mailboxPlans); - } - } - - - public static ExchangeMailboxPlan GetExchangeMailboxPlan(int itemID, int mailboxPlanId) - { - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = mailboxPlanId; - - try - { - return ObjectUtils.FillObjectFromDataReader( - DataProvider.GetExchangeMailboxPlan(mailboxPlanId)); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int AddExchangeMailboxPlan(int itemID, ExchangeMailboxPlan mailboxPlan) - { - // place log record - TaskManager.StartTask("EXCHANGE", "ADD_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = itemID; - - try - { - Organization org = GetOrganization(itemID); - if (org == null) - return -1; - - // load package context - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - - if (org.PackageId > 1) - { - mailboxPlan.EnableActiveSync = mailboxPlan.EnableActiveSync & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ACTIVESYNCALLOWED].QuotaAllocatedValue); - mailboxPlan.EnableIMAP = mailboxPlan.EnableIMAP & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_IMAPALLOWED].QuotaAllocatedValue); - mailboxPlan.EnableMAPI = mailboxPlan.EnableMAPI & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_MAPIALLOWED].QuotaAllocatedValue); - mailboxPlan.EnableOWA = mailboxPlan.EnableOWA & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_OWAALLOWED].QuotaAllocatedValue); - mailboxPlan.EnablePOP = mailboxPlan.EnablePOP & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_POP3ALLOWED].QuotaAllocatedValue); - - if (cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue != -1) - if (mailboxPlan.KeepDeletedItemsDays > cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue) - mailboxPlan.KeepDeletedItemsDays = cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue; - - if (cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue != -1) - if (mailboxPlan.MailboxSizeMB > cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue) - mailboxPlan.MailboxSizeMB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; - - if (cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue != -1) - if (mailboxPlan.MaxReceiveMessageSizeKB > cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue) - mailboxPlan.MaxReceiveMessageSizeKB = cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue; - - if (cntx.Quotas[Quotas.EXCHANGE2007_MAXSENDMESSAGESIZEKB].QuotaAllocatedValue != -1) - if (mailboxPlan.MaxSendMessageSizeKB > cntx.Quotas[Quotas.EXCHANGE2007_MAXSENDMESSAGESIZEKB].QuotaAllocatedValue) - mailboxPlan.MaxSendMessageSizeKB = cntx.Quotas[Quotas.EXCHANGE2007_MAXSENDMESSAGESIZEKB].QuotaAllocatedValue; - - if (cntx.Quotas[Quotas.EXCHANGE2007_MAXRECIPIENTS].QuotaAllocatedValue != -1) - if (mailboxPlan.MaxRecipients > cntx.Quotas[Quotas.EXCHANGE2007_MAXRECIPIENTS].QuotaAllocatedValue) - mailboxPlan.MaxRecipients = cntx.Quotas[Quotas.EXCHANGE2007_MAXRECIPIENTS].QuotaAllocatedValue; - - if (Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue)) mailboxPlan.HideFromAddressBook = true; - - mailboxPlan.AllowLitigationHold = mailboxPlan.AllowLitigationHold & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD].QuotaAllocatedValue); - - if (cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue != -1) - if (mailboxPlan.RecoverableItemsSpace > cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue) - mailboxPlan.RecoverableItemsSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue; - } - - return DataProvider.AddExchangeMailboxPlan(itemID, mailboxPlan.MailboxPlan, mailboxPlan.EnableActiveSync, mailboxPlan.EnableIMAP, mailboxPlan.EnableMAPI, mailboxPlan.EnableOWA, mailboxPlan.EnablePOP, - mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients, - mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType, - mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct, - mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - - } - - - public static int UpdateExchangeMailboxPlan(int itemID, ExchangeMailboxPlan mailboxPlan) - { - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = itemID; - - try - { - Organization org = GetOrganization(itemID); - if (org == null) - return -1; - - // load package context - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - - if (org.PackageId > 1) - { - mailboxPlan.EnableActiveSync = mailboxPlan.EnableActiveSync & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ACTIVESYNCALLOWED].QuotaAllocatedValue); - mailboxPlan.EnableIMAP = mailboxPlan.EnableIMAP & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_IMAPALLOWED].QuotaAllocatedValue); - mailboxPlan.EnableMAPI = mailboxPlan.EnableMAPI & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_MAPIALLOWED].QuotaAllocatedValue); - mailboxPlan.EnableOWA = mailboxPlan.EnableOWA & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_OWAALLOWED].QuotaAllocatedValue); - mailboxPlan.EnablePOP = mailboxPlan.EnablePOP & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_POP3ALLOWED].QuotaAllocatedValue); - - if (cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue != -1) - if (mailboxPlan.KeepDeletedItemsDays > cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue) - mailboxPlan.KeepDeletedItemsDays = cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue; - - if (cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue != -1) - if (mailboxPlan.MailboxSizeMB > cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue) - mailboxPlan.MailboxSizeMB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; - - if (cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue != -1) - if (mailboxPlan.MaxReceiveMessageSizeKB > cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue) - mailboxPlan.MaxReceiveMessageSizeKB = cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue; - - if (cntx.Quotas[Quotas.EXCHANGE2007_MAXSENDMESSAGESIZEKB].QuotaAllocatedValue != -1) - if (mailboxPlan.MaxSendMessageSizeKB > cntx.Quotas[Quotas.EXCHANGE2007_MAXSENDMESSAGESIZEKB].QuotaAllocatedValue) - mailboxPlan.MaxSendMessageSizeKB = cntx.Quotas[Quotas.EXCHANGE2007_MAXSENDMESSAGESIZEKB].QuotaAllocatedValue; - - if (cntx.Quotas[Quotas.EXCHANGE2007_MAXRECIPIENTS].QuotaAllocatedValue != -1) - if (mailboxPlan.MaxRecipients > cntx.Quotas[Quotas.EXCHANGE2007_MAXRECIPIENTS].QuotaAllocatedValue) - mailboxPlan.MaxRecipients = cntx.Quotas[Quotas.EXCHANGE2007_MAXRECIPIENTS].QuotaAllocatedValue; - - if (Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue)) mailboxPlan.HideFromAddressBook = true; - - mailboxPlan.AllowLitigationHold = mailboxPlan.AllowLitigationHold & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD].QuotaAllocatedValue); - - if (cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue != -1) - if (mailboxPlan.RecoverableItemsSpace > cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue) - mailboxPlan.RecoverableItemsSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue; - - } - - DataProvider.UpdateExchangeMailboxPlan(mailboxPlan.MailboxPlanId, mailboxPlan.MailboxPlan, mailboxPlan.EnableActiveSync, mailboxPlan.EnableIMAP, mailboxPlan.EnableMAPI, mailboxPlan.EnableOWA, mailboxPlan.EnablePOP, - mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients, - mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType, - mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct, - mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - - - return 0; - } - - - - public static int DeleteExchangeMailboxPlan(int itemID, int mailboxPlanId) - { - TaskManager.StartTask("EXCHANGE", "DELETE_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = itemID; - - try - { - DataProvider.DeleteExchangeMailboxPlan(mailboxPlanId); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - - } - - public static void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) - { - TaskManager.StartTask("EXCHANGE", "SET_EXCHANGE_MAILBOXPLAN"); - TaskManager.ItemId = itemId; - - try - { - DataProvider.SetOrganizationDefaultExchangeMailboxPlan(itemId, mailboxPlanId); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - - } - - - - #endregion - - - #region Contacts - public static int CreateContact(int itemId, string displayName, string email) - { - //if (EmailAddressExists(email)) - // return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - - - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // check mailbox quota - OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); - if (orgStats.AllocatedContacts > -1 - && orgStats.CreatedContacts >= orgStats.AllocatedContacts) - return BusinessErrorCodes.ERROR_EXCHANGE_CONTACTS_QUOTA_LIMIT; - - // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_CONTACT"); - TaskManager.ItemId = itemId; - - try - { - - displayName = displayName.Trim(); - email = email.Trim(); - - // load organization - Organization org = GetOrganization(itemId); - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - string name = email; - int idx = email.IndexOf("@"); - if (idx > -1) - name = email.Substring(0, idx); - - string accountName = BuildAccountName(org.OrganizationId, name); - - // add contact - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - //Create Exchange Organization - if (string.IsNullOrEmpty(org.GlobalAddressList)) - { - ExtendToExchangeOrganization(ref org); - - PackageController.UpdatePackageItem(org); - } - - exchange.CreateContact( - org.OrganizationId, - org.DistinguishedName, - displayName, - accountName, - email, org.DefaultDomain); - - ExchangeContact contact = exchange.GetContactGeneralSettings(accountName); - - // add meta-item - int accountId = AddAccount(itemId, ExchangeAccountType.Contact, accountName, - displayName, email, false, - 0, contact.SAMAccountName, null, 0, null); - - return accountId; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int DeleteContact(int itemId, int accountId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_CONTACT"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // delete contact - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.DeleteContact(account.AccountName); - - // remove meta-item - DeleteAccount(itemId, accountId); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - private static ExchangeContact GetDemoContactSettings() - { - ExchangeContact c = new ExchangeContact(); - c.DisplayName = "WebsitePanel Support"; - c.AccountName = "wsp_fabrikam"; - c.FirstName = "WebsitePanel"; - c.LastName = "Support"; - c.EmailAddress = "support@websitepanel.net"; - c.AcceptAccounts = GetAccounts(0, ExchangeAccountType.Mailbox).ToArray(); - return c; - } - - public static ExchangeContact GetContactGeneralSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoContactSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_CONTACT_GENERAL"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - return exchange.GetContactGeneralSettings(account.AccountName); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static 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) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_CONTACT_GENERAL"); - TaskManager.ItemId = itemId; - - try - { - displayName = displayName.Trim(); - emailAddress = emailAddress.Trim(); - firstName = firstName.Trim(); - lastName = lastName.Trim(); - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetContactGeneralSettings( - account.AccountName, - displayName, - emailAddress, - hideAddressBook, - firstName, - initials, - lastName, - address, - city, - state, - zip, - country, - jobTitle, - company, - department, - office, - managerAccountName, - businessPhone, - fax, - homePhone, - mobilePhone, - pager, - webPage, - notes, - useMapiRichTextFormat, org.DefaultDomain); - - // update account - account.DisplayName = displayName; - account.PrimaryEmailAddress = emailAddress; - account.AccountPassword = null; - UpdateAccount(account); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeContact GetContactMailFlowSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoContactSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_CONTACT_MAILFLOW"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - ExchangeContact contact = exchange.GetContactMailFlowSettings(account.AccountName); - contact.DisplayName = account.DisplayName; - return contact; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetContactMailFlowSettings(int itemId, int accountId, - string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_CONTACT_MAILFLOW"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetContactMailFlowSettings(account.AccountName, - acceptAccounts, - rejectAccounts, - requireSenderAuthentication); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - #endregion - - #region Distribution Lists - public static int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // check mailbox quota - OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); - if (orgStats.AllocatedDistributionLists > -1 - && orgStats.CreatedDistributionLists >= orgStats.AllocatedDistributionLists) - return BusinessErrorCodes.ERROR_EXCHANGE_DLISTS_QUOTA_LIMIT; - - // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_DISTR_LIST"); - TaskManager.ItemId = itemId; - - try - { - displayName = displayName.Trim(); - name = name.Trim(); - domain = domain.Trim(); - - // e-mail - string email = name + "@" + domain; - - // check e-mail - if (EmailAddressExists(email)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - - // load organization - Organization org = GetOrganization(itemId); - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - string accountName = BuildAccountName(org.OrganizationId, name); - - // add account - // add contact - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - //Create Exchange Organization - if (string.IsNullOrEmpty(org.GlobalAddressList)) - { - ExtendToExchangeOrganization(ref org); - - PackageController.UpdatePackageItem(org); - } - - OrganizationUser manager = OrganizationController.GetAccount(itemId, managerId); - - List addressLists = new List(); - addressLists.Add(org.GlobalAddressList); - addressLists.Add(org.AddressList); - - exchange.CreateDistributionList( - org.OrganizationId, - org.DistinguishedName, - displayName, - accountName, - name, - domain, manager.SamAccountName, addressLists.ToArray()); - - ExchangeDistributionList dl = exchange.GetDistributionListGeneralSettings(accountName); - - // add meta-item - int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, email, - displayName, email, false, - 0, dl.SAMAccountName, null, 0, null); - - // register email address - AddAccountEmailAddress(accountId, email); - - return accountId; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int DeleteDistributionList(int itemId, int accountId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // delete mailbox - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.DeleteDistributionList(account.AccountName); - - // unregister account - DeleteAccount(itemId, accountId); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - private static ExchangeDistributionList GetDemoDistributionListSettings() - { - ExchangeDistributionList c = new ExchangeDistributionList(); - c.DisplayName = "Fabrikam Sales"; - c.AccountName = "sales_fabrikam"; - c.ManagerAccount = GetAccounts(0, ExchangeAccountType.Mailbox)[0]; - c.MembersAccounts = GetAccounts(0, ExchangeAccountType.Mailbox).ToArray(); - c.AcceptAccounts = GetAccounts(0, ExchangeAccountType.Mailbox).ToArray(); - return c; - } - - public static ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoDistributionListSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_GENERAL"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - return exchange.GetDistributionListGeneralSettings(account.AccountName); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName, - bool hideAddressBook, string managerAccount, string[] memberAccounts, - string notes) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_GENERAL"); - TaskManager.ItemId = itemId; - - try - { - displayName = displayName.Trim(); - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - List addressLists = new List(); - addressLists.Add(org.GlobalAddressList); - addressLists.Add(org.AddressList); - - exchange.SetDistributionListGeneralSettings( - account.AccountName, - displayName, - hideAddressBook, - managerAccount, - memberAccounts, - notes, - addressLists.ToArray()); - - // update account - account.DisplayName = displayName; - account.AccountPassword = null; - UpdateAccount(account); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoDistributionListSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_MAILFLOW"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - ExchangeDistributionList list = exchange.GetDistributionListMailFlowSettings(account.AccountName); - list.DisplayName = account.DisplayName; - return list; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetDistributionListMailFlowSettings(int itemId, int accountId, - string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_MAILFLOW"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - List addressLists = new List(); - addressLists.Add(org.GlobalAddressList); - addressLists.Add(org.AddressList); - - - exchange.SetDistributionListMailFlowSettings(account.AccountName, - acceptAccounts, - rejectAccounts, - requireSenderAuthentication, - addressLists.ToArray()); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_ADDRESSES"); - TaskManager.ItemId = itemId; - - try - { - return GetAccountEmailAddresses(itemId, accountId); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "ADD_DISTR_LIST_ADDRESS"); - TaskManager.ItemId = itemId; - - try - { - // check - if (EmailAddressExists(emailAddress)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // add e-mail - AddAccountEmailAddress(accountId, emailAddress); - - // update e-mail addresses - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - List addressLists = new List(); - addressLists.Add(org.GlobalAddressList); - addressLists.Add(org.AddressList); - - exchange.SetDistributionListEmailAddresses( - account.AccountName, - GetAccountSimpleEmailAddresses(itemId, accountId), addressLists.ToArray()); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_DISTR_LIST_ADDRESS"); - TaskManager.ItemId = itemId; - - try - { - // get account - ExchangeAccount account = GetAccount(itemId, accountId); - account.PrimaryEmailAddress = emailAddress; - - // update exchange - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - List addressLists = new List(); - addressLists.Add(org.GlobalAddressList); - addressLists.Add(org.AddressList); - - exchange.SetDistributionListPrimaryEmailAddress( - account.AccountName, - emailAddress, - addressLists.ToArray()); - - // save account - account.AccountPassword = null; - UpdateAccount(account); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST_ADDRESSES"); - TaskManager.ItemId = itemId; - - try - { - // get account - ExchangeAccount account = GetAccount(itemId, accountId); - - // delete e-mail addresses - List toDelete = new List(); - foreach (string emailAddress in emailAddresses) - { - if (String.Compare(account.PrimaryEmailAddress, emailAddress, true) != 0) - toDelete.Add(emailAddress); - } - - // delete from meta-base - DeleteAccountEmailAddresses(accountId, toDelete.ToArray()); - - // delete from Exchange - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // update e-mail addresses - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - List addressLists = new List(); - addressLists.Add(org.GlobalAddressList); - addressLists.Add(org.AddressList); - - exchange.SetDistributionListEmailAddresses( - account.AccountName, - GetAccountSimpleEmailAddresses(itemId, accountId), addressLists.ToArray()); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - - public static ResultObject SetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) - { - ResultObject res = TaskManager.StartResultTask("EXCHANGE", "SET_DISTRIBUTION_LIST_PERMISSINS"); - Organization org; - try - { - org = GetOrganization(itemId); - if (org == null) - throw new ApplicationException("Organization is null"); - } - catch(Exception ex) - { - TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_ORGANIZATION_BY_ITEM_ID, ex); - return res; - } - - ExchangeServer exchange; - try - { - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - } - catch(Exception ex) - { - TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_ORGANIZATION_PROXY, ex); - return res; - } - - ExchangeAccount account; - - try - { - account = GetAccount(itemId, accountId); - } - catch(Exception ex) - { - TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_ACCOUNT, ex); - return res; - } - - try - { - List addressLists = new List(); - addressLists.Add(org.GlobalAddressList); - addressLists.Add(org.AddressList); - - exchange.SetDistributionListPermissions(org.OrganizationId, account.AccountName, sendAsAccounts, - sendOnBehalfAccounts, addressLists.ToArray()); - } - catch(Exception ex) - { - TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_SET_DISTRIBUTION_LIST_PERMISSIONS, ex); - return res; - } - - TaskManager.CompleteTask(); - return res; - } - - public static ExchangeDistributionListResult GetDistributionListPermissions(int itemId, int accountId) - { - Organization org; - ExchangeDistributionListResult res = TaskManager.StartResultTask("EXCHANGE", "GET_DISTRIBUTION_LIST_RESULT"); - - try - { - org = GetOrganization(itemId); - if (org == null) - throw new ApplicationException("Organization is null"); - } - catch(Exception ex) - { - TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_ORGANIZATION_BY_ITEM_ID, ex); - return res; - } - - ExchangeServer exchange; - try - { - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - } - catch(Exception ex) - { - TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_ORGANIZATION_PROXY, ex); - return res; - } - - ExchangeAccount account; - try - { - account = GetAccount(itemId, accountId); - } - catch(Exception ex) - { - TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_ACCOUNT, ex); - return res; - } - - try - { - res.Value = exchange.GetDistributionListPermissions(org.OrganizationId, account.AccountName); - res.Value.DisplayName = account.DisplayName; - } - catch(Exception ex) - { - TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_DISTRIBUTION_LIST_PERMISSIONS, ex); - return res; - } - - TaskManager.CompleteTask(); - return res; - } - - #endregion - - #region Public Folders - public static int CreatePublicFolder(int itemId, string parentFolder, string folderName, - bool mailEnabled, string name, string domain) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // check mailbox quota - OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); - if (orgStats.AllocatedPublicFolders > -1 - && orgStats.CreatedPublicFolders >= orgStats.AllocatedPublicFolders) - return BusinessErrorCodes.ERROR_EXCHANGE_PFOLDERS_QUOTA_LIMIT; - - // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_PUBLIC_FOLDER"); - TaskManager.ItemId = itemId; - - try - { - // e-mail - string email = ""; - if (mailEnabled && !String.IsNullOrEmpty(name)) - { - email = name + "@" + domain; - - // check e-mail - if (EmailAddressExists(email)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - } - - // full folder name - string normParent = parentFolder; - if (!normParent.StartsWith("\\")) - normParent = "\\" + normParent; - if (!normParent.EndsWith("\\")) - normParent = normParent + "\\"; - - string folderPath = normParent + folderName; - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - if (String.IsNullOrEmpty(name)) - name = Utils.CleanIdentifier(folderName); - - string accountName = BuildAccountName(org.OrganizationId, name); - - // add mailbox - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - //Create Exchange Organization - if (string.IsNullOrEmpty(org.GlobalAddressList)) - { - ExtendToExchangeOrganization(ref org); - - PackageController.UpdatePackageItem(org); - } - - exchange.CreatePublicFolder(org.DistinguishedName, - org.OrganizationId, - org.SecurityGroup, - parentFolder, - folderName, - mailEnabled, - accountName, - name, - domain); - - - ExchangePublicFolder folder = exchange.GetPublicFolderGeneralSettings(org.OrganizationId, parentFolder + "\\" + folderName); - - // add meta-item - int accountId = AddAccount(itemId, ExchangeAccountType.PublicFolder, accountName, - folderPath, email, mailEnabled, - 0, folder.NETBIOS+"\\"+accountName, null, 0, null); - - // register email address - if(mailEnabled) - AddAccountEmailAddress(accountId, email); - - return accountId; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int DeletePublicFolders(int itemId, int[] accountIds) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - if (accountIds != null) - foreach (int accountId in accountIds) - { - int result = DeletePublicFolder(itemId, accountId); - if (result < 0) - return result; - } - return 0; - } - - public static int DeletePublicFolder(int itemId, int accountId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_PUBLIC_FOLDER"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // delete folder - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.DeletePublicFolder(org.OrganizationId, account.DisplayName); - - // unregister account - DeleteAccount(itemId, accountId); - - // delete all nested folder meta-items - List folders = GetAccounts(itemId, ExchangeAccountType.PublicFolder); - foreach (ExchangeAccount folder in folders) - { - if (folder.DisplayName.ToLower().StartsWith(account.DisplayName.ToLower() + "\\")) - DeleteAccount(itemId, folder.AccountId); - } - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int EnableMailPublicFolder(int itemId, int accountId, - string name, string domain) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "ENABLE_MAIL_PUBLIC_FOLDER"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - if (account.MailEnabledPublicFolder) - return 0; - - // check email - string email = name + "@" + domain; - - // check e-mail - if (EmailAddressExists(email)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - - string accountName = BuildAccountName(org.OrganizationId, name); - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.EnableMailPublicFolder( - org.OrganizationId, - account.DisplayName, - account.AccountName, - name, - domain); - - // update and save account - account.AccountName = accountName; - account.MailEnabledPublicFolder = true; - account.PrimaryEmailAddress = email; - account.AccountPassword = null; - UpdateAccount(account); - - // register e-mail - AddAccountEmailAddress(accountId, email); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int DisableMailPublicFolder(int itemId, int accountId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DISABLE_MAIL_PUBLIC_FOLDER"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - if (!account.MailEnabledPublicFolder) - return 0; - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.DisableMailPublicFolder(org.OrganizationId, account.DisplayName); - - - // update and save account - account.MailEnabledPublicFolder = false; - account.PrimaryEmailAddress = ""; - account.AccountPassword = null; - UpdateAccount(account); - - - // delete all mail accounts - List addrs = new List(); - ExchangeEmailAddress[] emails = GetAccountEmailAddresses(itemId, accountId); - foreach (ExchangeEmailAddress email in emails) - addrs.Add(email.EmailAddress); - - DeleteAccountEmailAddresses(accountId, addrs.ToArray()); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - private static ExchangePublicFolder GetDemoPublicFolderSettings() - { - ExchangePublicFolder c = new ExchangePublicFolder(); - c.DisplayName = "\\fabrikam\\Documents"; - c.MailEnabled = true; - c.Name = "Documents"; - c.Accounts = GetAccounts(0, ExchangeAccountType.Mailbox).ToArray(); - c.AcceptAccounts = GetAccounts(0, ExchangeAccountType.Mailbox).ToArray(); - return c; - } - - public static ExchangePublicFolder GetPublicFolderGeneralSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoPublicFolderSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_PUBLIC_FOLDER_GENERAL"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - ExchangePublicFolder folder = exchange.GetPublicFolderGeneralSettings(org.OrganizationId, account.DisplayName); - folder.MailEnabled = account.MailEnabledPublicFolder; - folder.DisplayName = account.DisplayName; - return folder; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, - bool hideAddressBook, ExchangeAccount[] accounts) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_PUBLIC_FOLDER_GENERAL"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetPublicFolderGeneralSettings( - org.OrganizationId, - account.DisplayName, - newName, - hideAddressBook, - accounts - ); - - // update folder name - string origName = account.DisplayName; - string newFullName = origName.Substring(0, origName.LastIndexOf("\\") + 1) + newName; - - if (String.Compare(origName, newFullName, true) != 0) - { - // rename original folder - account.DisplayName = newFullName; - account.AccountPassword = null; - UpdateAccount(account); - - // rename nested folders - List folders = GetAccounts(itemId, ExchangeAccountType.PublicFolder); - foreach (ExchangeAccount folder in folders) - { - if (folder.DisplayName.ToLower().StartsWith(origName.ToLower() + "\\")) - { - folder.DisplayName = newFullName + folder.DisplayName.Substring(origName.Length); - UpdateAccount(folder); - } - } - } - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangePublicFolder GetPublicFolderMailFlowSettings(int itemId, int accountId) - { - #region Demo Mode - if (IsDemoMode) - { - return GetDemoPublicFolderSettings(); - } - #endregion - - // place log record - TaskManager.StartTask("EXCHANGE", "GET_PUBLIC_FOLDER_MAILFLOW"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - ExchangePublicFolder folder = exchange.GetPublicFolderMailFlowSettings(org.OrganizationId, account.DisplayName); - folder.DisplayName = account.DisplayName; - return folder; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetPublicFolderMailFlowSettings(int itemId, int accountId, - string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_PUBLIC_FOLDER_MAILFLOW"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetPublicFolderMailFlowSettings(org.OrganizationId, account.DisplayName, - acceptAccounts, - rejectAccounts, - requireSenderAuthentication); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeEmailAddress[] GetPublicFolderEmailAddresses(int itemId, int accountId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "GET_PUBLIC_FOLDER_ADDRESSES"); - TaskManager.ItemId = itemId; - - try - { - return GetAccountEmailAddresses(itemId, accountId); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int AddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "ADD_PUBLIC_FOLDER_ADDRESS"); - TaskManager.ItemId = itemId; - - try - { - // check - if (EmailAddressExists(emailAddress)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // add e-mail - AddAccountEmailAddress(accountId, emailAddress); - - // update e-mail addresses - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetPublicFolderEmailAddresses( - org.OrganizationId, - account.DisplayName, - GetAccountSimpleEmailAddresses(itemId, accountId)); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int SetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_PUBLIC_FOLDER_ADDRESS"); - TaskManager.ItemId = itemId; - - try - { - // get account - ExchangeAccount account = GetAccount(itemId, accountId); - account.PrimaryEmailAddress = emailAddress; - - // update exchange - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetPublicFolderPrimaryEmailAddress( - org.OrganizationId, - account.DisplayName, - emailAddress); - - // save account - account.AccountPassword = null; - UpdateAccount(account); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static int DeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_PUBLIC_FOLDER_ADDRESSES"); - TaskManager.ItemId = itemId; - - try - { - // get account - ExchangeAccount account = GetAccount(itemId, accountId); - - // delete e-mail addresses - List toDelete = new List(); - foreach (string emailAddress in emailAddresses) - { - if (String.Compare(account.PrimaryEmailAddress, emailAddress, true) != 0) - toDelete.Add(emailAddress); - } - - // delete from meta-base - DeleteAccountEmailAddresses(accountId, toDelete.ToArray()); - - // delete from Exchange - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // update e-mail addresses - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetPublicFolderEmailAddresses( - org.OrganizationId, - account.DisplayName, - GetAccountSimpleEmailAddresses(itemId, accountId)); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - #endregion - - #region Private Helpers - - - private static string GetPrimaryDomainController(int organizationServiceId) - { - - Organizations orgProxy = new Organizations(); - - ServiceProviderProxy.Init(orgProxy, organizationServiceId); - - string[] organizationSettings = orgProxy.ServiceProviderSettingsSoapHeaderValue.Settings; - - - - string orgPrimaryDomainController = string.Empty; - foreach (string str in organizationSettings) - { - string[] props = str.Split('='); - if (props[0].ToLower() == "primarydomaincontroller") - { - orgPrimaryDomainController = str; - break; - } - } - - return orgPrimaryDomainController; - } - - private static void ExtendExchangeSettings(List exchangeSettings, string primaryDomainController) - { - bool isAdded = false; - for (int i = 0; i < exchangeSettings.Count; i++) - { - string[] props = exchangeSettings[i].Split('='); - if (props[0].ToLower() == "primarydomaincontroller") - { - exchangeSettings[i] = primaryDomainController; - isAdded = true; - break; - } - } - - if (!isAdded) - { - exchangeSettings.Add(primaryDomainController); - } - } - - internal static ServiceProvider GetServiceProvider(int exchangeServiceId, int organizationServiceId) - { - ServiceProvider ws = new ServiceProvider(); - - ServiceProviderProxy.Init(ws, exchangeServiceId); - - string[] exchangeSettings = ws.ServiceProviderSettingsSoapHeaderValue.Settings; - - List resSettings = new List(exchangeSettings); - - string orgPrimaryDomainController = GetPrimaryDomainController(organizationServiceId); - - ExtendExchangeSettings(resSettings, orgPrimaryDomainController); - ws.ServiceProviderSettingsSoapHeaderValue.Settings = resSettings.ToArray(); - return ws; - } - - internal static ExchangeServer GetExchangeServer(int exchangeServiceId, int organizationServiceId) - { - ExchangeServer ws = new ExchangeServer(); - - ServiceProviderProxy.Init(ws, exchangeServiceId); - - string []exchangeSettings = ws.ServiceProviderSettingsSoapHeaderValue.Settings; - - List resSettings = new List(exchangeSettings); - - string orgPrimaryDomainController = GetPrimaryDomainController(organizationServiceId); - - ExtendExchangeSettings(resSettings, orgPrimaryDomainController); - ws.ServiceProviderSettingsSoapHeaderValue.Settings = resSettings.ToArray(); - return ws; - } - - internal static ServiceProvider GetExchangeServiceProvider(int exchangeServiceId, int organizationServiceId) - { - ServiceProvider ws = new ServiceProvider(); - - ServiceProviderProxy.Init(ws, exchangeServiceId); - - string[] exchangeSettings = ws.ServiceProviderSettingsSoapHeaderValue.Settings; - - List resSettings = new List(exchangeSettings); - - string orgPrimaryDomainController = GetPrimaryDomainController(organizationServiceId); - - ExtendExchangeSettings(resSettings, orgPrimaryDomainController); - ws.ServiceProviderSettingsSoapHeaderValue.Settings = resSettings.ToArray(); - return ws; - } - - - private static int GetExchangeServiceID(int packageId) - { - return PackageController.GetPackageServiceId(packageId, ResourceGroups.Exchange); - } - - private static string[] GetAccountSimpleEmailAddresses(int itemId, int accountId) - { - ExchangeEmailAddress[] emails = GetAccountEmailAddresses(itemId, accountId); - List result = new List(); - foreach (ExchangeEmailAddress email in emails) - { - string prefix = email.IsPrimary ? "SMTP:" : "smtp:"; - result.Add(prefix + email.EmailAddress); - } - - return result.ToArray(); - } - - private static bool QuotaEnabled(PackageContext cntx, string quotaName) - { - return cntx.Quotas.ContainsKey(quotaName) && !cntx.Quotas[quotaName].QuotaExhausted; - } - - private static bool IsDemoMode - { - get - { - return (SecurityContext.CheckAccount(DemandAccount.NotDemo) < 0); - } - } - #endregion - - public static ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "GET_MOBILE_DEVICES"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - return exchange.GetMobileDevices(account.UserPrincipalName); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "GET_MOBILE_DEVICE"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return null; - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - return exchange.GetMobileDevice(deviceId); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static void WipeDataFromDevice(int itemId, string deviceId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "WIPE_DATA_FROM_DEVICE"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return; - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.WipeDataFromDevice(deviceId); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static void CancelRemoteWipeRequest(int itemId, string deviceId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "CANCEL_REMOTE_WIPE_REQUEST"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return; - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.CancelRemoteWipeRequest(deviceId); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static void RemoveDevice(int itemId, string deviceId) - { - // place log record - TaskManager.StartTask("EXCHANGE", "REMOVE_DEVICE"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return; - - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.RemoveDevice(deviceId); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - 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"); - TaskManager.ItemId = 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"); - TaskManager.ItemId = 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"); - TaskManager.ItemId = 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"); - TaskManager.ItemId = 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"); - TaskManager.ItemId = 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"); - TaskManager.ItemId = 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"); - TaskManager.ItemId = AccountID; - - try - { - return DataProvider.GetExchangeAccountDisclaimerId(AccountID); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - - } - - } -} From 825f060016c4c7a082082873410297f864186de6 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Wed, 26 Jun 2013 11:26:43 -0400 Subject: [PATCH 06/16] Added tag build-2.1.0.124 for changeset 51a5a0e72f8e From ba4ad171d22d3460cc6c2c3e591a3187a753c541 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 27 Jun 2013 17:08:52 -0400 Subject: [PATCH 07/16] Added tag build-2.1.0.126 for changeset d8433acd5b3d From 8cd48e8ab3141ae27ed16d1c67ed4cc657afe03e Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 27 Jun 2013 17:37:50 -0400 Subject: [PATCH 08/16] Added tag build-2.1.0.127 for changeset 448d9e081867 From c0d0fe371f4ffc2f7e3e7c33df97e2d7d3c3906e Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 27 Jun 2013 17:57:19 -0400 Subject: [PATCH 09/16] Update Copyright on files --- WebsitePanel.Installer/Sources/VersionInfo.cs | 28 +++++++++++++++++ .../CustomAction.cs | 30 ++++++++++++++++++- .../Properties/AssemblyInfo.cs | 30 ++++++++++++++++++- WebsitePanel/Sources/VersionInfo.cs | 28 +++++++++++++++++ WebsitePanel/Sources/VersionInfo.vb | 28 +++++++++++++++++ .../ExchangeServerProxy.cs | 28 +++++++++++++++++ .../Common/IPAddress.cs | 30 ++++++++++++++++++- .../Common/Int128.cs | 30 ++++++++++++++++++- .../Properties/AssemblyInfo.cs | 30 ++++++++++++++++++- .../CreateAsyncVMfromVM.cs | 30 ++++++++++++++++++- .../HostedSolution/ExchangeDisclaimer.cs | 30 ++++++++++++++++++- .../WebsitePanel.SchedulerService/Program.cs | 30 ++++++++++++++++++- .../Properties/AssemblyInfo.cs | 30 ++++++++++++++++++- .../SchedulerService.Designer.cs | 30 ++++++++++++++++++- .../SchedulerService.cs | 30 ++++++++++++++++++- .../SchedulerServiceInstaller.cs | 30 ++++++++++++++++++- .../ExchangeServerProxy.cs | 28 +++++++++++++++++ ...DisclaimerGeneralSettings.ascx.designer.cs | 28 +++++++++++++++++ .../ExchangeDisclaimers.ascx.designer.cs | 28 +++++++++++++++++ ...ngeMailboxGeneralSettings.ascx.designer.cs | 28 +++++++++++++++++ .../WebsitePanel/Schedules.ascx.designer.cs | 28 +++++++++++++++++ .../WebsitePanel/Tasks.ascx.designer.cs | 28 +++++++++++++++++ 22 files changed, 628 insertions(+), 12 deletions(-) diff --git a/WebsitePanel.Installer/Sources/VersionInfo.cs b/WebsitePanel.Installer/Sources/VersionInfo.cs index aa59da61..9ec60861 100644 --- a/WebsitePanel.Installer/Sources/VersionInfo.cs +++ b/WebsitePanel.Installer/Sources/VersionInfo.cs @@ -1,3 +1,31 @@ +// 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. diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.cs b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.cs index 9dbf7fc3..f5655efd 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/CustomAction.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.Configuration.Install; using System.Data; using System.Data.SqlClient; diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/Properties/AssemblyInfo.cs b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/Properties/AssemblyInfo.cs index 222e3d9d..78fe3faf 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/Properties/AssemblyInfo.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.SchedulerServiceInstaller/Properties/AssemblyInfo.cs @@ -1,4 +1,32 @@ -using System.Reflection; +// 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; diff --git a/WebsitePanel/Sources/VersionInfo.cs b/WebsitePanel/Sources/VersionInfo.cs index aa59da61..9ec60861 100644 --- a/WebsitePanel/Sources/VersionInfo.cs +++ b/WebsitePanel/Sources/VersionInfo.cs @@ -1,3 +1,31 @@ +// 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. diff --git a/WebsitePanel/Sources/VersionInfo.vb b/WebsitePanel/Sources/VersionInfo.vb index ca84ccc9..b9674aab 100644 --- a/WebsitePanel/Sources/VersionInfo.vb +++ b/WebsitePanel/Sources/VersionInfo.vb @@ -1,3 +1,31 @@ +// 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. diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs index 6465e74f..71295d4e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs @@ -1,3 +1,31 @@ +// 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. diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Common/IPAddress.cs b/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 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/Properties/AssemblyInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Properties/AssemblyInfo.cs index 3fd65c77..f6d2b5d9 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Properties/AssemblyInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Properties/AssemblyInfo.cs @@ -1,4 +1,32 @@ -using System.Reflection; +// 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; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/VirtualizationForPrivateCloud/CreateAsyncVMfromVM.cs b/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.Providers.Base/HostedSolution/ExchangeDisclaimer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDisclaimer.cs index 58685a99..dab00abc 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDisclaimer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDisclaimer.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.Text; diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/Program.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/Program.cs index 7c991ea1..f646790c 100644 --- a/WebsitePanel/Sources/WebsitePanel.SchedulerService/Program.cs +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/Program.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.ServiceProcess; diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/Properties/AssemblyInfo.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/Properties/AssemblyInfo.cs index 7f591157..a8507d4f 100644 --- a/WebsitePanel/Sources/WebsitePanel.SchedulerService/Properties/AssemblyInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/Properties/AssemblyInfo.cs @@ -1,4 +1,32 @@ -using System.Reflection; +// 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; diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.Designer.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.Designer.cs index edc238f6..bc7321d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.Designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.Designer.cs @@ -1,4 +1,32 @@ -namespace WebsitePanel.SchedulerService +// 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 { diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.cs index d5407d1c..5e82a911 100644 --- a/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.cs +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerService.cs @@ -1,4 +1,32 @@ -using System.ServiceProcess; +// 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; diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerServiceInstaller.cs b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerServiceInstaller.cs index 3bbafcff..6b3d1320 100644 --- a/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerServiceInstaller.cs +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/SchedulerServiceInstaller.cs @@ -1,4 +1,32 @@ -using System.ComponentModel; +// 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; diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs index d7ff1985..37fc060b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs @@ -1,3 +1,31 @@ +// 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. 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 index ae7b517f..1e599b49 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs @@ -1,3 +1,31 @@ +// 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. 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 index 5c3bbd9e..1bc66c57 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.designer.cs @@ -1,3 +1,31 @@ +// 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. 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 3cbfa50e..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 @@ -1,3 +1,31 @@ +// 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. 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 f7cffb9e..aaf0e874 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx.designer.cs @@ -1,3 +1,31 @@ +// 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. 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 b4454382..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,3 +1,31 @@ +// 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. From 7681ee58488d39c9aab2c2dd085d4cdef885721a Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 27 Jun 2013 18:07:32 -0400 Subject: [PATCH 10/16] Added tag build-2.1.0.128 for changeset 34a6b8705014 From a1ed8f9d4634037bf267d9182890972008cde3e8 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 27 Jun 2013 18:13:31 -0400 Subject: [PATCH 11/16] Upload Scheduler Service Automatically during build --- WebsitePanel/build.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/build.xml b/WebsitePanel/build.xml index 82ecea07..4760d0c3 100644 --- a/WebsitePanel/build.xml +++ b/WebsitePanel/build.xml @@ -758,9 +758,10 @@ - + + From 02a2fa50b9f23747377b64f04f946e9832ace5d9 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 27 Jun 2013 18:28:00 -0400 Subject: [PATCH 12/16] Added tag build-2.1.0.129 for changeset aaf510b52e7c From efa7af35a13d62b070db86089eeedbac0c790209 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Tue, 16 Jul 2013 17:45:52 +0300 Subject: [PATCH 13/16] Installation of scheduler service added into enterprise server installer --- .../Sources/Setup.SchedulerService/Config.wxi | 2 +- .../Actions/EntServerActionManager.cs | 99 ++++++++++++++++++- .../WebsitePanel.Setup/Common/Global.cs | 4 +- .../Wizard/UninstallPage.cs | 9 +- .../WebsitePanel.SchedulerService.csproj | 2 +- WebsitePanel/build.xml | 21 +--- 6 files changed, 112 insertions(+), 25 deletions(-) diff --git a/WebsitePanel.Installer/Sources/Setup.SchedulerService/Config.wxi b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Config.wxi index 8265cb6f..9883f33b 100644 --- a/WebsitePanel.Installer/Sources/Setup.SchedulerService/Config.wxi +++ b/WebsitePanel.Installer/Sources/Setup.SchedulerService/Config.wxi @@ -1,6 +1,6 @@ - + diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs index 51032a44..b0e7673a 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs @@ -100,7 +100,75 @@ namespace WebsitePanel.Setup.Actions throw; } } - } + } + + 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 { @@ -350,6 +418,31 @@ namespace WebsitePanel.Setup.Actions Log.WriteEnd(String.Format("Updated {0} file", vars.ConfigurationFile)); } } + + 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 SaveEntServerConfigSettingsAction : Action, IInstallAction { @@ -393,7 +486,9 @@ namespace WebsitePanel.Setup.Actions new UpdateServeradminPasswAction(), new SaveAspNetDbConnectionStringAction(), new SaveComponentConfigSettingsAction(), - new SaveEntServerConfigSettingsAction() + new SaveEntServerConfigSettingsAction(), + new SaveSchedulerServiceConnectionStringAction(), + 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 819105d6..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/Wizard/UninstallPage.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs index cd65881d..08a97db0 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs @@ -288,7 +288,14 @@ namespace WebsitePanel.Setup action.Description = "Removing Windows service..."; action.Log = string.Format("- Remove {0} Windows service", serviceName); 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/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj b/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj index a1501bfa..58dc6bdb 100644 --- a/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj @@ -36,7 +36,7 @@ true - bin\ + ..\WebsitePanel.EnterpriseServer\bin\ DEBUG;TRACE full AnyCPU diff --git a/WebsitePanel/build.xml b/WebsitePanel/build.xml index 4760d0c3..c42ca019 100644 --- a/WebsitePanel/build.xml +++ b/WebsitePanel/build.xml @@ -164,25 +164,7 @@ - - - - - - - - - - - - - - - - - - - + @@ -395,6 +377,7 @@ + From 8d9e46969ac6168d0ce9d4289df0e0e1dcd9c79a Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Thu, 18 Jul 2013 10:46:59 +0300 Subject: [PATCH 14/16] Fixing deploy issue --- .../WebsitePanel.SchedulerService.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj b/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj index 58dc6bdb..475ed6fe 100644 --- a/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj +++ b/WebsitePanel/Sources/WebsitePanel.SchedulerService/WebsitePanel.SchedulerService.csproj @@ -44,7 +44,7 @@ MinimumRecommendedRules.ruleset - bin\ + ..\WebsitePanel.EnterpriseServer\bin\ TRACE true pdbonly From ec1ad64b9dc4fa5027b049566395db06257d7cfc Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Thu, 18 Jul 2013 11:41:25 +0300 Subject: [PATCH 15/16] Fixing deploy issue --- .../Actions/EntServerActionManager.cs | 62 +++++++++++++++++++ WebsitePanel/build.xml | 6 +- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs index b0e7673a..f1d608b8 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs @@ -33,6 +33,7 @@ using System.Linq; using System.ServiceProcess; using System.Text; using System.IO; +using System.Text.RegularExpressions; using System.Xml; namespace WebsitePanel.Setup.Actions @@ -443,6 +444,66 @@ namespace WebsitePanel.Setup.Actions 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 { @@ -488,6 +549,7 @@ namespace WebsitePanel.Setup.Actions new SaveComponentConfigSettingsAction(), new SaveEntServerConfigSettingsAction(), new SaveSchedulerServiceConnectionStringAction(), + new SaveSchedulerServiceCryptoKeyAction(), new InstallSchedulerServiceAction() }; diff --git a/WebsitePanel/build.xml b/WebsitePanel/build.xml index c42ca019..6f1125bf 100644 --- a/WebsitePanel/build.xml +++ b/WebsitePanel/build.xml @@ -306,10 +306,7 @@ - - - - + @@ -378,6 +375,7 @@ + From 9a566507eaeabfa9f717a5d82b8abc7a700c2447 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 18 Jul 2013 12:46:55 -0400 Subject: [PATCH 16/16] Added tag build-2.1.0.130 for changeset 74df5956733c