public LearnerState Build()
        {
            var categoryPerQuantity = CategoryPerQuantity.ToImmutableDictionary();
            var wordPerQuantity     = WordPerQuantity.ToImmutableDictionary();
            var categoryPerWords    = CategoryPerWords.ToImmutableDictionary(x => x.Key,
                                                                             x => x.Value.ToImmutableDictionary());

            return(new LearnerState(categoryPerQuantity, wordPerQuantity, categoryPerWords));
        }
예제 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CategoryPerQuantity?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (WordPerQuantity?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (CategoryPerWords?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }