Ejemplo n.º 1
0
        internal static void LogImageAnalysisResultCode(ImageAnalysisResult resultCode, ImageAnalysisLogData logData)
        {
            AttachmentProcessingLogger.Initialize();
            switch (resultCode)
            {
            case ImageAnalysisResult.ThumbnailSuccess:
                AttachmentProcessingLogger.LogEvent("StorageAttachmentImageAnalysis", "ThumbnailResult", "Success", "ThumbnailOperationTime", logData.operationTimeMs.ToString());
                AttachmentProcessingLogger.LogEvent("StorageAttachmentImageAnalysis", "ThumbnailSize", logData.thumbnailSize.ToString());
                AttachmentProcessingLogger.LogEvent("StorageAttachmentImageAnalysis", "ThumbnailWidth", logData.thumbnailWidth.ToString(), "ThumbnailHeight", logData.thumbnailHeight.ToString());
                return;

            case ImageAnalysisResult.SalientRegionSuccess:
                AttachmentProcessingLogger.LogEvent("StorageAttachmentImageAnalysis", "SalientRegionResult", "Success", "SalientRegionOperationTime", logData.operationTimeMs.ToString());
                return;

            case ImageAnalysisResult.UnknownFailure:
                AttachmentProcessingLogger.LogEvent("StorageAttachmentImageAnalysis", "Failure", logData.operationTimeMs.ToString());
                return;

            case ImageAnalysisResult.ImageTooSmallForAnalysis:
                AttachmentProcessingLogger.LogEvent("StorageAttachmentImageAnalysis", "ThumbnailResult", "ImageTooSmall", "ThumbnailOperationTime", logData.operationTimeMs.ToString());
                return;

            case ImageAnalysisResult.UnableToPerformSalientRegionAnalysis:
                AttachmentProcessingLogger.LogEvent("StorageAttachmentImageAnalysis", "SalientRegionResult", "Failure", "SalientRegionOperationTime", logData.operationTimeMs.ToString());
                return;

            case ImageAnalysisResult.ImageTooBigForAnalysis:
                AttachmentProcessingLogger.LogEvent("StorageAttachmentImageAnalysis", "ThumbnailResult", "ImageTooBigForAnalysis", "ImageSize", logData.thumbnailSize.ToString());
                return;

            default:
                return;
            }
        }
Ejemplo n.º 2
0
 internal static void LogImageAnalysisException(string callStack)
 {
     AttachmentProcessingLogger.Initialize();
     AttachmentProcessingLogger.LogEvent("StorageAttachmentImageAnalysis", "ThumbnailException", callStack);
 }