Mercurial > silverbladetech
annotate SilverlightValidation/SilverlightValidation.PL/Models/UserModel.cs @ 109:11994ccdc50b
First wave of tests complete
author | stevenhollidge <stevenhollidge@hotmail.com> |
---|---|
date | Sun, 06 May 2012 20:37:32 +0100 |
parents | db05a55e3536 |
children |
rev | line source |
---|---|
58 | 1 using System; |
2 using SilverlightValidation.Interfaces; | |
3 | |
4 namespace SilverlightValidation.Models | |
5 { | |
98 | 6 public class UserModel : IUserModel |
58 | 7 { |
8 public string Username { get; set; } | |
102
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
9 public string Password { get; set; } |
58 | 10 public string Email { get; set; } |
11 public DateTime? DateOfBirth { get; set; } | |
12 public string Description { get; set; } | |
13 | |
102
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
14 private UserModel() { } |
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
15 |
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
16 public static UserModel Create(string username = "", |
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
17 string password = "", |
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
18 string email = "", |
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
19 DateTime? dateOfBirth = null, |
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
20 string descripton = "") |
58 | 21 { |
102
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
22 return new UserModel() |
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
23 { |
109
11994ccdc50b
First wave of tests complete
stevenhollidge <stevenhollidge@hotmail.com>
parents:
102
diff
changeset
|
24 Username = username, |
11994ccdc50b
First wave of tests complete
stevenhollidge <stevenhollidge@hotmail.com>
parents:
102
diff
changeset
|
25 Password = password, |
11994ccdc50b
First wave of tests complete
stevenhollidge <stevenhollidge@hotmail.com>
parents:
102
diff
changeset
|
26 Email = email, |
11994ccdc50b
First wave of tests complete
stevenhollidge <stevenhollidge@hotmail.com>
parents:
102
diff
changeset
|
27 DateOfBirth = dateOfBirth, |
11994ccdc50b
First wave of tests complete
stevenhollidge <stevenhollidge@hotmail.com>
parents:
102
diff
changeset
|
28 Description = descripton |
102
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
29 }; |
58 | 30 } |
31 | |
98 | 32 public IUserModel Clone() |
58 | 33 { |
102
db05a55e3536
INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents:
98
diff
changeset
|
34 return (UserModel)this.MemberwiseClone(); |
58 | 35 } |
36 } | |
37 } |