Class EntitySynchronizer<TEntity, TSourceEntityEto>
Inheritance
object
EntitySynchronizer<TEntity, TSourceEntityEto>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Assembly: Volo.Abp.Ddd.Domain.dll
Syntax
public abstract class EntitySynchronizer<TEntity, TSourceEntityEto> : IDistributedEventHandler<EntityCreatedEto<TSourceEntityEto>>, IDistributedEventHandler<EntityUpdatedEto<TSourceEntityEto>>, IDistributedEventHandler<EntityDeletedEto<TSourceEntityEto>>, IEventHandler, ITransientDependency where TEntity : class, IEntity
Type Parameters
| Name |
Description |
| TEntity |
|
| TSourceEntityEto |
|
Constructors
EntitySynchronizer(IObjectMapper, IRepository<TEntity>)
Declaration
public EntitySynchronizer(IObjectMapper objectMapper, IRepository<TEntity> repository)
Parameters
Properties
IgnoreEntityCreatedEvent
Declaration
protected bool IgnoreEntityCreatedEvent { get; set; }
Property Value
IgnoreEntityDeletedEvent
Declaration
protected bool IgnoreEntityDeletedEvent { get; set; }
Property Value
IgnoreEntityUpdatedEvent
Declaration
protected bool IgnoreEntityUpdatedEvent { get; set; }
Property Value
ObjectMapper
Declaration
protected IObjectMapper ObjectMapper { get; }
Property Value
Repository
Declaration
protected IRepository<TEntity> Repository { get; }
Property Value
Methods
FindLocalEntityAsync(TSourceEntityEto)
Declaration
protected abstract Task<TEntity> FindLocalEntityAsync(TSourceEntityEto eto)
Parameters
| Type |
Name |
Description |
| TSourceEntityEto |
eto |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><TEntity> |
|
HandleEventAsync(EntityCreatedEto<TSourceEntityEto>)
Declaration
public virtual Task HandleEventAsync(EntityCreatedEto<TSourceEntityEto> eventData)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
HandleEventAsync(EntityDeletedEto<TSourceEntityEto>)
Declaration
public virtual Task HandleEventAsync(EntityDeletedEto<TSourceEntityEto> eventData)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
HandleEventAsync(EntityUpdatedEto<TSourceEntityEto>)
Declaration
public virtual Task HandleEventAsync(EntityUpdatedEto<TSourceEntityEto> eventData)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
IsEtoNewerAsync(TSourceEntityEto, TEntity)
Declaration
protected virtual Task<bool> IsEtoNewerAsync(TSourceEntityEto eto, TEntity localEntity)
Parameters
| Type |
Name |
Description |
| TSourceEntityEto |
eto |
|
| TEntity |
localEntity |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><bool> |
|
MapToEntityAsync(TSourceEntityEto, TEntity)
Declaration
protected virtual Task MapToEntityAsync(TSourceEntityEto eto, TEntity localEntity)
Parameters
| Type |
Name |
Description |
| TSourceEntityEto |
eto |
|
| TEntity |
localEntity |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
MapToEntityAsync(TSourceEntityEto)
Declaration
protected virtual Task<TEntity> MapToEntityAsync(TSourceEntityEto eto)
Parameters
| Type |
Name |
Description |
| TSourceEntityEto |
eto |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><TEntity> |
|
TryCreateOrUpdateEntityAsync(TSourceEntityEto)
Declaration
[UnitOfWork]
protected virtual Task<bool> TryCreateOrUpdateEntityAsync(TSourceEntityEto eto)
Parameters
| Type |
Name |
Description |
| TSourceEntityEto |
eto |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><bool> |
|
TryDeleteEntityAsync(TSourceEntityEto)
Declaration
[UnitOfWork]
protected virtual Task<bool> TryDeleteEntityAsync(TSourceEntityEto eto)
Parameters
| Type |
Name |
Description |
| TSourceEntityEto |
eto |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><bool> |
|
Implements
Extension Methods