Exemple #1
0
        internal static void FillDiscoveryLogEntity(
            DiscoveryLogs discoveryLog,
            DiscoveryResultBase result,
            StartImportStatus status)
        {
            DateTime utcNow = DateTime.UtcNow;

            discoveryLog.set_FinishedTimeStamp(utcNow.AddTicks(-(utcNow.Ticks % 10000000L)));
            discoveryLog.set_BatchID(new Guid?(result.get_BatchID()));
            discoveryLog.set_ProfileID(result.get_ProfileID());
            switch (status - 4)
            {
            case 0:
                discoveryLog.set_Result(3);
                discoveryLog.set_ResultDescription(Resources2.get_DiscoveryLogResult_ImportFailed());
                discoveryLog.set_ErrorMessage(Resources2.get_DiscoveryLogError_UnknownError());
                break;

            case 1:
                discoveryLog.set_Result(4);
                discoveryLog.set_ResultDescription(Resources2.get_DiscoveryLogResult_ImportFailedLicenseExceeded());
                break;

            case 2:
                discoveryLog.set_Result(2);
                discoveryLog.set_ResultDescription(Resources2.get_DiscoveryLogResult_ImportFinished());
                break;
            }
        }
        // Token: 0x060002B1 RID: 689 RVA: 0x00010D88 File Offset: 0x0000EF88
        internal static void FillDiscoveryLogEntity(DiscoveryLogs discoveryLog, DiscoveryResultBase result, StartImportStatus status)
        {
            DateTime utcNow = DateTime.UtcNow;

            discoveryLog.FinishedTimeStamp = utcNow.AddTicks(-(utcNow.Ticks % 10000000L));
            discoveryLog.BatchID           = new Guid?(result.BatchID);
            discoveryLog.ProfileID         = result.ProfileID;
            switch (status)
            {
            case StartImportStatus.Failed:
                discoveryLog.Result            = 3;
                discoveryLog.ResultDescription = Resources2.DiscoveryLogResult_ImportFailed;
                discoveryLog.ErrorMessage      = Resources2.DiscoveryLogError_UnknownError;
                return;

            case StartImportStatus.LicenseExceeded:
                discoveryLog.Result            = 4;
                discoveryLog.ResultDescription = Resources2.DiscoveryLogResult_ImportFailedLicenseExceeded;
                return;

            case StartImportStatus.Finished:
                discoveryLog.Result            = 2;
                discoveryLog.ResultDescription = Resources2.DiscoveryLogResult_ImportFinished;
                return;

            default:
                return;
            }
        }