// Token: 0x06000F80 RID: 3968 RVA: 0x0005BDBA File Offset: 0x00059FBA
 public SplitQuotaVerifier(IPublicFolderSession publicFolderSession, IPublicFolderMailboxLoggerBase logger, IAssistantRunspaceFactory powershellFactory)
 {
     this.publicFolderSession = publicFolderSession;
     this.logger            = logger;
     this.powershellFactory = powershellFactory;
 }
Beispiel #2
0
 // Token: 0x06000E94 RID: 3732 RVA: 0x00057748 File Offset: 0x00055948
 internal IdentifyTargetMailboxOperation(IPublicFolderSplitState splitState, IPublicFolderSession publicFolderSession, IPublicFolderMailboxLoggerBase logger, IAssistantRunspaceFactory powershellFactory) : base(IdentifyTargetMailboxOperation.OperationName, publicFolderSession, splitState, logger, powershellFactory, splitState.IdentifyTargetMailboxState, SplitProgressState.IdentifyTargetMailboxStarted, SplitProgressState.IdentifyTargetMailboxCompleted)
 {
 }
 // Token: 0x06000F5C RID: 3932 RVA: 0x0005B6FC File Offset: 0x000598FC
 internal PrepareTargetMailboxOperation(IPublicFolderSplitState splitState, IPublicFolderSession publicFolderSession, IPublicFolderMailboxLoggerBase logger, IAssistantRunspaceFactory powershellFactory, IXSOFactory xsoFactory) : base(PrepareTargetMailboxOperation.OperationName, publicFolderSession, splitState, logger, powershellFactory, splitState.PrepareTargetMailboxState, SplitProgressState.PrepareTargetMailboxStarted, SplitProgressState.PrepareTargetMailboxCompleted)
 {
     this.xsoFactory = xsoFactory;
 }
Beispiel #4
0
 // Token: 0x06000F79 RID: 3961 RVA: 0x0005BAC0 File Offset: 0x00059CC0
 internal PrepareSplitPlanOperation(IPublicFolderSplitState splitState, IPublicFolderSession session, IPublicFolderMailboxLoggerBase logger, IAssistantRunspaceFactory powershellFactory, string splitScriptPath) : base(PrepareSplitPlanOperation.OperationName, session, splitState, logger, powershellFactory, splitState.PrepareSplitPlanState, SplitProgressState.PrepareSplitPlanStarted, SplitProgressState.PrepareSplitPlanCompleted)
 {
     this.splitPlanScriptPath = splitScriptPath;
 }
Beispiel #5
0
 // Token: 0x06000E8B RID: 3723 RVA: 0x00057438 File Offset: 0x00055638
 internal SplitOperationBase(string name, IPublicFolderSession publicFolderSession, IPublicFolderSplitState splitState, IPublicFolderMailboxLoggerBase logger, IAssistantRunspaceFactory powershellFactory, ISplitOperationState splitOperationState, SplitProgressState startState, SplitProgressState completionState)
 {
     this.name = name;
     this.publicFolderSession = publicFolderSession;
     this.splitState          = splitState;
     this.logger              = logger;
     this.powershellFactory   = powershellFactory;
     this.startState          = startState;
     this.completionState     = completionState;
     this.splitOperationState = splitOperationState;
 }
 // Token: 0x06000F29 RID: 3881 RVA: 0x0005A7F9 File Offset: 0x000589F9
 internal PublicFolderSplitProcessor(IPublicFolderSession publicFolderSession, ITracer tracer, IXSOFactory xsoFactory, ISplitQuotaVerifier quotaVerifier, IPublicFolderMailboxLoggerBase logger, IPublicFolderMailboxLoggerBase completionLogger, ISplitStateAdapter adapter, ISplitOperationFactory operationFactory, IAssistantRunspaceFactory powershellFactory) : this(publicFolderSession, tracer, xsoFactory, logger, completionLogger, powershellFactory)
 {
     this.splitStateAdapter = adapter;
     this.quotaVerifier     = quotaVerifier;
     this.operationFactory  = operationFactory;
 }
 // Token: 0x06000F2A RID: 3882 RVA: 0x0005A822 File Offset: 0x00058A22
 private PublicFolderSplitProcessor(IPublicFolderSession publicFolderSession, ITracer tracer, IXSOFactory xsoFactory, IPublicFolderMailboxLoggerBase logger, IPublicFolderMailboxLoggerBase completionLogger, IAssistantRunspaceFactory powershellFactory) : base(publicFolderSession, tracer)
 {
     this.disposeTracker    = this.GetDisposeTracker();
     this.logger            = logger;
     this.completionLogger  = completionLogger;
     this.xsoFactory        = xsoFactory;
     this.powershellFactory = powershellFactory;
 }
 // Token: 0x06000F28 RID: 3880 RVA: 0x0005A78C File Offset: 0x0005898C
 internal PublicFolderSplitProcessor(IPublicFolderSession publicFolderSession, ITracer tracer, IPublicFolderMailboxLoggerBase logger, IPublicFolderMailboxLoggerBase completionLogger, IAssistantRunspaceFactory powershellFactory) : this(publicFolderSession, tracer, new XSOFactory(), logger, completionLogger, powershellFactory)
 {
     this.quotaVerifier     = new SplitQuotaVerifier(publicFolderSession, this.logger, this.powershellFactory);
     this.operationFactory  = new SplitOperationFactory(publicFolderSession, this.logger, this.powershellFactory, this.xsoFactory);
     this.splitStateAdapter = new SplitStateAdapter(publicFolderSession, this.xsoFactory, this.logger);
 }
 // Token: 0x06000F62 RID: 3938 RVA: 0x0005B979 File Offset: 0x00059B79
 public SplitOperationFactory(IPublicFolderSession publicFolderSession, IPublicFolderMailboxLoggerBase logger, IAssistantRunspaceFactory powershellFactory, IXSOFactory xsoFactory)
 {
     this.publicFolderSession = publicFolderSession;
     this.logger            = logger;
     this.powershellFactory = powershellFactory;
     this.xsoFactory        = xsoFactory;
 }
Beispiel #10
0
        // Token: 0x06000F17 RID: 3863 RVA: 0x0005A154 File Offset: 0x00058354
        public static Unlimited <ByteQuantifiedSize> GetMailboxQuota(IPublicFolderMailboxLoggerBase logger, IAssistantRunspaceFactory powershellFactory, Guid mailboxGuid, OrganizationId organizationId, ISplitOperationState splitOperationState)
        {
            ADObjectId mailboxDatabase                  = null;
            bool       useDatabaseQuotaDefaults         = false;
            Unlimited <ByteQuantifiedSize> mailboxQuota = Unlimited <ByteQuantifiedSize> .UnlimitedValue;
            string    value     = string.Format("{0}\\{1}", organizationId.OrganizationalUnit.Name, mailboxGuid.ToString());
            PSCommand psCommand = new PSCommand();

            psCommand.AddCommand("Get-Mailbox");
            psCommand.AddParameter("PublicFolder");
            psCommand.AddParameter("Identity", value);
            Mailbox publicFolderMailbox = null;

            PublicFolderSplitHelper.PowerShellExceptionHandler(delegate(out string originOfException, out ErrorRecord error)
            {
                error             = null;
                originOfException = "GetMailboxQuota - RunPSCommand: Get-Mailbox -PublicFolder";
                IAssistantRunspaceProxy assistantRunspaceProxy = powershellFactory.CreateRunspaceForDatacenterAdmin(organizationId);
                publicFolderMailbox = assistantRunspaceProxy.RunPSCommand <Mailbox>(psCommand, out error, logger);
                if (error == null)
                {
                    mailboxQuota                    = publicFolderMailbox.ProhibitSendQuota;
                    useDatabaseQuotaDefaults        = (publicFolderMailbox.UseDatabaseQuotaDefaults ?? false);
                    MailboxDatabase mailboxDatabase = publicFolderMailbox.Database;
                    if (useDatabaseQuotaDefaults && mailboxDatabase != null)
                    {
                        psCommand.Clear();
                        psCommand.AddCommand("Get-MailboxDatabase");
                        psCommand.AddParameter("Identity", mailboxDatabase.Name);
                        originOfException = "GetMailboxQuota - RunPSCommand: Get-MailboxDatabase";
                        mailboxDatabase   = assistantRunspaceProxy.RunPSCommand <MailboxDatabase>(psCommand, out error, logger);
                        if (error == null)
                        {
                            mailboxQuota = mailboxDatabase.ProhibitSendQuota;
                        }
                    }
                }
            }, splitOperationState);
            return(mailboxQuota);
        }
Beispiel #11
0
        // Token: 0x06000F16 RID: 3862 RVA: 0x00059F68 File Offset: 0x00058168
        public static Unlimited <ByteQuantifiedSize> GetActualItemSize(IPublicFolderMailboxLoggerBase logger, IAssistantRunspaceFactory powershellFactory, Guid mailboxGuid, OrganizationId organizationId, ISplitOperationState splitOperationState)
        {
            Unlimited <ByteQuantifiedSize> actualItemSize  = ByteQuantifiedSize.Zero;
            Collection <PSObject>          output          = null;
            Collection <ErrorRecord>       errors          = null;
            Dictionary <string, string>    paramDictionary = new Dictionary <string, string>
            {
                {
                    "Mailbox",
                    mailboxGuid.ToString()
                },
                {
                    "Organization",
                    organizationId.OrganizationalUnit.Name
                }
            };
            string text = Path.Combine(ExchangeSetupContext.InstallPath, "Scripts");

            if (string.IsNullOrEmpty(text))
            {
                throw new SplitProcessorException("PublicFolderSplitHelper::GetActualItemSize - GetExchangeScriptsPath", new Exception("ExchangeScriptsPath is null or empty"));
            }
            string scriptFullPath = Path.Combine(text, "Get-PublicFolderMailboxSize.ps1");

            PublicFolderSplitHelper.PowerShellExceptionHandler(delegate(out string originOfException, out ErrorRecord error)
            {
                error             = null;
                originOfException = "GetActualItemSize - RunPowershellScript Get-PublicFolderMailboxSize.ps1";
                IAssistantRunspaceProxy assistantRunspaceProxy = powershellFactory.CreateRunspaceForDatacenterAdmin(organizationId);
                output = assistantRunspaceProxy.RunPowershellScript(scriptFullPath, paramDictionary, out errors, logger);
                if (errors == null && output != null && output.Count > 0)
                {
                    actualItemSize = (ByteQuantifiedSize)output[0].BaseObject;
                    return;
                }
                error = errors[0];
            }, splitOperationState);
            return(actualItemSize);
        }
Beispiel #12
0
        // Token: 0x06000F15 RID: 3861 RVA: 0x00059E04 File Offset: 0x00058004
        public static Unlimited <ByteQuantifiedSize> GetTotalItemSize(IPublicFolderMailboxLoggerBase logger, IAssistantRunspaceFactory powershellFactory, Guid mailboxGuid, OrganizationId organizationId, ISplitOperationState splitOperationState)
        {
            Unlimited <ByteQuantifiedSize> totalItemSize = ByteQuantifiedSize.Zero;
            string    value = string.Format("{0}\\{1}", organizationId.OrganizationalUnit.Name, mailboxGuid.ToString());
            PSCommand cmd   = new PSCommand();

            cmd.AddCommand("Get-MailboxStatistics");
            cmd.AddParameter("NoADLookup");
            cmd.AddParameter("Identity", value);
            MailboxStatistics publicFolderMailboxStatistics = null;

            PublicFolderSplitHelper.PowerShellExceptionHandler(delegate(out string originOfException, out ErrorRecord error)
            {
                error             = null;
                originOfException = "GetTotalItemSize - RunPSCommand Get-MailboxStatistics";
                IAssistantRunspaceProxy assistantRunspaceProxy = powershellFactory.CreateRunspaceForDatacenterAdmin(organizationId);
                publicFolderMailboxStatistics = assistantRunspaceProxy.RunPSCommand <MailboxStatistics>(cmd, out error, logger);
                if (error == null && publicFolderMailboxStatistics != null)
                {
                    totalItemSize = publicFolderMailboxStatistics.TotalItemSize;
                }
            }, splitOperationState);
            return(totalItemSize);
        }