annotate SilverlightValidation/SilverlightValidation.PL/Models/UserModel.cs @ 97:1adc1ae981ea

Tests added to SilverlightValidation.Tests
author stevenhollidge <stevenhollidge@hotmail.com>
date Sat, 05 May 2012 16:39:00 +0100
parents 188f8b366e87
children d0c2cac12376
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 System.ComponentModel;
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
3 using SilverlightValidation.Interfaces;
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
4
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
5 namespace SilverlightValidation.Models
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
6 {
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
7 public class UserModel : IUserModel, ICloneable<UserModel>
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
8 {
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
9 public string Username { get; set; }
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 string Password { get; set; }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
12 public DateTime? DateOfBirth { get; set; }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
13 public string Description { get; set; }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
14
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
15 public static UserModel Create()
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
16 {
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
17 return new UserModel() { Username = "", Email = "", Password = "", DateOfBirth = null, Description = "" };
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
18 }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
19
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
20 public UserModel Clone()
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
21 {
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
22 return (UserModel) this.MemberwiseClone();
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
23 }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
24 }
241e2f22ed3c Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
25 }