|
|
@ -25,22 +25,12 @@ public abstract class BasicAggregateRoot : Entity, |
|
|
|
|
|
|
|
|
public virtual void ClearLocalEvents() |
|
|
public virtual void ClearLocalEvents() |
|
|
{ |
|
|
{ |
|
|
if (_localEvents == null) |
|
|
_localEvents?.Clear(); |
|
|
{ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_localEvents.Clear(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public virtual void ClearDistributedEvents() |
|
|
public virtual void ClearDistributedEvents() |
|
|
{ |
|
|
{ |
|
|
if (_distributedEvents == null) |
|
|
_distributedEvents?.Clear(); |
|
|
{ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_distributedEvents.Clear(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected virtual void AddLocalEvent(object eventData) |
|
|
protected virtual void AddLocalEvent(object eventData) |
|
|
@ -87,22 +77,12 @@ public abstract class BasicAggregateRoot<TKey> : Entity<TKey>, |
|
|
|
|
|
|
|
|
public virtual void ClearLocalEvents() |
|
|
public virtual void ClearLocalEvents() |
|
|
{ |
|
|
{ |
|
|
if (_localEvents == null) |
|
|
_localEvents?.Clear(); |
|
|
{ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_localEvents.Clear(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public virtual void ClearDistributedEvents() |
|
|
public virtual void ClearDistributedEvents() |
|
|
{ |
|
|
{ |
|
|
if (_distributedEvents == null) |
|
|
_distributedEvents?.Clear(); |
|
|
{ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_distributedEvents.Clear(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected virtual void AddLocalEvent(object eventData) |
|
|
protected virtual void AddLocalEvent(object eventData) |
|
|
|