PageRenderTime 43ms CodeModel.GetById 18ms 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. //===================================================================================
  17. using System.ComponentModel.DataAnnotations;
  18. using MVVM.Questionnaires.Framework;
  19. namespace MVVM.Questionnaires.Tests.TestObjects
  20. {
  21. public class TestEntity : DomainObject
  22. {
  23. private int someValue;
  24. [Range(10, 20)]
  25. public int SomeValue
  26. {
  27. set
  28. {
  29. if (this.someValue != value)
  30. {
  31. this.ValidateProperty("SomeValue", value);
  32. this.someValue = value;
  33. this.RaisePropertyChanged("SomeValue");
  34. }
  35. }
  36. }
  37. }
  38. }