コード例 #1
0
ファイル: Member.cs プロジェクト: Daskul/BIG
        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));
        }
コード例 #2
0
ファイル: MemberModel.cs プロジェクト: Daskul/BIG
 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;
 }
コード例 #3
0
ファイル: Member.cs プロジェクト: Daskul/BIG
 public static Member CreateRoot(
     Guid memberId, 
     string userName, 
     PersonalInformation personalInformation, 
     Rank rank)
 {
     return new Member(memberId, userName, personalInformation, rank);
 }
コード例 #4
0
ファイル: Member.cs プロジェクト: Daskul/BIG
        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;
        }