view SilverlightValidation/SilverlightValidation.PL/Models/UserModel.cs @ 104:4cfdecdb1d12

Silverlight Glimpse now lives on codeplex, StockDisplay lives on Google code
author stevenhollidge <stevenhollidge@hotmail.com>
date Sun, 06 May 2012 12:16:38 +0100
parents db05a55e3536
children 11994ccdc50b
line wrap: on
line source

using System;
using SilverlightValidation.Interfaces;

namespace SilverlightValidation.Models
{
    public class UserModel : IUserModel
    {
        public string Username { get; set; }
        public string Password { get; set; }
        public string Email { get; set; }
        public DateTime? DateOfBirth { get; set; }
        public string Description { get; set; }

        private UserModel() { }

        public static UserModel Create(string username = "",
                                        string password = "",
                                        string email = "",
                                        DateTime? dateOfBirth = null,
                                        string descripton = "")
        {
            return new UserModel()
                       {
                           Username = "",
                           Password = "",
                           Email = "",
                           DateOfBirth = null,
                           Description = ""
                       };
        }

        public IUserModel Clone()
        {
            return (UserModel)this.MemberwiseClone();
        }
    }
}