Show / Hide Table of Contents

Class PersistChangesHandler

A persist changes handler.

Inheritance
System.Object
Loggable
MessageHandlerBase<PersistChangesMessage, PersistChangesResponseMessage>
PersistChangesHandler
Implements
ILoggable
IMessageHandler<PersistChangesMessage>
IMessageHandler
System.IDisposable
Inherited Members
MessageHandlerBase<PersistChangesMessage, PersistChangesResponseMessage>.ProcessAsync(PersistChangesMessage, IMessagingContext, CancellationToken)
MessageHandlerBase<PersistChangesMessage, PersistChangesResponseMessage>.IMessageHandler<PersistChangesMessage>.ProcessAsync(PersistChangesMessage, IMessagingContext, CancellationToken)
MessageHandlerBase<PersistChangesMessage, PersistChangesResponseMessage>.IMessageHandler.ProcessAsync(IMessage, IMessagingContext, CancellationToken)
MessageHandlerBase<PersistChangesMessage, PersistChangesResponseMessage>.Dispose()
MessageHandlerBase<PersistChangesMessage, PersistChangesResponseMessage>.Dispose(Boolean)
Loggable.Logger
Loggable.GetLogger()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data.Endpoints
Assembly: Kephas.Data.Endpoints.dll
Syntax
public class PersistChangesHandler : MessageHandlerBase<PersistChangesMessage, PersistChangesResponseMessage>, ILoggable, IMessageHandler<PersistChangesMessage>, IMessageHandler, IDisposable

Constructors

| Improve this Doc View Source

PersistChangesHandler(IDataConversionService, IProjectedTypeResolver, IExportFactory<IDataSpace>)

Initializes a new instance of the PersistChangesHandler class.

Declaration
public PersistChangesHandler(IDataConversionService dataConversionService, IProjectedTypeResolver projectedTypeResolver, IExportFactory<IDataSpace> dataSpaceFactory)
Parameters
Type Name Description
IDataConversionService dataConversionService

The data conversion service.

IProjectedTypeResolver projectedTypeResolver

The projected type resolver.

IExportFactory<IDataSpace> dataSpaceFactory

The data space factory.

Methods

| Improve this Doc View Source

CreateDataConversionContextForResponse(IDataSpace)

Creates data conversion context for response.

Declaration
protected virtual IDataConversionContext CreateDataConversionContextForResponse(IDataSpace dataSpace)
Parameters
Type Name Description
IDataSpace dataSpace

Manager for data context.

Returns
Type Description
IDataConversionContext

The new data conversion context for response.

| Improve this Doc View Source

GetClientTypeName(Object)

Gets the type name of the client entity.

Declaration
protected virtual string GetClientTypeName(object clientEntity)
Parameters
Type Name Description
System.Object clientEntity

The client entity.

Returns
Type Description
System.String

The deleted entity.

| Improve this Doc View Source

PostPersistChangesAsync(PersistChangesResponseMessage, IList<(DtoEntityEntry dtoEntityEntry, Object entity)>, IDataSpace, CancellationToken)

Post persist changes asynchronously.

Declaration
protected virtual Task PostPersistChangesAsync(PersistChangesResponseMessage response, IList<(DtoEntityEntry dtoEntityEntry, object entity)> mappings, IDataSpace dataSpace, CancellationToken cancellationToken)
Parameters
Type Name Description
PersistChangesResponseMessage response

The response.

System.Collections.Generic.IList<System.ValueTuple<DtoEntityEntry, System.Object>> mappings

The mappings.

IDataSpace dataSpace

Manager for data context.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

PrePersistChangesAsync(PersistChangesResponseMessage, IList<(DtoEntityEntry clientEntry, Object entity)>, IDataSpace, CancellationToken)

Pre persist changes asynchronously.

Declaration
protected virtual Task PrePersistChangesAsync(PersistChangesResponseMessage response, IList<(DtoEntityEntry clientEntry, object entity)> mappings, IDataSpace dataSpace, CancellationToken cancellationToken)
Parameters
Type Name Description
PersistChangesResponseMessage response

The response.

System.Collections.Generic.IList<System.ValueTuple<DtoEntityEntry, System.Object>> mappings

The mappings.

IDataSpace dataSpace

Manager for data context.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

ProcessAsync(PersistChangesMessage, IMessagingContext, CancellationToken)

Processes the provided message asynchronously and returns a response promise.

Declaration
public override Task<PersistChangesResponseMessage> ProcessAsync(PersistChangesMessage message, IMessagingContext context, CancellationToken token)
Parameters
Type Name Description
PersistChangesMessage message

The message to be handled.

IMessagingContext context

The processing context.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<PersistChangesResponseMessage>

The response promise.

Overrides
Kephas.Messaging.MessageHandlerBase<Kephas.Data.Endpoints.PersistChangesMessage, Kephas.Data.Endpoints.PersistChangesResponseMessage>.ProcessAsync(Kephas.Data.Endpoints.PersistChangesMessage, Kephas.Messaging.IMessagingContext, System.Threading.CancellationToken)

Implements

ILoggable
IMessageHandler<TMessage>
IMessageHandler
System.IDisposable

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX