Mercurial > silverbladetech
annotate SilverlightValidation/SilverlightValidation.PL/Models/UserModel.cs @ 114:e51a6af1c98d
working version
author | adminsh@apollo |
---|---|
date | Sat, 19 May 2012 16:53:34 +0100 |
parents | 11994ccdc50b |
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 } |