Class DataSourceHandler
A data source handler.
Inheritance
System.Object
DataSourceHandler
Inherited Members
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 DataSourceHandler : MessageHandlerBase<DataSourceMessage, DataSourceResponseMessage>, ILoggable, IMessageHandler<DataSourceMessage>, IMessageHandler, IDisposable
Constructors
| Improve this Doc View SourceDataSourceHandler(IExportFactory<IDataSpace>, IDataSourceService, ITypeResolver, IProjectedTypeResolver)
Initializes a new instance of the DataSourceHandler class.
Declaration
public DataSourceHandler(IExportFactory<IDataSpace> dataSpaceFactory, IDataSourceService dataSourceService, ITypeResolver typeResolver, IProjectedTypeResolver projectedTypeResolver)
Parameters
Type | Name | Description |
---|---|---|
IExportFactory<IDataSpace> | dataSpaceFactory | The data space factory. |
IDataSourceService | dataSourceService | The data source service. |
ITypeResolver | typeResolver | The type resolver. |
IProjectedTypeResolver | projectedTypeResolver | The projected type resolver. |
Methods
| Improve this Doc View SourceProcessAsync(DataSourceMessage, IMessagingContext, CancellationToken)
Processes the provided message asynchronously and returns a response promise.
Declaration
public override Task<DataSourceResponseMessage> ProcessAsync(DataSourceMessage message, IMessagingContext context, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
DataSourceMessage | 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<DataSourceResponseMessage> | The response promise. |
Overrides
Kephas.Messaging.MessageHandlerBase<Kephas.Data.Endpoints.DataSourceMessage, Kephas.Data.Endpoints.DataSourceResponseMessage>.ProcessAsync(Kephas.Data.Endpoints.DataSourceMessage, Kephas.Messaging.IMessagingContext, System.Threading.CancellationToken)
|
Improve this Doc
View Source
ResolveEntityType(String)
Resolve the entity type.
Declaration
protected virtual ITypeInfo ResolveEntityType(string entityTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | entityTypeName | Name of the entity type. |
Returns
Type | Description |
---|---|
ITypeInfo | An ITypeInfo. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the requested operation is invalid. |
ResolveProjectedEntityType(ITypeInfo)
Resolve the projected entity type.
Declaration
protected virtual ITypeInfo ResolveProjectedEntityType(ITypeInfo entityType)
Parameters
Type | Name | Description |
---|---|---|
ITypeInfo | entityType | Type of the entity. |
Returns
Type | Description |
---|---|
ITypeInfo | An ITypeInfo. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the requested operation is invalid. |
ResolveProperty(ITypeInfo, String)
Resolve property information.
Declaration
protected virtual IPropertyInfo ResolveProperty(ITypeInfo entityType, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
ITypeInfo | entityType | Type of the entity. |
System.String | propertyName | Name of the property. |
Returns
Type | Description |
---|---|
IPropertyInfo | An IPropertyInfo. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the requested operation is invalid. |
Implements
System.IDisposable