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
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
1 using System;
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
2 using SilverlightValidation.Interfaces;
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
3
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
4 namespace SilverlightValidation.Models
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
5 {
98
d0c2cac12376 Latest version
stevenhollidge <stevenhollidge@hotmail.com>
parents: 96
diff changeset
6 public class UserModel : IUserModel
58
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
7 {
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
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
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
10 public string Email { get; set; }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
11 public DateTime? DateOfBirth { get; set; }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
12 public string Description { get; set; }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
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
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
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
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
30 }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
31
98
d0c2cac12376 Latest version
stevenhollidge <stevenhollidge@hotmail.com>
parents: 96
diff changeset
32 public IUserModel Clone()
58
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
33 {
102
db05a55e3536 INPC tests added
stevenhollidge <stevenhollidge@hotmail.com>
parents: 98
diff changeset
34 return (UserModel)this.MemberwiseClone();
58
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
35 }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
36 }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
37 }