예제 #1
0
        public async Task <Detection> CreateDetectionAsync(BaseDetection detection, byte[] detectionImageData)
        {
            // Upload person image to known persons blob container
            var detectionImageUrl = await this.blobStorageService.UploadBytesToContainerAsync(detection.Id, detectionImageData, DetectionsContainerName);

            // Enter record in known persons table
            var detectionResult = new Detection {
                Id = detection.Id, ImageReference = detectionImageUrl, DetectionTimestamp = DateTime.UtcNow.ToString()
            };

            var success = await this.tableStorageService.CreateEntityInTableAsync <DetectionEntity>(DetectionEntity.FromDetection(detectionResult), DetectionsTableName);

            return(detectionResult);
        }
예제 #2
0
    private void HandleDetectionStrategy()
    {
        switch (detectionOption)
        {
        case DetectionOption.Custom:
            if (detectionBehaviour == null)
            {
                Debug.LogError("No BaseDetection assigned to Interactable", gameObject);
            }
            break;

        case DetectionOption.CustomAuto:
            detectionBehaviour = gameObject.GetComponent <BaseDetection>();
            if (detectionBehaviour == null)
            {
                Debug.LogError("No Script with BaseDetection on Object to be auto added to Interactable");
            }
            break;

        case DetectionOption.ConsoleLog:
            detectionBehaviour = gameObject.AddComponent <ConsoleDetection>();
            break;

        case DetectionOption.BasicHighlight:
            detectionBehaviour = gameObject.AddComponent <HighlightDetection>();
            break;

        case DetectionOption.Empty:
            detectionBehaviour = gameObject.AddComponent <EmptyDetection>();
            break;

        default:
            detectionBehaviour = gameObject.AddComponent <EmptyDetection>();
            break;
        }
    }