PageRenderTime 26ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/V4/MVVM RI/MVVM.Questionnaires/Model/MultipleSelectionQuestion.cs

#
C# | 51 lines | 32 code | 3 blank | 16 comment | 2 complexity | 04848b318320d5c0685878f757325f69 MD5 | raw file
  1. //===================================================================================
  2. // Microsoft patterns & practices
  3. // Composite Application Guidance for Windows Presentation Foundation and Silverlight
  4. //===================================================================================
  5. // Copyright (c) Microsoft Corporation. All rights reserved.
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
  7. // OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
  8. // LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  9. // FITNESS FOR A PARTICULAR PURPOSE.
  10. //===================================================================================
  11. // The example companies, organizations, products, domain names,
  12. // e-mail addresses, logos, people, places, and events depicted
  13. // herein are fictitious. No association with any real company,
  14. // organization, product, domain name, email address, logo, person,
  15. // places, or events is intended or should be inferred.
  16. //===================================================================================
  17. using System.Collections.Generic;
  18. namespace MVVM.Questionnaires.Model
  19. {
  20. public partial class MultipleSelectionQuestion
  21. {
  22. internal MultipleSelectionQuestion(QuestionTemplate questionTemplate)
  23. : base(questionTemplate)
  24. {
  25. }
  26. public override bool IsComplete
  27. {
  28. get
  29. {
  30. return base.IsComplete && this.Response != null;
  31. }
  32. }
  33. public int? MaxSelections
  34. {
  35. get
  36. {
  37. return ((MultipleSelectionQuestionTemplate)this.QuestionTemplate).MaxSelections;
  38. }
  39. }
  40. public ICollection<string> Range
  41. {
  42. get
  43. {
  44. return ((MultipleSelectionQuestionTemplate)this.QuestionTemplate).Range;
  45. }
  46. }
  47. }
  48. }