コード例 #1
0
 public void Enable(DateTime asOfDate)
 {
     if (_changeTracker.CanToggleEnabling(asOfDate))
     {
         Enabled        = true;
         _changeTracker = _changeTracker.EnablingOn(asOfDate);
     }
 }
コード例 #2
0
 public void Enable(DateTime asOfDate)
 {
     if (this.changeTracker.CanToggleEnabling(asOfDate))
     {
         this.Enabled       = true;
         this.changeTracker = this.changeTracker.EnablingOn(asOfDate);
     }
 }
コード例 #3
0
 public void ChangeName(string firstName, string lastName, DateTime asOfDate)
 {
     if (_changeTracker.CanChangeName(asOfDate))
     {
         FirstName      = firstName;
         LastName       = lastName;
         _changeTracker = _changeTracker.NameChangedOn(asOfDate);
     }
 }
コード例 #4
0
 public void ChangeEmailAddress(string emailAddress, DateTime asOfDate)
 {
     if (_changeTracker.CanChangeEmailAddress(asOfDate) &&
         !EmailAddress.Equals(emailAddress))
     {
         EmailAddress   = emailAddress;
         _changeTracker = _changeTracker.EmailAddressChangedOn(asOfDate);
     }
 }
コード例 #5
0
 public void ChangeName(string firstName, string lastName, DateTime asOfDate)
 {
     if (this.changeTracker.CanChangeName(asOfDate))
     {
         this.FirstName     = firstName;
         this.LastName      = lastName;
         this.changeTracker = this.changeTracker.NameChangedOn(asOfDate);
     }
 }
コード例 #6
0
        public Member(
            TenantId tenantId,
            string userName,
            string firstName,
            string lastName,
            string emailAddress,
            DateTime initializedOn)
        {
            AssertionConcern.AssertArgumentNotNull(tenantId, "The tenant id must be provided.");

            TenantId       = tenantId;
            EmailAddress   = emailAddress;
            Enabled        = true;
            FirstName      = firstName;
            LastName       = lastName;
            _changeTracker = new MemberChangeTracker(initializedOn, initializedOn, initializedOn);
        }
コード例 #7
0
ファイル: Member.cs プロジェクト: nutshellit/IDDD_Samples_NET
        public Member(
            TenantId tenantId,
            string userName,
            string firstName,
            string lastName,
            string emailAddress,
            DateTime initializedOn)
        {
            AssertionConcern.AssertArgumentNotNull(tenantId, "The tenant id must be provided.");

            this.TenantId = tenantId;
            this.EmailAddress = emailAddress;
            this.Enabled = true;
            this.FirstName = firstName;
            this.LastName = lastName;
            this.changeTracker = new MemberChangeTracker(initializedOn, initializedOn, initializedOn);
        }
コード例 #8
0
ファイル: Member.cs プロジェクト: asr0/IDDD_Samples_NET
 public void ChangeEmailAddress(string emailAddress, DateTime asOfDate)
 {
     if (this.changeTracker.CanChangeEmailAddress(asOfDate) 
         && !this.EmailAddress.Equals(emailAddress))
     {
         this.EmailAddress = emailAddress;
         this.changeTracker = this.changeTracker.EmailAddressChangedOn(asOfDate);
     }
 }
コード例 #9
0
ファイル: Member.cs プロジェクト: asr0/IDDD_Samples_NET
 public void Enable(DateTime asOfDate)
 {
     if (this.changeTracker.CanToggleEnabling(asOfDate))
     {
         this.Enabled = true;
         this.changeTracker = this.changeTracker.EnablingOn(asOfDate);
     }
 }
コード例 #10
0
ファイル: Member.cs プロジェクト: asr0/IDDD_Samples_NET
 public void ChangeName(string firstName, string lastName, DateTime asOfDate)
 {
     if (this.changeTracker.CanChangeName(asOfDate))
     {
         this.FirstName = firstName;
         this.LastName = lastName;
         this.changeTracker = this.changeTracker.NameChangedOn(asOfDate);
     }
 }