PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms 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//===================================================================================
17using System.Collections.Generic;
18namespace MVVM.Questionnaires.Model
19{
20    public partial class MultipleSelectionQuestion
21    {
22        internal MultipleSelectionQuestion(QuestionTemplate questionTemplate)
23            : base(questionTemplate)
24        {
25        }
26
27        public override bool IsComplete
28        {
29            get
30            {
31                return base.IsComplete && this.Response != null;
32            }
33        }
34
35        public int? MaxSelections
36        {
37            get
38            {
39                return ((MultipleSelectionQuestionTemplate)this.QuestionTemplate).MaxSelections;
40            }
41        }
42
43        public ICollection<string> Range
44        {
45            get
46            {
47                return ((MultipleSelectionQuestionTemplate)this.QuestionTemplate).Range;
48            }
49        }
50    }
51}