public Category(string name, string id, Theme theme, List<Quiz> quizzes, bool solved) { this.name = name; this.id = id; this.theme = theme; this.quizzes = quizzes; scores = new int[quizzes.Count]; this.solved = solved; }
public Category (string name, string id, Theme theme, List<Quiz> quizzes, bool solved) { Name = name; Id = id; Theme = theme; Quizzes = quizzes; Scores = new int[quizzes.Count]; Solved = solved; }
public Category (string name, string id, Theme theme, List<Quiz> quizzes, int[] scores, bool solved) { Name = name; Id = id; Theme = theme; if (quizzes.Count == scores.Length) { Quizzes = quizzes; Scores = scores; } else { throw new InvalidOperationException ("Quizzes and scores must have the same length"); } Solved = solved; }
protected Category(Parcel inObj) { name = inObj.ReadString(); id = inObj.ReadString(); theme = (Theme)(System.Enum.GetValues(typeof(Theme)).GetValue(inObj.ReadInt())); quizzes = new List<Quiz>(); inObj.ReadTypedList(quizzes, Quiz.InitializeCreator()); scores = inObj.CreateIntArray(); solved = ParcelableHelper.ReadBoolean(inObj); }