コード例 #1
0
 public void Reset()
 {
     PassportInfo       = null;
     PassportValidation = PassportValidationState.None;
     PassportFaceId     = null;
     RequestedEmotion   = null;
     EmotionScores      = null;
     EmotionValidation  = EmotionValidationState.None;
     FaceValidation     = FaceComparisonValidationState.None;
     SelfieFaceId       = null;
 }
コード例 #2
0
        internal static OnboardingState Create(DynamicTableEntity entity)
        {
            var model = new OnboardingState()
            {
                ETag               = entity.ETag,
                Id                 = entity.Properties[nameof(Id)].GuidValue.Value,
                BotSessionId       = entity.Properties.TryGetValue(nameof(BotSessionId), out var botSessionProperty) ? botSessionProperty.StringValue : null,
                UserEmail          = entity.Properties[nameof(UserEmail)].StringValue,
                PassportFaceId     = entity.Properties.TryGetValue(nameof(PassportFaceId), out var passportFaceId) ? passportFaceId.StringValue : null,
                SelfieFaceId       = entity.Properties.TryGetValue(nameof(SelfieFaceId), out var selfieFaceId) ? selfieFaceId.StringValue : null,
                CreatedAt          = entity.Properties[nameof(CreatedAt)].DateTimeOffsetValue.Value,
                UpdatedAt          = entity.Properties[nameof(UpdatedAt)].DateTimeOffsetValue.Value,
                PassportValidation = entity.Properties.ReadEnum <PassportValidationState>(nameof(PassportValidation)).GetValueOrDefault(),
                PassportInfo       = entity.Properties.ReadObject <PassportInformation>(nameof(PassportInfo)),
                EmotionValidation  = entity.Properties.ReadEnum <EmotionValidationState>(nameof(EmotionValidation)).GetValueOrDefault(),
                EmotionScores      = entity.Properties.ReadObject <EmotionScores>(nameof(EmotionScores)),
                RequestedEmotion   = entity.Properties.ReadEnum <FaceEmotion>(nameof(RequestedEmotion)),
                FaceValidation     = entity.Properties.ReadEnum <FaceComparisonValidationState>(nameof(FaceValidation)).GetValueOrDefault(),
            };

            return(model);
        }
コード例 #3
0
 public void SetImageComparisonState(FaceComparisonValidationState validationState)
 {
     FaceValidation = validationState;
 }