58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
1 using System;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
2 using System.ComponentModel;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
3 using SilverlightValidation.Interfaces;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
4
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
5 namespace SilverlightValidation.Models
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
6 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
7 public class UserModel : IUserModel, ICloneable<UserModel>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
8 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
9 public string Username { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
10 public string Email { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
11 public string Password { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
12 public DateTime? DateOfBirth { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
13 public string Description { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
14
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
15 public static UserModel Create()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
16 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
17 return new UserModel() { Username = "", Email = "", Password = "", DateOfBirth = null, Description = "" };
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
18 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
19
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
20 public UserModel Clone()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
21 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
22 return (UserModel) this.MemberwiseClone();
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
23 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
24 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
25 }
|