PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/V4/MVVM RI/MVVM.Questionnaires.Tests/TestObjects/TestEntity.cs

#
C# | 40 lines | 22 code | 2 blank | 16 comment | 2 complexity | 1bb771878df5e9802eaf22081abc56cf 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.ComponentModel.DataAnnotations;
18using MVVM.Questionnaires.Framework;
19
20namespace MVVM.Questionnaires.Tests.TestObjects
21{
22    public class TestEntity : DomainObject
23    {
24        private int someValue;
25
26        [Range(10, 20)]
27        public int SomeValue
28        {
29            set
30            {
31                if (this.someValue != value)
32                {
33                    this.ValidateProperty("SomeValue", value);
34                    this.someValue = value;
35                    this.RaisePropertyChanged("SomeValue");
36                }
37            }
38        }
39    }
40}