Пример #1
0
        internal static RequestStatisticsBase CreateRequestStatistics(Type t, RequestJobXML rj, bool acceptBase)
        {
            RequestStatisticsBase requestStatisticsBase = null;

            if (t.Equals(typeof(MoveRequestStatistics)))
            {
                requestStatisticsBase = new MoveRequestStatistics(rj);
            }
            else if (t.Equals(typeof(MergeRequestStatistics)))
            {
                requestStatisticsBase = new MergeRequestStatistics(rj);
            }
            else if (t.Equals(typeof(MailboxImportRequestStatistics)))
            {
                requestStatisticsBase = new MailboxImportRequestStatistics(rj);
            }
            else if (t.Equals(typeof(MailboxExportRequestStatistics)))
            {
                requestStatisticsBase = new MailboxExportRequestStatistics(rj);
            }
            else if (t.Equals(typeof(MailboxRelocationRequestStatistics)))
            {
                requestStatisticsBase = new MailboxRelocationRequestStatistics(rj);
            }
            else if (t.Equals(typeof(MailboxRestoreRequestStatistics)))
            {
                requestStatisticsBase = new MailboxRestoreRequestStatistics(rj);
            }
            else if (t.Equals(typeof(PublicFolderMoveRequestStatistics)))
            {
                requestStatisticsBase = new PublicFolderMoveRequestStatistics(rj);
            }
            else if (t.Equals(typeof(PublicFolderMigrationRequestStatistics)))
            {
                requestStatisticsBase = new PublicFolderMigrationRequestStatistics(rj);
            }
            else if (t.Equals(typeof(PublicFolderMailboxMigrationRequestStatistics)))
            {
                requestStatisticsBase = new PublicFolderMailboxMigrationRequestStatistics(rj);
            }
            else if (t.Equals(typeof(SyncRequestStatistics)))
            {
                requestStatisticsBase = new SyncRequestStatistics(rj);
            }
            else if (t.Equals(typeof(FolderMoveRequestStatistics)))
            {
                requestStatisticsBase = new FolderMoveRequestStatistics(rj);
            }
            else if (acceptBase && t.Equals(typeof(RequestStatisticsBase)))
            {
                return(RequestJobProvider.CreateRequestStatistics(rj));
            }
            if (requestStatisticsBase != null)
            {
                rj.Retire();
            }
            return(requestStatisticsBase);
        }
Пример #2
0
        internal static RequestStatisticsBase CreateRequestStatistics(RequestJobXML rj)
        {
            RequestStatisticsBase requestStatisticsBase = null;

            switch (rj.RequestType)
            {
            case MRSRequestType.Move:
                requestStatisticsBase = new MoveRequestStatistics(rj);
                break;

            case MRSRequestType.Merge:
                requestStatisticsBase = new MergeRequestStatistics(rj);
                break;

            case MRSRequestType.MailboxImport:
                requestStatisticsBase = new MailboxImportRequestStatistics(rj);
                break;

            case MRSRequestType.MailboxExport:
                requestStatisticsBase = new MailboxExportRequestStatistics(rj);
                break;

            case MRSRequestType.MailboxRestore:
                requestStatisticsBase = new MailboxRestoreRequestStatistics(rj);
                break;

            case MRSRequestType.PublicFolderMove:
                requestStatisticsBase = new PublicFolderMoveRequestStatistics(rj);
                break;

            case MRSRequestType.PublicFolderMigration:
                requestStatisticsBase = new PublicFolderMigrationRequestStatistics(rj);
                break;

            case MRSRequestType.Sync:
                requestStatisticsBase = new SyncRequestStatistics(rj);
                break;

            case MRSRequestType.MailboxRelocation:
                requestStatisticsBase = new MailboxRelocationRequestStatistics(rj);
                break;

            case MRSRequestType.FolderMove:
                requestStatisticsBase = new FolderMoveRequestStatistics(rj);
                break;

            case MRSRequestType.PublicFolderMailboxMigration:
                requestStatisticsBase = new PublicFolderMailboxMigrationRequestStatistics(rj);
                break;
            }
            if (requestStatisticsBase != null)
            {
                rj.Retire();
            }
            return(requestStatisticsBase);
        }
Пример #3
0
        internal static RequestStatisticsBase CreateRequestStatistics(TransactionalRequestJob rj)
        {
            RequestStatisticsBase result = null;

            switch (rj.RequestType)
            {
            case MRSRequestType.Move:
                result = new MoveRequestStatistics(rj);
                break;

            case MRSRequestType.Merge:
                result = new MergeRequestStatistics(rj);
                break;

            case MRSRequestType.MailboxImport:
                result = new MailboxImportRequestStatistics(rj);
                break;

            case MRSRequestType.MailboxExport:
                result = new MailboxExportRequestStatistics(rj);
                break;

            case MRSRequestType.MailboxRestore:
                result = new MailboxRestoreRequestStatistics(rj);
                break;

            case MRSRequestType.PublicFolderMove:
                result = new PublicFolderMoveRequestStatistics(rj);
                break;

            case MRSRequestType.PublicFolderMigration:
                result = new PublicFolderMigrationRequestStatistics(rj);
                break;

            case MRSRequestType.Sync:
                result = new SyncRequestStatistics(rj);
                break;

            case MRSRequestType.MailboxRelocation:
                result = new MailboxRelocationRequestStatistics(rj);
                break;

            case MRSRequestType.FolderMove:
                result = new FolderMoveRequestStatistics(rj);
                break;

            case MRSRequestType.PublicFolderMailboxMigration:
                result = new PublicFolderMailboxMigrationRequestStatistics(rj);
                break;
            }
            return(result);
        }
 public PublicFolderMailboxMigrationRequestIdParameter(PublicFolderMailboxMigrationRequestStatistics requestStats) : base(requestStats)
 {
 }