Class EnumDataSourceProvider
A data source provider for enumeration based properties.
Inheritance
System.Object
EnumDataSourceProvider
Implements
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.DataSources.Providers
Assembly: Kephas.Data.dll
Syntax
[ProcessingPriority(Priority.Low)]
public class EnumDataSourceProvider : IDataSourceProvider
Methods
| Improve this Doc View SourceCanHandle(IPropertyInfo, IDataSourceContext)
Determines whether the provider can handle the list source request.
Declaration
public bool CanHandle(IPropertyInfo propertyInfo, IDataSourceContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyInfo | propertyInfo | Information describing the property. |
| IDataSourceContext | context | The context. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if we can handle, false if not. |
GetDataSourceAsync(IPropertyInfo, IDataSourceContext, CancellationToken)
Gets the data source asynchronously.
Declaration
public Task<IEnumerable<object>> GetDataSourceAsync(IPropertyInfo propertyInfo, IDataSourceContext context, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyInfo | propertyInfo | Information describing the property. |
| IDataSourceContext | context | The context. |
| System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.Object>> | A promise of the data source. |