private Member( Guid memberId, string username, PersonalInformation personalInfo, Rank rank) : base() { this.Id = memberId; this.Username = username; this.PersonalInformation = personalInfo; this.RegistrationDate = DateTime.Now; this.Rank = rank; // default as Root of Chain this.UplineId = null; this.Position = Position.Root; this.RaiseEvent(new MemberRegistered( this.Id, this.Username, this.RegistrationDate, this.UplineId, this.Position, this.PersonalInformation, this.Rank.Id)); }
public MemberModel( Guid id, AccountNo accountNo, string username, DateTime registrationDate, Rank rank, PersonalInformation personalInformation) { this.Id = id; this.AccountNo = accountNo; this.Username = username; this.RegistrationDate = registrationDate; this.Rank = rank; this.PersonalInformation = personalInformation; }
public static Member CreateRoot( Guid memberId, string userName, PersonalInformation personalInformation, Rank rank) { return new Member(memberId, userName, personalInformation, rank); }
public static Member CreateDownLine( Guid memberId, string userName, PersonalInformation personalInformation, Rank rank, Guid uplineId, Position position) { Member member = new Member(memberId, userName, personalInformation, rank); member.RegisterDownLineOf(uplineId, position); return member; }