コード例 #1
0
 public string Validaiton()
 {
     if (Question.Trim() == string.Empty)
     {
         return("Please Insert Question, Cannot be Empty");
     }
     if (ChoiceA.Trim() == string.Empty)
     {
         return("Please Insert Choice A, Cannot be Empty");
     }
     if (ChoiceB.Trim() == string.Empty)
     {
         return("Please Insert Choice A, Cannot be Empty");
     }
     if (ChoiceC.Trim() == string.Empty)
     {
         return("Please Insert Choice A, Cannot be Empty");
     }
     if (ChoiceD.Trim() == string.Empty)
     {
         return("Please Insert Choice A, Cannot be Empty");
     }
     else
     {
         return(string.Empty);
     }
 }
コード例 #2
0
        public OrderedFilmRank Clone()
        {
            var clonedSortedFilms  = SortedFilms?.Select(f => f.Clone())?.ToArray();
            var clonedIgnoredFilms = IgnoredFilms?.Select(f => f.Clone())?.ToArray();

            var clonedChoiceA = ChoiceA?.Clone();
            var clonedChoiceB = ChoiceB?.Clone();

            var cloned = new OrderedFilmRank(
                Id,
                Completed,
                clonedSortedFilms,
                clonedIgnoredFilms,
                clonedChoiceA,
                clonedChoiceB,
                ChoicesRemaining);

            return(cloned);
        }
コード例 #3
0
 internal uint Decode(RangeDecoder RangeDecoder, uint PositionState) => ChoiceA.Decode(RangeDecoder) == 0U ? LowDecoder[PositionState].Decode(RangeDecoder) : 8U + (ChoiceB.Decode(RangeDecoder) == 0U ? MidDecoder[PositionState].Decode(RangeDecoder) : (8U + HighDecoder.Decode(RangeDecoder)));