comparison SilverlightValidation/SilverlightValidation.PL/Models/UserModel.cs @ 102:db05a55e3536

INPC tests added
author stevenhollidge <stevenhollidge@hotmail.com>
date Sun, 06 May 2012 12:13:29 +0100
parents d0c2cac12376
children 11994ccdc50b
comparison
equal deleted inserted replaced
101:2372846797f0 102:db05a55e3536
1 using System; 1 using System;
2 using System.ComponentModel;
3 using SilverlightValidation.Interfaces; 2 using SilverlightValidation.Interfaces;
4 3
5 namespace SilverlightValidation.Models 4 namespace SilverlightValidation.Models
6 { 5 {
7 public class UserModel : IUserModel 6 public class UserModel : IUserModel
8 { 7 {
9 public string Username { get; set; } 8 public string Username { get; set; }
9 public string Password { get; set; }
10 public string Email { get; set; } 10 public string Email { get; set; }
11 public string Password { get; set; }
12 public DateTime? DateOfBirth { get; set; } 11 public DateTime? DateOfBirth { get; set; }
13 public string Description { get; set; } 12 public string Description { get; set; }
14 13
15 public static UserModel Create() 14 private UserModel() { }
15
16 public static UserModel Create(string username = "",
17 string password = "",
18 string email = "",
19 DateTime? dateOfBirth = null,
20 string descripton = "")
16 { 21 {
17 return new UserModel() { Username = "", Email = "", Password = "", DateOfBirth = null, Description = "" }; 22 return new UserModel()
23 {
24 Username = "",
25 Password = "",
26 Email = "",
27 DateOfBirth = null,
28 Description = ""
29 };
18 } 30 }
19 31
20 public IUserModel Clone() 32 public IUserModel Clone()
21 { 33 {
22 return (UserModel) this.MemberwiseClone(); 34 return (UserModel)this.MemberwiseClone();
23 } 35 }
24 } 36 }
25 } 37 }